-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #241 from uclid-org/adwait-adtfix
Fix dependency issue with `generateDatatypes`
- Loading branch information
Showing
5 changed files
with
105 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
package uclid | ||
package smt | ||
|
||
import uclid.lang | ||
|
||
object ASTConcreteEvaluator | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/** | ||
This test was failing datatype generation as the record is hidden in the | ||
array type. | ||
|
||
The fix was to have generateDatatypes also track the intermediate type names | ||
generated along the way, and to perform dependency analysis taking into | ||
account these intermediate names. | ||
**/ | ||
|
||
module common { | ||
|
||
type flag_t = enum { A, B }; | ||
|
||
type arr_t = [bv3]a_t; | ||
|
||
type a_t = record { f : flag_t }; | ||
|
||
} | ||
|
||
module main { | ||
|
||
type * = common.*; | ||
|
||
var a : arr_t; | ||
|
||
var f : flag_t; | ||
|
||
procedure [noinline] p1 () | ||
modifies a; | ||
ensures (a[0bv3].f == B); | ||
{} | ||
|
||
init { | ||
call p1(); | ||
} | ||
|
||
next { | ||
if (!(a[0bv3].f == B)) { | ||
havoc a; | ||
} | ||
} | ||
|
||
invariant dummy : (a[0bv3].f == B); | ||
|
||
control { | ||
v = bmc(2); | ||
check; | ||
print_results; | ||
} | ||
|
||
} |