Skip to content

Commit

Permalink
SMV: range types are enum types
Browse files Browse the repository at this point in the history
The range types x..y are syntactic sugar for the explicit enumeration {x, ..., y}.
  • Loading branch information
kroening committed Feb 17, 2025
1 parent fd24964 commit 7aa4f8b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions regression/smv/range-type/range_is_enum1.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
KNOWNBUG
range_is_enum1.smv

^EXIT=0$
^SIGNAL=0$
--
^warning: ignoring
--
Conversion from range to enum not supported.
10 changes: 10 additions & 0 deletions regression/smv/range-type/range_is_enum1.smv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
MODULE main

-- range types are syntactic sugar for enumeration types
VAR x: 0..6;
VAR y: {0, 1, 2, 3, 4, 5, 6};
VAR z: 0..6;

ASSIGN x := y;
ASSIGN y := z;

0 comments on commit 7aa4f8b

Please sign in to comment.