本文整理汇总了Python中pysmt.smtlib.parser.SmtLibParser.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python SmtLibParser.__init__方法的具体用法?Python SmtLibParser.__init__怎么用?Python SmtLibParser.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pysmt.smtlib.parser.SmtLibParser
的用法示例。
在下文中一共展示了SmtLibParser.__init__方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from pysmt.smtlib.parser import SmtLibParser [as 别名]
# 或者: from pysmt.smtlib.parser.SmtLibParser import __init__ [as 别名]
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)
示例2: __init__
# 需要导入模块: from pysmt.smtlib.parser import SmtLibParser [as 别名]
# 或者: from pysmt.smtlib.parser.SmtLibParser import __init__ [as 别名]
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)