Ejemplo n.º 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()
Ejemplo n.º 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()
Ejemplo n.º 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()
Ejemplo n.º 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()
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 7
0
 def test_reset(self):
     init_nusmv()
     reset_nusmv()
     self.assertTrue(is_nusmv_init())
     deinit_nusmv()