source: CIVL/examples/languageFeatures/atomStatementBad.cvl@ 38b7d06

1.23 2.0 main test-branch
Last change on this file since 38b7d06 was 10e8759, checked in by Manchun Zheng <zmanchun@…>, 12 years ago

Implement $atomic and $atom blocks. Tests are added accordingly. TODO: implement related methods in TransientProcessState.java.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@372 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 188 bytes
RevLine 
[d410676]1int n = 3;
2
3void main(){
4 int x = 3;
5
6 // non-determinism, an exception will be thrown
[10e8759]7 $atom{
[d410676]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.