source: CIVL/examples/locks.cvl@ 844ebd8

1.23 2.0 main test-branch
Last change on this file since 844ebd8 was b6c1fcb, checked in by Tim Zirkel <zirkeltk@…>, 13 years ago

Initial commit of model builder, side effect remover, and other related classes.

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

  • Property mode set to 100644
File size: 349 bytes
RevLine 
[b6c1fcb]1int x;
2int y;
3
4void f(int n) {
5 for (int i=0; i<n; i++) {
6 \when (x==0) x=1;
7 \when (y==0) y=1;
8 y=0;
9 x=0;
10 }
11}
12
13void g(int m) {
14 for (int i=0; i<m; i++) {
15 \when (y==0) y=1;
16 \when (x==0) x=1;
17 x=0;
18 y=0;
19 }
20}
21
22void main() {
23 x = 0;
24 y = 0;
25 \proc p = \spawn f(10);
26 \proc q = \spawn g(10);
27 \wait p;
28 \wait q;
29}
Note: See TracBrowser for help on using the repository browser.