mirror of
https://github.com/Z3Prover/z3
synced 2025-04-27 02:45:51 +00:00
add tc and trc functionals for binary relations
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
ae982c5225
commit
182039eb44
3 changed files with 30 additions and 8 deletions
|
@ -10379,10 +10379,16 @@ def Range(lo, hi, ctx = None):
|
|||
|
||||
# Special Relations
|
||||
|
||||
def PartialOrder(n, s):
|
||||
ctx = s.ctx
|
||||
return FuncDeclRef(Z3_mk_partial_order(ctx, n, s.ast), ctx)
|
||||
def TransitiveClosure(f):
|
||||
"""Given a binary relation R, such that the two arguments have the same sort
|
||||
create the transitive closure relation R+.
|
||||
The transitive closure R+ is a new relation.
|
||||
"""
|
||||
return FuncDeclRef(Z3_mk_transitive_closure(f.ctx_ref(), f.ast), f.ctx)
|
||||
|
||||
def TreeOrder(n, s):
|
||||
ctx = s.ctx
|
||||
return FuncDeclRef(Z3_mk_tree_order(ctx, n, s.ast), ctx)
|
||||
def TransitiveReflexiveClosure(f):
|
||||
"""Given a binary relation R, such that the two arguments have the same sort
|
||||
create the transitive reflexive closure relation R*.
|
||||
The transitive reflexive closure R* is a new relation.
|
||||
"""
|
||||
return FuncDeclRef(Z3_mk_transitive_reflexive_closure(f.ctx_ref(), f.ast), f.ctx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue