def test_next_state_with_inputs(self):
     fsm = self.model()
     c2p = eval_simple_expression(fsm, "c2.payer")
     (inputs, state) = choose_next_state(fsm, fsm.pick_one_state(fsm.init))
     
     print()
     if state is None:
         print("No chosen state.")
     else:
         if inputs is not None:
             values = inputs.get_str_values()
             for var in values:
                 print(var, "=", values[var])
             print("-" * 40)
         values = state.get_str_values()
         for var in values:
             print(var, "=", values[var])
Exemple #2
0
    def test_next_state_with_inputs(self):
        fsm = self.model()
        c2p = eval_simple_expression(fsm, "c2.payer")
        (inputs, state) = choose_next_state(fsm, fsm.pick_one_state(fsm.init))

        print()
        if state is None:
            print("No chosen state.")
        else:
            if inputs is not None:
                values = inputs.get_str_values()
                for var in values:
                    print(var, "=", values[var])
                print("-" * 40)
            values = state.get_str_values()
            for var in values:
                print(var, "=", values[var])
 def test_next_state_without_inputs(self):
     glob.load_from_file("tests/pynusmv/models/modules.smv")
     fsm = glob.mas()
     self.assertIsNotNone(fsm)
     c2p = eval_simple_expression(fsm, "top")
     (inputs, state) = choose_next_state(fsm, fsm.pick_one_state(fsm.init))
     
     print()
     if state is None:
         print("No chosen state.")
     else:
         if inputs is not None:
             values = inputs.get_str_values()
             for var in values:
                 print(var, "=", values[var])
             print("-" * 40)
         values = state.get_str_values()
         for var in values:
             print(var, "=", values[var])
Exemple #4
0
    def test_next_state_without_inputs(self):
        glob.load_from_file("tests/pynusmv/models/modules.smv")
        fsm = glob.mas()
        self.assertIsNotNone(fsm)
        c2p = eval_simple_expression(fsm, "top")
        (inputs, state) = choose_next_state(fsm, fsm.pick_one_state(fsm.init))

        print()
        if state is None:
            print("No chosen state.")
        else:
            if inputs is not None:
                values = inputs.get_str_values()
                for var in values:
                    print(var, "=", values[var])
                print("-" * 40)
            values = state.get_str_values()
            for var in values:
                print(var, "=", values[var])