Index: tests/tuple/tupleAssign.c
===================================================================
--- tests/tuple/tupleAssign.c	(revision 200fcb3c496b08f843f691550554b21d786aad38)
+++ 	(revision )
@@ -1,66 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// tupleAssign.c --
-//
-// Author           : Rob Schluntz
-// Created On       : Tue Nov 15 17:24:32 2016
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Dec  4 22:03:48 2018
-// Update Count     : 35
-//
-
-#include <fstream.hfa>
-
-int main() {
-	{
-		// test multiple assignment and cascading assignment
-		int u = 5, v = 6, x = 10, y = 11;
-		[int, int] z = [100, 200];
-
-		// swap x, y and store the new [x, y] in [u, v] and in z;
-		printf( "u=%d v=%d x=%d y=%d z=[%d, %d]\n", u, v, x, y, z );
-		sout | "u=" | u | "v=" | v | "x=" | x | "y=" | y | "z=[" | z | "]";
-		z = [u, v] = [x, y] = [y, x];
-		printf( "u=%d v=%d x=%d y=%d z=[%d, %d]\n", u, v, x, y, z );
-		sout | "u=" | u | "v=" | v | "x=" | x | "y=" | y | "z=[" | z | "]";
-
-		// shuffle elements -- v = z.0, z.0 = z.1, z.1 = u, u = v
-		[v, z, u] = [z, u, v];
-		printf( "u=%d v=%d z=[%d, %d]\n", u, v, z );
-		sout | "u=" | u | "v=" | v | "z=[" | z | "]";
-
-		// multiple assignment with tuple expression on right
-		z = [111, 222];
-		[u, v] = [123, 456];
-		printf( "u=%d v=%d z=[%d, %d]\n", u, v, z );
-		sout | "u=" | u | "v=" | v | "z=[" | z | "]";
-	}
-	{
-		// test mass assignment
-		double d = 0.0;
-		int i = 0;
-		char c = '\0';
-		struct X {
-			int z;
-		} x;
-		X ?=?(X & x, double d) { return x; }
-		[int, double, int] t;
-
-		// no conversion from X to integral types, so this serves as a santiy
-		// check that as long as this compiles, ?=?(_, x) is not generated.
-		[t, x, d, i, c, x] = (double)94.12;
-		printf( "d=%lg i=%d c=%c t=[%d, %lg, %d]\n", d, i, (int)c, t );
-		sout | "d=" | d | "i=" | i | "c=" | c | ' ' | "t=[" | t | "]";
-		[x, c, i, d, x, t] = (double)-94.12;
-		printf( "d=%lg i=%d c=%c t=[%d, %lg, %d]\n", d, i, c, t );
-		sout | "d=" | d | "i=" | i | "c=" | c | ' ' | "t=[" | t | "]";
-	}
-}
-
-// Local Variables: //
-// tab-width: 4 //
-// End: //
Index: tests/tuple/tupleAssign.cfa
===================================================================
--- tests/tuple/tupleAssign.cfa	(revision 84b4d607b60eece5075c7419f55cd58b8d234c19)
+++ tests/tuple/tupleAssign.cfa	(revision 84b4d607b60eece5075c7419f55cd58b8d234c19)
@@ -0,0 +1,66 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// tupleAssign.c --
+//
+// Author           : Rob Schluntz
+// Created On       : Tue Nov 15 17:24:32 2016
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Tue Dec  4 22:03:48 2018
+// Update Count     : 35
+//
+
+#include <fstream.hfa>
+
+int main() {
+	{
+		// test multiple assignment and cascading assignment
+		int u = 5, v = 6, x = 10, y = 11;
+		[int, int] z = [100, 200];
+
+		// swap x, y and store the new [x, y] in [u, v] and in z;
+		printf( "u=%d v=%d x=%d y=%d z=[%d, %d]\n", u, v, x, y, z );
+		sout | "u=" | u | "v=" | v | "x=" | x | "y=" | y | "z=[" | z | "]";
+		z = [u, v] = [x, y] = [y, x];
+		printf( "u=%d v=%d x=%d y=%d z=[%d, %d]\n", u, v, x, y, z );
+		sout | "u=" | u | "v=" | v | "x=" | x | "y=" | y | "z=[" | z | "]";
+
+		// shuffle elements -- v = z.0, z.0 = z.1, z.1 = u, u = v
+		[v, z, u] = [z, u, v];
+		printf( "u=%d v=%d z=[%d, %d]\n", u, v, z );
+		sout | "u=" | u | "v=" | v | "z=[" | z | "]";
+
+		// multiple assignment with tuple expression on right
+		z = [111, 222];
+		[u, v] = [123, 456];
+		printf( "u=%d v=%d z=[%d, %d]\n", u, v, z );
+		sout | "u=" | u | "v=" | v | "z=[" | z | "]";
+	}
+	{
+		// test mass assignment
+		double d = 0.0;
+		int i = 0;
+		char c = '\0';
+		struct X {
+			int z;
+		} x;
+		X ?=?(X & x, double d) { return x; }
+		[int, double, int] t;
+
+		// no conversion from X to integral types, so this serves as a santiy
+		// check that as long as this compiles, ?=?(_, x) is not generated.
+		[t, x, d, i, c, x] = (double)94.12;
+		printf( "d=%lg i=%d c=%c t=[%d, %lg, %d]\n", d, i, (int)c, t );
+		sout | "d=" | d | "i=" | i | "c=" | c | ' ' | "t=[" | t | "]";
+		[x, c, i, d, x, t] = (double)-94.12;
+		printf( "d=%lg i=%d c=%c t=[%d, %lg, %d]\n", d, i, c, t );
+		sout | "d=" | d | "i=" | i | "c=" | c | ' ' | "t=[" | t | "]";
+	}
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
Index: tests/tuple/tupleCast.c
===================================================================
--- tests/tuple/tupleCast.c	(revision 200fcb3c496b08f843f691550554b21d786aad38)
+++ 	(revision )
@@ -1,30 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// tupleCast.c --
-//
-// Author           : Rob Schluntz
-// Created On       : Mon Dec 12 15:56:07 2016
-// Last Modified By : Rob Schluntz
-// Last Modified On : Mon Dec 12 15:56:20 2016
-// Update Count     : 2
-//
-
-[char, int, double] f() { printf("ran f\n"); return ['c', 70, 6.28]; }
-
-int main() {
-  [int, char, float] x = [10, 'A', 3.14f];
-  printf("%d %c %g\n", ([int, char, float])x);
-  printf("%d %c\n", ([int, char])x);
-  printf("%d\n", ([int])x);
-  // printf("%d\n", (int)x);
-  printf("%g %g\n", ([double, float])x);
-  printf("%d %c\n", ([int, char])f());
-}
-
-// Local Variables: //
-// tab-width: 2 //
-// End: //
Index: tests/tuple/tupleCast.cfa
===================================================================
--- tests/tuple/tupleCast.cfa	(revision 84b4d607b60eece5075c7419f55cd58b8d234c19)
+++ tests/tuple/tupleCast.cfa	(revision 84b4d607b60eece5075c7419f55cd58b8d234c19)
@@ -0,0 +1,30 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// tupleCast.c --
+//
+// Author           : Rob Schluntz
+// Created On       : Mon Dec 12 15:56:07 2016
+// Last Modified By : Rob Schluntz
+// Last Modified On : Mon Dec 12 15:56:20 2016
+// Update Count     : 2
+//
+
+[char, int, double] f() { printf("ran f\n"); return ['c', 70, 6.28]; }
+
+int main() {
+  [int, char, float] x = [10, 'A', 3.14f];
+  printf("%d %c %g\n", ([int, char, float])x);
+  printf("%d %c\n", ([int, char])x);
+  printf("%d\n", ([int])x);
+  // printf("%d\n", (int)x);
+  printf("%g %g\n", ([double, float])x);
+  printf("%d %c\n", ([int, char])f());
+}
+
+// Local Variables: //
+// tab-width: 2 //
+// End: //
Index: tests/tuple/tupleFunction.c
===================================================================
--- tests/tuple/tupleFunction.c	(revision 200fcb3c496b08f843f691550554b21d786aad38)
+++ 	(revision )
@@ -1,98 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// tupleFunction.c --
-//
-// Author           : Rob Schluntz
-// Created On       : Tue Nov 15 17:24:32 2016
-// Last Modified By : Rob Schluntz
-// Last Modified On : Tue Nov 15 17:27:28 2016
-// Update Count     : 3
-//
-
-struct S {
-	int f1, f2;
-	char f3;
-	double f4;
-} v;
-
-[int] foo( [int, int, double, S] x ) {
-	printf("foo([%d, %d, %lg, {%d, %d, %c, %lg}])\n", x.0, x.1, x.2, x.3.[f1, f2, f3, f4]);
-	int a, b;
-	double c;
-	S d;
-	[a, b, c, d] = x;
-	[int, int, double, S] X = x;
-	printf("a=%d b=%d c=%lg d={%d, %d, %c, %lg}\n", a, b, c, d.[f1, f2, f3, f4]);
-	printf("X=[%d, %d, %lg, {%d, %d, %c, %lg}]\n", X.0, X.1, X.2, X.3.[f1, f2, f3, f4]);
-	return b;
-}
-
-[void] bar( [int, double, int] z ) {
-	printf("bar([%d, %lg, %d])\n", z);
-}
-
-[void] baz( int a, double b, int c ) {
-	printf("baz(%d, %lg, %d)\n", a, b, c);
-}
-
-[void] qux( [int, double] n, int m ) {
-	printf("qux([%d, %lg], %d)\n", n, m);
-}
-
-[int, double x, int] quux() {
-	return [3, 5.254, 4];
-}
-[[[int, double, int], [int, double]]] quuux() {
-	return [1, 2, 3, 4, 5];
-}
-
-int main() {
-	[int, double, int] x = [777, 2.76, 8675];
-	int x1 = 123, x3 = 456;
-	double x2 = 999.123;
-
-	printf("foo(...)=%d\n", foo(x1, x3, x2, (S){ 321, 654, 'Q', 3.14 }));
-
-	// call function with tuple parameter using tuple variable arg
-	bar(x);
-
-	// call function with tuple parameter using multiple values
-	bar(x1, x2, x3);
-
-	// call function with multiple parameters using tuple variable arg
-	baz(x);
-
-	// call function with multiple parameters using multiple args
-	baz(x1, x2, x3);
-
-	// call function with multiple parameters, one of which is a tuple using tuple variable arg
-	qux(x);
-
-	// call function with multiple parameters, one of which is a tuple using multiple args
-	qux(x1, x2, x3);
-
-	// call function with multiple return values and assign into a tuple variable
-	x = quux();
-	printf("x=[%d, %lg, %d]\n", x);
-
-	// call function with multiple return values and assign into a tuple expression
-	[x1, x2, x3] = quux();
-	printf("x1=%d x2=%lg x3=%d\n", x1, x2, x3);
-
-	// xxx - tuples of type parameters should come out as generic types?
-	// [x1, x2, x3] = ([(int)x1, (int)x2, (int)x3]) + ([(int)1, (int)2, (int)3]);
-	// ([(int)x1, (int)x2, (int)x3]) + ([(int)1, (int)2, (int)3]);
-	// printf("%d %g %d\n", x1, x2, x3);
-
-	// xxx - comes out the back as a cast, but should come out as a tuple expression of the first n fields cast to each of the result types
-	// ([int, double])x;
-}
-
-// Local Variables: //
-// tab-width: 4 //
-// End: //
-
Index: tests/tuple/tupleFunction.cfa
===================================================================
--- tests/tuple/tupleFunction.cfa	(revision 84b4d607b60eece5075c7419f55cd58b8d234c19)
+++ tests/tuple/tupleFunction.cfa	(revision 84b4d607b60eece5075c7419f55cd58b8d234c19)
@@ -0,0 +1,98 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// tupleFunction.c --
+//
+// Author           : Rob Schluntz
+// Created On       : Tue Nov 15 17:24:32 2016
+// Last Modified By : Rob Schluntz
+// Last Modified On : Tue Nov 15 17:27:28 2016
+// Update Count     : 3
+//
+
+struct S {
+	int f1, f2;
+	char f3;
+	double f4;
+} v;
+
+[int] foo( [int, int, double, S] x ) {
+	printf("foo([%d, %d, %lg, {%d, %d, %c, %lg}])\n", x.0, x.1, x.2, x.3.[f1, f2, f3, f4]);
+	int a, b;
+	double c;
+	S d;
+	[a, b, c, d] = x;
+	[int, int, double, S] X = x;
+	printf("a=%d b=%d c=%lg d={%d, %d, %c, %lg}\n", a, b, c, d.[f1, f2, f3, f4]);
+	printf("X=[%d, %d, %lg, {%d, %d, %c, %lg}]\n", X.0, X.1, X.2, X.3.[f1, f2, f3, f4]);
+	return b;
+}
+
+[void] bar( [int, double, int] z ) {
+	printf("bar([%d, %lg, %d])\n", z);
+}
+
+[void] baz( int a, double b, int c ) {
+	printf("baz(%d, %lg, %d)\n", a, b, c);
+}
+
+[void] qux( [int, double] n, int m ) {
+	printf("qux([%d, %lg], %d)\n", n, m);
+}
+
+[int, double x, int] quux() {
+	return [3, 5.254, 4];
+}
+[[[int, double, int], [int, double]]] quuux() {
+	return [1, 2, 3, 4, 5];
+}
+
+int main() {
+	[int, double, int] x = [777, 2.76, 8675];
+	int x1 = 123, x3 = 456;
+	double x2 = 999.123;
+
+	printf("foo(...)=%d\n", foo(x1, x3, x2, (S){ 321, 654, 'Q', 3.14 }));
+
+	// call function with tuple parameter using tuple variable arg
+	bar(x);
+
+	// call function with tuple parameter using multiple values
+	bar(x1, x2, x3);
+
+	// call function with multiple parameters using tuple variable arg
+	baz(x);
+
+	// call function with multiple parameters using multiple args
+	baz(x1, x2, x3);
+
+	// call function with multiple parameters, one of which is a tuple using tuple variable arg
+	qux(x);
+
+	// call function with multiple parameters, one of which is a tuple using multiple args
+	qux(x1, x2, x3);
+
+	// call function with multiple return values and assign into a tuple variable
+	x = quux();
+	printf("x=[%d, %lg, %d]\n", x);
+
+	// call function with multiple return values and assign into a tuple expression
+	[x1, x2, x3] = quux();
+	printf("x1=%d x2=%lg x3=%d\n", x1, x2, x3);
+
+	// xxx - tuples of type parameters should come out as generic types?
+	// [x1, x2, x3] = ([(int)x1, (int)x2, (int)x3]) + ([(int)1, (int)2, (int)3]);
+	// ([(int)x1, (int)x2, (int)x3]) + ([(int)1, (int)2, (int)3]);
+	// printf("%d %g %d\n", x1, x2, x3);
+
+	// xxx - comes out the back as a cast, but should come out as a tuple expression of the first n fields cast to each of the result types
+	// ([int, double])x;
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
+
Index: tests/tuple/tupleMember.c
===================================================================
--- tests/tuple/tupleMember.c	(revision 200fcb3c496b08f843f691550554b21d786aad38)
+++ 	(revision )
@@ -1,61 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// tupleFunction.c --
-//
-// Author           : Rob Schluntz
-// Created On       : Tue Nov 15 17:24:32 2016
-// Last Modified By : Rob Schluntz
-// Last Modified On : Tue Nov 15 17:27:28 2016
-// Update Count     : 3
-//
-
-void f() {
-	printf("called f!\n");
-}
-
-double g(double x, char y, int z) {
-	return z-y+x;
-}
-
-struct V2	{
-	int f2, f3;
-};
-struct V {
-	int f1;
-	V2 i; // temporary
-	// struct V2 {
-	//   int f2, f3;
-	// } i;
-	double f4;
-} v;
-
-V & h() {
-	static V local = { 111, { 222, 333 }, 444.5 };
-	return local;
-}
-
-int main() {
-	struct X {
-		int a;
-		double b;
-		char c;
-	} x = { 10, 12.5, '\x9' };
-
-	// should only call f once
-	printf("g(...)=%lg\n", g((f(), x).[b, c, a]));
-
-	v.[f1, i.[f2, f3], f4].[1.0, 2, 0, 1.1] = [11, 3.14159, 12, 13];
-
-	printf("v.[f1, i.[f2, f3], f4]=[%d, %d, %d, %lg]\n", v.[f1, i.[f2, f3], f4]);
-
-	h().[f1, i.[f2, f3], f4].[1.0, 2, 0, 1.1] = [987, 6.28, 4, 2];
-	printf("v.[f1, i.[f2, f3], f4]=[%d, [%d, %d], %lg]\n", h().[f1, i.[f2, f3], f4]);
-}
-
-// Local Variables: //
-// tab-width: 4 //
-// End: //
Index: tests/tuple/tupleMember.cfa
===================================================================
--- tests/tuple/tupleMember.cfa	(revision 84b4d607b60eece5075c7419f55cd58b8d234c19)
+++ tests/tuple/tupleMember.cfa	(revision 84b4d607b60eece5075c7419f55cd58b8d234c19)
@@ -0,0 +1,61 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// tupleFunction.c --
+//
+// Author           : Rob Schluntz
+// Created On       : Tue Nov 15 17:24:32 2016
+// Last Modified By : Rob Schluntz
+// Last Modified On : Tue Nov 15 17:27:28 2016
+// Update Count     : 3
+//
+
+void f() {
+	printf("called f!\n");
+}
+
+double g(double x, char y, int z) {
+	return z-y+x;
+}
+
+struct V2	{
+	int f2, f3;
+};
+struct V {
+	int f1;
+	V2 i; // temporary
+	// struct V2 {
+	//   int f2, f3;
+	// } i;
+	double f4;
+} v;
+
+V & h() {
+	static V local = { 111, { 222, 333 }, 444.5 };
+	return local;
+}
+
+int main() {
+	struct X {
+		int a;
+		double b;
+		char c;
+	} x = { 10, 12.5, '\x9' };
+
+	// should only call f once
+	printf("g(...)=%lg\n", g((f(), x).[b, c, a]));
+
+	v.[f1, i.[f2, f3], f4].[1.0, 2, 0, 1.1] = [11, 3.14159, 12, 13];
+
+	printf("v.[f1, i.[f2, f3], f4]=[%d, %d, %d, %lg]\n", v.[f1, i.[f2, f3], f4]);
+
+	h().[f1, i.[f2, f3], f4].[1.0, 2, 0, 1.1] = [987, 6.28, 4, 2];
+	printf("v.[f1, i.[f2, f3], f4]=[%d, [%d, %d], %lg]\n", h().[f1, i.[f2, f3], f4]);
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
Index: tests/tuple/tuplePolymorphism.c
===================================================================
--- tests/tuple/tuplePolymorphism.c	(revision 200fcb3c496b08f843f691550554b21d786aad38)
+++ 	(revision )
@@ -1,74 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// tuplePolymorphism.c --
-//
-// Author           : Rob Schluntz
-// Created On       : Tue Nov 16 10:38:00 2016
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Thu May 18 18:05:12 2017
-// Update Count     : 4
-//
-
-// packed is needed so that structs are not passed with the same alignment as function arguments
-__attribute__((packed)) struct A {
-	double x;
-	char y;
-	double z;
-};
-
-__attribute__((packed)) struct B {
-	long long x;
-	char y;
-	long long z;
-};
-
-// ensure that f is a viable candidate for g, even though its parameter structure does not exactly match
-[A] f([A, B] x, B y) { printf("%g %c %g %lld %c %lld %lld %c %lld\n", x.0.[x,y,z], x.1.[x,y,z], y.[x,y,z]); return x.0; }
-forall(otype T, otype U | { T f(T, U, U); })
-void g(T x, U y) { f(x, y, y); }
-
-// add two triples
-forall(otype T | { T ?+?(T, T); })
-[T, T, T] ?+?([T, T, T] x, [T, T, T] y) {
-	return [x.0+y.0, x.1+y.1, x.2+y.2];
-}
-
-int main() {
-	int x1 = 123, x3 = 456;
-	double x2 = 999.123;
-
-	int i1 = 111, i3 = 222;
-	double i2 = 333;
-
-	int d1 = 555, d3 = 444;
-	double d2 = 666;
-
-
-	[i1, i2, i3] = ([x1, (int)x2, x3]) + ([9, 2, 3]);
-	[d1, d2, d3] = ([x1, x2, x3]) + ([9, 2, 3]);
-	printf("%d %g %d\n", i1, i2, i3);
-	printf("%d %g %d\n", d1, d2, d3);
-
-	[double, double, double] zzz;
-	zzz = [x1, x2, x3];
-	printf("%g %g %g\n", zzz);
-	[x1, x2, x3] = zzz+zzz;
-	printf("%d %g %d\n", x1, x2, x3);
-
-	// ensure non-matching assertions are specialized correctly
-	g((A){ 1.21, 'x', 10.21}, (B){ 1111LL, 'v', 54385938LL });
-}
-
-forall(otype T)
-[T, T] foo([T, T] y) {
-	[T, T] x;
-	return x;
-}
-
-// Local Variables: //
-// tab-width: 4 //
-// End: //
Index: tests/tuple/tuplePolymorphism.cfa
===================================================================
--- tests/tuple/tuplePolymorphism.cfa	(revision 84b4d607b60eece5075c7419f55cd58b8d234c19)
+++ tests/tuple/tuplePolymorphism.cfa	(revision 84b4d607b60eece5075c7419f55cd58b8d234c19)
@@ -0,0 +1,74 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// tuplePolymorphism.c --
+//
+// Author           : Rob Schluntz
+// Created On       : Tue Nov 16 10:38:00 2016
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Thu May 18 18:05:12 2017
+// Update Count     : 4
+//
+
+// packed is needed so that structs are not passed with the same alignment as function arguments
+__attribute__((packed)) struct A {
+	double x;
+	char y;
+	double z;
+};
+
+__attribute__((packed)) struct B {
+	long long x;
+	char y;
+	long long z;
+};
+
+// ensure that f is a viable candidate for g, even though its parameter structure does not exactly match
+[A] f([A, B] x, B y) { printf("%g %c %g %lld %c %lld %lld %c %lld\n", x.0.[x,y,z], x.1.[x,y,z], y.[x,y,z]); return x.0; }
+forall(otype T, otype U | { T f(T, U, U); })
+void g(T x, U y) { f(x, y, y); }
+
+// add two triples
+forall(otype T | { T ?+?(T, T); })
+[T, T, T] ?+?([T, T, T] x, [T, T, T] y) {
+	return [x.0+y.0, x.1+y.1, x.2+y.2];
+}
+
+int main() {
+	int x1 = 123, x3 = 456;
+	double x2 = 999.123;
+
+	int i1 = 111, i3 = 222;
+	double i2 = 333;
+
+	int d1 = 555, d3 = 444;
+	double d2 = 666;
+
+
+	[i1, i2, i3] = ([x1, (int)x2, x3]) + ([9, 2, 3]);
+	[d1, d2, d3] = ([x1, x2, x3]) + ([9, 2, 3]);
+	printf("%d %g %d\n", i1, i2, i3);
+	printf("%d %g %d\n", d1, d2, d3);
+
+	[double, double, double] zzz;
+	zzz = [x1, x2, x3];
+	printf("%g %g %g\n", zzz);
+	[x1, x2, x3] = zzz+zzz;
+	printf("%d %g %d\n", x1, x2, x3);
+
+	// ensure non-matching assertions are specialized correctly
+	g((A){ 1.21, 'x', 10.21}, (B){ 1111LL, 'v', 54385938LL });
+}
+
+forall(otype T)
+[T, T] foo([T, T] y) {
+	[T, T] x;
+	return x;
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
Index: tests/tuple/tupleVariadic.c
===================================================================
--- tests/tuple/tupleVariadic.c	(revision 200fcb3c496b08f843f691550554b21d786aad38)
+++ 	(revision )
@@ -1,142 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// tuplePolymorphism.c --
-//
-// Author           : Rob Schluntz
-// Created On       : Fri Dec 16 10:25:35 2016
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Aug  2 09:24:04 2018
-// Update Count     : 6
-//
-
-#include <stdlib.hfa>
-
-void func(void) {
-	printf("called func(void)\n");
-}
-forall(otype T, ttype Params | { void process(T); void func(Params); })
-void func(T arg1, Params p) {
-	process(arg1);
-	func(p);
-}
-void process(int x) {
-	printf("called process(int) %d\n", x);
-}
-void process(double x) {
-	printf("called process(double) %g\n", x);
-}
-
-struct array {
-	int * data;
-	int size;
-};
-
-// xxx - eventually this will be collapsed...x
-void ?{}(array & a) {
-	a.size = 0;
-	a.data = 0;
-	printf("called ?{} with no a\n");
-}
-
-void ?{}(array & a, int a0) {
-	a.size = 1;
-	a.data = (int*)malloc(sizeof(int)*a.size);
-	a.data[0] = a0;
-	printf("called ?{} with a: %d\n", a0);
-}
-
-void ?{}(array & a, int a0, int a1) {
-	a.size = 2;
-	a.data = (int*)malloc(sizeof(int)*a.size);
-	a.data[0] = a0;
-	a.data[1] = a1;
-	printf("called ?{} with a: %d %d\n", a0, a1);
-}
-
-void ?{}(array & a, int a0, int a1, int a2) {
-	a.size = 3;
-	a.data = (int*)malloc(sizeof(int)*a.size);
-	a.data[0] = a0;
-	a.data[1] = a1;
-	a.data[2] = a2;
-	printf("called ?{} with a: %d %d %d\n", a0, a1, a2);
-}
-
-void ^?{}(array & a) {
-	free(a.data);
-}
-
-// test use of a tuple argument
-[void] ?{}(array & a, [int, int, int, int] args) {
-	int a0, a1, a2, a3;
-	[a0, a1, a2, a3] = args;
-	a.size = 4;
-	a.data = (int *)malloc(sizeof(int)*a.size);
-	a.data[0] = a0;
-	a.data[1] = a1;
-	a.data[2] = a2;
-	a.data[3] = a3;
-	printf("called ?{} with a: %d %d %d %d\n", a0, a1, a2, a3);
-}
-
-void print(array * x) {
-	printf("array = { ");
-	for (int i = 0; i < x->size; ++i) {
-		printf("%d, ", x->data[i]);
-	}
-	printf("}\n");
-}
-
-forall(otype T)
-T * copy(T x) {
-	// test calling new inside a polymorphic function
-	return new(x);
-}
-
-forall(ttype T | { void foo(T); }) void bar(T x) {}
-void foo(int) {}
-
-int main() {
-	array * x0 = new();
-	print(x0);
-
-	array * x1 = new(999);
-	print(x1);
-
-	array * x2 = new(123, 456);
-	print(x2);
-
-	array * x3 = new(100, 200, 300);
-	print(x3);
-
-	array * x4 = new(10, 2, 3, 4);
-	print(x4);
-
-	int * ptr = copy(111111);
-	printf("copy=%d\n", *ptr);
-
-	printf("calling func\n");
-	func(3, 2.0, 111, 4.145);
-	printf("finished func\n");
-
-	{
-		// T = [const int] -- this ensures that void(*)(int) satisfies void(*)(const int)
-		const int x;
-		bar(x);
-	}
-
-	delete(ptr);
-	delete(x4);
-	delete(x3);
-	delete(x2);
-	delete(x1);
-	delete(x0);
-}
-
-// Local Variables: //
-// tab-width: 4 //
-// End: //
Index: tests/tuple/tupleVariadic.cfa
===================================================================
--- tests/tuple/tupleVariadic.cfa	(revision 84b4d607b60eece5075c7419f55cd58b8d234c19)
+++ tests/tuple/tupleVariadic.cfa	(revision 84b4d607b60eece5075c7419f55cd58b8d234c19)
@@ -0,0 +1,142 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// tuplePolymorphism.c --
+//
+// Author           : Rob Schluntz
+// Created On       : Fri Dec 16 10:25:35 2016
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Thu Aug  2 09:24:04 2018
+// Update Count     : 6
+//
+
+#include <stdlib.hfa>
+
+void func(void) {
+	printf("called func(void)\n");
+}
+forall(otype T, ttype Params | { void process(T); void func(Params); })
+void func(T arg1, Params p) {
+	process(arg1);
+	func(p);
+}
+void process(int x) {
+	printf("called process(int) %d\n", x);
+}
+void process(double x) {
+	printf("called process(double) %g\n", x);
+}
+
+struct array {
+	int * data;
+	int size;
+};
+
+// xxx - eventually this will be collapsed...x
+void ?{}(array & a) {
+	a.size = 0;
+	a.data = 0;
+	printf("called ?{} with no a\n");
+}
+
+void ?{}(array & a, int a0) {
+	a.size = 1;
+	a.data = (int*)malloc(sizeof(int)*a.size);
+	a.data[0] = a0;
+	printf("called ?{} with a: %d\n", a0);
+}
+
+void ?{}(array & a, int a0, int a1) {
+	a.size = 2;
+	a.data = (int*)malloc(sizeof(int)*a.size);
+	a.data[0] = a0;
+	a.data[1] = a1;
+	printf("called ?{} with a: %d %d\n", a0, a1);
+}
+
+void ?{}(array & a, int a0, int a1, int a2) {
+	a.size = 3;
+	a.data = (int*)malloc(sizeof(int)*a.size);
+	a.data[0] = a0;
+	a.data[1] = a1;
+	a.data[2] = a2;
+	printf("called ?{} with a: %d %d %d\n", a0, a1, a2);
+}
+
+void ^?{}(array & a) {
+	free(a.data);
+}
+
+// test use of a tuple argument
+[void] ?{}(array & a, [int, int, int, int] args) {
+	int a0, a1, a2, a3;
+	[a0, a1, a2, a3] = args;
+	a.size = 4;
+	a.data = (int *)malloc(sizeof(int)*a.size);
+	a.data[0] = a0;
+	a.data[1] = a1;
+	a.data[2] = a2;
+	a.data[3] = a3;
+	printf("called ?{} with a: %d %d %d %d\n", a0, a1, a2, a3);
+}
+
+void print(array * x) {
+	printf("array = { ");
+	for (int i = 0; i < x->size; ++i) {
+		printf("%d, ", x->data[i]);
+	}
+	printf("}\n");
+}
+
+forall(otype T)
+T * copy(T x) {
+	// test calling new inside a polymorphic function
+	return new(x);
+}
+
+forall(ttype T | { void foo(T); }) void bar(T x) {}
+void foo(int) {}
+
+int main() {
+	array * x0 = new();
+	print(x0);
+
+	array * x1 = new(999);
+	print(x1);
+
+	array * x2 = new(123, 456);
+	print(x2);
+
+	array * x3 = new(100, 200, 300);
+	print(x3);
+
+	array * x4 = new(10, 2, 3, 4);
+	print(x4);
+
+	int * ptr = copy(111111);
+	printf("copy=%d\n", *ptr);
+
+	printf("calling func\n");
+	func(3, 2.0, 111, 4.145);
+	printf("finished func\n");
+
+	{
+		// T = [const int] -- this ensures that void(*)(int) satisfies void(*)(const int)
+		const int x;
+		bar(x);
+	}
+
+	delete(ptr);
+	delete(x4);
+	delete(x3);
+	delete(x2);
+	delete(x1);
+	delete(x0);
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
Index: tests/tuple/tuples.c
===================================================================
--- tests/tuple/tuples.c	(revision 200fcb3c496b08f843f691550554b21d786aad38)
+++ 	(revision )
@@ -1,32 +1,0 @@
-int a;
-float a;
-int f( int );
-float f( float );
-
-void g() {
-	// selects the same f each time but without a cast would be ambiguous
-	f( (int)a );
-	(int)f( a );
-}
-
-[ int ] p;
-[ int, double ] p;
-[ int, int, int ] p;
-[ int, int, int, int ] p;
-
-[ char ] q;
-[ int, int ] q;
-[ int, int, float ] q;
-[ int, int, int, int ] q;
-
-[ int, int ] r( int, int, int, int );
-
-void s() {
-	r( p, q );
-	r( [ q, p ] );
-	r( r( p, q ), r( q, q ) );
-}
-
-// Local Variables: //
-// tab-width: 4 //
-// End: //
Index: tests/tuple/tuples.cfa
===================================================================
--- tests/tuple/tuples.cfa	(revision 84b4d607b60eece5075c7419f55cd58b8d234c19)
+++ tests/tuple/tuples.cfa	(revision 84b4d607b60eece5075c7419f55cd58b8d234c19)
@@ -0,0 +1,32 @@
+int a;
+float a;
+int f( int );
+float f( float );
+
+void g() {
+	// selects the same f each time but without a cast would be ambiguous
+	f( (int)a );
+	(int)f( a );
+}
+
+[ int ] p;
+[ int, double ] p;
+[ int, int, int ] p;
+[ int, int, int, int ] p;
+
+[ char ] q;
+[ int, int ] q;
+[ int, int, float ] q;
+[ int, int, int, int ] q;
+
+[ int, int ] r( int, int, int, int );
+
+void s() {
+	r( p, q );
+	r( [ q, p ] );
+	r( r( p, q ), r( q, q ) );
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
