def And(*args): size = len(args) clause = args[size - 1].cons justify = args[size - 1].justify curr = size - 2 while curr >= 0: clause = z3.And(args[curr].cons, clause) justify += args[curr].justify curr -= 1 a = SMTConstraint(clause) a.justify = justify return a
def Or(*args): size = len(args) clause = args[size-1].cons justify = args[size-1].justify curr = size-2 while curr >= 0: clause = z3.Or(args[curr].cons,clause) justify += args[curr].justify curr -= 1 a = SMTConstraint(clause) a.justify = justify return a
def exists(vs, cs): f = SMTConstraint(z3.Exists(vs, cs.cons)) f.justify = cs.justify return f
def forall(vs, cs): f = SMTConstraint(z3.ForAll(vs, cs.cons)) f.justify = cs.justify return f
def Not(cs): n = SMTConstraint(z3.Not(cs.cons)) n.justify = cs.justify return n
def exists(vs, cs): f = SMTConstraint( z3.Exists(vs, cs.cons) ) f.justify = cs.justify return f
def forall(vs, cs): f = SMTConstraint( z3.ForAll(vs, cs.cons) ) f.justify = cs.justify return f
def Not(cs): n = SMTConstraint( z3.Not(cs.cons) ) n.justify = cs.justify return n