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

1.23 2.0 main test-branch
Last change on this file since 844ebd8 was d96afbd, checked in by Stephen Siegel <siegel@…>, 13 years ago

Debugging ANTLR to AST translation.

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

  • Property mode set to 100644
File size: 265 bytes
Line 
1
2\input int n;
3
4\proc procs[n];
5
6void f(int pid) {
7 for (int i=0; i<n; i++) {
8 \assert \collective(procs, n) i==procs[(i+1)%n]@i ;
9 }
10}
11
12void main() {
13 \assume n>0;
14 for (int i=0; i<n; i++) procs[i] = \spawn f(i);
15 for (int i=0; i<n; i++) \wait procs[i];
16}
Note: See TracBrowser for help on using the repository browser.