Z3
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Data Fields
Fixedpoint Class Reference

Fixedpoint. More...

+ Inheritance diagram for Fixedpoint:

Public Member Functions

def __init__
 
def __del__
 
def set
 
def help
 
def param_descrs
 
def assert_exprs
 
def add
 
def append
 
def insert
 
def add_rule
 
def rule
 
def fact
 
def query
 
def push
 
def pop
 
def update_rule
 
def get_answer
 
def get_num_levels
 
def get_cover_delta
 
def add_cover
 
def register_relation
 
def set_predicate_representation
 
def parse_string
 
def parse_file
 
def get_rules
 
def get_assertions
 
def __repr__
 
def sexpr
 
def to_string
 
def statistics
 
def reason_unknown
 
def declare_var
 
def abstract
 
- Public Member Functions inherited from Z3PPObject
def use_pp
 

Data Fields

 ctx
 
 fixedpoint
 
 vars
 

Detailed Description

Fixedpoint.

Fixedpoint API provides methods for solving with recursive predicates

Definition at line 6091 of file z3py.py.

Constructor & Destructor Documentation

def __init__ (   self,
  fixedpoint = None,
  ctx = None 
)

Definition at line 6094 of file z3py.py.

6095  def __init__(self, fixedpoint=None, ctx=None):
6096  assert fixedpoint == None or ctx != None
6097  self.ctx = _get_ctx(ctx)
6098  self.fixedpoint = None
6099  if fixedpoint == None:
6100  self.fixedpoint = Z3_mk_fixedpoint(self.ctx.ref())
6101  else:
6102  self.fixedpoint = fixedpoint
6103  Z3_fixedpoint_inc_ref(self.ctx.ref(), self.fixedpoint)
6104  self.vars = []
def __init__
Definition: z3py.py:6094
void Z3_API Z3_fixedpoint_inc_ref(__in Z3_context c, __in Z3_fixedpoint d)
Increment the reference counter of the given fixedpoint context.
Z3_fixedpoint Z3_API Z3_mk_fixedpoint(__in Z3_context c)
Create a new fixedpoint context.
def __del__ (   self)

Definition at line 6105 of file z3py.py.

6106  def __del__(self):
6107  if self.fixedpoint != None:
6108  Z3_fixedpoint_dec_ref(self.ctx.ref(), self.fixedpoint)
void Z3_API Z3_fixedpoint_dec_ref(__in Z3_context c, __in Z3_fixedpoint d)
Decrement the reference counter of the given fixedpoint context.

Member Function Documentation

def __repr__ (   self)
Return a formatted string with all added rules and constraints.

Definition at line 6269 of file z3py.py.

6270  def __repr__(self):
6271  """Return a formatted string with all added rules and constraints."""
6272  return self.sexpr()
def __repr__
Definition: z3py.py:6269
def abstract (   self,
  fml,
  is_forall = True 
)

Definition at line 6305 of file z3py.py.

Referenced by Fixedpoint.add_rule(), Fixedpoint.assert_exprs(), Fixedpoint.query(), and Fixedpoint.update_rule().

6306  def abstract(self, fml, is_forall=True):
6307  if self.vars == []:
6308  return fml
6309  if is_forall:
6310  return ForAll(self.vars, fml)
6311  else:
6312  return Exists(self.vars, fml)
def Exists
Definition: z3py.py:1808
def ForAll
Definition: z3py.py:1789
def abstract
Definition: z3py.py:6305
def add (   self,
  args 
)
Assert constraints as background axioms for the fixedpoint solver. Alias for assert_expr.

Definition at line 6137 of file z3py.py.

6138  def add(self, *args):
6139  """Assert constraints as background axioms for the fixedpoint solver. Alias for assert_expr."""
6140  self.assert_exprs(*args)
def assert_exprs
Definition: z3py.py:6123
def add_cover (   self,
  level,
  predicate,
  property 
)
Add property to predicate for the level'th unfolding. -1 is treated as infinity (infinity)

Definition at line 6233 of file z3py.py.

6234  def add_cover(self, level, predicate, property):
6235  """Add property to predicate for the level'th unfolding. -1 is treated as infinity (infinity)"""
6236  Z3_fixedpoint_add_cover(self.ctx.ref(), self.fixedpoint, level, predicate.ast, property.ast)
def add_cover
Definition: z3py.py:6233
void Z3_API Z3_fixedpoint_add_cover(Z3_context c, Z3_fixedpoint d, int level, Z3_func_decl pred, Z3_ast property)
Add property about the predicate pred. Add a property of predicate pred at level. It gets pushed forw...
def add_rule (   self,
  head,
  body = None,
  name = None 
)
Assert rules defining recursive predicates to the fixedpoint solver.
>>> a = Bool('a')
>>> b = Bool('b')
>>> s = Fixedpoint()
>>> s.register_relation(a.decl())
>>> s.register_relation(b.decl())
>>> s.fact(a)
>>> s.rule(b, a)
>>> s.query(b)
sat

Definition at line 6149 of file z3py.py.

Referenced by Fixedpoint.fact(), and Fixedpoint.rule().

6150  def add_rule(self, head, body = None, name = None):
6151  """Assert rules defining recursive predicates to the fixedpoint solver.
6152  >>> a = Bool('a')
6153  >>> b = Bool('b')
6154  >>> s = Fixedpoint()
6155  >>> s.register_relation(a.decl())
6156  >>> s.register_relation(b.decl())
6157  >>> s.fact(a)
6158  >>> s.rule(b, a)
6159  >>> s.query(b)
6160  sat
6161  """
6162  if name == None:
6163  name = ""
6164  name = to_symbol(name, self.ctx)
6165  if body == None:
6166  head = self.abstract(head)
6167  Z3_fixedpoint_add_rule(self.ctx.ref(), self.fixedpoint, head.as_ast(), name)
6168  else:
6169  body = _get_args(body)
6170  f = self.abstract(Implies(And(body),head))
6171  Z3_fixedpoint_add_rule(self.ctx.ref(), self.fixedpoint, f.as_ast(), name)
def Implies
Definition: z3py.py:1413
def And
Definition: z3py.py:1468
def abstract
Definition: z3py.py:6305
void Z3_API Z3_fixedpoint_add_rule(__in Z3_context c, __in Z3_fixedpoint d, __in Z3_ast rule, __in Z3_symbol name)
Add a universal Horn clause as a named rule. The horn_rule should be of the form: ...
def add_rule
Definition: z3py.py:6149
def to_symbol
Definition: z3py.py:94
def append (   self,
  args 
)
Assert constraints as background axioms for the fixedpoint solver. Alias for assert_expr.

Definition at line 6141 of file z3py.py.

6142  def append(self, *args):
6143  """Assert constraints as background axioms for the fixedpoint solver. Alias for assert_expr."""
6144  self.assert_exprs(*args)
def assert_exprs
Definition: z3py.py:6123
def assert_exprs (   self,
  args 
)
Assert constraints as background axioms for the fixedpoint solver.

Definition at line 6123 of file z3py.py.

Referenced by Fixedpoint.add(), Fixedpoint.append(), and Fixedpoint.insert().

6124  def assert_exprs(self, *args):
6125  """Assert constraints as background axioms for the fixedpoint solver."""
6126  args = _get_args(args)
6127  s = BoolSort(self.ctx)
6128  for arg in args:
6129  if isinstance(arg, Goal) or isinstance(arg, AstVector):
6130  for f in arg:
6131  f = self.abstract(f)
6132  Z3_fixedpoint_assert(self.ctx.ref(), self.fixedpoint, f.as_ast())
6133  else:
6134  arg = s.cast(arg)
6135  arg = self.abstract(arg)
6136  Z3_fixedpoint_assert(self.ctx.ref(), self.fixedpoint, arg.as_ast())
void Z3_API Z3_fixedpoint_assert(__in Z3_context c, __in Z3_fixedpoint d, __in Z3_ast axiom)
Assert a constraint to the fixedpoint context.
def BoolSort
Definition: z3py.py:1325
def abstract
Definition: z3py.py:6305
def assert_exprs
Definition: z3py.py:6123
def declare_var (   self,
  vars 
)
Add variable or several variables.
The added variable or variables will be bound in the rules
and queries

Definition at line 6296 of file z3py.py.

6297  def declare_var(self, *vars):
6298  """Add variable or several variables.
6299  The added variable or variables will be bound in the rules
6300  and queries
6301  """
6302  vars = _get_args(vars)
6303  for v in vars:
6304  self.vars += [v]
def declare_var
Definition: z3py.py:6296
def fact (   self,
  head,
  name = None 
)
Assert facts defining recursive predicates to the fixedpoint solver. Alias for add_rule.

Definition at line 6176 of file z3py.py.

6177  def fact(self, head, name = None):
6178  """Assert facts defining recursive predicates to the fixedpoint solver. Alias for add_rule."""
6179  self.add_rule(head, None, name)
def add_rule
Definition: z3py.py:6149
def get_answer (   self)
Retrieve answer from last query call.

Definition at line 6219 of file z3py.py.

6220  def get_answer(self):
6221  """Retrieve answer from last query call."""
6222  r = Z3_fixedpoint_get_answer(self.ctx.ref(), self.fixedpoint)
6223  return _to_expr_ref(r, self.ctx)
def get_answer
Definition: z3py.py:6219
Z3_ast Z3_API Z3_fixedpoint_get_answer(__in Z3_context c, __in Z3_fixedpoint d)
Retrieve a formula that encodes satisfying answers to the query.
def get_assertions (   self)
retrieve assertions that have been added to fixedpoint context

Definition at line 6265 of file z3py.py.

6266  def get_assertions(self):
6267  """retrieve assertions that have been added to fixedpoint context"""
6268  return AstVector(Z3_fixedpoint_get_assertions(self.ctx.ref(), self.fixedpoint), self.ctx)
Z3_ast_vector Z3_API Z3_fixedpoint_get_assertions(__in Z3_context c, __in Z3_fixedpoint f)
Retrieve set of background assertions from fixedpoint context.
def get_assertions
Definition: z3py.py:6265
def get_cover_delta (   self,
  level,
  predicate 
)
Retrieve properties known about predicate for the level'th unfolding. -1 is treated as the limit (infinity)

Definition at line 6228 of file z3py.py.

6229  def get_cover_delta(self, level, predicate):
6230  """Retrieve properties known about predicate for the level'th unfolding. -1 is treated as the limit (infinity)"""
6231  r = Z3_fixedpoint_get_cover_delta(self.ctx.ref(), self.fixedpoint, level, predicate.ast)
6232  return _to_expr_ref(r, self.ctx)
Z3_ast Z3_API Z3_fixedpoint_get_cover_delta(Z3_context c, Z3_fixedpoint d, int level, Z3_func_decl pred)
def get_cover_delta
Definition: z3py.py:6228
def get_num_levels (   self,
  predicate 
)
Retrieve number of levels used for predicate in PDR engine

Definition at line 6224 of file z3py.py.

6225  def get_num_levels(self, predicate):
6226  """Retrieve number of levels used for predicate in PDR engine"""
6227  return Z3_fixedpoint_get_num_levels(self.ctx.ref(), self.fixedpoint, predicate.ast)
unsigned Z3_API Z3_fixedpoint_get_num_levels(Z3_context c, Z3_fixedpoint d, Z3_func_decl pred)
Query the PDR engine for the maximal levels properties are known about predicate. ...
def get_num_levels
Definition: z3py.py:6224
def get_rules (   self)
retrieve rules that have been added to fixedpoint context

Definition at line 6261 of file z3py.py.

6262  def get_rules(self):
6263  """retrieve rules that have been added to fixedpoint context"""
6264  return AstVector(Z3_fixedpoint_get_rules(self.ctx.ref(), self.fixedpoint), self.ctx)
def get_rules
Definition: z3py.py:6261
Z3_ast_vector Z3_API Z3_fixedpoint_get_rules(__in Z3_context c, __in Z3_fixedpoint f)
Retrieve set of rules from fixedpoint context.
def help (   self)
Display a string describing all available options.

Definition at line 6115 of file z3py.py.

6116  def help(self):
6117  """Display a string describing all available options."""
6118  print(Z3_fixedpoint_get_help(self.ctx.ref(), self.fixedpoint))
Z3_string Z3_API Z3_fixedpoint_get_help(__in Z3_context c, __in Z3_fixedpoint f)
Return a string describing all fixedpoint available parameters.
def insert (   self,
  args 
)
Assert constraints as background axioms for the fixedpoint solver. Alias for assert_expr.

Definition at line 6145 of file z3py.py.

6146  def insert(self, *args):
6147  """Assert constraints as background axioms for the fixedpoint solver. Alias for assert_expr."""
6148  self.assert_exprs(*args)
def assert_exprs
Definition: z3py.py:6123
def param_descrs (   self)
Return the parameter description set.

Definition at line 6119 of file z3py.py.

6120  def param_descrs(self):
6121  """Return the parameter description set."""
6122  return ParamDescrsRef(Z3_fixedpoint_get_param_descrs(self.ctx.ref(), self.fixedpoint), self.ctx)
def param_descrs
Definition: z3py.py:6119
Z3_param_descrs Z3_API Z3_fixedpoint_get_param_descrs(__in Z3_context c, __in Z3_fixedpoint f)
Return the parameter description set for the given fixedpoint object.
def parse_file (   self,
  f 
)
Parse rules and queries from a file

Definition at line 6257 of file z3py.py.

6258  def parse_file(self, f):
6259  """Parse rules and queries from a file"""
6260  return AstVector(Z3_fixedpoint_from_file(self.ctx.ref(), self.fixedpoint, f), self.ctx)
Z3_ast_vector Z3_API Z3_fixedpoint_from_file(__in Z3_context c, __in Z3_fixedpoint f, __in Z3_string s)
Parse an SMT-LIB2 file with fixedpoint rules. Add the rules to the current fixedpoint context...
def parse_file
Definition: z3py.py:6257
def parse_string (   self,
  s 
)
Parse rules and queries from a string

Definition at line 6253 of file z3py.py.

6254  def parse_string(self, s):
6255  """Parse rules and queries from a string"""
6256  return AstVector(Z3_fixedpoint_from_string(self.ctx.ref(), self.fixedpoint, s), self.ctx)
Z3_ast_vector Z3_API Z3_fixedpoint_from_string(__in Z3_context c, __in Z3_fixedpoint f, __in Z3_string s)
Parse an SMT-LIB2 string with fixedpoint rules. Add the rules to the current fixedpoint context...
def parse_string
Definition: z3py.py:6253
def pop (   self)
restore to previously created backtracking point

Definition at line 6206 of file z3py.py.

6207  def pop(self):
6208  """restore to previously created backtracking point"""
6209  Z3_fixedpoint_pop(self.ctx.ref(), self.fixedpoint)
void Z3_API Z3_fixedpoint_pop(Z3_context c, Z3_fixedpoint d)
Backtrack one backtracking point.
def push (   self)
create a backtracking point for added rules, facts and assertions

Definition at line 6202 of file z3py.py.

6203  def push(self):
6204  """create a backtracking point for added rules, facts and assertions"""
6205  Z3_fixedpoint_push(self.ctx.ref(), self.fixedpoint)
void Z3_API Z3_fixedpoint_push(Z3_context c, Z3_fixedpoint d)
Create a backtracking point.
def query (   self,
  query 
)
Query the fixedpoint engine whether formula is derivable.
   You can also pass an tuple or list of recursive predicates.

Definition at line 6180 of file z3py.py.

6181  def query(self, *query):
6182  """Query the fixedpoint engine whether formula is derivable.
6183  You can also pass an tuple or list of recursive predicates.
6184  """
6185  query = _get_args(query)
6186  sz = len(query)
6187  if sz >= 1 and isinstance(query[0], FuncDecl):
6188  _decls = (FuncDecl * sz)()
6189  i = 0
6190  for q in query:
6191  _decls[i] = q.ast
6192  i = i + 1
6193  r = Z3_fixedpoint_query_relations(self.ctx.ref(), self.fixedpoint, sz, _decls)
6194  else:
6195  if sz == 1:
6196  query = query[0]
6197  else:
6198  query = And(query)
6199  query = self.abstract(query, False)
6200  r = Z3_fixedpoint_query(self.ctx.ref(), self.fixedpoint, query.as_ast())
6201  return CheckSatResult(r)
def And
Definition: z3py.py:1468
Z3_lbool Z3_API Z3_fixedpoint_query(__in Z3_context c, __in Z3_fixedpoint d, __in Z3_ast query)
Pose a query against the asserted rules.
Z3_lbool Z3_API Z3_fixedpoint_query_relations(__in Z3_context c, __in Z3_fixedpoint d, __in unsigned num_relations, __in_ecount(num_relations) Z3_func_decl const relations[])
Pose multiple queries against the asserted rules.
def abstract
Definition: z3py.py:6305
def reason_unknown (   self)
Return a string describing why the last `query()` returned `unknown`.

Definition at line 6291 of file z3py.py.

6292  def reason_unknown(self):
6293  """Return a string describing why the last `query()` returned `unknown`.
6294  """
6295  return Z3_fixedpoint_get_reason_unknown(self.ctx.ref(), self.fixedpoint)
Z3_string Z3_API Z3_fixedpoint_get_reason_unknown(__in Z3_context c, __in Z3_fixedpoint d)
Retrieve a string that describes the last status returned by Z3_fixedpoint_query. ...
def reason_unknown
Definition: z3py.py:6291
def register_relation (   self,
  relations 
)
Register relation as recursive

Definition at line 6237 of file z3py.py.

6238  def register_relation(self, *relations):
6239  """Register relation as recursive"""
6240  relations = _get_args(relations)
6241  for f in relations:
6242  Z3_fixedpoint_register_relation(self.ctx.ref(), self.fixedpoint, f.ast)
def register_relation
Definition: z3py.py:6237
void Z3_API Z3_fixedpoint_register_relation(__in Z3_context c, __in Z3_fixedpoint d, __in Z3_func_decl f)
Register relation as Fixedpoint defined. Fixedpoint defined relations have least-fixedpoint semantics...
def rule (   self,
  head,
  body = None,
  name = None 
)
Assert rules defining recursive predicates to the fixedpoint solver. Alias for add_rule.

Definition at line 6172 of file z3py.py.

6173  def rule(self, head, body = None, name = None):
6174  """Assert rules defining recursive predicates to the fixedpoint solver. Alias for add_rule."""
6175  self.add_rule(head, body, name)
def add_rule
Definition: z3py.py:6149
def set (   self,
  args,
  keys 
)
Set a configuration option. The method `help()` return a string containing all available options.        

Definition at line 6109 of file z3py.py.

6110  def set(self, *args, **keys):
6111  """Set a configuration option. The method `help()` return a string containing all available options.
6112  """
6113  p = args2params(args, keys, self.ctx)
6114  Z3_fixedpoint_set_params(self.ctx.ref(), self.fixedpoint, p.params)
def args2params
Definition: z3py.py:4467
void Z3_API Z3_fixedpoint_set_params(__in Z3_context c, __in Z3_fixedpoint f, __in Z3_params p)
Set parameters on fixedpoint context.
def set_predicate_representation (   self,
  f,
  representations 
)
Control how relation is represented

Definition at line 6243 of file z3py.py.

6244  def set_predicate_representation(self, f, *representations):
6245  """Control how relation is represented"""
6246  representations = _get_args(representations)
6247  representations = [to_symbol(s) for s in representations]
6248  sz = len(representations)
6249  args = (Symbol * sz)()
6250  for i in range(sz):
6251  args[i] = representations[i]
6252  Z3_fixedpoint_set_predicate_representation(self.ctx.ref(), self.fixedpoint, f.ast, sz, args)
def set_predicate_representation
Definition: z3py.py:6243
void Z3_API Z3_fixedpoint_set_predicate_representation(__in Z3_context c, __in Z3_fixedpoint d, __in Z3_func_decl f, __in unsigned num_relations, __in_ecount(num_relations) Z3_symbol const relation_kinds[])
Configure the predicate representation.
def to_symbol
Definition: z3py.py:94
def sexpr (   self)
Return a formatted string (in Lisp-like format) with all added constraints. We say the string is in s-expression format.        

Definition at line 6273 of file z3py.py.

Referenced by Fixedpoint.__repr__().

6274  def sexpr(self):
6275  """Return a formatted string (in Lisp-like format) with all added constraints. We say the string is in s-expression format.
6276  """
6277  return Z3_fixedpoint_to_string(self.ctx.ref(), self.fixedpoint, 0, (Ast * 0)())
Z3_string Z3_API Z3_fixedpoint_to_string(__in Z3_context c, __in Z3_fixedpoint f, __in unsigned num_queries, __in_ecount(num_queries) Z3_ast queries[])
Print the current rules and background axioms as a string.
def statistics (   self)
Return statistics for the last `query()`.

Definition at line 6286 of file z3py.py.

6287  def statistics(self):
6288  """Return statistics for the last `query()`.
6289  """
6290  return Statistics(Z3_fixedpoint_get_statistics(self.ctx.ref(), self.fixedpoint), self.ctx)
def statistics
Definition: z3py.py:6286
Statistics.
Definition: z3py.py:5544
Z3_stats Z3_API Z3_fixedpoint_get_statistics(__in Z3_context c, __in Z3_fixedpoint d)
Retrieve statistics information from the last call to Z3_fixedpoint_query.
def to_string (   self,
  queries 
)
Return a formatted string (in Lisp-like format) with all added constraints.
   We say the string is in s-expression format.
   Include also queries.

Definition at line 6278 of file z3py.py.

6279  def to_string(self, queries):
6280  """Return a formatted string (in Lisp-like format) with all added constraints.
6281  We say the string is in s-expression format.
6282  Include also queries.
6283  """
6284  args, len = _to_ast_array(queries)
6285  return Z3_fixedpoint_to_string(self.ctx.ref(), self.fixedpoint, len, args)
def to_string
Definition: z3py.py:6278
Z3_string Z3_API Z3_fixedpoint_to_string(__in Z3_context c, __in Z3_fixedpoint f, __in unsigned num_queries, __in_ecount(num_queries) Z3_ast queries[])
Print the current rules and background axioms as a string.
def update_rule (   self,
  head,
  body,
  name 
)
update rule

Definition at line 6210 of file z3py.py.

6211  def update_rule(self, head, body, name):
6212  """update rule"""
6213  if name == None:
6214  name = ""
6215  name = to_symbol(name, self.ctx)
6216  body = _get_args(body)
6217  f = self.abstract(Implies(And(body),head))
6218  Z3_fixedpoint_update_rule(self.ctx.ref(), self.fixedpoint, f.as_ast(), name)
void Z3_API Z3_fixedpoint_update_rule(__in Z3_context c, __in Z3_fixedpoint d, __in Z3_ast a, __in Z3_symbol name)
Update a named rule. A rule with the same name must have been previously created. ...
def Implies
Definition: z3py.py:1413
def And
Definition: z3py.py:1468
def abstract
Definition: z3py.py:6305
def update_rule
Definition: z3py.py:6210
def to_symbol
Definition: z3py.py:94

Field Documentation

ctx

Definition at line 6096 of file z3py.py.

Referenced by Probe.__eq__(), Probe.__ge__(), ApplyResult.__getitem__(), Probe.__gt__(), Probe.__le__(), Probe.__lt__(), Probe.__ne__(), Fixedpoint.add_rule(), Tactic.apply(), ApplyResult.as_expr(), Fixedpoint.assert_exprs(), ApplyResult.convert_model(), Fixedpoint.get_answer(), Fixedpoint.get_assertions(), Fixedpoint.get_cover_delta(), Fixedpoint.get_rules(), Fixedpoint.param_descrs(), Tactic.param_descrs(), Fixedpoint.parse_file(), Fixedpoint.parse_string(), Fixedpoint.set(), Tactic.solver(), Fixedpoint.statistics(), and Fixedpoint.update_rule().

fixedpoint

Definition at line 6097 of file z3py.py.

Referenced by Fixedpoint.__del__(), Fixedpoint.add_cover(), Fixedpoint.add_rule(), Fixedpoint.assert_exprs(), Fixedpoint.get_answer(), Fixedpoint.get_assertions(), Fixedpoint.get_cover_delta(), Fixedpoint.get_num_levels(), Fixedpoint.get_rules(), Fixedpoint.help(), Fixedpoint.param_descrs(), Fixedpoint.parse_file(), Fixedpoint.parse_string(), Fixedpoint.pop(), Fixedpoint.push(), Fixedpoint.query(), Fixedpoint.reason_unknown(), Fixedpoint.register_relation(), Fixedpoint.set(), Fixedpoint.set_predicate_representation(), Fixedpoint.sexpr(), Fixedpoint.statistics(), Fixedpoint.to_string(), and Fixedpoint.update_rule().

vars

Definition at line 6103 of file z3py.py.

Referenced by Fixedpoint.abstract(), and Fixedpoint.declare_var().