1.23
2.0
main
test-branch
|
Last change
on this file since d410676 was d410676, checked in by Manchun Zheng <zmanchun@…>, 12 years ago |
|
Add warning when atomic block is too long, and throw exception when non-determinism in atomic is detected, add tests accordingly.
git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@345 fb995dde-84ed-4084-dfe6-e5aef3e2452c
|
-
Property mode
set to
100644
|
|
File size:
190 bytes
|
| Line | |
|---|
| 1 | int n = 3;
|
|---|
| 2 |
|
|---|
| 3 | void main(){
|
|---|
| 4 | int x = 3;
|
|---|
| 5 |
|
|---|
| 6 | // non-determinism, an exception will be thrown
|
|---|
| 7 | $atomic{
|
|---|
| 8 | $choose {
|
|---|
| 9 | $when (n>2) { x=2; }
|
|---|
| 10 | $when (n>1) { x=1; }
|
|---|
| 11 | default: {x=0; }
|
|---|
| 12 | }
|
|---|
| 13 | }
|
|---|
| 14 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.