Index: doc/theses/colby_parsons_MMAth/benchmarks/waituntil/cfa/future.cfa
===================================================================
--- doc/theses/colby_parsons_MMAth/benchmarks/waituntil/cfa/future.cfa	(revision 1fbf481de7b6f658d4627f71c96ffba349954e16)
+++ doc/theses/colby_parsons_MMAth/benchmarks/waituntil/cfa/future.cfa	(revision 48ec19a6b7aa401947f7315e4bf4d7092b21285e)
@@ -7,40 +7,133 @@
 #include <string.h>
 
-size_t Clients = 1, Time = 10;
+// #define ANDOR
+
+size_t Processors = 2, Time = 10;
 
 size_t globalTotal = 0;
 future(size_t) A, B, C;
-volatile bool server_done_loop = false;
-volatile bool client_done_loop = false;
+volatile bool done_loop = false;
 volatile bool client_done = false;
 volatile bool server_done = false;
 
-volatile size_t client_count = 0;
-volatile size_t client_loop_count = 0;
+static inline void wait() {
+    #ifdef OR
+    waituntil( A ) { get( A ); }
+    or waituntil( B ) { get( B ); }
+    or waituntil( C ) { get( C ); }
+    #endif
+    #ifdef AND
+    waituntil( A ) { get( A ); }
+    and waituntil( B ) { get( B ); }
+    #endif
+    #ifdef AND3
+    waituntil( A ) { get( A ); }
+    and waituntil( B ) { get( B ); }
+    and waituntil( C ) { get( C ); }
+    #endif
+    #ifdef ANDOR
+    waituntil( A ) { get( A ); }
+    and waituntil( B ) { get( B ); }
+    or waituntil( C ) { get( C ); }
+    #endif
+    #ifdef ORAND
+    (waituntil( A ) { get( A ); }
+    or waituntil( B ) { get( B ); })
+    and waituntil( C ) { get( C ); }
+    #endif
+    #ifdef BASIC
+    get( A );
+    #endif
+}
+
+static inline fulfill( size_t i ) {
+    #ifdef OR
+    if ( i % 3 == 0 ) {
+        fulfil(A, i);
+    } else if ( i % 3 == 1 ) {
+        fulfil(B, i);
+    } else {
+        fulfil(C, i);
+    }
+    #endif
+    #ifdef AND
+    if ( i % 2 == 0 ) {
+        fulfil(A, i);
+        fulfil(B, i);
+    } else {
+        fulfil(B, i);
+        fulfil(A, i);
+    }
+    #endif
+    #ifdef AND3
+    if ( i % 6 == 0 ) {
+        fulfil(A, i);
+        fulfil(B, i);
+        fulfil(C, i);
+    } else if ( i % 6 == 1 ) {
+        fulfil(A, i);
+        fulfil(C, i);
+        fulfil(B, i);
+    } else if ( i % 6 == 2 ) {
+        fulfil(B, i);
+        fulfil(A, i);
+        fulfil(C, i);
+    } else if ( i % 6 == 3 ) {
+        fulfil(B, i);
+        fulfil(C, i);
+        fulfil(A, i);
+    } else if ( i % 6 == 4 ) {
+        fulfil(C, i);
+        fulfil(A, i);
+        fulfil(B, i);
+    } else if ( i % 6 == 5 ) {
+        fulfil(C, i);
+        fulfil(B, i);
+        fulfil(A, i);
+    }
+    #endif
+    #ifdef ANDOR
+    if ( i % 4 == 0 ) {
+        fulfil(A, i);
+        fulfil(B, i);
+    } else if ( i % 4 == 1 ) {
+        fulfil(A, i);
+        fulfil(C, i);
+    } else if ( i % 4 == 2 ) {
+        fulfil(B, i);
+        fulfil(C, i);
+    } else {
+        fulfil(C, i);
+    }
+    #endif
+    #ifdef ORAND
+    if ( i % 4 == 0 ) {
+        fulfil(A, i);
+        fulfil(C, i);
+    } else if ( i % 4 == 1 ) {
+        fulfil(C, i);
+        fulfil(A, i);
+    } else if ( i % 4 == 2 ) {
+        fulfil(B, i);
+        fulfil(C, i);
+    } else {
+        fulfil(C, i);
+        fulfil(B, i);
+    }
+    #endif
+    #ifdef BASIC
+    fulfil(A, i);
+    #endif
+}
+
 thread Client {};
 void main( Client & this ) {
     size_t i = 0;
-    for(;; i++ ) {
-        waituntil( A ) { get(A); }
-        and waituntil( B ) { get(B); }
-        or waituntil( C ) { get(C); }
-
-        // needs to check after waituntil for termination synchronization
-        if ( client_done ) break;
-
-        // Barrier-like synch needed to reset futures safely
-        if ( __atomic_add_fetch( &client_count, 1, __ATOMIC_SEQ_CST ) == Clients ) { // synchronize reset
-            client_count = 0;
-            reset( A );
-            reset( B );
-            reset( C );
-            client_done_loop = true; // unblock clients
-        }
-        while( !client_done_loop ) {} // client barrier
-        if ( __atomic_add_fetch( &client_loop_count, 1, __ATOMIC_SEQ_CST ) == Clients ) { 
-            client_done_loop = false; // reset barrier before clients can proceed past waituntil
-            server_done_loop = true; // unblock server to restart iteration
-            client_loop_count = 0;
-        }
+    for(; !client_done; i++ ) {
+        wait();
+        reset( A );
+        reset( B );
+        reset( C );
+        done_loop = true;
     }
     __atomic_fetch_add( &globalTotal, i, __ATOMIC_SEQ_CST );
@@ -50,18 +143,7 @@
 void main( Server & this ) {
     for( size_t i = 0; !server_done; i++ ) {
-        if ( i % 4 == 0 ) {
-            fulfil(A, i);
-            fulfil(B, i);
-        } else if ( i % 4 == 1 ) {
-            fulfil(A, i);
-            fulfil(C, i);
-        } else if ( i % 4 == 2 ) {
-            fulfil(B, i);
-            fulfil(C, i);
-        } else {
-            fulfil(C, i);
-        }
-        while( !server_done_loop && !server_done ) {} // server barrier
-        server_done_loop = false; // reset server barrier
+        fulfill( i );
+        while( !done_loop ) {}
+        done_loop = false;
     }
 }
@@ -69,12 +151,8 @@
 int main( int argc, char * argv[] ) {
     switch ( argc ) {
-	  case 3:
-		if ( strcmp( argv[2], "d" ) != 0 ) {			// default ?
-			Time = atoi( argv[2] );
-		} // if
 	  case 2:
 		if ( strcmp( argv[1], "d" ) != 0 ) {			// default ?
-			Clients = atoi( argv[1] );
-			if ( Clients < 1 ) goto Usage;
+			Time = atoi( argv[1] );
+			if ( Time < 0 ) goto Usage;
 		} // if
 	  case 1:											// use defaults
@@ -83,22 +161,21 @@
 	  Usage:
 		sout | "Usage: " | argv[0]
-             | " [ clients (> 0) | 'd' (default " | Clients
-			 | ") ] [ time (>= 0) | 'd' (default " | Time
+             | "[ time (>= 0) | 'd' (default " | Time
 			 | ") ]" ;
 		exit( EXIT_FAILURE );
 	} // switch
-    processor p[Clients];
+    processor p[Processors - 1];
 
     {
-        Client c[Clients];
+        Server s;
         {
-            Server s;
+            Client c;
 
             sleep(Time`s);
-            server_done = true;
+
+            client_done = true;
         }
-        while( available(A) || available(B) || available(C) ) {}
-        client_done = true;
-        fulfil( C, 0 );
+        server_done = true;
+        done_loop = true;
     }
     printf("%zu\n", globalTotal);
Index: doc/theses/colby_parsons_MMAth/benchmarks/waituntil/cfa/sidechan.cfa
===================================================================
--- doc/theses/colby_parsons_MMAth/benchmarks/waituntil/cfa/sidechan.cfa	(revision 1fbf481de7b6f658d4627f71c96ffba349954e16)
+++ doc/theses/colby_parsons_MMAth/benchmarks/waituntil/cfa/sidechan.cfa	(revision 48ec19a6b7aa401947f7315e4bf4d7092b21285e)
@@ -37,5 +37,5 @@
 thread Consumer {};
 void main( Consumer & this ) {
-    int idx = __atomic_fetch_add( &cons_counter, 1, __ATOMIC_SEQ_CST ) % Channels;
+    const int idx = __atomic_fetch_add( &cons_counter, 1, __ATOMIC_SEQ_CST ) % Channels;
     size_t val, i = 0;
     try {
@@ -49,5 +49,5 @@
 thread Producer {};
 void main( Producer & this ) {
-    int idx = __atomic_fetch_add( &prod_counter, 1, __ATOMIC_SEQ_CST ) % Channels;
+    const int idx = __atomic_fetch_add( &prod_counter, 1, __ATOMIC_SEQ_CST ) % Channels;
     try {
         for( size_t i = 0;; i++ ) {
Index: doc/theses/colby_parsons_MMAth/benchmarks/waituntil/run
===================================================================
--- doc/theses/colby_parsons_MMAth/benchmarks/waituntil/run	(revision 1fbf481de7b6f658d4627f71c96ffba349954e16)
+++ doc/theses/colby_parsons_MMAth/benchmarks/waituntil/run	(revision 48ec19a6b7aa401947f7315e4bf4d7092b21285e)
@@ -85,14 +85,16 @@
 }
 
-# numtimes=5
-numtimes=1
+numtimes=3
+# numtimes=1
 
 # num_threads='2 4 8 16 24 32'
-# side_chan_threads='6 12 18 24 30' # must be mults of 6
+side_chan_threads='6 12 18 24 30' # must be mults of 6
 num_threads='2'
-side_chan_threads='6'
+# side_chan_threads='6'
 
 chan_size='10'
 future_time='10'
+future_flags=('-DOR' '-DAND3' '-DANDOR' '-DORAND')
+future_names=('OR' 'AND' 'ANDOR' 'ORAND')
 
 # toggle benchmarks
@@ -103,6 +105,6 @@
 spin=${false}
 contend=${false}
-sidechan=${false}
-# future=${false}
+# sidechan=${false}
+future=${false}
 
 runCFA=${true}
@@ -164,10 +166,7 @@
 
 run_future() {
-    for p in ${num_threads} ; do
-        pre_args=$(( ${p} - 1 ))
-        affinity ${p}
-        preprint="${p}\t"
-        repeat_command taskset -c ${taskset} ./a.${hostname} ${pre_args} ${post_args}
-    done
+    affinity 2
+    preprint="2\t"
+    repeat_command taskset -c ${taskset} ./a.${hostname} ${post_args}
 }
 
@@ -247,5 +246,5 @@
         ${cfa} ${cfa_flags} sidechan.cfa -o a.${hostname} > /dev/null 2>&1
         run_side_chan
-        rm a.${hostname}
+        # rm a.${hostname}
         cd - > /dev/null
     fi # done CFA
@@ -262,23 +261,25 @@
 
 if [ ${future} -eq ${true} ] ; then
-    echo "future: "
     post_args=${future_time}
-    if [ ${runCFA} -eq ${true} ] ; then
-        cd cfa # CFA RUN
-        print_header 'CFA'
-        ${cfa} ${cfa_flags} future.cfa -o a.${hostname} > /dev/null 2>&1
-        run_future
-        rm a.${hostname}
-        cd - > /dev/null
-    fi # done CFA
-
-    if [ ${runUCPP} -eq ${true} ] ; then
-        cd ucpp
-        print_header 'uC++'
-        ${UCPP} ${UCPPflags} future.cc -o a.${hostname} > /dev/null 2>&1
-        run_future
-        rm a.${hostname}
-        cd - > /dev/null
-    fi # done Go
-fi
-
+    for i in ${!future_flags[@]}; do
+        echo 'future '${future_names[$i]}':'
+        if [ ${runCFA} -eq ${true} ] ; then
+            cd cfa # CFA RUN
+            print_header 'CFA'
+            ${cfa} ${cfa_flags} ${future_flags[$i]} future.cfa -o a.${hostname} > /dev/null 2>&1
+            run_future
+            rm a.${hostname}
+            cd - > /dev/null
+        fi # done CFA
+
+        if [ ${runUCPP} -eq ${true} ] ; then
+            cd ucpp
+            print_header 'uC++'
+            ${UCPP} ${UCPPflags} ${future_flags[$i]} future.cc -o a.${hostname} > /dev/null 2>&1
+            run_future
+            rm a.${hostname}
+            cd - > /dev/null
+        fi # done Go
+    done
+fi
+
Index: doc/theses/colby_parsons_MMAth/benchmarks/waituntil/ucpp/future.cc
===================================================================
--- doc/theses/colby_parsons_MMAth/benchmarks/waituntil/ucpp/future.cc	(revision 1fbf481de7b6f658d4627f71c96ffba349954e16)
+++ doc/theses/colby_parsons_MMAth/benchmarks/waituntil/ucpp/future.cc	(revision 48ec19a6b7aa401947f7315e4bf4d7092b21285e)
@@ -3,40 +3,133 @@
 #include <uFuture.h>
 
-size_t Clients = 2, Time = 10;
+// #define ANDOR
 
+size_t Processors = 2, Time = 10;
 size_t globalTotal = 0;
-Future_ISM<size_t> A, B, C;
-volatile bool server_done_loop = false;
-volatile bool client_done_loop = false;
+volatile bool done_loop = false;
 volatile bool client_done = false;
 volatile bool server_done = false;
 
-volatile size_t client_count = 0;
-volatile size_t client_loop_count = 0;
+Future_ISM<size_t> A, B, C;
+
+static inline void wait() {
+    #ifdef OR
+    _Select( A ) { A(); }
+    or _Select( B ) { B(); }
+    or _Select( C ) { C(); }
+    #endif
+    #ifdef AND
+    _Select( A ) { A(); }
+    and _Select( B ) { B(); }
+    #endif
+    #ifdef AND3
+    _Select( A ) { A(); }
+    and _Select( B ) { B(); }
+    and _Select( C ) { C(); }
+    #endif
+    #ifdef ANDOR
+    _Select( A ) { A(); }
+    and _Select( B ) { B(); }
+    or _Select( C ) { C(); }
+    #endif
+    #ifdef ORAND
+    (_Select( A ) { A(); }
+    or _Select( B ) { B(); })
+    and _Select( C ) { C(); }
+    #endif
+    #ifdef BASIC
+    A();
+    #endif
+}
+
+static inline void fulfill( size_t i ) {
+    #ifdef OR
+    if ( i % 3 == 0 ) {
+        A.delivery(i);
+    } else if ( i % 3 == 1 ) {
+        B.delivery(i);
+    } else {
+        C.delivery(i);
+    }
+    #endif
+    #ifdef AND
+    if ( i % 2 == 0 ) {
+        A.delivery(i);
+        B.delivery(i);
+    } else {
+        B.delivery(i);
+        A.delivery(i);
+    }
+    #endif
+    #ifdef AND3
+    if ( i % 6 == 0 ) {
+        A.delivery(i);
+        B.delivery(i);
+        C.delivery(i);
+    } else if ( i % 6 == 1 ) {
+        A.delivery(i);
+        C.delivery(i);
+        B.delivery(i);
+    } else if ( i % 6 == 2 ) {
+        B.delivery(i);
+        A.delivery(i);
+        C.delivery(i);
+    } else if ( i % 6 == 3 ) {
+        B.delivery(i);
+        C.delivery(i);
+        A.delivery(i);
+    } else if ( i % 6 == 4 ) {
+        C.delivery(i);
+        A.delivery(i);
+        B.delivery(i);
+    } else if ( i % 6 == 5 ) {
+        C.delivery(i);
+        B.delivery(i);
+        A.delivery(i);
+    }
+    #endif
+    #ifdef ANDOR
+    if ( i % 4 == 0 ) {
+        A.delivery(i);
+        B.delivery(i);
+    } else if ( i % 4 == 1 ) {
+        A.delivery(i);
+        C.delivery(i);
+    } else if ( i % 4 == 2 ) {
+        B.delivery(i);
+        C.delivery(i);
+    } else {
+        C.delivery(i);
+    }
+    #endif
+    #ifdef ORAND
+    if ( i % 4 == 0 ) {
+        A.delivery(i);
+        C.delivery(i);
+    } else if ( i % 4 == 1 ) {
+        C.delivery(i);
+        A.delivery(i);
+    } else if ( i % 4 == 2 ) {
+        B.delivery(i);
+        C.delivery(i);
+    } else {
+        C.delivery(i);
+        B.delivery(i);
+    }
+    #endif
+    #ifdef BASIC
+    A.delivery(i);
+    #endif
+}
+
 _Task Client {
 	void main() {
 		size_t i = 0;
-        for(;; i++ ) {
-            _Select( A ) { A(); }
-            and _Select( B ) { B(); }
-            or _Select( C ) { C(); }
-
-            // needs to check after waituntil for termination synchronization
-            if ( client_done ) break;
-            
-            // Barrier-like synch needed to reset futures safely
-            if ( __atomic_add_fetch(&client_count, 1, __ATOMIC_SEQ_CST) == Clients ) {
-                client_count = 0;
-                A.reset();
-                B.reset();
-                C.reset();
-                client_done_loop = true;
-            }
-            while( !client_done_loop ) {} // client barrier
-            if ( __atomic_add_fetch( &client_loop_count, 1, __ATOMIC_SEQ_CST ) == Clients ) { 
-                client_done_loop = false; // reset barrier before clients can proceed past waituntil
-                server_done_loop = true; // unblock server to restart iteration
-                client_loop_count = 0;
-            }
+        for(; !client_done; i++ ) {
+            wait();
+            A.reset();
+            B.reset();
+            C.reset();
+            done_loop = true;
         }
         __atomic_fetch_add( &globalTotal, i, __ATOMIC_SEQ_CST );
@@ -47,18 +140,7 @@
 	void main() {
 		for( size_t i = 0; !server_done; i++ ) {
-            if ( i % 4 == 0 ) {
-                A.delivery(i);
-                B.delivery(i);
-            } else if ( i % 4 == 1 ) {
-                A.delivery(i);
-                C.delivery(i);
-            } else if ( i % 4 == 2 ) {
-                B.delivery(i);
-                C.delivery(i);
-            } else {
-                C.delivery(i);
-            }
-            while( !server_done_loop && !server_done ) {} // server barrier
-            server_done_loop = false; // reset server barrier
+            fulfill( i );
+            while( !done_loop ) {}
+            done_loop = false;
         }
 	}
@@ -67,12 +149,8 @@
 int main( int argc, char * argv[] ) {
 	switch ( argc ) {
-	  case 3:
-		if ( strcmp( argv[2], "d" ) != 0 ) {			// default ?
-			Time = atoi( argv[2] );
-		} // if
 	  case 2:
 		if ( strcmp( argv[1], "d" ) != 0 ) {			// default ?
-			Clients = atoi( argv[1] );
-			if ( Clients < 1 ) goto Usage;
+			Time = atoi( argv[1] );
+			if ( Time < 0 ) goto Usage;
 		} // if
 	  case 1:											// use defaults
@@ -81,23 +159,21 @@
 	  Usage:
 		cerr << "Usage: " << argv[0]
-             << " [ clients (> 0) | 'd' (default " << Clients
-			 << ") ] [ time (>= 0) | 'd' (default " << Time
+             << "[ time (>= 0) | 'd' (default " << Time
 			 << ") ]" ;
 		exit( EXIT_FAILURE );
 	} // switch
-    uProcessor p[Clients];
+    uProcessor p[Processors - 1];
 
     {
-        Client c[Clients];
+        Server s;
         {
-            Server s;
+            Client c;
 
             uBaseTask::sleep( uDuration( Time ) );
 
-            server_done = true;
+            client_done = true;
         }
-        while( A.available() || B.available() || C.available() ) {}
-        client_done = true;
-        C.delivery(1); // can't deliver 0 since it causes ambiguity
+        server_done = true;
+        done_loop = true;
     }
     cout << globalTotal << endl;
