Index: doc/theses/colby_parsons_MMAth/benchmarks/waituntil/cfa/order.cfa
===================================================================
--- doc/theses/colby_parsons_MMAth/benchmarks/waituntil/cfa/order.cfa	(revision a1f0cb667245ca06f92ac43da8ee0b87f481ab7a)
+++ doc/theses/colby_parsons_MMAth/benchmarks/waituntil/cfa/order.cfa	(revision a1f0cb667245ca06f92ac43da8ee0b87f481ab7a)
@@ -0,0 +1,77 @@
+#include <select.hfa>
+#include <thread.hfa>
+#include <channel.hfa>
+#include <locks.hfa>
+#include <fstream.hfa>
+#include <stdio.h>
+#include <time.hfa>
+#include <string.h>
+
+size_t ChannelSize = 100, Channels = 2;
+
+channel(size_t) * chans;
+
+size_t globalTotal = 0;
+int cons_counter = 0, prod_counter = 0;
+
+thread SelectConsumer {};
+void main( SelectConsumer & this ) {
+    size_t val, i = 0;
+    try {
+        for(;; i++ ) {
+            waituntil( val << chans[0] ) {} or waituntil( val << chans[1] ) {}
+        }
+    } catch( channel_closed * e ) {}
+    __atomic_fetch_add( &globalTotal, i, __ATOMIC_SEQ_CST );
+}
+
+thread SelectProducer {};
+void main( SelectProducer & this ) {
+    try {
+        for( size_t i = 0;; i++ ) {
+            waituntil( i >> chans[0] ) {} or waituntil( i >> chans[1] ) {}
+        }
+    } catch( channel_closed * e ) {}
+}
+
+thread Consumer {};
+void main( Consumer & this ) {
+    size_t val, i = 0;
+    try {
+        for(;; i++ ) {
+            remove( chans[1] );
+        }
+    } catch( channel_closed * e ) {}
+    __atomic_fetch_add( &globalTotal, i, __ATOMIC_SEQ_CST );
+}
+
+thread Producer {};
+void main( Producer & this ) {
+    try {
+        for( size_t i = 0;; i++ ) {
+            insert( chans[1], i );
+        }
+    } catch( channel_closed * e ) {}
+}
+
+int main( int argc, char * argv[] ) {
+    processor p[3];
+
+    chans = aalloc( Channels );
+    for ( i; Channels )
+        chans[i]{ ChannelSize };
+
+    {
+        Producer p;
+        SelectProducer sp;
+        Consumer c;
+        SelectConsumer sc;
+
+        sleep(10`s);
+
+        for ( i; Channels )
+            close( chans[i] );
+    }
+    adelete( chans );
+    printf("%zu\n", globalTotal);
+}
Index: doc/theses/colby_parsons_MMAth/benchmarks/waituntil/data/nasus.txt
===================================================================
--- doc/theses/colby_parsons_MMAth/benchmarks/waituntil/data/nasus.txt	(revision a1f0cb667245ca06f92ac43da8ee0b87f481ab7a)
+++ doc/theses/colby_parsons_MMAth/benchmarks/waituntil/data/nasus.txt	(revision a1f0cb667245ca06f92ac43da8ee0b87f481ab7a)
@@ -0,0 +1,464 @@
+5
+2 4 8 16 24 32
+6 12 18 24 30
+CFA Go 
+contend2: 
+CFA:
+cores	throughput (entries)
+2	19898679
+2	19894150
+2	20137125
+2	19991476
+2	19234635
+4	24597417
+4	23137681
+4	23918947
+4	23122373
+4	24953526
+8	10070010
+8	9620363
+8	9545751
+8	9424066
+8	9460164
+16	6753442
+16	6886566
+16	7291622
+16	6762093
+16	6695073
+24	5786637
+24	6567375
+24	6523225
+24	6611613
+24	6535767
+32	6227126
+32	5669331
+32	5618844
+32	6231765
+32	5572424
+Go:
+cores	throughput (entries)
+2	40037157
+2	38945848
+2	37571150
+2	39936025
+2	37039238
+4	32175550
+4	31962675
+4	32105762
+4	31933749
+4	31992633
+8	15195906
+8	16230217
+8	15627983
+8	15570514
+8	16559040
+16	7221728
+16	6952933
+16	7086069
+16	7031895
+16	7093710
+24	4978681
+24	5140366
+24	5128459
+24	4630814
+24	4676848
+32	4131795
+32	4105783
+32	4481729
+32	4272797
+32	4268574
+contend4: 
+CFA:
+cores	throughput (entries)
+2	16339398
+2	14695219
+2	13848084
+2	16291888
+2	15029757
+4	19966677
+4	20854760
+4	19653169
+4	19833858
+4	21023458
+8	10699611
+8	11219280
+8	10511145
+8	11041690
+8	10967281
+16	7290494
+16	7218116
+16	7842921
+16	7623273
+16	7330702
+24	6109672
+24	6581276
+24	6395101
+24	6472148
+24	6199770
+32	6673246
+32	6836995
+32	6767080
+32	6038521
+32	6864899
+Go:
+cores	throughput (entries)
+2	20077486
+2	20275897
+2	20038097
+2	19919690
+2	20116470
+4	20032686
+4	19957974
+4	20134395
+4	20067732
+4	20055099
+8	11869308
+8	12165199
+8	11236909
+8	12228766
+8	12011988
+16	8018777
+16	8040533
+16	8026976
+16	7952682
+16	7853705
+24	6857428
+24	6334115
+24	6325502
+24	7042792
+24	6902630
+32	4949042
+32	4967659
+32	6227926
+32	6243556
+32	5023701
+contend8: 
+CFA:
+cores	throughput (entries)
+2	3915791
+2	3886691
+2	3959442
+2	4981399
+2	3941817
+4	11127006
+4	11221830
+4	11079265
+4	11151398
+4	11224959
+8	9223444
+8	9024163
+8	9123901
+8	9087014
+8	9453781
+16	7377324
+16	7136077
+16	6563752
+16	7158678
+16	6541387
+24	5955510
+24	5996812
+24	5746359
+24	6361212
+24	5918614
+32	6357515
+32	5691522
+32	6263042
+32	6347267
+32	6368643
+Go:
+cores	throughput (entries)
+2	11062704
+2	11834447
+2	11977981
+2	10213219
+2	11076487
+4	15936414
+4	15949952
+4	15949080
+4	15934646
+4	15939730
+8	8723728
+8	8543977
+8	8526952
+8	9357181
+8	9139019
+16	6443224
+16	6722238
+16	7064065
+16	7531808
+16	7044549
+24	5340807
+24	5546286
+24	6487048
+24	5620639
+24	6466995
+32	4698418
+32	3932033
+32	5878789
+32	4682276
+32	5956515
+spin2: 
+CFA:
+cores	throughput (entries)
+2	17117536
+2	20202783
+2	20556179
+2	20392088
+2	20470298
+4	25887873
+4	25952265
+4	25848766
+4	25837700
+4	25801944
+8	11134838
+8	11555854
+8	11188929
+8	11128470
+8	11699863
+16	8258208
+16	8448259
+16	7713563
+16	7775916
+16	8421946
+24	7250842
+24	7302187
+24	7447901
+24	7262134
+24	6677079
+32	6216074
+32	6948262
+32	6200769
+32	6901374
+32	6114399
+Go:
+cores	throughput (entries)
+2	51893214
+2	51889467
+2	51939463
+2	51801002
+2	51903499
+4	48397770
+4	48273065
+4	48357522
+4	48414843
+4	48354460
+8	17017886
+8	15747240
+8	17507556
+8	16836401
+8	16991476
+16	9864825
+16	9736384
+16	9466884
+16	10636287
+16	11018805
+24	8878797
+24	8309111
+24	8382343
+24	8208643
+24	8267685
+32	7726655
+32	8676947
+32	9565782
+32	7378698
+32	8821379
+spin4: 
+CFA:
+cores	throughput (entries)
+2	10885361
+2	10986228
+2	10922593
+2	10981854
+2	10802839
+4	20170365
+4	20575238
+4	21331044
+4	20673253
+4	18556265
+8	11737217
+8	11748248
+8	11486998
+8	12242609
+8	12343969
+16	7973731
+16	8434888
+16	7739464
+16	8085925
+16	8451073
+24	7494298
+24	7770603
+24	6847549
+24	6848642
+24	6955404
+32	6283388
+32	6267627
+32	6394047
+32	7238228
+32	6447263
+Go:
+cores	throughput (entries)
+2	24474628
+2	24450635
+2	24464130
+2	24388835
+2	24399848
+4	21964092
+4	21927900
+4	21917894
+4	21907439
+4	21919829
+8	9292641
+8	9897648
+8	10087481
+8	9856804
+8	9352230
+16	6875204
+16	7275156
+16	7308155
+16	6185134
+16	7332646
+24	5314855
+24	6130990
+24	6137104
+24	6149285
+24	6138690
+32	5794913
+32	4410110
+32	5699670
+32	5804679
+32	5715486
+spin8: 
+CFA:
+cores	throughput (entries)
+2	7533145
+2	7594283
+2	7638398
+2	7594530
+2	7485690
+4	16766189
+4	18061179
+4	17993902
+4	18011040
+4	16460498
+8	10867024
+8	10843424
+8	11083909
+8	10948061
+8	10822110
+16	7501685
+16	8353481
+16	7320773
+16	7526689
+16	8246035
+24	7236819
+24	6972608
+24	6408133
+24	6354528
+24	6509391
+32	5836946
+32	6608952
+32	6641278
+32	6795005
+32	5860346
+Go:
+cores	throughput (entries)
+2	13790874
+2	14567852
+2	14205324
+2	14504228
+2	14384568
+4	16067014
+4	16066057
+4	16073591
+4	16030101
+4	16061818
+8	9578833
+8	9532381
+8	8701030
+8	9584525
+8	8916123
+16	6552319
+16	6587695
+16	6573825
+16	7169936
+16	7405217
+24	6641876
+24	6621158
+24	5759567
+24	6683788
+24	5741050
+32	4853916
+32	6089821
+32	4777627
+32	4775830
+32	4797652
+sidechan: 
+CFA:
+cores	throughput (entries)
+6	52350358
+6	51089420
+6	51599645
+6	49724864
+6	50690583
+12	22415327
+12	20081063
+12	21935873
+12	21880536
+12	20033232
+18	15456025
+18	15387442
+18	14382883
+18	14035015
+18	15592819
+24	11865714
+24	12301650
+24	12088656
+24	12576841
+24	12162360
+30	13853077
+30	12833176
+30	13571913
+30	12692339
+30	12684621
+Go:
+cores	throughput (entries)
+6	45626050
+6	45619431
+6	44683942
+6	43678277
+6	45086748
+12	35205036
+12	34228171
+12	33791468
+12	35703621
+12	35832911
+18	26240847
+18	25969956
+18	21891404
+18	23696718
+18	24735429
+24	15259398
+24	14293074
+24	15512026
+24	15143365
+24	14071826
+30	11492999
+30	11337248
+30	12332749
+30	12230220
+30	12142768
+order: 
+CFA:
+cores	throughput (entries)
+4	153212169
+4	157994884
+4	158642649
+4	158440202
+4	158443807
+Go:
+cores	throughput (entries)
+4	69227256
+4	68925276
+4	68974826
+4	69283275
+4	69040020
Index: doc/theses/colby_parsons_MMAth/benchmarks/waituntil/data/nasus_Order
===================================================================
--- doc/theses/colby_parsons_MMAth/benchmarks/waituntil/data/nasus_Order	(revision a1f0cb667245ca06f92ac43da8ee0b87f481ab7a)
+++ doc/theses/colby_parsons_MMAth/benchmarks/waituntil/data/nasus_Order	(revision a1f0cb667245ca06f92ac43da8ee0b87f481ab7a)
@@ -0,0 +1,1 @@
+15844020 & 6904002
Index: doc/theses/colby_parsons_MMAth/benchmarks/waituntil/data/nasus_future.txt
===================================================================
--- doc/theses/colby_parsons_MMAth/benchmarks/waituntil/data/nasus_future.txt	(revision a1f0cb667245ca06f92ac43da8ee0b87f481ab7a)
+++ doc/theses/colby_parsons_MMAth/benchmarks/waituntil/data/nasus_future.txt	(revision a1f0cb667245ca06f92ac43da8ee0b87f481ab7a)
@@ -0,0 +1,64 @@
+5
+2
+6
+CFA 
+future OR:
+CFA:
+cores	throughput (entries)
+2	15566828
+2	15086557
+2	15067263
+2	15120455
+2	15358905
+uC++:
+cores	throughput (entries)
+2	6900123
+2	7041717
+2	6856625
+2	7099780
+2	7001880
+future AND:
+CFA:
+cores	throughput (entries)
+2	12229605
+2	11796118
+2	11763758
+2	11973787
+2	11975449
+uC++:
+cores	throughput (entries)
+2	4431174
+2	4426260
+2	4494870
+2	4481836
+2	4521053
+future ANDOR:
+CFA:
+cores	throughput (entries)
+2	13551357
+2	13524679
+2	13222745
+2	13556235
+2	13315978
+uC++:
+cores	throughput (entries)
+2	10932140
+2	10528383
+2	10136509
+2	8971750
+2	10027387
+future ORAND:
+CFA:
+cores	throughput (entries)
+2	13020750
+2	13202965
+2	13277704
+2	13179737
+2	13017765
+uC++:
+cores	throughput (entries)
+2	5293289
+2	5185935
+2	5188311
+2	5175251
+2	5191507
Index: doc/theses/colby_parsons_MMAth/benchmarks/waituntil/data/pyke.txt
===================================================================
--- doc/theses/colby_parsons_MMAth/benchmarks/waituntil/data/pyke.txt	(revision a1f0cb667245ca06f92ac43da8ee0b87f481ab7a)
+++ doc/theses/colby_parsons_MMAth/benchmarks/waituntil/data/pyke.txt	(revision a1f0cb667245ca06f92ac43da8ee0b87f481ab7a)
@@ -0,0 +1,465 @@
+5
+2 4 8 16 24 32
+6 12 18 24 30
+CFA Go 
+contend2: 
+CFA:
+cores	throughput (entries)
+2	9967035
+2	9800656
+2	9930224
+2	9985950
+2	9866750
+4	15365587
+4	15230284
+4	14863936
+4	14792464
+4	14456437
+8	11177325
+8	11399628
+8	11247990
+8	11116979
+8	11180166
+16	8630393
+16	8413553
+16	8586178
+16	8452667
+16	8510492
+24	8172246
+24	8190544
+24	8037263
+24	8029636
+24	8330698
+32	8403854
+32	8472348
+32	8493152
+32	8362818
+32	8390131
+Go:
+cores	throughput (entries)
+2	44914185
+2	45769369
+2	37580742
+2	41070461
+2	39787488
+4	32818773
+4	33049966
+4	33188220
+4	33045833
+4	33316967
+8	15983204
+8	15830646
+8	15569769
+8	15914976
+8	15894024
+16	9079211
+16	8908247
+16	9129370
+16	8989494
+16	9110099
+24	7927422
+24	7855155
+24	7915465
+24	7877308
+24	7971973
+32	7126295
+32	7450573
+32	7349965
+32	7480862
+32	7325246
+contend4: 
+CFA:
+cores	throughput (entries)
+2	7711287
+2	7636048
+2	7879877
+2	7632539
+2	7716597
+4	13538861
+4	13570963
+4	14061876
+4	13745413
+4	13435094
+8	11783506
+8	11835871
+8	11305173
+8	11595505
+8	11776842
+16	9314177
+16	9267802
+16	9198536
+16	9329322
+16	9120626
+24	8519394
+24	8350923
+24	8526669
+24	8506273
+24	8454808
+32	8212978
+32	8161628
+32	8197493
+32	8326109
+32	8335861
+Go:
+cores	throughput (entries)
+2	19305443
+2	18617443
+2	18798213
+2	18900110
+2	18730396
+4	16583610
+4	16976951
+4	16601629
+4	17066647
+4	16921525
+8	10182191
+8	10151597
+8	10274864
+8	10132974
+8	10313177
+16	8112814
+16	8154933
+16	8177719
+16	8144694
+16	8210164
+24	7494676
+24	7424790
+24	7503452
+24	7489997
+24	7457173
+32	7464628
+32	7597947
+32	7465098
+32	7578292
+32	7146705
+contend8: 
+CFA:
+cores	throughput (entries)
+2	4553172
+2	4358948
+2	4633044
+2	4298938
+2	4433528
+4	9268621
+4	9316788
+4	9134321
+4	9317794
+4	9096543
+8	11281989
+8	12106942
+8	12155325
+8	12070751
+8	11840874
+16	10199853
+16	10248616
+16	10268593
+16	10303374
+16	10322409
+24	8729770
+24	8707377
+24	8718720
+24	8638369
+24	8586905
+32	7948616
+32	8162892
+32	7993031
+32	7895951
+32	8222873
+Go:
+cores	throughput (entries)
+2	9455116
+2	9529410
+2	8207766
+2	7795882
+2	7684988
+4	7758234
+4	8248808
+4	8204068
+4	8252258
+4	7820115
+8	7224181
+8	7156840
+8	7248816
+8	7169039
+8	7250521
+16	6412117
+16	6429773
+16	6414842
+16	6474895
+16	6493768
+24	5910867
+24	5943544
+24	5889434
+24	5960548
+24	5854276
+32	5574433
+32	5501965
+32	5660822
+32	5525961
+32	5571871
+spin2: 
+CFA:
+cores	throughput (entries)
+2	11091685
+2	10716028
+2	10263026
+2	11024866
+2	10141356
+4	13458646
+4	12675243
+4	13601822
+4	12493029
+4	13526328
+8	11857151
+8	12449743
+8	12402808
+8	12115910
+8	12328377
+16	9285877
+16	9431990
+16	9498253
+16	9288202
+16	9314209
+24	9134958
+24	9037642
+24	8894318
+24	8878258
+24	8870078
+32	9574533
+32	9558834
+32	8891248
+32	9425577
+32	9575672
+Go:
+cores	throughput (entries)
+2	41407277
+2	41185974
+2	42546942
+2	41599985
+2	41537281
+4	18274724
+4	19403137
+4	19174836
+4	19832568
+4	20434642
+8	12161534
+8	11877215
+8	12092572
+8	11870295
+8	11953849
+16	9400275
+16	9379035
+16	9121639
+16	9313220
+16	9156810
+24	8163137
+24	8212680
+24	7718772
+24	8329378
+24	8242728
+32	8698636
+32	8738083
+32	8712188
+32	8968355
+32	9000456
+spin4: 
+CFA:
+cores	throughput (entries)
+2	8543234
+2	8548877
+2	8428083
+2	8904947
+2	8478075
+4	11365692
+4	12109844
+4	11446726
+4	11515624
+4	11992092
+8	11984771
+8	12153123
+8	11709308
+8	12103916
+8	11953110
+16	9904786
+16	9763922
+16	9743041
+16	9913004
+16	9661295
+24	8960227
+24	8932460
+24	8985062
+24	8957904
+24	9030960
+32	9189691
+32	9389309
+32	9431123
+32	9307976
+32	9216590
+Go:
+cores	throughput (entries)
+2	15669478
+2	15308587
+2	15510092
+2	15437039
+2	15227836
+4	10451307
+4	10417069
+4	9804714
+4	10495039
+4	9877950
+8	7258556
+8	7318110
+8	7471921
+8	7382093
+8	7262086
+16	6219816
+16	6146980
+16	6202815
+16	6120133
+16	6224194
+24	5730137
+24	5586527
+24	5596617
+24	5623077
+24	5682422
+32	5926340
+32	5851871
+32	5871301
+32	5875055
+32	5845408
+spin8: 
+CFA:
+cores	throughput (entries)
+2	5364493
+2	5298352
+2	5343768
+2	5369572
+2	5384383
+4	9898690
+4	9968625
+4	10025418
+4	9986221
+4	10228985
+8	11846407
+8	11885865
+8	11941307
+8	12353081
+8	12148637
+16	10518783
+16	10615015
+16	10459213
+16	10403451
+16	10398262
+24	8988384
+24	8997726
+24	8966938
+24	9034410
+24	9048297
+32	8790460
+32	8967228
+32	8962159
+32	8753670
+32	8859608
+Go:
+cores	throughput (entries)
+2	9066062
+2	9737392
+2	9142101
+2	9187665
+2	9519920
+4	7574448
+4	8050344
+4	7698715
+4	7666895
+4	7638515
+8	7160856
+8	7127596
+8	7059170
+8	7122960
+8	7130382
+16	6412929
+16	6486433
+16	6438736
+16	6485939
+16	6078041
+24	5900909
+24	5962074
+24	5956968
+24	5956481
+24	5970036
+32	5608255
+32	5671451
+32	5571902
+32	5565332
+32	5599883
+sidechan: 
+CFA:
+cores	throughput (entries)
+6	72354348
+6	71860298
+6	72277047
+6	73041939
+6	73059623
+12	25204538
+12	25305309
+12	24503906
+12	25391473
+12	25444230
+18	21692078
+18	22384941
+18	22535288
+18	22239042
+18	22360659
+24	18246388
+24	18267877
+24	17924009
+24	18457526
+24	17959192
+30	22892750
+30	22855602
+30	21234954
+30	22781023
+30	23008437
+Go:
+cores	throughput (entries)
+6	47262886
+6	47522972
+6	47191097
+6	47649131
+6	47126015
+12	37610289
+12	38562781
+12	37069115
+12	37159580
+12	38417947
+18	20760742
+18	20449941
+18	20645451
+18	20441743
+18	20929537
+24	14620575
+24	14475628
+24	14995888
+24	14401480
+24	14549618
+30	12383406
+30	11910359
+30	10780129
+30	12028827
+30	12367389
+order: 
+CFA:
+cores	throughput (entries)
+4	68683961
+4	69299441
+4	62515413
+4	68207586
+4	68368563
+Go:
+cores	throughput (entries)
+4	60368130
+4	60454358
+4	60967535
+4	59271747
+4	61334120
+
Index: doc/theses/colby_parsons_MMAth/benchmarks/waituntil/data/pyke_Order
===================================================================
--- doc/theses/colby_parsons_MMAth/benchmarks/waituntil/data/pyke_Order	(revision a1f0cb667245ca06f92ac43da8ee0b87f481ab7a)
+++ doc/theses/colby_parsons_MMAth/benchmarks/waituntil/data/pyke_Order	(revision a1f0cb667245ca06f92ac43da8ee0b87f481ab7a)
@@ -0,0 +1,1 @@
+6836856 & 6045435
Index: doc/theses/colby_parsons_MMAth/benchmarks/waituntil/data/pyke_future.txt
===================================================================
--- doc/theses/colby_parsons_MMAth/benchmarks/waituntil/data/pyke_future.txt	(revision a1f0cb667245ca06f92ac43da8ee0b87f481ab7a)
+++ doc/theses/colby_parsons_MMAth/benchmarks/waituntil/data/pyke_future.txt	(revision a1f0cb667245ca06f92ac43da8ee0b87f481ab7a)
@@ -0,0 +1,64 @@
+5
+2
+6
+CFA 
+future OR:
+CFA:
+cores	throughput (entries)
+2	7979542
+2	8195420
+2	8339041
+2	7735845
+2	8279155
+uC++:
+cores	throughput (entries)
+2	4648297
+2	4766391
+2	4631747
+2	4600202
+2	4683445
+future AND:
+CFA:
+cores	throughput (entries)
+2	5400791
+2	5792970
+2	6061253
+2	6034621
+2	5792246
+uC++:
+cores	throughput (entries)
+2	4190818
+2	4127246
+2	4026182
+2	4219090
+2	4203589
+future ANDOR:
+CFA:
+cores	throughput (entries)
+2	6889728
+2	6644816
+2	6871689
+2	6713521
+2	6881730
+uC++:
+cores	throughput (entries)
+2	4465233
+2	4371764
+2	4374007
+2	4109526
+2	4262671
+future ORAND:
+CFA:
+cores	throughput (entries)
+2	6393712
+2	6276503
+2	6238200
+2	6444010
+2	6433157
+uC++:
+cores	throughput (entries)
+2	4198438
+2	4312017
+2	3417079
+2	3350573
+2	3331244
Index: doc/theses/colby_parsons_MMAth/benchmarks/waituntil/genPlots
===================================================================
--- doc/theses/colby_parsons_MMAth/benchmarks/waituntil/genPlots	(revision a1f0cb667245ca06f92ac43da8ee0b87f481ab7a)
+++ doc/theses/colby_parsons_MMAth/benchmarks/waituntil/genPlots	(revision a1f0cb667245ca06f92ac43da8ee0b87f481ab7a)
@@ -0,0 +1,5 @@
+#!/bin/bash -
+python3 plotData.py data/nasus.txt nasus_
+python3 plotData.py data/pyke.txt pyke_
+python3 plotData.py data/nasus_future.txt nasus_
+python3 plotData.py data/pyke_future.txt pyke_
Index: doc/theses/colby_parsons_MMAth/benchmarks/waituntil/go/order/go.mod
===================================================================
--- doc/theses/colby_parsons_MMAth/benchmarks/waituntil/go/order/go.mod	(revision a1f0cb667245ca06f92ac43da8ee0b87f481ab7a)
+++ doc/theses/colby_parsons_MMAth/benchmarks/waituntil/go/order/go.mod	(revision a1f0cb667245ca06f92ac43da8ee0b87f481ab7a)
@@ -0,0 +1,3 @@
+module order
+
+go 1.18
Index: doc/theses/colby_parsons_MMAth/benchmarks/waituntil/go/order/order.go
===================================================================
--- doc/theses/colby_parsons_MMAth/benchmarks/waituntil/go/order/order.go	(revision a1f0cb667245ca06f92ac43da8ee0b87f481ab7a)
+++ doc/theses/colby_parsons_MMAth/benchmarks/waituntil/go/order/order.go	(revision a1f0cb667245ca06f92ac43da8ee0b87f481ab7a)
@@ -0,0 +1,109 @@
+package main
+
+import (
+	"fmt"
+	"sync"
+	"time"
+	"runtime"
+)
+
+var Channels, ChannelSize int = 2, 100
+var cons_done, prod_done bool = false, false;
+var total_operations uint64 = 0
+var m sync.Mutex
+
+var prodJoin chan int = make(chan int)
+var consJoin chan int = make(chan int)
+
+func selectconsumer( chans [] chan uint64 ) {
+	var count uint64 = 0
+	for {
+		if cons_done { break }		
+		select {
+			case <- chans[0]:
+			case <- chans[1]:
+		}
+		if ! prod_done { count++ }
+	}
+	m.Lock()
+	total_operations += count
+	m.Unlock()
+	consJoin <- 0
+}
+
+func consumer( chans [] chan uint64 ) {
+	var count uint64 = 0
+	for {
+		if cons_done { break }		
+		<-chans[1]
+		if ! prod_done { count++ }
+	}
+	m.Lock()
+	total_operations += count
+	m.Unlock()
+	consJoin <- 0
+}
+
+func selectproducer( chans [] chan uint64 ) {
+	var count uint64 = 0
+	var checksum uint64 = 0
+	for {
+		if prod_done { break }
+		checksum = checksum ^ count
+		select {
+			case chans[0] <- count:
+			case chans[1] <- count:
+		}
+		count++
+	}
+	prodJoin <- 0
+}
+
+func producer( chans [] chan uint64 ) {
+	var count uint64 = 0
+	var checksum uint64 = 0
+	for {
+		if prod_done { break }
+		checksum = checksum ^ count
+		chans[1] <- count
+		count++
+	}
+	prodJoin <- 0
+}
+
+
+func main() {
+	runtime.GOMAXPROCS( 4 );
+
+	// fmt.Println("Processors: ",Processors," Channels: ",Channels," ProdsPerChan: ",ProdsPerChan," ConsPerChan: ",ConsPerChan," Channel Size: ",ChannelSize)
+	
+	chans := make( [] chan uint64, Channels )
+	for i := range chans {
+		chans[i] = make(chan uint64, ChannelSize)
+	}
+
+	
+	go selectproducer( chans )
+	go selectconsumer( chans )
+	go producer( chans )
+	go consumer( chans )
+	
+
+	// wait 10 seconds
+	time.Sleep(time.Second * 10)
+	// fmt.Println("prod done\n")
+	prod_done = true
+	for j := 0; j < 2; j++ {
+		<-prodJoin
+	}
+	// fmt.Println("cons done\n")
+	cons_done = true
+	for i := range chans {
+		close(chans[i])
+	}
+	
+	for j := 0; j < 2; j++{
+		<-consJoin
+	}
+    fmt.Println(total_operations)
+}
Index: doc/theses/colby_parsons_MMAth/benchmarks/waituntil/plotData.py
===================================================================
--- doc/theses/colby_parsons_MMAth/benchmarks/waituntil/plotData.py	(revision a1f0cb667245ca06f92ac43da8ee0b87f481ab7a)
+++ doc/theses/colby_parsons_MMAth/benchmarks/waituntil/plotData.py	(revision a1f0cb667245ca06f92ac43da8ee0b87f481ab7a)
@@ -0,0 +1,273 @@
+import os
+import sys
+import time
+import itertools
+import matplotlib.pyplot as plt
+import matplotlib.ticker as ticks
+import math
+from scipy import stats as st
+import numpy as np
+from enum import Enum
+from statistics import median
+
+import matplotlib
+matplotlib.use("pgf")
+matplotlib.rcParams.update({
+    "pgf.texsystem": "pdflatex",
+    'font.family': 'serif',
+    'text.usetex': True,
+    'pgf.rcfonts': False,
+    'font.size': 16
+})
+marker = itertools.cycle(('o', 's', 'D', 'x', 'p', '^', 'h', '*', 'v' )) 
+
+readfile = open(sys.argv[1], "r")
+
+machineName = ""
+
+if len(sys.argv) > 2:
+    machineName = sys.argv[2]
+
+# first line has num times per experiment
+line = readfile.readline()
+numTimes = int(line)
+
+# second line has processor args
+line = readfile.readline()
+procs = []
+for val in line.split():
+    procs.append(int(val))
+
+# 3rd line has processor for side_chan bench
+line = readfile.readline()
+sideChanProcs = []
+for val in line.split():
+    sideChanProcs.append(int(val))
+
+# 4th line has number of variants
+line = readfile.readline()
+names = line.split()
+numVariants = len(names)
+
+lines = (line.rstrip() for line in readfile) # All lines including the blank ones
+lines = (line for line in lines if line) # Non-blank lines
+
+def sci_format(x, pos):
+    return '{:.1e}'.format(x).replace('+0', '')
+
+def sci_format_label(x):
+    return '{:.2e}'.format(x).replace('+0', '')
+
+class Bench(Enum):
+    Unset = 0
+    Contend2 = 1
+    Contend4 = 2
+    Contend8 = 3
+    Spin2 = 4
+    Spin4 = 5
+    Spin8 = 6
+    SideChan = 7
+    Future = 8
+    Order = 9
+
+nameSet = False
+currBench = Bench.Unset # default val
+count = 0
+procCount = 0
+currVariant = 0
+name = ""
+title = ""
+experiment_duration = 10.0
+var_name = ""
+future_variants=["CFA", "uC++"]
+future_names=["OR", "AND", "AND-OR", "OR-AND"]
+future_data=[[0.0 for i in range(len(future_names))] for j in range(2)]
+future_bars=[[[0.0 for i in range(len(future_names))],[0.0 for k in range(len(future_names))]] for j in range(2)]
+curr_future=0
+sendData = [0.0 for j in range(numVariants)]
+data = [[0.0 for i in range(len(procs))] for j in range(numVariants)]
+bars = [[[0.0 for i in range(len(procs))],[0.0 for k in range(len(procs))]] for j in range(numVariants)]
+sideData = [[0.0 for i in range(len(sideChanProcs))] for j in range(numVariants)]
+sideBars = [[[0.0 for i in range(len(sideChanProcs))],[0.0 for k in range(len(sideChanProcs))]] for j in range(numVariants)]
+tempData = [0.0 for i in range(numTimes)]
+orderData = [0.0 for i in range(numVariants)]
+for idx, line in enumerate(lines):
+    # print(line)
+    
+    if currBench == Bench.Unset:
+        if line == "contend2:":
+            name = "Contend_2"
+            title = "2 Clause Contend"
+            currBench = Bench.Contend2
+        elif line == "contend4:":
+            name = "Contend_4"
+            title = "4 Clause Contend"
+            currBench = Bench.Contend4
+        elif line == "contend8:":
+            name = "Contend_8"
+            title = "8 Clause Contend"
+            currBench = Bench.Contend8
+        elif line == "spin2:":
+            name = "Spin_2"
+            title = "2 Clause Spin"
+            currBench = Bench.Spin2
+        elif line == "spin4:":
+            name = "Spin_4"
+            title = "4 Clause Spin"
+            currBench = Bench.Spin4
+        elif line == "spin8:":
+            name = "Spin_8"
+            title = "8 Clause Spin"
+            currBench = Bench.Spin8
+        elif line == "sidechan:":
+            name = "Sidechan"
+            currBench = Bench.SideChan
+        elif line[0:6] == "future":
+            name = "Future"
+            title = "Future Synchronization"
+            currBench = Bench.Future
+        elif line == "order:":
+            name = "order"
+            currBench = Bench.Order
+        else:
+            print("Expected benchmark name")
+            print("Line: " + line)
+            sys.exit()
+        continue
+
+    if line[0:5] == "cores":
+        continue
+
+    if not nameSet:
+        nameSet = True
+        continue
+    
+    lineArr = line.split()
+    tempData[count] = float(lineArr[-1]) / experiment_duration
+    count += 1
+
+    if currBench == Bench.Future:
+        if count == numTimes:
+            currMedian = median( tempData )
+            future_data[currVariant][curr_future] = currMedian
+            lower, upper = st.t.interval(0.95, numTimes - 1, loc=np.mean(tempData), scale=st.sem(tempData))
+            future_bars[currVariant][0][curr_future] = currMedian - lower
+            future_bars[currVariant][1][curr_future] = upper - currMedian
+            count = 0
+            nameSet = False
+            currVariant += 1
+            if currVariant == 2:
+                curr_future += 1
+                # reset
+                currBench = Bench.Unset
+                currVariant = 0
+                if curr_future == len(future_names):
+                    x = np.arange(len(future_names))  # the label locations
+                    width = 0.45  # the width of the bars
+                    multiplier = .5
+                    fig, ax = plt.subplots(layout='constrained')
+                    plt.title(title + " Benchmark")
+                    plt.ylabel("Throughput (statement completions per second)")
+                    plt.xlabel("Operation")
+                    ax.yaxis.set_major_formatter(ticks.FuncFormatter(sci_format))
+                    for idx, arr in enumerate(future_data):
+                        offset = width * multiplier
+                        rects = ax.bar(x + offset, arr, width, label=future_variants[idx], yerr=[future_bars[idx][0], future_bars[idx][1]])
+                        # ax.bar_label(rects, padding=3, fmt='%.1e')
+                        ax.bar_label(rects, padding=3, fmt=sci_format_label)
+                        multiplier += 1
+                    plt.xticks(x + width, future_names)
+                    
+                    ax.legend(future_variants, loc='lower right')
+                    # fig.savefig("plots/" + machineName + name + ".png")
+                    plt.savefig("plots/" + machineName + name + ".pgf")
+                    fig.clf()
+
+    elif currBench == Bench.Order:
+        if count == numTimes:
+            currMedian = median( tempData )
+            orderData[currVariant] = currMedian
+            count = 0
+            currVariant += 1
+            procCount = 0
+            nameSet = False
+            if currVariant == numVariants:
+                fileName = "data/" + machineName + "Order"
+                f = open(fileName, 'w')
+                f.write(" & ".join(map(lambda a: str(int(a)), orderData)))
+                
+                # reset
+                currBench = Bench.Unset
+                currVariant = 0
+
+    elif currBench == Bench.SideChan:
+        if count == numTimes:
+            currMedian = median( tempData )
+            sideData[currVariant][procCount] = currMedian
+            lower, upper = st.t.interval(0.95, numTimes - 1, loc=np.mean(tempData), scale=st.sem(tempData))
+            sideBars[currVariant][0][procCount] = currMedian - lower
+            sideBars[currVariant][1][procCount] = upper - currMedian
+            count = 0
+            procCount += 1
+            if procCount == len(sideChanProcs):
+                procCount = 0
+                nameSet = False
+                currVariant += 1
+
+                if currVariant == numVariants:
+                    fig, ax = plt.subplots()
+                    plt.title(name + " Benchmark")
+                    plt.ylabel("Throughput (channel operations per second)")
+                    plt.xlabel("Cores")
+                    ax.yaxis.set_major_formatter(ticks.FuncFormatter(sci_format))
+                    for idx, arr in enumerate(sideData):
+                        plt.errorbar( sideChanProcs, arr, [sideBars[idx][0], sideBars[idx][1]], capsize=2, marker=next(marker) )
+                    plt.xticks(sideChanProcs)
+                    marker = itertools.cycle(('o', 's', 'D', 'x', 'p', '^', 'h', '*', 'v' )) 
+                    # plt.yscale("log")
+                    ax.legend(names)
+                    # fig.savefig("plots/" + machineName + name + ".png")
+                    plt.savefig("plots/" + machineName + name + ".pgf")
+                    fig.clf()
+
+                    # reset
+                    currBench = Bench.Unset
+                    currVariant = 0
+    else:
+        if count == numTimes:
+            currMedian = median( tempData )
+            data[currVariant][procCount] = currMedian
+            lower, upper = st.t.interval(0.95, numTimes - 1, loc=np.mean(tempData), scale=st.sem(tempData))
+            bars[currVariant][0][procCount] = currMedian - lower
+            bars[currVariant][1][procCount] = upper - currMedian
+            count = 0
+            procCount += 1
+
+            if procCount == len(procs):
+                procCount = 0
+                nameSet = False
+                currVariant += 1
+
+                if currVariant == numVariants:
+                    fig, ax = plt.subplots(layout='constrained')
+                    plt.title(title + " Benchmark")
+                    plt.ylabel("Throughput (channel operations per second)")
+                    plt.xlabel("Cores")
+                    ax.yaxis.set_major_formatter(ticks.FuncFormatter(sci_format))
+                    for idx, arr in enumerate(data):
+                        plt.errorbar( procs, arr, [bars[idx][0], bars[idx][1]], capsize=2, marker=next(marker) )
+                    plt.xticks(procs)
+                    marker = itertools.cycle(('o', 's', 'D', 'x', 'p', '^', 'h', '*', 'v' )) 
+                    # plt.yscale("log")
+                    # plt.ylim(1, None)
+                    # ax.get_yaxis().set_major_formatter(ticks.ScalarFormatter())
+                    # else:
+                    #     plt.ylim(0, None)
+                    ax.legend(names)
+                    # fig.savefig("plots/" + machineName + name + ".png")
+                    plt.savefig("plots/" + machineName + name + ".pgf")
+                    fig.clf()
+
+                    # reset
+                    currBench = Bench.Unset
+                    currVariant = 0
Index: doc/theses/colby_parsons_MMAth/benchmarks/waituntil/run
===================================================================
--- doc/theses/colby_parsons_MMAth/benchmarks/waituntil/run	(revision fa5e1aa5984ed29d58206d4ec81dd05c0a1b3ece)
+++ doc/theses/colby_parsons_MMAth/benchmarks/waituntil/run	(revision a1f0cb667245ca06f92ac43da8ee0b87f481ab7a)
@@ -85,5 +85,5 @@
 }
 
-numtimes=3
+numtimes=5
 # numtimes=1
 
@@ -103,15 +103,17 @@
 sidechan=${true}
 future=${true}
+order=${true}
 spin=${false}
 contend=${false}
-# sidechan=${false}
+sidechan=${false}
 future=${false}
+# order=${false}
 
 runCFA=${true}
 runGO=${true}
-runUCPP=${true}
+# runUCPP=${true}
 # runCFA=${false}
-runGO=${false}
-# runUCPP=${false}
+# runGO=${false}
+runUCPP=${false}
 
 cfa=~/cfa-cc/driver/cfa
@@ -165,4 +167,10 @@
 }
 
+run_order() {
+    affinity 4
+    preprint="4\t"
+    repeat_command taskset -c ${taskset} ./a.${hostname}
+}
+
 run_future() {
     affinity 2
@@ -246,5 +254,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
@@ -284,2 +292,23 @@
 fi
 
+if [ ${order} -eq ${true} ] ; then
+    echo "order: "
+    post_args=${chan_size}
+    if [ ${runCFA} -eq ${true} ] ; then
+        cd cfa # CFA RUN
+        print_header 'CFA'
+        ${cfa} ${cfa_flags} order.cfa -o a.${hostname} > /dev/null 2>&1
+        run_order
+        rm a.${hostname}
+        cd - > /dev/null
+    fi # done CFA
+
+    if [ ${runGO} -eq ${true} ] ; then
+        cd go/order
+        print_header 'Go'
+        go build -o a.${hostname} > /dev/null 2>&1
+        run_order
+        rm a.${hostname}
+        cd - > /dev/null
+    fi # done Go
+fi
