@@ -3,6 +3,7 @@ package org.usvm.machine
3
3
import io.ksmt.KContext
4
4
import io.ksmt.solver.KSolver
5
5
import io.ksmt.solver.KSolverConfiguration
6
+ import io.ksmt.solver.KTheory
6
7
import io.ksmt.solver.runner.KSolverRunnerManager
7
8
import io.ksmt.solver.yices.KYicesSolver
8
9
import io.ksmt.solver.yices.KYicesSolverConfiguration
@@ -30,8 +31,18 @@ private object SameProcessSolverFactory : SolverFactory {
30
31
solverType : SolverType
31
32
): KSolver <out KSolverConfiguration > = when (solverType) {
32
33
// Yices with Fp support via SymFpu
33
- SolverType .YICES -> KSymFpuSolver (KYicesSolver (ctx), ctx)
34
- SolverType .Z3 -> KZ3Solver (ctx)
34
+ SolverType .YICES -> KSymFpuSolver (KYicesSolver (ctx), ctx).apply {
35
+ configure {
36
+ // Fp theory is handled by the SymFpu
37
+ optimizeForTheories(setOf (KTheory .Array , KTheory .BV , KTheory .UF ))
38
+ }
39
+ }
40
+
41
+ SolverType .Z3 -> KZ3Solver (ctx).apply {
42
+ configure {
43
+ optimizeForTheories(setOf (KTheory .Array , KTheory .BV , KTheory .UF , KTheory .FP ))
44
+ }
45
+ }
35
46
}
36
47
37
48
override fun close () {
@@ -52,8 +63,18 @@ private class AnotherProcessSolverFactory : SolverFactory {
52
63
solverType : SolverType
53
64
): KSolver <out KSolverConfiguration > = when (solverType) {
54
65
// Yices with Fp support via SymFpu
55
- SolverType .YICES -> solverManager.createSolver(ctx, YicesWithSymFpu ::class )
56
- SolverType .Z3 -> solverManager.createSolver(ctx, KZ3Solver ::class )
66
+ SolverType .YICES -> solverManager.createSolver(ctx, YicesWithSymFpu ::class ).apply {
67
+ configure {
68
+ // Fp theory is handled by the SymFpu
69
+ optimizeForTheories(setOf (KTheory .Array , KTheory .BV , KTheory .UF ))
70
+ }
71
+ }
72
+
73
+ SolverType .Z3 -> solverManager.createSolver(ctx, KZ3Solver ::class ).apply {
74
+ configure {
75
+ optimizeForTheories(setOf (KTheory .Array , KTheory .BV , KTheory .UF , KTheory .FP ))
76
+ }
77
+ }
57
78
}
58
79
59
80
override fun close () {
0 commit comments