operators

This commit is contained in:
Artur Meski
2017-04-04 22:48:11 +02:00
parent b22fcd8015
commit cabe9fc1b8

View File

@@ -49,6 +49,18 @@ class Formula_rsLTL(object):
def f_bag(cls, bag_descr): def f_bag(cls, bag_descr):
return cls(rsLTL_form_type.bag, bag = bag_descr) return cls(rsLTL_form_type.bag, bag = bag_descr)
@classmethod
def f_And(cls, arg_L, arg_R):
return cls(rsLTL_form_type.l_and, L_oper = arg_L, R_oper = arg_R)
@classmethod
def f_Or(cls, arg_L, arg_R):
return cls(rsLTL_form_type.l_or, L_oper = arg_L, R_oper = arg_R)
@classmethod
def f_Implies(cls, arg_L, arg_R):
return cls(rsLTL_form_type.l_implies, L_oper = arg_L, R_oper = arg_R)
@classmethod @classmethod
def f_X(cls, sub, arg): def f_X(cls, sub, arg):
return cls(rsLTL_form_type.t_next, L_oper = arg, sub_oper = sub) return cls(rsLTL_form_type.t_next, L_oper = arg, sub_oper = sub)
@@ -69,10 +81,6 @@ class Formula_rsLTL(object):
def f_R(cls, sub, arg_L, arg_R): def f_R(cls, sub, arg_L, arg_R):
return cls(rsLTL_form_type.t_release, L_oper = arg_L, R_oper = arg_R, sub_oper = sub) return cls(rsLTL_form_type.t_release, L_oper = arg_L, R_oper = arg_R, sub_oper = sub)
@classmethod
def f_Implies(cls, arg_L, arg_R):
return cls(rsLTL_form_type.l_implies, L_oper = arg_L, R_oper = arg_R)
def __and__(self, other): def __and__(self, other):
return Formula_rsLTL(rsLTL_form_type.l_and, L_oper = self, R_oper = other) return Formula_rsLTL(rsLTL_form_type.l_and, L_oper = self, R_oper = other)