Пример #1
0
 def do_reset(self, args):
     """Reset the prompt; forget the read model and restart NuSMV."""
     self.fsm = None
     self.model = None
     self.last = None
     self.paths = []
     glob.reset_globals()
     reset_nusmv()
Пример #2
0
 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()
Пример #3
0
 def do_reset(self, args):
     """Reset the prompt; forget the read model and restart NuSMV."""
     self.fsm = None
     self.model = None
     self.last = None
     self.paths = []
     glob.reset_globals()
     reset_nusmv()
Пример #4
0
 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()
Пример #5
0
 def do_read(self, arg):
     """
     Read file as SMV model to get FSM.
     usage: read FILEPATH
     """
     if len(arg) < 1:
         print("[ERROR] read command needs the SMV model path.")
     else:
         if self.fsm is not None:
             reset_nusmv()
         try:
             self.fsm = BddFsm.from_filename(arg)
             self.fsmpath = arg
         except Exception as e:
             print("[ERROR]", e)
Пример #6
0
 def do_read(self, arg):
     """
     Read file as SMV model to get FSM.
     usage: read FILEPATH
     """
     if len(arg) < 1:
         print("[ERROR] read command needs the SMV model path.")
     else:
         if self.fsm is not None:
             reset_nusmv()
         try:
             self.fsm = BddFsm.from_filename(arg)
             self.fsmpath = arg
         except Exception as e:
             print("[ERROR]", e)
Пример #7
0
 def test_reset(self):
     init_nusmv()
     reset_nusmv()
     self.assertTrue(is_nusmv_init())
     deinit_nusmv()