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 44Passing problem to incremental SMT2 solving via "z3"
55^EXIT=(0|127|134|137)$
66^SIGNAL=0$
7+ identifier: main::1::x
78--
9+ type: pointer
810--
911Test that running cbmc with the `--incremental-smt2-solver` argument causes the
1012incremental smt2 solving to be used. Note that at the time of adding this test,
1113an 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)
1717
1818exprt smt2_incremental_decision_proceduret::get (const exprt &expr) const
1919{
20- UNIMPLEMENTED;
21- return exprt ();
20+ UNIMPLEMENTED_FEATURE (" `get` of:\n " + expr.pretty (2 , 0 ));
2221}
2322
2423void smt2_incremental_decision_proceduret::print_assignment (
2524 std::ostream &out) const
2625{
27- UNIMPLEMENTED ;
26+ UNIMPLEMENTED_FEATURE ( " printing of assignments. " ) ;
2827}
2928
3029std::string
@@ -41,28 +40,34 @@ smt2_incremental_decision_proceduret::get_number_of_solver_calls() const
4140
4241void smt2_incremental_decision_proceduret::set_to (const exprt &expr, bool value)
4342{
44- UNIMPLEMENTED;
43+ UNIMPLEMENTED_FEATURE (
44+ " `set_to` (" + std::string{value ? " true" : " false" } + " ):\n " +
45+ expr.pretty (2 , 0 ));
4546}
4647
4748void smt2_incremental_decision_proceduret::push (
4849 const std::vector<exprt> &assumptions)
4950{
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." );
5157}
5258
5359void smt2_incremental_decision_proceduret::push ()
5460{
55- UNIMPLEMENTED ;
61+ UNIMPLEMENTED_FEATURE ( " `push`. " ) ;
5662}
5763
5864void smt2_incremental_decision_proceduret::pop ()
5965{
60- UNIMPLEMENTED ;
66+ UNIMPLEMENTED_FEATURE ( " `pop`. " ) ;
6167}
6268
6369decision_proceduret::resultt smt2_incremental_decision_proceduret::dec_solve ()
6470{
6571 ++number_of_solver_calls;
66- UNIMPLEMENTED;
67- return decision_proceduret::resultt::D_SATISFIABLE;
72+ UNIMPLEMENTED_FEATURE (" solving." );
6873}
You can’t perform that action at this time.
0 commit comments