Ejemplo n.º 1
0
 def can_provide_for(self, other):
     """Check if the set of behaviours is smaller or equal in the other set of behaviours but on the types"""
     variables = self.variables + other.variables
     proposition = Implies(self.formula, other.formula)
     for v in variables.list:
         proposition = proposition.replace(v.name, v.port_type)
     return check_validity(variables.get_nusmv_types(), proposition)
Ejemplo n.º 2
0
 def __ge__(self, other: 'LTL'):
     if self.is_true():
         return True
     """Check if the set of behaviours is bigger of equal than the other set of behaviours"""
     variables_a = set(self.variables.get_nusmv_names())
     variables_b = set(other.variables.get_nusmv_names())
     variables = variables_a | variables_b
     return check_validity(list(variables), "((" + other.formula + ") -> (" + self.formula + "))")
Ejemplo n.º 3
0
 def __le__(self, other: 'LTL'):
     if other.is_true():
         return True
     """Check if the set of behaviours is smaller or equal in the other set of behaviours"""
     variables_a = set(self.variables.get_nusmv_names())
     variables_b = set(other.variables.get_nusmv_names())
     if len(variables_b & variables_a) > 0:
         variables = variables_a | variables_b
         return check_validity(list(variables), "((" + self.formula + ") -> (" + other.formula + "))")
     return False