source:
CIVL/examples/languageFeatures/atomChooseBad.cvl@
b50d2e7
| Last change on this file since b50d2e7 was 36b5ada, checked in by , 12 years ago | |
|---|---|
|
|
| File size: 352 bytes | |
| Rev | Line | |
|---|---|---|
| [36b5ada] | 1 | /* Commandline execution: |
| 2 | * civl verify atomChooseBad.cvl | |
| 3 | * */ | |
| 4 | int n = 3; | |
| 5 | ||
| 6 | void main(){ | |
| 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 | } | |
| 19 | } |
Note:
See TracBrowser
for help on using the repository browser.
