
SimpleAPITest

-- 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	  false
  true	  true	  true
  false	  true	  true

-- 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: {true -> 0, false -> 115, 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

SimpleAPITest2

-- Declaration of symbols
Sat

-- Adding some assertions (uses methods from TerForConvenience._)
Sat
Unsat
Sat

SimpleAPITest3
Invalid
Valid

SimpleAPITest4
Sat
Sat

SimpleAPITest5
Starting ...
T/O
Valid

SimpleAPITest6
Sat
Unsat
Sat
x = 10, k = 0
Sat
x = 15, k = 25

SimpleAPITest7
Sat
Sat
Some(3)

SimpleAPITest8
Sat
Sat

SimpleAPITest9
Sat
Valid
Unsat
Sat
Sat
Unsat

SimpleAPITest10
Sat
Sat

SimpleAPITest11
Inconclusive
0

interpolation-bug.scala
0: Unsat
1: Vector(rootjthen_fwd, false)

scope-bug.scala
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

incrementality-bug.scala
59: Sat
72: 0
73: Invalid

getConstraint-bug.scala
39: Valid
40: true

TheoryTest.scala
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

TheoryTest2.scala
Unsat
Inconclusive
{c -> 0, b -> 0, a -> 0, mul(0, 0) -> 0}
Unsat
Unsat

TheoryTest3.scala
Unsat

TypeTests.scala
Starting
\exists int v0, v1; v1 = x + v0
Sat
\exists int v0; (v0 >= 0 & v0 = x)
Sat
\forall int v0; (!(v0 >= 0) | x = v0)
Unsat
\exists int v0; (v0 >= 0 & x = y + v0) <-> x >= y
Valid
\exists int v0; (v0 >= 0 & 9 >= v0 & v0 - x >= 1)
\exists int v0; (v0 >= 0 & 9 >= v0 & v0 - x >= 1)
8 >= x
Valid
Unsat
x1 = x2
Unsat
Valid
Valid
14 >= X & X >= 11
Sat
10
Unsat
Unsat
Unsat
Finished

nonlinear.scala
0: Sat
{c1 -> 1, c0 -> 4}
1: Sat
{c1 -> 3, c0 -> 3}
2: Unsat
3: Invalid
{c0 -> -1}
4: Valid
5: Valid

nonlinearInterpolation.scala
Unsat
Vector(!((-3 + c1) = 0))

division.scala
0: Sat
{c0 -> 8}
1: Sat
{c0 -> 7}
2: Invalid
{c0 -> -4}
3: Invalid
{c1 -> 2, c0 -> 1}
4: Valid

deadlock.scala
starting
Sat
getting model ...
{}
finished

exception.scala
starting
x
{}
y
finished

incremental.scala
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

divmodprint.scala
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

ADTTest.scala
Vector(nil)
Sat
{nil -> 1, 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}
Unsat
Unsat
Valid
Valid
Unsat
Valid
Valid
Unsat
Valid
Invalid

ADTTest2.scala
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))

ADTTest3.scala
Vector(red, nil)
Test 1
Sat
{nil -> 1, red -> 0, blue -> 1, green -> 2, c2 -> 2, c1 -> 2, c0 -> 0, colour_list_depth(2) -> 1, colour_list_depth(1) -> -1, colour_list_depth(0) -> 0, colour_list_ctor(2) -> 1, colour_list_ctor(1) -> 0, colour_list_ctor(0) -> 1, tail(2) -> 0, tail(0) -> 1, head(2) -> 0, head(0) -> 2, cons(2, 1) -> 0, cons(0, 0) -> 2}
Test 2
Unsat
Test 3
Unsat
Test 4
Valid
Test 5
Valid
Test 10
Unsat
Test 11
Valid
Test 12
Invalid
{red -> 0, blue -> 1, green -> 2, c5 -> 2}
2
Some(green)
Test 13
Valid
Test 14
Valid
Test 15
Invalid
Test 15b
Valid
Test 16
Valid
Test 17
Unsat
Test 18
Sat
Some(green)
Some(cons(green, nil))
Unsat
Test 19
Sat
green
cons(green, nil)
Unsat
Sat
Some(green)
Some(cons(green, nil))
Test 20
Sat
Some(nil)
Some(cons(blue, nil))
None
Test 21
Sat
Some(green)
Some(blue)
Some(green)
None
Test 30
Valid
Invalid
Vector(red, nil)
Test 1
Sat
{nil -> 1, red -> 0, blue -> 1, green -> 2, c2 -> 2, c1 -> 2, c0 -> 0, colour_list_size(2) -> 5, colour_list_size(1) -> 1, colour_list_size(0) -> 3, colour_list_ctor(2) -> 1, colour_list_ctor(1) -> 0, colour_list_ctor(0) -> 1, tail(2) -> 0, tail(0) -> 1, head(2) -> 0, head(0) -> 2, cons(2, 1) -> 0, cons(0, 0) -> 2}
Test 2
Unsat
Test 3
Unsat
Test 4
Valid
Test 5
Valid
Test 10
Unsat
Test 11
Valid
Test 12
Invalid
{red -> 0, blue -> 1, green -> 2, c5 -> 2}
2
Some(green)
Test 13
Valid
Test 14
Valid
Test 15
Invalid
Test 15b
Valid
Test 16
Valid
Test 17
Unsat
Test 18
Sat
Some(green)
Some(cons(green, nil))
Unsat
Test 19
Sat
green
cons(green, nil)
Unsat
Sat
Some(green)
Some(cons(green, nil))
Test 20
Sat
Some(nil)
Some(cons(blue, nil))
None
Test 21
Sat
Some(green)
Some(blue)
Some(green)
None
Test 30
Valid
Invalid

ADTTest4.scala
Test 1
Sat
cons(red, cons(green, nil))
Sat
cons(red, cons(green, cons(green, cons(green, cons(green, cons(green, nil))))))
Unsat

pred-simplify.scala
starting
c = 4 & !p
p | c = 4
finished

empty-stack-bug.scala
Sat
0

TestModuloArithmetic.scala
Test 1
Sat
{b2 -> 0, b1 -> 13}
b1 = mod_cast(0, 255, 13)
Test 2
Sat
{w2 -> 0, w1 -> 13}
Test 3
Sat
h1 = mod_cast(0, 65535, 11007)
Unsat
Test 4
Valid
Test 5
Valid
Test 6
Valid
Test 7
Unsat
Vector(((x + -1 * mod_cast(0, 1, 1)) = 0), ((-1 + y) >= 0))
Test 8
\exists int v0; (v0 >= 0 & 3 >= v0 & bv_mul(2, x, v0) = 1.\as[bv[2]])
x = 3 | x = 1
Valid

TreeInterpolation.scala
Unsat
List(1, 3, 5, 10, 20, 40)
false
   (d = 0)
      ((-1 + b) = 0)
      ((1 + (d + -1 * c)) = 0)
   ((-5 + e) = 0)

TestFrame.scala
Sat
Unsat
Sat
Inconclusive
Unsat
x - y >= 2

readSMTLIB.scala
x - y >= 1 & y + -1*50 >= 1
Sat
Unsat
x - y >= 1 & y + -1*50 >= 1
Sat
Unsat
