Exemplo n.º 1
0
 def test_full_countex(self):
     fsm = self.model()
     
     spec = parseCTLK("'c2.payer' -> A[AX ('c1.payer' | ~'c1.payer')"
                      " U K<'c1'> ('c2.payer')]")[0]
     self.assertIsNotNone(spec)
     self.assertTrue((fsm.init & ~evalCTLK(fsm, spec)).isnot_false())
     state = fsm.pick_one_state(fsm.init & ~evalCTLK(fsm, spec))
     self.assertIsNotNone(state)
     
     expl = explain_countex(fsm, state, spec)
     self.assertIsNotNone(expl)
     
     print(xml_countex(fsm, expl, spec))
     
     
     spec = parseCTLK("AG(~'c1.payer' | E<'c1'> ('c1.payer' -> "
                      "C<'c2','c3'> AF 'c1.payer'))")[0]
     self.assertIsNotNone(spec)
     self.assertTrue((fsm.init & ~evalCTLK(fsm, spec)).isnot_false())
     state = fsm.pick_one_state(fsm.init & ~evalCTLK(fsm, spec))
     self.assertIsNotNone(state)
     
     expl = explain_countex(fsm, state, spec)
     self.assertIsNotNone(expl)
     
     print(xml_countex(fsm, expl, spec))
Exemplo n.º 2
0
 def test_false(self):
     fsm = self.simplemodel()
     
     spec = parseCTLK("False")[0]
     self.assertIsNotNone(spec)
     state = fsm.pick_one_state(fsm.init & ~evalCTLK(fsm, spec))
     self.assertIsNotNone(state)
     
     expl = explain_countex(fsm, state, spec)
     self.assertIsNotNone(expl)
     self.assertEqual(type(expl), Tlacenode)
     self.assertEqual(expl.state, state)
     self.assertEqual(len(expl.atomics), 0)
     self.assertEqual(len(expl.branches), 0)
     self.assertEqual(len(expl.universals), 0)
     
     print(xml_countex(fsm, expl, spec))