Example #1
0
 def justice(self):
     """
     The list of sexp expressions defining the set of justice constraints 
     for this FSM.
     
     .. note::
         
         NUSMV supports two types of fairness constraints, namely justice 
         constraints and com- passion constraints. A justice constraint 
         consists of a formula f, which is assumed to be true infinitely 
         often in all the fair paths. In NUSMV, justice constraints are 
         identified by keywords JUSTICE and, for backward compatibility, 
         FAIRNESS.
              
     :return: the list of sexp expressions defining the set of justice
              constraints for this FSM. 
     """
     ptr = _sexp.SexpFsm_get_justice(self._as_SexpFsm_ptr())
     return NodeIterator.from_pointer(ptr)
Example #2
0
File: fsm.py Project: yyaan/pynusmv
 def justice(self):
     """
     The list of sexp expressions defining the set of justice constraints 
     for this FSM.
     
     .. note::
         
         NUSMV supports two types of fairness constraints, namely justice 
         constraints and com- passion constraints. A justice constraint 
         consists of a formula f, which is assumed to be true infinitely 
         often in all the fair paths. In NUSMV, justice constraints are 
         identified by keywords JUSTICE and, for backward compatibility, 
         FAIRNESS.
              
     :return: the list of sexp expressions defining the set of justice
              constraints for this FSM. 
     """
     ptr = _sexp.SexpFsm_get_justice(self._as_SexpFsm_ptr())
     return NodeIterator.from_pointer(ptr)
Example #3
0
File: fsm.py Project: yyaan/pynusmv
 def compassion(self):
     """
     The list of sexp expressions defining the set of compassion constraints 
     for this FSM.
     
     .. note::
         
         NUSMV supports two types of fairness constraints, namely justice 
         constraints and compassion constraints. A justice constraint 
         consists of a formula f, which is assumed to be true infinitely 
         often in all the fair paths. A compassion constraint consists of a 
         pair of formulas (p,q); if property p is true infinitely often in a
         fair path, then also formula q has to be true infinitely often in 
         the fair path. In NUSMV, compassion constraints are identified by 
         keyword COMPASSION. If compassion constraints are used, then the 
         model must not contain any input variables. Currently, NUSMV does 
         not enforce this so it is the responsibility of the user to 
         make sure that this is the case.
              
     :return: the list of sexp expressions defining the set of compassion
              constraints for this FSM. 
     """
     ptr = _sexp.SexpFsm_get_compassion(self._as_SexpFsm_ptr())
     return NodeIterator.from_pointer(ptr)
Example #4
0
 def compassion(self):
     """
     The list of sexp expressions defining the set of compassion constraints 
     for this FSM.
     
     .. note::
         
         NUSMV supports two types of fairness constraints, namely justice 
         constraints and compassion constraints. A justice constraint 
         consists of a formula f, which is assumed to be true infinitely 
         often in all the fair paths. A compassion constraint consists of a 
         pair of formulas (p,q); if property p is true infinitely often in a
         fair path, then also formula q has to be true infinitely often in 
         the fair path. In NUSMV, compassion constraints are identified by 
         keyword COMPASSION. If compassion constraints are used, then the 
         model must not contain any input variables. Currently, NUSMV does 
         not enforce this so it is the responsibility of the user to 
         make sure that this is the case.
              
     :return: the list of sexp expressions defining the set of compassion
              constraints for this FSM. 
     """
     ptr = _sexp.SexpFsm_get_compassion(self._as_SexpFsm_ptr())
     return NodeIterator.from_pointer(ptr)
Example #5
0
File: fsm.py Project: yyaan/pynusmv
 def fairness_iterator(self):
     """:return: an iterator to iterate over the fairness list"""
     _ptr = _be.BeFsm_get_fairness_list(self._ptr)
     _iter = NodeIterator.from_pointer(_ptr)
     for fairness in _iter:
         yield self._fairness_conversion(fairness)
Example #6
0
 def test_iterator_string(self):
     iterator = NodeIterator.from_node(Node.from_ptr(self._TEST))
     self.assertEqual(str(iterator), "NodeIterator[, , ]")
Example #7
0
 def test_from_node(self):
     iterator = NodeIterator.from_node(Node.from_ptr(self._TEST))
     lst = [i for i in iterator]
     self.assertEqual(2, len(lst))
Example #8
0
 def test_from_pointer(self):
     iterator = NodeIterator.from_pointer(self._TEST)
     lst = [i for i in iterator]
     self.assertEqual(2, len(lst))
Example #9
0
 def test_from_node(self):
     iterator = NodeIterator.from_node(Node.from_ptr(self._TEST))
     lst = [i for i in iterator]
     self.assertEqual(2, len(lst))
         
Example #10
0
 def test_from_pointer(self):
     iterator = NodeIterator.from_pointer(self._TEST)
     lst = [i for i in iterator]
     self.assertEqual(2, len(lst))