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

1.23 2.0 acw/focus-triggers main test-branch
Last change on this file since 844ebd8 was d96afbd, checked in by Stephen Siegel <siegel@…>, 14 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
RevLine 
[34760dc]1
[59b5362]2\input int n;
[34760dc]3
[59b5362]4\proc procs[n];
[34760dc]5
6void f(int pid) {
7 for (int i=0; i<n; i++) {
[d96afbd]8 \assert \collective(procs, n) i==procs[(i+1)%n]@i ;
[34760dc]9 }
10}
11
12void main() {
[59b5362]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];
[34760dc]16}
Note: See TracBrowser for help on using the repository browser.