source: CIVL/examples/por/loop.cvl@ 227bd05

1.23 2.0 main test-branch
Last change on this file since 227bd05 was fc15297, checked in by Manchun Zheng <zmanchun@…>, 11 years ago

added an example for revealing a bug in the POR when there is a loop

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

  • Property mode set to 100644
File size: 329 bytes
Line 
1#include<civlc.cvh>
2
3int g=0;
4
5void proc0(){
6 int x,y,z;
7
8 while(1){
9 x=0;
10 y=0;
11 z=0;
12 }
13}
14
15void proc1(){
16 g=1;
17}
18
19void proc2(){
20 g=2;
21}
22
23int main(){
24 $proc p0, p1, p2;
25
26 $atomic{
27 p0=$spawn proc0();
28 p1=$spawn proc1();
29 p2=$spawn proc2();
30 }
31 $wait(p0);
32 $wait(p1);
33 $wait(p2);
34 $assert(g>0);
35}
Note: See TracBrowser for help on using the repository browser.