source:
CIVL/examples/languageFeatures/atomChooseBad.cvl@
08299ed
| Last change on this file since 08299ed was e6b02c8, checked in by , 12 years ago | |
|---|---|
|
|
| File size: 372 bytes | |
| Rev | Line | |
|---|---|---|
| [36b5ada] | 1 | /* Commandline execution: |
| 2 | * civl verify atomChooseBad.cvl | |
| 3 | * */ | |
| 4 | int n = 3; | |
| 5 | ||
| 6 | void main(){ | |
| [e6b02c8] | 7 | int x = 3; |
| 8 | ||
| 9 | // non-determinism, an error will be reported | |
| 10 | // because the execution of an $atom block should be | |
| 11 | // finite, deterministic and non-blocking. | |
| 12 | $atom { | |
| 13 | $choose { | |
| 14 | $when (n>2) { x=2; } | |
| 15 | $when (n>1) { x=1; } | |
| 16 | default: {x=0; } | |
| 17 | } | |
| 18 | } | |
| [36b5ada] | 19 | } |
Note:
See TracBrowser
for help on using the repository browser.
