You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following program is getting indefinitely stuck in the Z3 Solver.
#include <klee/klee.h>
#define N 36
#define MAX 9999
int a[N+1];
int alwaystrue(int n);
int f(int n);
main() {
int sum = 0;
for (int i = 1; i <= N; i++) a[i] = i;
for (int i = 1; i <= N; i++) {
int choice;
klee_make_symbolic(&choice, sizeof(int), "choice");
if (choice) sum++;
else {
if (alwaystrue(sum + 777)) sum += 2; else sum = MAX;
}
}
klee_assert(sum <= 2*N);
}
int alwaystrue(int n) {
if (n*n/33 > 45) return f(n + 444);
else return f(n + 555);
}
int f(int n) {
int sum = 0;
for (int i = 1; i <= N; i++) sum += a[i];
return sum - n*(n + 1)/2 + 1;
}
At some point in time, the following expression is passed from the pushup () to the z3 solver for simplification.
I have tried to set the solver time e.g., --max-solver-time=2 but the system is unable to recognize its effect. -max-solver-time=<seconds> - Maximum amount of time for a single SMT query (default=0s (off)). Enables --use-forked-solver
The following program is getting indefinitely stuck in the
Z3 Solver
.At some point in time, the following expression is passed from the pushup () to the z3 solver for simplification.
After applying the
txExpr2z3Expr
, the following z3 expr is obtained.Above expr is sent to
applyTactic(c, "simplify", z3e)
and the obtained simplified z3 expr is as follows:Subsequently, the above z3 expr is supplied to the
applyTactic(c, "ctx-solver-simplify", z3e)
,but, the program is getting stuck at this point.
The text was updated successfully, but these errors were encountered: