3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-27 02:45:51 +00:00

fix tree-order, change API for special relations to produce function declarations

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2019-04-16 00:04:48 -07:00
parent b4ba44ce9d
commit 6158ea61c8
8 changed files with 92 additions and 91 deletions

View file

@ -10379,6 +10379,18 @@ def Range(lo, hi, ctx = None):
# Special Relations
def PartialOrder(a, index):
return FuncDeclRef(Z3_mk_partial_order(a.ctx_ref(), a.ast, index), a.ctx);
def LinearOrder(a, index):
return FuncDeclRef(Z3_mk_linear_order(a.ctx_ref(), a.ast, index), a.ctx);
def TreeOrder(a, index):
return FuncDeclRef(Z3_mk_tree_order(a.ctx_ref(), a.ast, index), a.ctx);
def PiecewiseLinearOrder(a, index):
return FuncDeclRef(Z3_mk_piecewise_linear_order(a.ctx_ref(), a.ast, index), a.ctx);
def TransitiveClosure(f):
"""Given a binary relation R, such that the two arguments have the same sort
create the transitive closure relation R+.