Index: src/examples/Attributes.c
===================================================================
--- src/examples/Attributes.c	(revision 1c31f681ccd8499a1803e510a302bdfd289ce990)
+++ src/examples/Attributes.c	(revision 1c31f681ccd8499a1803e510a302bdfd289ce990)
@@ -0,0 +1,92 @@
+// I Compile-time resolution
+// =========================
+// 
+// 1. an isolated name, where the argument is implicitly determined by the result context
+// 
+//    @max
+// 
+// 2. a direct application to a manifest otype
+// 
+//    @max( int )
+// 
+// 3. constraining a otype variable; the application is implicitly performed at the call site as in (2)
+// 
+//    forall( otype T | { T @max( T ); } ) T x( T t );
+// 
+// 
+// II Run-time resolution
+// ======================
+// 
+// 1. an indirect reference, where the argument is implicitly determined by the result context
+// 
+//    attr_var = &@max;
+//    x = (*attr_var);
+// 
+// 2. an indirect application to a manifest otype
+// 
+//    (*attr_var)( int )
+// 
+// 3. a direct application to a otype variable
+// 
+//    @max( T )
+// 
+// Under what circumstances can this be done at compile/link time?
+// 
+// 
+// III Declaration forms
+// =====================
+// 
+// 1. monomorphic with implicit argument
+// 
+//    int @max;
+// 
+// 2. monomorphic with explicit argument
+// 
+//    int @max( int );
+// 
+// 3. polymorphic
+// 
+//    forall( otype T | constraint( T ) ) int @attr( T );
+
+int @max = 3;
+
+int main() {
+    int x;
+    otype @otype(otype t);									// compiler intrinsic
+    otype @widest(otype t);
+    @otype(x) *y;										// gcc: otypeof(x) *y;
+//    const @widest(double) *w;							// gcc: const otypeof(x) *w;
+//    * @otype(3 + 4) z;									// cfa declaration syntax
+    y = @max;		
+    z = @max(x) + @size(int);
+    y = @min(3 + 4);
+    if ( @const(x) ) { }
+    if ( @volatile(y) ) { }
+    if ( @extern(y) ) { }
+    if ( @static(y) ) { }
+    @max;
+}
+
+int @foo(int) {
+    return 7;
+}
+
+int @voon;
+double @voon;
+
+int @bort(int);
+int @bort(double);
+
+void g( int );
+
+void f() {
+	float x;
+	double x;
+	@bort(x);
+	@bort(int);
+	g( @voon );
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
Index: src/examples/Initialization.c
===================================================================
--- src/examples/Initialization.c	(revision 1c31f681ccd8499a1803e510a302bdfd289ce990)
+++ src/examples/Initialization.c	(revision 1c31f681ccd8499a1803e510a302bdfd289ce990)
@@ -0,0 +1,41 @@
+// Cforall extensions
+
+int * x11 = 0, x12 = 0;
+int * x21 = 0, x22 = 0;
+
+[20] int y1, y2 = { 1, 2, 3 };
+
+// designators
+
+struct {
+	[int] w;
+} a = { .w : [2] };
+
+struct { int a[3], b; } w [] = { [0].a : {1}, [0].b : 3, [1].a[0] : 2 };
+
+struct {
+	int f1, f2, f3;
+	struct { int g1, g2, g3; } f4[4];
+} v7 = {
+  .f1 : 4,
+  f2 : 3,
+  .f4[2] : {
+	  .g1 : 3,
+	  g3 : 0,
+	},
+  .f4[3].g3 : 7,
+};
+
+struct point { int x; int z; struct {int y1, y2, y3;} y; int w;};
+struct quintet { int v, w, x, y, z;};
+
+int main() {
+	struct point p1 = { x : 3 };
+	struct point p2 = { 3, 4 };
+	struct point p3 = { .[x,z] : 5, y : { .[y3,y1] : 6, 17 } };
+	struct point p4 = { w : 5, 4 };
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
Index: src/examples/Initialization2.c
===================================================================
--- src/examples/Initialization2.c	(revision 1c31f681ccd8499a1803e510a302bdfd289ce990)
+++ src/examples/Initialization2.c	(revision 1c31f681ccd8499a1803e510a302bdfd289ce990)
@@ -0,0 +1,15 @@
+int a = 3;
+struct { int x; int y; } z = { 3, 7 };      /* OK */
+struct { int x; int y; } z1 = { .[x,y]:3 }; /* OK */
+struct { int x; int y; } z2 = { y:3, x:4 }; /* OK */
+struct { int x; struct { int y1; int y2; } y; } z3 = { x:3, y:{y1:4, y2:5} };  /* OK */
+struct { int x; struct { int y1; int y2; } y; } z3 = { y:{y2:9, y1:8}, x:7 };  /* OK */
+struct { int x; struct { int y1; int y2; } y; } z3 = { x:7, {y2:9, y1:8} };  /* OK */
+struct { int x; struct { int y1; int y2; } y; } z3 = { 3, {4, 5} };   /* OK */
+//struct { int x; struct { int y1; int y2; } } z3 = {4, {5,6}};
+//struct { int x; struct { int y1; int y2; } y; } z4 = { y:{4,5}, a:3 };
+//struct { int x; struct { int y1; int y2; } y; } z5 = { a:3, {4,5}};
+//int x[20] = { [10]: 4 };
+struct t { int a, b; };
+struct t x = { b:4, a:3 };
+struct { int x; int y; } z6= {5,6,4};  /* (should be an) error */
Index: src/examples/Makefile.example
===================================================================
--- src/examples/Makefile.example	(revision 1c31f681ccd8499a1803e510a302bdfd289ce990)
+++ src/examples/Makefile.example	(revision 1c31f681ccd8499a1803e510a302bdfd289ce990)
@@ -0,0 +1,42 @@
+CFA ?= ../driver/cfa-cpp
+CFAOPT ?= -a
+OUTPUT ?= Output
+EXPECT ?= Expect
+OUTPUTDIR ?= ${OUTPUT}${CFAOPT}
+EXPECTDIR ?= ${EXPECT}${CFAOPT}
+EXAMPLES = ${wildcard *.c}
+OUTPUTS = ${addprefix ${OUTPUTDIR}/,${EXAMPLES:.c=.txt}}
+
+#.SILENT :
+
+all :
+	+for opt in -a -e -f -r -s -v ; do \
+	    make test CFAOPT=$${opt} ; \
+	done ; \
+	rm -f core
+
+test : ${OUTPUTS} ${OUTPUTDIR}/report
+
+${OUTPUTDIR}/%.txt : %.c ${CFA} Makefile
+	-${CFA} -n ${CFAOPT} $< > $@ 2>&1
+
+${OUTPUTDIR}/report : ${OUTPUTS} ${EXPECTDIR}
+	rm -f $@
+	echo "===== regression test using cfa-cpp flag ${CFAOPT} ====="
+	@for i in ${OUTPUTS} ; do \
+	     echo "---"`basename $$i`"---" | tee -a $@; \
+	     diff -B -w ${EXPECTDIR}/`basename $$i` $$i | tee -a $@; \
+	done
+
+${OUTPUTS} : | ${OUTPUTDIR}		# order only prerequisite
+
+${OUTPUTDIR} :
+	mkdir -p $@
+
+# remove the expected results directories to generate new ones from the current output
+
+${EXPECTDIR} : | ${OUTPUTS}		# new Expected results ?
+	cp -pr ${OUTPUTDIR} $@
+
+clean :
+	rm -rf ${OUTPUT}-* core
Index: src/examples/Members.c
===================================================================
--- src/examples/Members.c	(revision 1c31f681ccd8499a1803e510a302bdfd289ce990)
+++ src/examples/Members.c	(revision 1c31f681ccd8499a1803e510a302bdfd289ce990)
@@ -0,0 +1,72 @@
+char ?=?( char*, char );
+int ?=?( int*, int );
+float ?=?( float*, float );
+forall( dtype DT ) DT * ?=?( DT**, DT* );
+forall(otype T) lvalue T *?( T* );
+char *__builtin_memcpy();
+
+void a( char );
+void b( int );
+void c( int* );
+void d( float* );
+
+struct a_struct {
+	int a;
+	char a;
+	float a;
+};
+
+union b_struct {
+	int *a;
+	char *a;
+	float *a;
+};
+
+void f() {
+	struct a_struct the_struct;
+	union b_struct the_struct;
+  
+	a( the_struct.a );
+	b( the_struct.a );
+	c( the_struct.a );
+	d( the_struct.a );
+}
+
+struct c_struct {
+	int;
+	char;
+	float;
+};
+
+union d_struct {
+	int*;
+	char*;
+	float*;
+};
+
+void g() {
+	unsigned short x;
+	struct c_struct x;
+	union d_struct x;
+  
+	a( x );	// the 'a' and 'b' calls resolve to the ushort
+	b( x );	// it's debatable whether this is good
+	c( x );
+	d( x );
+}
+
+// make sure that forward declarations work
+
+struct forward;
+
+struct forward *q;
+
+struct forward { int y; };
+
+void h() {
+	q->y;
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
Index: src/examples/Misc.c
===================================================================
--- src/examples/Misc.c	(revision 1c31f681ccd8499a1803e510a302bdfd289ce990)
+++ src/examples/Misc.c	(revision 1c31f681ccd8499a1803e510a302bdfd289ce990)
@@ -0,0 +1,19 @@
+// interesting corner cases
+
+int a;
+int b;
+float b;
+
+void g( int );
+void g( unsigned );
+
+void f( void ) {
+	g( (a, b) );
+	g( (a, a, b) );
+	g( sizeof a );
+	g( sizeof( int ) );
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
Index: src/examples/MiscError.c
===================================================================
--- src/examples/MiscError.c	(revision 1c31f681ccd8499a1803e510a302bdfd289ce990)
+++ src/examples/MiscError.c	(revision 1c31f681ccd8499a1803e510a302bdfd289ce990)
@@ -0,0 +1,16 @@
+int a;
+int b;
+float b;
+
+void g( int );
+
+void f( void ) {
+	g( (b, a) );
+	g( (b, a, b) );
+	g( (a, b, b) );
+	sizeof b;
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
Index: src/examples/Rank2.c
===================================================================
--- src/examples/Rank2.c	(revision 1c31f681ccd8499a1803e510a302bdfd289ce990)
+++ src/examples/Rank2.c	(revision 1c31f681ccd8499a1803e510a302bdfd289ce990)
@@ -0,0 +1,20 @@
+int ?=?( int *, int );
+forall(dtype DT) DT * ?=?( DT **, DT * );
+
+void a() {
+	forall( otype T ) void f( T );
+	void g( forall( otype U ) void p( U ) );
+	g( f );
+}
+
+void g() {
+	void h( int *null );
+	forall( otype T ) T id( T );
+	forall( dtype T ) T *0;
+	int 0;
+	h( id( id( id( 0 ) ) ) );
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
Index: src/examples/Tuple.c
===================================================================
--- src/examples/Tuple.c	(revision 1c31f681ccd8499a1803e510a302bdfd289ce990)
+++ src/examples/Tuple.c	(revision 1c31f681ccd8499a1803e510a302bdfd289ce990)
@@ -0,0 +1,70 @@
+int f( int, int );
+int g( int, int, int );
+static [ int, int *, * int, int ] h( int a, int b, * int c, [] char d );
+
+struct inner {
+	int f2, f3;
+};
+
+struct outer {
+	int f1;
+	struct inner i;
+	double f4;
+} s, *sp;
+
+const volatile [ int, int ] t1;
+static const [ int, const int ] t2;
+const static [ int, const int ] t3;
+
+[ int rc ] printf( * char fmt, ... );
+int printf( char *fmt, ... );
+
+[ short x, unsigned y ] f1( int w ) {
+	[ y, x ] = [ x, y ] = [ w, 23 ];
+}
+
+[ [ int, char, long, int ] r ] g1() {
+	short x, p;
+	unsigned int y;
+	[ int, int ] z;
+
+	[ x, y, z ] = [ p, f( 17 ), 3 ];
+	[ x, y, z ] = ([short, unsigned int, [int, int]])([ p, f( 17 ), 3 ]);
+	r = [ x, y, z ];
+}
+
+[ int rc ] main( int argc, ** char argv ) {
+	int a, b, c, d;
+	struct outer t = { .[ f1,f4 ] : [ 1,7.0 ] };
+	f( [ 3,5 ] );
+	g( [ 3,5 ], 3 );
+	f( t1 );
+	g( t1, 3 );
+
+	[ , , , ];						/* empty tuple */
+	[ 3, 5 ];
+	[ a, b ] = 3;
+	[ a, b ] = [ 4.6 ];
+	[ a, b ] = [ c, d ] = [ 3, 5 ];
+	[ a, b, [ c ] ] = [ 2,[ a, b ] ];
+	[ a, b ] = 3 > 4 ? [ b, 6 ] : [ 7, 8 ];
+
+	t1 = [ a, b ];
+	t1 = t2 = [ a, b ];
+	[ a, b ] = [ c, d ] = d += c += 1;
+	[ a, b ] = [ c, d ] = t1;
+	[ a, b ] = t1 = [ c, d ];
+	[ a, b ] = t1 = t2 = [ c, d ];
+	t1 = [ 3, 4 ] = [ 3, 4 ] = t1 = [ 3, 4 ];
+
+	s.[ f1, i.[ f2, f3 ], f4 ] = [ 11, 12, 13, 3.14159 ];
+	s.[ f1, i.[ f2, f3 ], f4 ] = h( 3, 3, 0, "abc" );
+	[ a, , b, ] = h( 3, 3, 0, "abc" );			/* ignore some results */
+	sp->[ f4,f1 ] = sp->[ f1, f4 ];
+	printf( "expecting 3, 17, 23, 4; got %d, %d, %d, %d\n", s.[ f4, i.[ f3, f2 ], f1 ] );
+	rc = 0;
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
Index: src/examples/abstype.c
===================================================================
--- src/examples/abstype.c	(revision ee5153450a63c4ce207bc8006df0fefce0f172ae)
+++ src/examples/abstype.c	(revision 1c31f681ccd8499a1803e510a302bdfd289ce990)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Apr  6 22:16:08 2016
-// Update Count     : 8
+// Last Modified On : Tue Jun 14 14:27:48 2016
+// Update Count     : 9
 //
 
@@ -21,8 +21,8 @@
 }
 
-forall( otype T ) lvalue T *?( T* );
+forall( otype T ) lvalue T *?( T * );
 int ?++( int * );
 int ?=?( int *, int );
-forall( dtype DT ) DT * ?=?( DT **, DT* );
+forall( dtype DT ) DT * ?=?( DT **, DT * );
 
 otype U = int *;
