File tree Expand file tree Collapse file tree 5 files changed +38
-0
lines changed
Expand file tree Collapse file tree 5 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ CORE
2+ invar1.smv
3+ --bound 20
4+ ^\[.*\] G x != 10: PROVED up to bound 20$
5+ ^EXIT=0$
6+ ^SIGNAL=0$
7+ --
8+ --
Original file line number Diff line number Diff line change 1+ MODULE main
2+
3+ VAR x : 1..10;
4+
5+ ASSIGN init(x) := 1;
6+ ASSIGN next(x) := x = 10 ? 10 : x + 1;
7+
8+ -- x won't reach 10, since we won't reach 3
9+ INVAR x != 3
10+
11+ LTLSPEC G x != 10
Original file line number Diff line number Diff line change 1+ CORE
2+ invar2.smv
3+
4+ ^file .* line 6: next\(...\) is not allowed here$
5+ ^EXIT=2$
6+ ^SIGNAL=0$
7+ --
8+ --
Original file line number Diff line number Diff line change 1+ MODULE main
2+
3+ VAR x : 1..10;
4+
5+ -- next(...) is not allowed
6+ INVAR next(x) != 3
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ class smv_typecheckt:public typecheckt
4949 typedef enum
5050 {
5151 INIT,
52+ INVAR,
5253 TRANS,
5354 OTHER,
5455 LTL,
@@ -1562,6 +1563,10 @@ void smv_typecheckt::typecheck(
15621563 return ;
15631564
15641565 case smv_parse_treet::modulet::itemt::INVAR:
1566+ typecheck (item.expr , INVAR);
1567+ convert_expr_to (item.expr , bool_typet{});
1568+ return ;
1569+
15651570 case smv_parse_treet::modulet::itemt::FAIRNESS:
15661571 typecheck (item.expr , OTHER);
15671572 convert_expr_to (item.expr , bool_typet{});
You can’t perform that action at this time.
0 commit comments