@@ -51,6 +51,7 @@ class TheoriesBuilderTests extends AnyFunSuite with TestHelpers {
51
51
52
52
53
53
{
54
+ import theories .Core .Equals
54
55
import theories .Ints ._
55
56
val theoryString = " Theory of Ints"
56
57
var counter = 0
@@ -84,9 +85,22 @@ class TheoriesBuilderTests extends AnyFunSuite with TestHelpers {
84
85
85
86
val f8 = LessEquals (Sub (NumeralLit (5 ), NumeralLit (3 )), NumeralLit (1 ))
86
87
mkTest(f8, UnsatStatus , uniqueName())
88
+
89
+ val f9 = Equals (Add (NumeralLit (1 ), NumeralLit (2 ), NumeralLit (3 ), NumeralLit (4 )), NumeralLit (10 ))
90
+ mkTest(f9, SatStatus , uniqueName())
91
+
92
+ val f10 = Equals (Sub (NumeralLit (1 ), NumeralLit (2 ), NumeralLit (3 ), NumeralLit (4 )), NumeralLit (- 8 ))
93
+ mkTest(f10, SatStatus , uniqueName())
94
+
95
+ val f11 = Equals (Mul (NumeralLit (1 ), NumeralLit (2 ), NumeralLit (3 ), NumeralLit (4 )), NumeralLit (24 ))
96
+ mkTest(f11, SatStatus , uniqueName())
97
+
98
+ val f12 = Equals (Div (NumeralLit (80 ), NumeralLit (4 ), NumeralLit (2 )), NumeralLit (10 ))
99
+ mkTest(f12, SatStatus , uniqueName())
87
100
}
88
101
89
102
{
103
+ import theories .Core .Equals
90
104
import theories .Reals ._
91
105
val theoryString = " Theory of Reals"
92
106
var counter = 0
@@ -116,6 +130,18 @@ class TheoriesBuilderTests extends AnyFunSuite with TestHelpers {
116
130
117
131
val f8 = LessEquals (Sub (NumeralLit (5 ), NumeralLit (3 )), NumeralLit (1 ))
118
132
mkTest(f8, UnsatStatus , uniqueName())
133
+
134
+ val f9 = Equals (Add (NumeralLit (1 ), NumeralLit (2 ), NumeralLit (3 ), NumeralLit (4 )), NumeralLit (10 ))
135
+ mkTest(f9, SatStatus , uniqueName())
136
+
137
+ val f10 = Equals (Sub (NumeralLit (1 ), NumeralLit (2 ), NumeralLit (3 ), NumeralLit (4 )), NumeralLit (- 8 ))
138
+ mkTest(f10, SatStatus , uniqueName())
139
+
140
+ val f11 = Equals (Mul (NumeralLit (1 ), NumeralLit (2 ), NumeralLit (3 ), NumeralLit (4 )), NumeralLit (24 ))
141
+ mkTest(f11, SatStatus , uniqueName())
142
+
143
+ val f12 = Equals (Div (NumeralLit (80 ), NumeralLit (4 ), NumeralLit (2 )), NumeralLit (10 ))
144
+ mkTest(f12, SatStatus , uniqueName())
119
145
}
120
146
121
147
{
@@ -181,5 +207,11 @@ class TheoriesBuilderTests extends AnyFunSuite with TestHelpers {
181
207
// Int2BV does not care about the sign
182
208
val f17 = Equals (Int2BV (8 , NumeralLit (- 214 )), BitVectorConstant (42 , 8 ))
183
209
mkTest(f17, SatStatus , uniqueName())
210
+
211
+ val f18 = Equals (Add (BitVectorConstant (1 , 32 ), BitVectorConstant (2 , 32 ), BitVectorConstant (3 , 32 ), BitVectorConstant (4 , 32 )), BitVectorConstant (10 , 32 ))
212
+ mkTest(f18, SatStatus , uniqueName())
213
+
214
+ val f20 = Equals (Mul (BitVectorConstant (1 , 32 ), BitVectorConstant (2 , 32 ), BitVectorConstant (3 , 32 ), BitVectorConstant (4 , 32 )), BitVectorConstant (24 , 32 ))
215
+ mkTest(f20, SatStatus , uniqueName())
184
216
}
185
217
}
0 commit comments