source:
CIVL/examples/languageFeatures/atomChooseBad.cvl@
c33bde8
| Last change on this file since c33bde8 was e6b02c8, checked in by , 12 years ago | |
|---|---|
|
|
| File size: 372 bytes | |
| Line | |
|---|---|
| 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.
