当前位置: 首页>>代码示例>>Python>>正文


Python SmtLibParser.__init__方法代码示例

本文整理汇总了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)
开发者ID:agriggio,项目名称:pysmt,代码行数:33,代码来源:smtlib.py

示例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)
开发者ID:bingcao,项目名称:pysmt,代码行数:16,代码来源:test_parser_extensibility.py


注:本文中的pysmt.smtlib.parser.SmtLibParser.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。