Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] View of /tests/vis15-bugs/blocks3.diderot
ViewVC logotype

View of /tests/vis15-bugs/blocks3.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4640 - (download) (annotate)
Tue Sep 27 20:54:47 2016 UTC (3 years ago) by glk
File size: 970 byte(s)
initial result of svn export --username anonsvn --password=anonsvn https://svn.smlnj-gforge.cs.uchicago.edu/svn/diderot/branches/vis15/src/tests/
#version 2.0
input real x ("a value") = 42;
input int num ("# strands") = 4;
int iter = 0;

/*
function real test() {
   print("foo = ", foo, "\n");
   return 0;
}
*/

initialize {
   print("global initialize\n");
}

strand demo(int ii) {
   output real out = ii;
   int imax = ii;
   initialize { print("strand ", ii, ": initialize \n"); }
   start { print("strand ", ii, ": start\n"); }
   update {
      print("strand ", ii, ": iter ", iter, " update\n");
      if (iter >= imax) {
         if ((ii/2)*2  == ii) {
           stabilize;
         } else {
           die;
         }
      }
   }
   stabilize { print("strand ", ii, ": stabilize\n"); }
}

start {
   print("global start: hello\n");
}

update {
   print(
      "global update: iter ", iter, " done: #alive = ", numStrands(),
      ", #stable = ", numStable(), ", #active = ", numActive(), "\n");
   iter += 1;
   if (iter > num/2) {
      stabilize;
   }
}

create_collection { demo(ii) | ii in 1..num }

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0