
-- Declaration of symbols
Sat

-- Adding some assertions (uses methods from IExpression._)
Sat
Partial model: {c1 -> 100, c0 -> 115, p1 -> true, p0 -> true}

-- Querying the model
r = true
r & !s = false
v = true

-- Scoping (locally add assertions, declare symbols, etc)
Unsat
Sat

-- Shorter notation via importing
Sat
Sat

-- Nesting scopes and use of quantifiers
Unsat

-- Declaring functions
Sat
f(x) + f(z) = -1
(f(x) === f(z)) = false
Partial model: {c4 -> 20, c3 -> 10, c2 -> 9, c1 -> 100, c0 -> 115, f(20) -> -1, f(9) -> 0, p1 -> true, p0 -> true}
In model: f(x) + f(z) = Some(-1)
          f(17) = None
          (f(x) >= -5) = Some(true)
Unsat

-- Generating different models for the same formula
  p1  	  p2  	  p3
------------------------
  -	  true	  true
  true	  true	  false

-- Incremental solving
  p1  	  p2  	  p3
------------------------
  true	  true	  true
  false	  true	  true
  true	  true	  false

-- Validity mode
Sat
x = 6
2*x = 12
Valid

-- Theory of arrays
Sat
select(a, 1) = 1
select(a, 10) = 0
Unsat
Valid
Unsat

-- Non-trivial quantifiers
Invalid
Valid

-- Quantifiers, functions, and triggers
Sat
b = -2
Unsat
Sat
b = -2
b = -3
b = -4
b = -5

-- Boolean functions and triggers
Sat
Partial model: {c2 -> 5, c1 -> 100, c0 -> 115, r(5, 1) -> 0, r(1, 5) -> 0, p1 -> true, p0 -> true}
Valid

-- Existential constants
Valid
X = 1
X + Y = 1
Y = 0
Valid
X = 10
Model: {X2 -> 10}

-- Quantifier elimination
Valid
Equivalent qf constraint: X >= 4
Valid
Equivalent qf constraint: X = 42 | X = 3
Valid
Equivalent qf constraint: X = 42 | X = 3 | (X = 100 & Y >= 100)

-- Simplification, projection
Project 5 < x & x < 2*y existentially to y: !(3 >= y)
Project x > y | x < 0 universally to x: -1 >= x
Simplify ex(x => 5 < x & x < 2*y) to: y >= 4

-- Asynchronous interface
Running
true
Sat

-- Asynchronous interface, timeouts
Running
true
Sat

-- Asynchronous interface, busy waiting
Running
Sat

-- Stopping computations
expected result

-- Stopping computation after a while
expected result
Wait for 30ms ...
Sat

-- Interpolation
Unsat
Vector(c >= 0, d >= 1)
Vector(d - c >= 1, d >= 1)

-- Interpolation with functions
Unsat
Vector(!(c = 3) | f(3) = 5, f(3) = 5)
Vector(!(c = 3))

-- Interpolation with arrays
Unsat
Vector(select(b, 0) = 1)

-- Generating a larger amount of constraints
Sat
c100 = 100
Valid

-- Generating a larger amount of constraints (2)
Sat
x500 = 124750
Valid

-- Declaration of symbols
Sat

-- Adding some assertions (uses methods from TerForConvenience._)
Sat
Unsat
Sat
Invalid
Valid
Sat
Sat
Starting ...
T/O
Valid
Sat
Unsat
Sat
x = 10, k = 0
Sat
x = 15, k = 25
Sat
Sat
Some(3)
Sat
Sat
Sat
Valid
Unsat
Sat
Sat
Unsat
Sat
Sat
Inconclusive
0
0: Unsat
1: Vector(rootjthen_fwd, false)
0: Sat
1: Sat
2: Sat
3: Sat
4: 1
5: 3
6: 2
7: Sat
8: Unsat
10b: Sat
11: 1
12: 3
13: -5
59: Sat
72: 0
73: Invalid
39: Valid
40: true
Sat
List((Vector(0, 1),2), (Vector(1, 2),3))
Sat
List((Vector(0, 2),1), (Vector(0, 1),2), (Vector(1, 2),3))
Unsat
Valid
Unsat
Inconclusive
{c -> 0, b -> 0, a -> 0, mul(0, 0) -> 0}
Unsat
Unsat
Unsat
0: Sat
{c1 -> 1, c0 -> 4}
1: Sat
{c1 -> 3, c0 -> 3}
2: Unsat
3: Invalid
{c0 -> -1}
4: Valid
5: Valid
Unsat
Vector(!((-3 + c1) = 0))
0: Sat
{c0 -> 8}
1: Sat
{c0 -> 7}
2: Invalid
{c0 -> -4}
3: Invalid
{c1 -> 2, c0 -> 1}
4: Valid
x - y + -1 >= 0 & y + -1*50 + -1 >= 0
Sat
Unsat
starting
Sat
getting model ...
{}
finished
starting
x
{}
y
finished
starting
Sat
{z -> 3, y -> -1, x -> 0, a -> false}
Sat
{z -> 5, y -> 1, x -> 2, a -> true}
Sat
Sat
{z -> 5, y -> 1, x -> 2, a -> true}
finished
starting
(div x  5)
(div x  (- 5))
(div (* (- 1) x )  5)
(div (* (- 1) x )  (- 5))
(mod x  5)
(mod x  (- 5))
(mod (* (- 1) x )  5)
(mod (* (- 1) x )  (- 5))
(_eps ((var0 Int)) (and (<= 0 var0 ) (or (= var0 x ) (= (* (- 1) var0 ) x ) ) ) ) 
finished
Vector(nil)
Sat
{c2 -> 2, c1 -> 0, c0 -> 42, list_depth(2) -> 1, list_depth(1) -> -1, list_depth(0) -> 0, list_ctor(2) -> 1, list_ctor(1) -> 0, list_ctor(0) -> 1, tail(2) -> 0, tail(0) -> 1, head(2) -> 42, head(0) -> 0, cons(42, 0) -> 2, cons(0, 1) -> 0, nil -> 1}
Unsat
Unsat
Valid
Valid
Unsat
Valid
Valid
Unsat
Valid
Invalid
Unsat
Vector(!(list_ctor(x) = 0))
Unsat
Vector(!(head(x) = 0))
Unsat
Vector(((-42 + head(x)) = 0))
Unsat
Vector(((-42 + head(x)) = 0), !((-43 + head(a)) = 0))
Valid
Vector(((nil + -1 * x) = 0), ((y + -1 * x) = 0))
Valid
Vector(((cons(1, cons(2, nil)) + -1 * x) = 0), ((y + -1 * x) = 0))
