def __init__(self, env=None, interactive=False): SmtLibParser.__init__(self, env, interactive) # Add new commands # # The mapping function takes care of consuming the command # name from the input stream, e.g., '(init' . Therefore, # _cmd_init will receive the rest of the stream, in our # example, '(and A B)) ...' self.commands["init"] = self._cmd_init self.commands["trans"] = self._cmd_trans # Remove unused commands # # If some commands are not compatible with the extension, they # can be removed from the parser. If found, they will cause # the raising of the exception UnknownSmtLibCommandError del self.commands["check-sat"] del self.commands["get-value"] # ... # Add 'next' function # # New operators can be added similarly as done for commands. # e.g., 'next'. The helper function _operator_adapter, # simplifies the writing of such extensions. In this example, # we will rewrite the content of the next without the need of # introducing a new pySMT operator. If you are interested in a # simple way of handling new operators in pySMT see # pysmt.test.test_dwf. self.interpreted["next"] = self._operator_adapter(self._next_var)
def __init__(self, env=None, interactive=False): SmtLibParser.__init__(self, env, interactive) self.commands['declare-primed-var'] = self._cmd_declare_primed_var self.commands['synth-inv'] = self._cmd_synth_inv self.commands['check-synth'] = self._cmd_check_synth self.commands['inv-constraint'] = self._cmd_inv_constraint
def __init__(self, env=None, interactive=False): self._parser = SmtLibParser() SmtLibParser.__init__(self, env, interactive) self.orig = System() self.curr = System() self.strat = StratificationOracle() self.syntax = SyntaxInference() self._sorts = set() self._sort2fin = dict() self._enumsorts = dict() self._enum2qvar = dict() self._fin2sort = dict() self._enum2inf = dict() self._ordered_sorts = dict() self._ordered_min = dict() self._ordered_max = dict() self._dependency_height = dict() self._enum_height = dict() self._idx = 0 self.gen = common.gopts.gen self._child_sort = set() self._parent_sort = dict() self._definitionMap = dict()
def __init__(self, env=None, interactive=False): SmtLibParser.__init__(self, env, interactive) # Add new commands self.commands["init"] = self._cmd_init self.commands["trans"] = self._cmd_trans # Remove unused commands del self.commands["check-sat"] del self.commands["get-value"] # ... # Add 'next' function self.interpreted["next"] = self._operator_adapter(self._next_var)