source: CIVL/examples/por/trade3.cvl@ 0fdf4bd

1.23 2.0 acw/focus-triggers main test-branch
Last change on this file since 0fdf4bd was 3ff27cf, checked in by Manchun Zheng <zmanchun@…>, 11 years ago

updated examples since $assert/$assume has been changed to functions; fixed the model builder for the new side-effect remover.

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

  • Property mode set to 100644
File size: 276 bytes
Line 
1#include<civlc.cvh>
2
3int x=0;
4
5void p1() {
6 $atomic {
7 x=1;
8 $when(x==2);
9 x=3;
10 }
11}
12
13void p2() {
14 $when(x==1);
15 x=2;
16 x=4;
17}
18
19void main() {
20 $proc proc1 = $spawn p1();
21 $proc proc2 = $spawn p2();
22
23 $wait(proc1);
24 $wait(proc2);
25 $assert((x==3)); // false
26}
Note: See TracBrowser for help on using the repository browser.