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


Python init.init_nusmv函数代码示例

本文整理汇总了Python中pynusmv.init.init_nusmv函数的典型用法代码示例。如果您正苦于以下问题:Python init_nusmv函数的具体用法?Python init_nusmv怎么用?Python init_nusmv使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了init_nusmv函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_ast_to_spec

    def test_ast_to_spec(self):
        queries = ["?",
                   "~?",
                   "'request' & ?",
                   "? | 'state = ready'",
                   "? -> '!request'",
                   "'state = busy' <-> ?",
                   "AX ?",
                   "AF ?",
                   "AG ?",
                   "EX ?",
                   "EF ?",
                   "EG ?",
                   "A[True U ?]",
                   "A[? W False]",
                   "E[? U True]",
                   "E[False W ?]",
                   "A[False oU ?]",
                   "A[? oW True]",
                   "A[True dU ?]",
                   "A[? dW False]",
                   "E[False oU ?]",
                   "E[? oW True]",
                   "E[True dU ?]",
                   "E[? dW False]"]

        for query in queries:
            init_nusmv()
            self.init_model()
            self.assertIsInstance(ast_to_spec(replace(parse_ctlq(query),
                                                      TrueExp())),
                                  Spec)
            deinit_nusmv()
开发者ID:sbusard,项目名称:PyTLQ,代码行数:33,代码来源:test_utils.py

示例2: setUp

 def setUp(self):
     init_nusmv()
     ret = cmd.Cmd_SecureCommandExecute("read_model -i"
                                        " tests/pynusmv/models/admin.smv")
     self.assertEqual(ret, 0)
     ret = cmd.Cmd_SecureCommandExecute("go")
     self.assertEqual(ret, 0)
开发者ID:ancailliau,项目名称:pynusmv,代码行数:7,代码来源:testPropDb.py

示例3: setUp

 def setUp(self):
     init_nusmv()
     load_from_file(tests.current_directory(__file__)+"/models/flipflops_trans_invar_fairness.smv")
     go_bmc()
     
     self.fsm = BeFsm.global_master_instance()
     self.enc = self.fsm.encoding
开发者ID:xgillard,项目名称:pynusmv,代码行数:7,代码来源:testBmcModel.py

示例4: test_bdd_to_set

    def test_bdd_to_set(self):
        set_ = {HashableDict({'state': 'ready', 'request': 'TRUE'}),
                HashableDict({'state': 'ready', 'request': 'FALSE'})}

        init_nusmv()
        fsm = self.init_model()
        self.assertEqual(bdd_to_set(fsm, fsm.init), set_)
        deinit_nusmv()
开发者ID:sbusard,项目名称:PyTLQ,代码行数:8,代码来源:test_utils.py

示例5: test_init

 def test_init(self):
     init_nusmv()
     # Should not produce error
     fsm = BddFsm.from_filename("tests/pynusmv/models/admin.smv")
     reset_nusmv()
     # Should not produce error
     fsm = BddFsm.from_filename("tests/pynusmv/models/admin.smv")
     deinit_nusmv()
开发者ID:ancailliau,项目名称:pynusmv,代码行数:8,代码来源:testInit.py

示例6: __enter__

 def __enter__(self):
     """Performs what one would usually do in setUp"""
     init_nusmv()
     load_from_file(self.model)
     go_bmc()
     self.testcase.sexpfsm = master_bool_sexp_fsm()
     self.testcase.befsm   = master_be_fsm()
     self.testcase.enc     = self.testcase.befsm.encoding
     self.testcase.mgr     = self.testcase.enc.manager
开发者ID:xgillard,项目名称:pynusmv,代码行数:9,代码来源:utils.py

示例7: setUp

 def setUp(self):
     init_nusmv()
     load_from_file(tests.current_directory(__file__)+"/models/flipflops_vif.smv")
     go_bmc()
     self.enc = master_be_fsm().encoding
     self.v   = self.enc.by_name['v']
     self.f   = self.enc.by_name['f']
     self.i   = self.enc.by_name['i']
     self.n   = self.enc.by_name['next(v)']
开发者ID:xgillard,项目名称:pynusmv,代码行数:9,代码来源:testBeVar.py

示例8: setUp

 def setUp(self):
     init_nusmv()
     #config.debug = True
     config.partial.early.type = "full"
     config.partial.caching = True
     config.partial.filtering = True
     #config.partial.separation.type = "reach"
     #config.garbage.type = "step"
     #config.garbage.step = 4
     config.partial.alternate.type = {"univ", "strat"}
开发者ID:ancailliau,项目名称:pynusmv,代码行数:10,代码来源:testCheckPartial.py

示例9: setUp

 def setUp(self):
     init_nusmv()
     glob.load(self.model())
     glob.flatten_hierarchy()
     glob.encode_variables()  # does it for BDD
     self.go_bmc()
     
     pd = _prop.PropPkg_get_prop_database()
     fsm= _prop.PropDb_master_get_be_fsm(pd)
     self._TEST = _be.BeFsm_get_fairness_list(fsm)
开发者ID:xgillard,项目名称:pynusmv,代码行数:10,代码来源:testNodeIterator.py

示例10: test_gc

    def test_gc(self):
        """
        This test should not produce a segfault due to freed memory after
        deiniting NuSMV. This is thanks to the PyNuSMV GC system that keeps
        track of all wrapped pointers and free them when deiniting NuSMV, if
        needed.
        """
        init_nusmv()

        fsm = BddFsm.from_filename("tests/pynusmv/models/admin.smv")
        init = fsm.init

        deinit_nusmv()
开发者ID:sbusard,项目名称:pynusmv,代码行数:13,代码来源:testGC.py

示例11: proceed

def proceed(args):
    """Actually proceeds to the verification"""
    with init_nusmv():
        load(args.model)
        with BmcSupport():

            observable = mk_observable_names(args)

            if not args.quiet:
                with open(args.model) as m:
                    model = m.read()
                print_greeting(model, observable)

            if args.spec is not None:
                check(args, args.spec, observable)
            else:
                print("*" * 80)
                print("* DIAGNOSABILITY TESTS")
                print("*" * 80)
                print("Enter diagnosability condition, one per line in the format: 'c1 ; c2'")
                for line in sys.stdin:
                    check(args, line, observable)
开发者ID:xgillard,项目名称:pynusmv,代码行数:22,代码来源:diagnosability.py

示例12: setUp

 def setUp(self):
     init_nusmv()
     load_from_file(tests.current_directory(__file__)+"/models/flipflops_vif.smv")
     go_bmc()
     self._TESTED = BeEnc.global_singleton_instance()
开发者ID:xgillard,项目名称:pynusmv,代码行数:5,代码来源:testBeEnc.py

示例13: check_ctl_spec

    # Populate arguments: for now, only the model
    parser.add_argument('model', help='the NuSMV model with specifications')
    args = parser.parse_args(allargs)
    
    # Initialize the model
    fsm = BddFsm.from_filename(args.model)
    propDb = glob.prop_database()
    
    # Check all CTL properties
    for prop in propDb:
        #  Check type
        if prop.type == propTypes['CTL']:
            spec = prop.exprcore
    
            (satisfied, cntex) = check_ctl_spec(fsm, spec)
            # Print the result and the TLACE if any
            print('Specification',str(spec), 'is', str(satisfied),
                  file=sys.stderr)
        
            if not satisfied:
                print(xml_representation(fsm, cntex, spec))
            
            print()


if __name__ == '__main__': 
    # Initialize NuSMV
    init_nusmv()   
    check_and_explain(sys.argv[1:])
    # Quit NuSMV
    deinit_nusmv()
开发者ID:ancailliau,项目名称:pynusmv,代码行数:31,代码来源:tlace.py

示例14: setUp

 def setUp(self):
     init_nusmv()
     load(self.model())
开发者ID:xgillard,项目名称:pynusmv,代码行数:3,代码来源:testTrace.py

示例15: preloop

 def preloop(self):
     init_nusmv()
开发者ID:ancailliau,项目名称:pynusmv,代码行数:2,代码来源:trace.py


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