3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 00:55:31 +00:00

working on bmc and bug fixes

Signed-off-by: unknown <nbjorner@NBJORNER-X200.redmond.corp.microsoft.com>
This commit is contained in:
unknown 2012-10-11 09:05:12 -07:00
parent 33c82dd5ca
commit 3e810ca74f
16 changed files with 347 additions and 7008 deletions

View file

@ -1328,6 +1328,21 @@ def Implies(a, b, ctx=None):
b = s.cast(b)
return BoolRef(Z3_mk_implies(ctx.ref(), a.as_ast(), b.as_ast()), ctx)
def Xor(a, b, ctx=None):
"""Create a Z3 Xor expression.
>>> p, q = Bools('p q')
>>> Xor(p, q)
Xor(p, q)
>>> simplify(Xor(p, q))
Not(p) == q
"""
ctx = _get_ctx(_ctx_from_ast_arg_list([a, b], ctx))
s = BoolSort(ctx)
a = s.cast(a)
b = s.cast(b)
return BoolRef(Z3_mk_xor(ctx.ref(), a.as_ast(), b.as_ast()), ctx)
def Not(a, ctx=None):
"""Create a Z3 not expression or probe.