Skip to content

Commit

Permalink
Fix one off for pdkind model. Fixes #52.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dejan Jovanovic committed Aug 10, 2018
1 parent 0184506 commit 0b88fe9
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/engine/pdkind/pdkind_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ const system::trace_helper* pdkind_engine::get_trace() {

// Get the model and add it to the trace
model = solver->get_model();
d_trace->set_model(model, current_depth + 1, current_depth + cex_step);
d_trace->set_model(model, current_depth, current_depth + cex_step);

// Done, pop the solver scope
scope.pop();
Expand Down
52 changes: 52 additions & 0 deletions test/regress/issues/51.mcmt
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
(define-state-type
S
(
(p Int)
(p_del Int)
(p_nil Bool)
(x Int)
(x_del Int)
(x_nil Bool)
(y Int)
(y_del Int)
(y_nil Bool))
())
(define-transition-system
TS
S
(and
(= y x)
(= y_del x_del)
(= y_nil true)
(=
p
(+ 1 y))
(= p_del 0)
(=
p_nil
(or false y_nil))
(= 0 y_del)
(= x 1)
(= x_del 0)
(= x_nil false))
(and
(= next.y state.x)
(= next.y_del state.x_del)
(= next.y_nil state.x_nil)
(=
next.p
(+ 1 next.y))
(= next.p_del 0)
(=
next.p_nil
(or false next.y_nil))
(= 0 next.y_del)
(= next.x next.p)
(= next.x_del next.p_del)
(= next.x_nil next.p_nil)))
(query
TS
(= x 1))
(query
TS
(= x 2))
1 change: 1 addition & 0 deletions test/regress/issues/51.mcmt.gold
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
invalid.*
1 change: 1 addition & 0 deletions test/regress/issues/51.mcmt.options
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--engine pdkind --show-trace
12 changes: 12 additions & 0 deletions test/regress/issues/52.mcmt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
(define-state-type
S
((x Int))
((i Int)))
(define-transition-system
TS
S
(= x 0)
(= next.x (+ state.x 1)))
(query
TS
(< x 10))
1 change: 1 addition & 0 deletions test/regress/issues/52.mcmt.gold
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
invalid.*
1 change: 1 addition & 0 deletions test/regress/issues/52.mcmt.options
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--engine pdkind --show-trace

0 comments on commit 0b88fe9

Please sign in to comment.