source: CIVL/examples/concurrency/civl172miss.cvl@ bd6628e

1.23 2.0 acw/focus-triggers main test-branch
Last change on this file since bd6628e was e88e3e3, checked in by Ziqing Luo <ziqing@…>, 9 years ago

commit two examples one of which has an assertion violation that CIVL-1.7.2 cannot detect and the other has an assertion violation that current CIVL cound not deetct before the previosu fix.

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

  • Property mode set to 100644
File size: 361 bytes
Line 
1#include<civlc.cvh>
2$input int N=3;
3int y = 0;
4
5int proc(int pid) {
6 L1: y = $choose_int(2);
7 $atomic{
8 y++;
9 $assert(pid != 0 || y != 3);
10 }
11 goto L1;
12 return 0;
13}
14
15int main() {
16 $proc procs[N];
17
18 $atomic{
19 for (int i = 0; i < N; i++)
20 procs[i] = $spawn proc(i);
21 }
22 for (int i = 0; i < N; i++)
23 $wait(procs[i]);
24 return 0;
25}
Note: See TracBrowser for help on using the repository browser.