Index: tests/concurrent/actors/matrix.cfa
===================================================================
--- tests/concurrent/actors/matrix.cfa	(revision 418882afb89c90d42a4199db59843426687a4df0)
+++ tests/concurrent/actors/matrix.cfa	(revision 418882afb89c90d42a4199db59843426687a4df0)
@@ -0,0 +1,144 @@
+#include <actor.hfa>
+#include <fstream.hfa>
+#include <stdlib.hfa>
+#include <string.h>
+#include <stdio.h>
+
+//////////////////////////////////////////////////////////
+// sample to show what code I need to generate per receive routine:
+//////////////////////////////////////////////////////////
+
+unsigned int xr = 2048, xc = 2048, yc = 2048, Processors = 1; // default values
+
+struct derived_actor {
+    inline actor;
+};
+void ?{}( derived_actor & this ) { ((actor &)this){}; }
+
+struct derived_msg {
+    inline message;
+    int * Z;
+	int * X;
+    int ** Y;
+};
+
+void ?{}( derived_msg & this ) {}
+void ?{}( derived_msg & this, int * Z, int * X, int ** Y ) {
+    ((message &) this){ Finished };
+    this.Z = Z;
+    this.X = X;
+    this.Y = Y;
+}
+
+Allocation receive( derived_actor & receiver, derived_msg & msg ) {
+    for ( unsigned int i = 0; i < yc; i += 1 ) { // multiply X_row by Y_col and sum products
+        msg.Z[i] = 0;
+        for ( unsigned int j = 0; j < xc; j += 1 ) {
+            msg.Z[i] += msg.X[j] * msg.Y[j][i];
+        } // for
+    } // for
+    return Finished;
+}
+
+// // for each receive in the compiler we will need to generate the following routine:
+// static inline derived_actor & ?|?( derived_actor & receiver, derived_msg & msg ) {					// add two structures
+// 	request * new_req = alloc();
+//     Allocation (*my_work_fn)( derived_actor &, derived_msg & ) = receive;
+//     __receive_fn fn = (__receive_fn)my_work_fn;
+//     (*new_req){ &receiver, &msg, fn };
+//     send( receiver, *new_req );
+//     return receiver;
+// }
+
+int main( int argc, char * argv[] ) {
+    switch ( argc ) {
+	  case 5:
+		if ( strcmp( argv[4], "d" ) != 0 ) {			// default ?
+			Processors = atoi( argv[4] );
+			if ( Processors < 1 ) goto Usage;
+		} // if
+	  case 4:
+		if ( strcmp( argv[3], "d" ) != 0 ) {			// default ?
+			xr = atoi( argv[3] );
+			if ( xr < 1 ) goto Usage;
+		} // if
+	  case 3:
+		if ( strcmp( argv[2], "d" ) != 0 ) {			// default ?
+			xc = atoi( argv[2] );
+			if ( xc < 1 ) goto Usage;
+		} // if
+	  case 2:
+		if ( strcmp( argv[1], "d" ) != 0 ) {			// default ?
+			yc = atoi( argv[1] );
+			if ( yc < 1 ) goto Usage;
+		} // if
+	  case 1:											// use defaults
+		break;
+	  default:
+	  Usage:
+		sout | "Usage: " | argv[0]
+			 | " [ yc (> 0) | 'd' (default " | yc
+			 | ") ] [ xc (> 0) | 'd' (default " | xc
+			 | ") ] [ xr (> 0) | 'd' (default " | xr
+			 | ") ] [ processors (> 0) | 'd' (default " | Processors
+			 | ") ]" ;
+		exit( EXIT_FAILURE );
+	} // switch
+
+    unsigned int r, c;
+	int * Z[xr], * X[xr], * Y[xc];
+
+	for ( r = 0; r < xr; r += 1 ) {						// create/initialize X matrix
+		X[r] = aalloc( xc );
+		for ( c = 0; c < xc; c += 1 ) {
+			X[r][c] = r * c % 37;						// for timing
+		} // for
+	} // for
+	for ( r = 0; r < xc; r += 1 ) {						// create/initialize Y matrix
+		Y[r] = aalloc( yc );
+		for ( c = 0; c < yc; c += 1 ) {
+			Y[r][c] = r * c % 37;						// for timing
+		} // for
+	} // for
+	for ( r = 0; r < xr; r += 1 ) {						// create Z matrix
+		Z[r] = aalloc( yc );
+	} // for
+
+    // processor procs[Processors - 1];
+
+    executor e{ Processors, Processors, Processors == 1 ? 1 : Processors * 16, true };
+
+    printf("starting\n");
+
+    start_actor_system( e );
+
+    printf("started\n");
+
+    derived_msg messages[xr];
+
+    derived_actor actors[xr];
+
+	for ( unsigned int r = 0; r < xr; r += 1 ) {
+		messages[r]{ Z[r], X[r], Y };
+	} // for
+
+	for ( unsigned int r = 0; r < xr; r += 1 ) {
+		actors[r] | messages[r];
+	} // for
+
+    printf("stopping\n");
+
+    stop_actor_system();
+
+    printf("stopped\n");
+
+    for ( r = 0; r < xr; r += 1 ) {						// deallocate X and Z matrices
+		free( X[r] );
+        free( Z[r] );
+	} // for
+	for ( r = 0; r < xc; r += 1 ) {						// deallocate Y matrix
+        free( Y[r] );
+	} // for
+
+    return 0;
+}
Index: tests/concurrent/actors/types.cfa
===================================================================
--- tests/concurrent/actors/types.cfa	(revision 418882afb89c90d42a4199db59843426687a4df0)
+++ tests/concurrent/actors/types.cfa	(revision 418882afb89c90d42a4199db59843426687a4df0)
@@ -0,0 +1,118 @@
+#include <actor.hfa>
+#include <fstream.hfa>
+#include <stdlib.hfa>
+#include <string.h>
+#include <stdio.h>
+#include <mutex_stmt.hfa>
+
+struct derived_actor {
+    inline actor;
+    int counter;
+};
+static inline void ?{}( derived_actor & this ) { ((actor &)this){}; this.counter = 0; }
+
+struct d_msg {
+    inline message;
+    int num;
+};
+static inline void ?{}( d_msg & this ) { ((message &)this){}; }
+
+// this isn't a valid receive routine since int is not a message type
+Allocation receive( derived_actor & receiver, int i ) with( receiver ) {
+    mutex(sout) sout | i;
+    counter++;
+    if ( counter == 2 ) return Finished;
+    return Nodelete; 
+}
+
+Allocation receive( derived_actor & receiver, d_msg & msg ) {
+    return receive( receiver, msg.num );
+}
+
+struct derived_actor2 {
+    inline actor;
+};
+static inline void ?{}( derived_actor2 & this ) { ((actor &)this){}; }
+
+Allocation receive( derived_actor2 & receiver, d_msg & msg ) {
+    mutex(sout) sout | msg.num;
+    return Finished;
+}
+
+struct derived_actor3 {
+    inline actor;
+};
+static inline void ?{}( derived_actor3 & this ) { ((actor &)this){}; }
+
+struct d_msg2 {
+    inline message;
+    int num;
+};
+static inline void ?{}( d_msg2 & this ) { ((message &)this){}; }
+
+Allocation receive( derived_actor3 & receiver, d_msg & msg ) {
+    mutex(sout) sout | msg.num;
+    if ( msg.num == -1 ) return Nodelete;
+    return Finished;
+}
+
+Allocation receive( derived_actor3 & receiver, d_msg2 & msg ) {
+    mutex(sout) sout | msg.num;
+    return Finished;
+}
+
+size_t Processors = 3;
+
+int main( int argc, char * argv[] ) {
+    printf("start\n");
+
+    processor p[Processors - 1];
+
+    printf("basic test\n"); 
+    start_actor_system( Processors ); // test passing number of processors
+    derived_actor a;
+    d_msg b, c;
+    b.num = 1;
+    c.num = 2;
+    a | b | c;
+    stop_actor_system();
+
+    printf("same message and different actors test\n");
+    start_actor_system(); // let system detect # of processors
+    derived_actor2 d_ac2_0, d_ac2_1;
+    d_msg d_ac2_msg;
+    d_ac2_msg.num = 3;
+    d_ac2_0 | d_ac2_msg;
+    d_ac2_1 | d_ac2_msg;
+    stop_actor_system();
+
+    
+    {
+        printf("same message and different actor types test\n");
+        executor e{ 0, Processors, Processors == 1 ? 1 : Processors * 4, false };
+        start_actor_system( e ); // pass an explicit executor
+        derived_actor2 d_ac2_2;
+        derived_actor3 d_ac3_0;
+        d_msg d_ac23_msg;
+        d_ac23_msg.num = 4;
+        d_ac3_0 | d_ac23_msg;
+        d_ac2_2 | d_ac23_msg;
+        stop_actor_system();
+    } // RAII to clean up executor
+
+    {
+        printf("different message types, one actor test\n");
+        executor e{ 1, Processors, Processors == 1 ? 1 : Processors * 4, true };
+        start_actor_system( Processors );
+        derived_actor3 a3;
+        d_msg b1;
+        d_msg2 c2;
+        b1.num = -1;
+        c2.num = 5;
+        a3 | b1 | c2;
+        stop_actor_system();
+    } // RAII to clean up executor
+
+    printf("end\n");
+    return 0;
+}
