File tree Expand file tree Collapse file tree 2 files changed +20
-9
lines changed
regression/cbmc-incr-smt2/nondeterministic-int-assert
src/solvers/smt2_incremental Expand file tree Collapse file tree 2 files changed +20
-9
lines changed Original file line number Diff line number Diff line change 4
4
Passing problem to incremental SMT2 solving via "z3"
5
5
^EXIT=(0|127|134|137)$
6
6
^SIGNAL=0$
7
+ identifier: main::1::x
7
8
--
9
+ type: pointer
8
10
--
9
11
Test that running cbmc with the `--incremental-smt2-solver` argument causes the
10
12
incremental smt2 solving to be used. Note that at the time of adding this test,
11
13
an invariant violation is expected due to the unimplemented solving.
14
+ Regexes matching the printing in the expected failed invariant are included in
15
+ order to test that `--slice-formula` is causing the first unimplemented
16
+ expression passed to `smt2_incremental_decision_proceduret` to relate to the
17
+ variable `x` in function `main` and not to `cprover_initialise`.
Original file line number Diff line number Diff line change @@ -17,14 +17,13 @@ exprt smt2_incremental_decision_proceduret::handle(const exprt &expr)
17
17
18
18
exprt smt2_incremental_decision_proceduret::get (const exprt &expr) const
19
19
{
20
- UNIMPLEMENTED;
21
- return exprt ();
20
+ UNIMPLEMENTED_FEATURE (" `get` of:\n " + expr.pretty (2 , 0 ));
22
21
}
23
22
24
23
void smt2_incremental_decision_proceduret::print_assignment (
25
24
std::ostream &out) const
26
25
{
27
- UNIMPLEMENTED ;
26
+ UNIMPLEMENTED_FEATURE ( " printing of assignments. " ) ;
28
27
}
29
28
30
29
std::string
@@ -41,28 +40,34 @@ smt2_incremental_decision_proceduret::get_number_of_solver_calls() const
41
40
42
41
void smt2_incremental_decision_proceduret::set_to (const exprt &expr, bool value)
43
42
{
44
- UNIMPLEMENTED;
43
+ UNIMPLEMENTED_FEATURE (
44
+ " `set_to` (" + std::string{value ? " true" : " false" } + " ):\n " +
45
+ expr.pretty (2 , 0 ));
45
46
}
46
47
47
48
void smt2_incremental_decision_proceduret::push (
48
49
const std::vector<exprt> &assumptions)
49
50
{
50
- UNIMPLEMENTED;
51
+ for (const auto &assumption : assumptions)
52
+ {
53
+ UNIMPLEMENTED_FEATURE (
54
+ " pushing of assumption:\n " + assumption.pretty (2 , 0 ));
55
+ }
56
+ UNIMPLEMENTED_FEATURE (" `push` of empty assumptions." );
51
57
}
52
58
53
59
void smt2_incremental_decision_proceduret::push ()
54
60
{
55
- UNIMPLEMENTED ;
61
+ UNIMPLEMENTED_FEATURE ( " `push`. " ) ;
56
62
}
57
63
58
64
void smt2_incremental_decision_proceduret::pop ()
59
65
{
60
- UNIMPLEMENTED ;
66
+ UNIMPLEMENTED_FEATURE ( " `pop`. " ) ;
61
67
}
62
68
63
69
decision_proceduret::resultt smt2_incremental_decision_proceduret::dec_solve ()
64
70
{
65
71
++number_of_solver_calls;
66
- UNIMPLEMENTED;
67
- return decision_proceduret::resultt::D_SATISFIABLE;
72
+ UNIMPLEMENTED_FEATURE (" solving." );
68
73
}
You can’t perform that action at this time.
0 commit comments