Z3
Public Member Functions | Data Fields
ParserContext Class Reference

Public Member Functions

def __init__
 
def __del__ (self)
 
def add_sort (self, sort)
 
def add_decl (self, decl)
 
def from_string (self, s)
 

Data Fields

 ctx
 
 pctx
 

Detailed Description

Definition at line 9341 of file z3py.py.

Constructor & Destructor Documentation

def __init__ (   self,
  ctx = None 
)

Definition at line 9342 of file z3py.py.

9342  def __init__(self, ctx= None):
9343  self.ctx = _get_ctx(ctx)
9344  self.pctx = Z3_mk_parser_context(self.ctx.ref())
9345  Z3_parser_context_inc_ref(self.ctx.ref(), self.pctx)
9346 
void Z3_API Z3_parser_context_inc_ref(Z3_context c, Z3_parser_context pc)
Increment the reference counter of the given Z3_parser_context object.
Z3_parser_context Z3_API Z3_mk_parser_context(Z3_context c)
Create a parser context.
def __del__ (   self)

Definition at line 9347 of file z3py.py.

9347  def __del__(self):
9348  if self.ctx.ref() is not None and self.pctx is not None and Z3_parser_context_dec_ref is not None:
9349  Z3_parser_context_dec_ref(self.ctx.ref(), self.pctx)
9350  self.pctx = None
9351 
def __del__(self)
Definition: z3py.py:9347
void Z3_API Z3_parser_context_dec_ref(Z3_context c, Z3_parser_context pc)
Decrement the reference counter of the given Z3_parser_context object.

Member Function Documentation

def add_decl (   self,
  decl 
)

Definition at line 9355 of file z3py.py.

9355  def add_decl(self, decl):
9356  Z3_parser_context_add_decl(self.ctx.ref(), self.pctx, decl.as_ast())
9357 
def add_decl(self, decl)
Definition: z3py.py:9355
void Z3_API Z3_parser_context_add_decl(Z3_context c, Z3_parser_context pc, Z3_func_decl f)
Add a function declaration.
def add_sort (   self,
  sort 
)

Definition at line 9352 of file z3py.py.

9352  def add_sort(self, sort):
9353  Z3_parser_context_add_sort(self.ctx.ref(), self.pctx, sort.as_ast())
9354 
def add_sort(self, sort)
Definition: z3py.py:9352
void Z3_API Z3_parser_context_add_sort(Z3_context c, Z3_parser_context pc, Z3_sort s)
Add a sort declaration.
def from_string (   self,
  s 
)

Definition at line 9358 of file z3py.py.

9358  def from_string(self, s):
9359  return AstVector(Z3_parser_context_from_string(self.ctx.ref(), self.pctx, s), self.ctx)
9360 
Z3_ast_vector Z3_API Z3_parser_context_from_string(Z3_context c, Z3_parser_context pc, Z3_string s)
Parse a string of SMTLIB2 commands. Return assertions.
def from_string(self, s)
Definition: z3py.py:9358

Field Documentation

ctx

Definition at line 9343 of file z3py.py.

Referenced by ParserContext.from_string().

pctx