8// Special relation constructors
10// MkLinearOrder creates a linear (total) order relation over the given sort.
11// The id parameter distinguishes multiple linear orders over the same sort.
12func (c *Context) MkLinearOrder(s *Sort, id uint) *FuncDecl {
13 return newFuncDecl(c, C.Z3_mk_linear_order(c.ptr, s.ptr, C.uint(id)))
16// MkPartialOrder creates a partial order relation over the given sort.
17// The id parameter distinguishes multiple partial orders over the same sort.
18func (c *Context) MkPartialOrder(s *Sort, id uint) *FuncDecl {
19 return newFuncDecl(c, C.Z3_mk_partial_order(c.ptr, s.ptr, C.uint(id)))
22// MkPiecewiseLinearOrder creates a piecewise linear order relation over the given sort.
23// The id parameter distinguishes multiple piecewise linear orders over the same sort.
24func (c *Context) MkPiecewiseLinearOrder(s *Sort, id uint) *FuncDecl {
25 return newFuncDecl(c, C.Z3_mk_piecewise_linear_order(c.ptr, s.ptr, C.uint(id)))
28// MkTreeOrder creates a tree order relation over the given sort.
29// The id parameter distinguishes multiple tree orders over the same sort.
30func (c *Context) MkTreeOrder(s *Sort, id uint) *FuncDecl {
31 return newFuncDecl(c, C.Z3_mk_tree_order(c.ptr, s.ptr, C.uint(id)))
34// MkTransitiveClosure creates the transitive closure of a binary relation.
35// The resulting relation is recursive.
36func (c *Context) MkTransitiveClosure(f *FuncDecl) *FuncDecl {
37 return newFuncDecl(c, C.Z3_mk_transitive_closure(c.ptr, f.ptr))