Index: src/Parser/DeclarationNode.cc
===================================================================
--- src/Parser/DeclarationNode.cc	(revision b16898e15cca72a9db8a280714dbc0100e4abffa)
+++ src/Parser/DeclarationNode.cc	(revision 3403534e2b90c8ea3761ef2743ab04b0f002e8d8)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 12:34:05 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sun Aug 28 22:12:44 2016
-// Update Count     : 278
+// Last Modified On : Mon Aug 29 22:30:56 2016
+// Update Count     : 327
 //
 
@@ -42,4 +42,30 @@
 
 extern LinkageSpec::Spec linkage;						// defined in parser.yy
+
+DeclarationNode::DeclarationNode()
+		: type( 0 )
+		, storageClass( NoStorageClass )
+		, isInline( false )
+		, isNoreturn( false )
+		, bitfieldWidth( 0 )
+		, initializer( 0 )
+		, hasEllipsis( false )
+		, linkage( ::linkage )
+		, extension( false )
+		, error() {
+	attr.expr = nullptr;
+	attr.type = nullptr;
+
+	variable.tyClass = DeclarationNode::Type;
+	variable.assertions = nullptr;
+}
+
+DeclarationNode::~DeclarationNode() {
+	delete attr.expr;
+	delete attr.type;
+	delete type;
+	delete bitfieldWidth;
+	delete initializer;
+}
 
 DeclarationNode *DeclarationNode::clone() const {
@@ -55,25 +81,13 @@
 	newnode->set_next( maybeClone( get_next() ) );
 	newnode->linkage = linkage;
+
+	newnode->variable.assertions = maybeClone( variable.assertions );
+	newnode->variable.name = variable.name;
+	newnode->variable.tyClass = variable.tyClass;
+
+	newnode->attr.expr = maybeClone( attr.expr );
+	newnode->attr.type = maybeClone( attr.type );
 	return newnode;
 } // DeclarationNode::clone
-
-DeclarationNode::DeclarationNode()
-	: type( 0 )
-	, storageClass( NoStorageClass )
-	, isInline( false )
-	, isNoreturn( false )
-	, bitfieldWidth( 0 )
-	, initializer( 0 )
-	, hasEllipsis( false )
-	, linkage( ::linkage )
-	, extension( false )
-	, error() {
-}
-
-DeclarationNode::~DeclarationNode() {
-	delete type;
-	delete bitfieldWidth;
-	delete initializer;
-}
 
 bool DeclarationNode::get_hasEllipsis() const {
@@ -129,11 +143,11 @@
 
 	newnode->type = new TypeData( TypeData::Function );
-	newnode->type->function->params = param;
-	newnode->type->function->newStyle = newStyle;
-	newnode->type->function->body = body;
+	newnode->type->function.params = param;
+	newnode->type->function.newStyle = newStyle;
+	newnode->type->function.body = body;
 	typedefTable.addToEnclosingScope( newnode->name, TypedefTable::ID );
 
 	if ( body ) {
-		newnode->type->function->hasBody = true;
+		newnode->type->function.hasBody = true;
 	} // if
 
@@ -175,5 +189,5 @@
 	DeclarationNode *newnode = new DeclarationNode;
 	newnode->type = new TypeData( TypeData::Basic );
-	newnode->type->basic->typeSpec.push_back( bt );
+	newnode->type->basic.typeSpec.push_back( bt );
 	return newnode;
 } // DeclarationNode::newBasicType
@@ -182,21 +196,14 @@
 	DeclarationNode *newnode = new DeclarationNode;
 	newnode->type = new TypeData( TypeData::Basic );
-	newnode->type->basic->modifiers.push_back( mod );
+	newnode->type->basic.modifiers.push_back( mod );
 	return newnode;
 } // DeclarationNode::newModifier
 
-DeclarationNode * DeclarationNode::newBuiltinType( BuiltinType bt ) {
-	DeclarationNode *newnode = new DeclarationNode;
-	newnode->type = new TypeData( TypeData::Builtin );
-	newnode->type->builtin->type = bt;
-	return newnode;
-} // DeclarationNode::newBuiltinType
-
 DeclarationNode * DeclarationNode::newFromTypedef( std::string *name ) {
 	DeclarationNode *newnode = new DeclarationNode;
 	newnode->type = new TypeData( TypeData::SymbolicInst );
-	newnode->type->symbolic->name = assign_strptr( name );
-	newnode->type->symbolic->isTypedef = true;
-	newnode->type->symbolic->params = 0;
+	newnode->type->symbolic.name = assign_strptr( name );
+	newnode->type->symbolic.isTypedef = true;
+	newnode->type->symbolic.params = 0;
 	return newnode;
 } // DeclarationNode::newFromTypedef
@@ -205,12 +212,12 @@
 	DeclarationNode *newnode = new DeclarationNode;
 	newnode->type = new TypeData( TypeData::Aggregate );
-	newnode->type->aggregate->kind = kind;
-	newnode->type->aggregate->name = assign_strptr( name );
-	if ( newnode->type->aggregate->name == "" ) {		// anonymous aggregate ?
-		newnode->type->aggregate->name = anonymous.newName();
-	} // if
-	newnode->type->aggregate->actuals = actuals;
-	newnode->type->aggregate->fields = fields;
-	newnode->type->aggregate->body = body;
+	newnode->type->aggregate.kind = kind;
+	newnode->type->aggregate.name = assign_strptr( name );
+	if ( newnode->type->aggregate.name == "" ) {		// anonymous aggregate ?
+		newnode->type->aggregate.name = anonymous.newName();
+	} // if
+	newnode->type->aggregate.actuals = actuals;
+	newnode->type->aggregate.fields = fields;
+	newnode->type->aggregate.body = body;
 	return newnode;
 } // DeclarationNode::newAggregate
@@ -220,9 +227,9 @@
 	newnode->name = assign_strptr( name );
 	newnode->type = new TypeData( TypeData::Enum );
-	newnode->type->enumeration->name = newnode->name;
-	if ( newnode->type->enumeration->name == "" ) {		// anonymous enumeration ?
-		newnode->type->enumeration->name = DeclarationNode::anonymous.newName();
-	} // if
-	newnode->type->enumeration->constants = constants;
+	newnode->type->enumeration.name = newnode->name;
+	if ( newnode->type->enumeration.name == "" ) {		// anonymous enumeration ?
+		newnode->type->enumeration.name = DeclarationNode::anonymous.newName();
+	} // if
+	newnode->type->enumeration.constants = constants;
 	return newnode;
 } // DeclarationNode::newEnum
@@ -245,7 +252,7 @@
 	DeclarationNode *newnode = new DeclarationNode;
 	newnode->type = new TypeData( TypeData::SymbolicInst );
-	newnode->type->symbolic->name = assign_strptr( name );
-	newnode->type->symbolic->isTypedef = false;
-	newnode->type->symbolic->actuals = params;
+	newnode->type->symbolic.name = assign_strptr( name );
+	newnode->type->symbolic.isTypedef = false;
+	newnode->type->symbolic.actuals = params;
 	return newnode;
 } // DeclarationNode::newFromTypeGen
@@ -255,6 +262,6 @@
 	newnode->name = assign_strptr( name );
 	newnode->type = new TypeData( TypeData::Variable );
-	newnode->type->variable->tyClass = tc;
-	newnode->type->variable->name = newnode->name;
+	newnode->variable.tyClass = tc;
+	newnode->variable.name = newnode->name;
 	return newnode;
 } // DeclarationNode::newTypeParam
@@ -263,8 +270,8 @@
 	DeclarationNode *newnode = new DeclarationNode;
 	newnode->type = new TypeData( TypeData::Aggregate );
-	newnode->type->aggregate->kind = Trait;
-	newnode->type->aggregate->params = params;
-	newnode->type->aggregate->fields = asserts;
-	newnode->type->aggregate->name = assign_strptr( name );
+	newnode->type->aggregate.kind = Trait;
+	newnode->type->aggregate.params = params;
+	newnode->type->aggregate.fields = asserts;
+	newnode->type->aggregate.name = assign_strptr( name );
 	return newnode;
 } // DeclarationNode::newTrait
@@ -273,8 +280,8 @@
 	DeclarationNode *newnode = new DeclarationNode;
 	newnode->type = new TypeData( TypeData::AggregateInst );
-	newnode->type->aggInst->aggregate = new TypeData( TypeData::Aggregate );
-	newnode->type->aggInst->aggregate->aggregate->kind = Trait;
-	newnode->type->aggInst->aggregate->aggregate->name = assign_strptr( name );
-	newnode->type->aggInst->params = params;
+	newnode->type->aggInst.aggregate = new TypeData( TypeData::Aggregate );
+	newnode->type->aggInst.aggregate->aggregate.kind = Trait;
+	newnode->type->aggInst.aggregate->aggregate.name = assign_strptr( name );
+	newnode->type->aggInst.params = params;
 	return newnode;
 } // DeclarationNode::newTraitUse
@@ -284,7 +291,7 @@
 	newnode->name = assign_strptr( name );
 	newnode->type = new TypeData( TypeData::Symbolic );
-	newnode->type->symbolic->isTypedef = false;
-	newnode->type->symbolic->params = typeParams;
-	newnode->type->symbolic->name = newnode->name;
+	newnode->type->symbolic.isTypedef = false;
+	newnode->type->symbolic.params = typeParams;
+	newnode->type->symbolic.name = newnode->name;
 	return newnode;
 } // DeclarationNode::newTypeDecl
@@ -299,10 +306,10 @@
 	DeclarationNode *newnode = new DeclarationNode;
 	newnode->type = new TypeData( TypeData::Array );
-	newnode->type->array->dimension = size;
-	newnode->type->array->isStatic = isStatic;
-	if ( newnode->type->array->dimension == 0 || newnode->type->array->dimension->isExpressionType<ConstantExpr *>() ) {
-		newnode->type->array->isVarLen = false;
+	newnode->type->array.dimension = size;
+	newnode->type->array.isStatic = isStatic;
+	if ( newnode->type->array.dimension == 0 || newnode->type->array.dimension->isExpressionType<ConstantExpr *>() ) {
+		newnode->type->array.isVarLen = false;
 	} else {
-		newnode->type->array->isVarLen = true;
+		newnode->type->array.isVarLen = true;
 	} // if
 	return newnode->addQualifiers( qualifiers );
@@ -312,7 +319,7 @@
 	DeclarationNode *newnode = new DeclarationNode;
 	newnode->type = new TypeData( TypeData::Array );
-	newnode->type->array->dimension = 0;
-	newnode->type->array->isStatic = false;
-	newnode->type->array->isVarLen = true;
+	newnode->type->array.dimension = 0;
+	newnode->type->array.isStatic = false;
+	newnode->type->array.isVarLen = true;
 	return newnode->addQualifiers( qualifiers );
 }
@@ -327,5 +334,5 @@
 	DeclarationNode *newnode = new DeclarationNode;
 	newnode->type = new TypeData( TypeData::Tuple );
-	newnode->type->tuple->members = members;
+	newnode->type->tuple = members;
 	return newnode;
 }
@@ -334,13 +341,20 @@
 	DeclarationNode *newnode = new DeclarationNode;
 	newnode->type = new TypeData( TypeData::Typeof );
-	newnode->type->typeexpr->expr = expr;
-	return newnode;
-}
+	newnode->type->typeexpr = expr;
+	return newnode;
+}
+
+DeclarationNode * DeclarationNode::newBuiltinType( BuiltinType bt ) {
+	DeclarationNode *newnode = new DeclarationNode;
+	newnode->type = new TypeData( TypeData::Builtin );
+	newnode->builtin = bt;
+	return newnode;
+} // DeclarationNode::newBuiltinType
 
 DeclarationNode *DeclarationNode::newAttr( std::string *name, ExpressionNode *expr ) {
 	DeclarationNode *newnode = new DeclarationNode;
 	newnode->type = new TypeData( TypeData::Attr );
-	newnode->type->attr->name = assign_strptr( name );
-	newnode->type->attr->expr = expr;
+	newnode->attr.name = assign_strptr( name );
+	newnode->attr.expr = expr;
 	return newnode;
 }
@@ -349,6 +363,6 @@
 	DeclarationNode *newnode = new DeclarationNode;
 	newnode->type = new TypeData( TypeData::Attr );
-	newnode->type->attr->name = assign_strptr( name );
-	newnode->type->attr->type = type;
+	newnode->attr.name = assign_strptr( name );
+	newnode->attr.type = type;
 	return newnode;
 }
@@ -407,7 +421,7 @@
 				} else {
 					if ( type->kind == TypeData::Aggregate ) {
-						type->aggregate->params = q->type->forall;
+						type->aggregate.params = q->type->forall;
 						// change implicit typedef from TYPEDEFname to TYPEGENname
-						typedefTable.changeKind( type->aggregate->name, TypedefTable::TG );
+						typedefTable.changeKind( type->aggregate.name, TypedefTable::TG );
 					} else {
 						type->forall = q->type->forall;
@@ -457,6 +471,6 @@
 				if ( src->kind != TypeData::Unknown ) {
 					assert( src->kind == TypeData::Basic );
-					dst->basic->modifiers.splice( dst->basic->modifiers.end(), src->basic->modifiers );
-					dst->basic->typeSpec.splice( dst->basic->typeSpec.end(), src->basic->typeSpec );
+					dst->basic.modifiers.splice( dst->basic.modifiers.end(), src->basic.modifiers );
+					dst->basic.typeSpec.splice( dst->basic.typeSpec.end(), src->basic.typeSpec );
 				} // if
 				break;
@@ -466,7 +480,7 @@
 				  case TypeData::Enum:
 					dst->base = new TypeData( TypeData::AggregateInst );
-					dst->base->aggInst->aggregate = src;
+					dst->base->aggInst.aggregate = src;
 					if ( src->kind == TypeData::Aggregate ) {
-						dst->base->aggInst->params = maybeClone( src->aggregate->actuals );
+						dst->base->aggInst.params = maybeClone( src->aggregate.actuals );
 					} // if
 					dst->base->qualifiers |= src->qualifiers;
@@ -495,7 +509,7 @@
 				if ( o->type->kind == TypeData::Aggregate || o->type->kind == TypeData::Enum ) {
 					type = new TypeData( TypeData::AggregateInst );
-					type->aggInst->aggregate = o->type;
+					type->aggInst.aggregate = o->type;
 					if ( o->type->kind == TypeData::Aggregate ) {
-						type->aggInst->params = maybeClone( o->type->aggregate->actuals );
+						type->aggInst.params = maybeClone( o->type->aggregate.actuals );
 					} // if
 					type->qualifiers |= o->type->qualifiers;
@@ -523,7 +537,7 @@
 DeclarationNode *DeclarationNode::addTypedef() {
 	TypeData *newtype = new TypeData( TypeData::Symbolic );
-	newtype->symbolic->params = 0;
-	newtype->symbolic->isTypedef = true;
-	newtype->symbolic->name = name;
+	newtype->symbolic.params = 0;
+	newtype->symbolic.isTypedef = true;
+	newtype->symbolic.name = name;
 	newtype->base = type;
 	type = newtype;
@@ -535,15 +549,15 @@
 	switch ( type->kind ) {
 	  case TypeData::Symbolic:
-		if ( type->symbolic->assertions ) {
-			type->symbolic->assertions->appendList( assertions );
+		if ( type->symbolic.assertions ) {
+			type->symbolic.assertions->appendList( assertions );
 		} else {
-			type->symbolic->assertions = assertions;
+			type->symbolic.assertions = assertions;
 		} // if
 		break;
 	  case TypeData::Variable:
-		if ( type->variable->assertions ) {
-			type->variable->assertions->appendList( assertions );
+		if ( variable.assertions ) {
+			variable.assertions->appendList( assertions );
 		} else {
-			type->variable->assertions = assertions;
+			variable.assertions = assertions;
 		} // if
 		break;
@@ -574,7 +588,7 @@
 	assert( type );
 	assert( type->kind == TypeData::Function );
-	assert( type->function->body == 0 );
-	type->function->body = body;
-	type->function->hasBody = true;
+	assert( type->function.body == 0 );
+	type->function.body = body;
+	type->function.hasBody = true;
 	return this;
 }
@@ -583,6 +597,6 @@
 	assert( type );
 	assert( type->kind == TypeData::Function );
-	assert( type->function->oldDeclList == 0 );
-	type->function->oldDeclList = list;
+	assert( type->function.oldDeclList == 0 );
+	type->function.oldDeclList = list;
 	return this;
 }
@@ -630,7 +644,7 @@
 			  case TypeData::Enum:
 				p->type->base = new TypeData( TypeData::AggregateInst );
-				p->type->base->aggInst->aggregate = type;
+				p->type->base->aggInst.aggregate = type;
 				if ( type->kind == TypeData::Aggregate ) {
-					p->type->base->aggInst->params = maybeClone( type->aggregate->actuals );
+					p->type->base->aggInst.params = maybeClone( type->aggregate.actuals );
 				} // if
 				p->type->base->qualifiers |= type->qualifiers;
@@ -667,7 +681,7 @@
 			  case TypeData::Enum:
 				lastArray->base = new TypeData( TypeData::AggregateInst );
-				lastArray->base->aggInst->aggregate = type;
+				lastArray->base->aggInst.aggregate = type;
 				if ( type->kind == TypeData::Aggregate ) {
-					lastArray->base->aggInst->params = maybeClone( type->aggregate->actuals );
+					lastArray->base->aggInst.params = maybeClone( type->aggregate.actuals );
 				} // if
 				lastArray->base->qualifiers |= type->qualifiers;
@@ -687,5 +701,5 @@
 DeclarationNode *DeclarationNode::addParamList( DeclarationNode *params ) {
 	TypeData *ftype = new TypeData( TypeData::Function );
-	ftype->function->params = params;
+	ftype->function.params = params;
 	setBase( type, ftype );
 	return this;
@@ -697,10 +711,10 @@
 			type->base = addIdListToType( type->base, ids );
 		} else {
-			type->function->idList = ids;
+			type->function.idList = ids;
 		} // if
 		return type;
 	} else {
 		TypeData *newtype = new TypeData( TypeData::Function );
-		newtype->function->idList = ids;
+		newtype->function.idList = ids;
 		return newtype;
 	} // if
@@ -727,11 +741,11 @@
 	if ( newnode->type->kind == TypeData::AggregateInst ) {
 		// don't duplicate members
-		if ( newnode->type->aggInst->aggregate->kind == TypeData::Enum ) {
-			delete newnode->type->aggInst->aggregate->enumeration->constants;
-			newnode->type->aggInst->aggregate->enumeration->constants = 0;
+		if ( newnode->type->aggInst.aggregate->kind == TypeData::Enum ) {
+			delete newnode->type->aggInst.aggregate->enumeration.constants;
+			newnode->type->aggInst.aggregate->enumeration.constants = 0;
 		} else {
-			assert( newnode->type->aggInst->aggregate->kind == TypeData::Aggregate );
-			delete newnode->type->aggInst->aggregate->aggregate->fields;
-			newnode->type->aggInst->aggregate->aggregate->fields = 0;
+			assert( newnode->type->aggInst.aggregate->kind == TypeData::Aggregate );
+			delete newnode->type->aggInst.aggregate->aggregate.fields;
+			newnode->type->aggInst.aggregate->aggregate.fields = 0;
 		} // if
 	} // if
@@ -753,11 +767,11 @@
 			if ( newType->kind == TypeData::AggregateInst ) {
 				// don't duplicate members
-				if ( newType->aggInst->aggregate->kind == TypeData::Enum ) {
-					delete newType->aggInst->aggregate->enumeration->constants;
-					newType->aggInst->aggregate->enumeration->constants = 0;
+				if ( newType->aggInst.aggregate->kind == TypeData::Enum ) {
+					delete newType->aggInst.aggregate->enumeration.constants;
+					newType->aggInst.aggregate->enumeration.constants = 0;
 				} else {
-					assert( newType->aggInst->aggregate->kind == TypeData::Aggregate );
-					delete newType->aggInst->aggregate->aggregate->fields;
-					newType->aggInst->aggregate->aggregate->fields = 0;
+					assert( newType->aggInst.aggregate->kind == TypeData::Aggregate );
+					delete newType->aggInst.aggregate->aggregate.fields;
+					newType->aggInst.aggregate->aggregate.fields = 0;
 				} // if
 			} // if
@@ -896,5 +910,12 @@
 	if ( ! error.empty() ) throw SemanticError( error, this );
 	if ( type ) {
-		return buildDecl( type, name, storageClass, maybeBuild< Expression >( bitfieldWidth ), isInline, isNoreturn, linkage, maybeBuild< Initializer >(initializer) )->set_extension( extension );
+		if ( type->kind == TypeData::Variable ) {
+			static const TypeDecl::Kind kindMap[] = { TypeDecl::Any, TypeDecl::Ftype, TypeDecl::Dtype };
+			TypeDecl * ret = new TypeDecl( variable.name, DeclarationNode::NoStorageClass, 0, kindMap[ variable.tyClass ] );
+			buildList( variable.assertions, ret->get_assertions() );
+			return ret;
+		} else {
+			return buildDecl( type, name, storageClass, maybeBuild< Expression >( bitfieldWidth ), isInline, isNoreturn, linkage, maybeBuild< Initializer >(initializer) )->set_extension( extension );
+		} // if
 	} // if
 	if ( ! isInline && ! isNoreturn ) {
@@ -909,26 +930,38 @@
 	switch ( type->kind ) {
 	  case TypeData::Enum:
-		return new EnumInstType( buildQualifiers( type ), type->enumeration->name );
+		return new EnumInstType( buildQualifiers( type ), type->enumeration.name );
 	  case TypeData::Aggregate: {
 		  ReferenceToType *ret;
-		  switch ( type->aggregate->kind ) {
+		  switch ( type->aggregate.kind ) {
 			case DeclarationNode::Struct:
-			  ret = new StructInstType( buildQualifiers( type ), type->aggregate->name );
+			  ret = new StructInstType( buildQualifiers( type ), type->aggregate.name );
 			  break;
 			case DeclarationNode::Union:
-			  ret = new UnionInstType( buildQualifiers( type ), type->aggregate->name );
+			  ret = new UnionInstType( buildQualifiers( type ), type->aggregate.name );
 			  break;
 			case DeclarationNode::Trait:
-			  ret = new TraitInstType( buildQualifiers( type ), type->aggregate->name );
+			  ret = new TraitInstType( buildQualifiers( type ), type->aggregate.name );
 			  break;
 			default:
 			  assert( false );
 		  } // switch
-		  buildList( type->aggregate->actuals, ret->get_parameters() );
+		  buildList( type->aggregate.actuals, ret->get_parameters() );
 		  return ret;
 	  }
 	  case TypeData::Symbolic: {
-		  TypeInstType *ret = new TypeInstType( buildQualifiers( type ), type->symbolic->name, false );
-		  buildList( type->symbolic->actuals, ret->get_parameters() );
+		  TypeInstType *ret = new TypeInstType( buildQualifiers( type ), type->symbolic.name, false );
+		  buildList( type->symbolic.actuals, ret->get_parameters() );
+		  return ret;
+	  }
+	  case TypeData::Attr: {
+		  assert( type->kind == TypeData::Attr );
+		  // assert( type->attr );
+		  AttrType * ret;
+		  if ( attr.expr ) {
+			  ret = new AttrType( buildQualifiers( type ), attr.name, attr.expr->build() );
+		  } else {
+			  assert( attr.type );
+			  ret = new AttrType( buildQualifiers( type ), attr.name, attr.type->buildType() );
+		  } // if
 		  return ret;
 	  }
Index: src/Parser/ParseNode.h
===================================================================
--- src/Parser/ParseNode.h	(revision b16898e15cca72a9db8a280714dbc0100e4abffa)
+++ src/Parser/ParseNode.h	(revision 3403534e2b90c8ea3761ef2743ab04b0f002e8d8)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 13:28:16 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sun Aug 28 21:14:51 2016
-// Update Count     : 575
+// Last Modified On : Mon Aug 29 21:45:43 2016
+// Update Count     : 583
 //
 
@@ -290,4 +290,26 @@
 	// bool buildFuncSpecifier( StorageClass key ) const;
 
+	struct Enumeration_t {
+		std::string name;
+		DeclarationNode * constants;
+	};
+	Enumeration_t enumeration;
+
+	struct Variable_t {
+		DeclarationNode::TypeClass tyClass;
+		std::string name;
+		DeclarationNode * assertions;
+	};
+	Variable_t variable;
+
+	struct Attr_t {
+		std::string name;
+		ExpressionNode * expr;
+		DeclarationNode * type;
+	};
+	Attr_t attr;
+
+	BuiltinType builtin;
+
 	TypeData *type;
 	std::string name;
Index: src/Parser/TypeData.cc
===================================================================
--- src/Parser/TypeData.cc	(revision b16898e15cca72a9db8a280714dbc0100e4abffa)
+++ src/Parser/TypeData.cc	(revision 3403534e2b90c8ea3761ef2743ab04b0f002e8d8)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 15:12:51 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sun Aug 28 18:28:58 2016
-// Update Count     : 223
+// Last Modified On : Mon Aug 29 22:31:53 2016
+// Update Count     : 277
 //
 
@@ -33,63 +33,63 @@
 		break;
 	  case Basic:
-		basic = new Basic_t;
+		// basic = new Basic_t;
 		break;
 	  case Array:
-		array = new Array_t;
-		array->dimension = 0;
-		array->isVarLen = false;
-		array->isStatic = false;
+		// array = new Array_t;
+		array.dimension = 0;
+		array.isVarLen = false;
+		array.isStatic = false;
 		break;
 	  case Function:
-		function = new Function_t;
-		function->params = 0;
-		function->idList = 0;
-		function->oldDeclList = 0;
-		function->body = 0;
-		function->hasBody = false;
-		function->newStyle = false;
+		// function = new Function_t;
+		function.params = 0;
+		function.idList = 0;
+		function.oldDeclList = 0;
+		function.body = 0;
+		function.hasBody = false;
+		function.newStyle = false;
 		break;
 	  case Aggregate:
-		aggregate = new Aggregate_t;
-		aggregate->params = 0;
-		aggregate->actuals = 0;
-		aggregate->fields = 0;
+		// aggregate = new Aggregate_t;
+		aggregate.params = 0;
+		aggregate.actuals = 0;
+		aggregate.fields = 0;
 		break;
 	  case AggregateInst:
-		aggInst = new AggInst_t;
-		aggInst->aggregate = 0;
-		aggInst->params = 0;
+		// aggInst = new AggInst_t;
+		aggInst.aggregate = 0;
+		aggInst.params = 0;
 		break;
 	  case Enum:
-		enumeration = new Enumeration_t;
-		enumeration->constants = 0;
+		// enumeration = new Enumeration_t;
+		enumeration.constants = 0;
 		break;
 	  case Symbolic:
 	  case SymbolicInst:
-		symbolic = new Symbolic_t;
-		symbolic->params = 0;
-		symbolic->actuals = 0;
-		symbolic->assertions = 0;
+		// symbolic = new Symbolic_t;
+		symbolic.params = 0;
+		symbolic.actuals = 0;
+		symbolic.assertions = 0;
 		break;
 	  case Variable:
-		variable = new Variable_t;
-		variable->tyClass = DeclarationNode::Type;
-		variable->assertions = 0;
+		// variable = new Variable_t;
+		// variable.tyClass = DeclarationNode::Type;
+		// variable.assertions = 0;
 		break;
 	  case Tuple:
-		tuple = new Tuple_t;
-		tuple->members = 0;
+		// tuple = new Tuple_t;
+		tuple = nullptr;
 		break;
 	  case Typeof:
-		typeexpr = new Typeof_t;
-		typeexpr->expr = 0;
+		// typeexpr = new Typeof_t;
+		typeexpr = nullptr;
+		break;
+	  case Attr:
+		// attr = new Attr_t;
+		// attr.expr = nullptr;
+		// attr.type = nullptr;
 		break;
 	  case Builtin:
-		builtin = new Builtin_t;
-		break;
-	  case Attr:
-		attr = new Attr_t;
-		attr->expr = 0;
-		attr->type = 0;
+		// builtin = new Builtin_t;
 		break;
 	} // switch
@@ -107,58 +107,58 @@
 		break;
 	  case Basic:
-		delete basic;
+		// delete basic;
 		break;
 	  case Array:
-		delete array->dimension;
-		delete array;
+		delete array.dimension;
+		// delete array;
 		break;
 	  case Function:
-		delete function->params;
-		delete function->idList;
-		delete function->oldDeclList;
-		delete function->body;
-		delete function;
+		delete function.params;
+		delete function.idList;
+		delete function.oldDeclList;
+		delete function.body;
+		// delete function;
 		break;
 	  case Aggregate:
-		delete aggregate->params;
-		delete aggregate->actuals;
-		delete aggregate->fields;
-		delete aggregate;
+		delete aggregate.params;
+		delete aggregate.actuals;
+		delete aggregate.fields;
+		// delete aggregate;
 		break;
 	  case AggregateInst:
-		delete aggInst->aggregate;
-		delete aggInst->params;
-		delete aggInst;
+		delete aggInst.aggregate;
+		delete aggInst.params;
+		// delete aggInst;
 		break;
 	  case Enum:
-		delete enumeration->constants;
-		delete enumeration;
+		delete enumeration.constants;
+		// delete enumeration;
 		break;
 	  case Symbolic:
 	  case SymbolicInst:
-		delete symbolic->params;
-		delete symbolic->actuals;
-		delete symbolic->assertions;
-		delete symbolic;
+		delete symbolic.params;
+		delete symbolic.actuals;
+		delete symbolic.assertions;
+		// delete symbolic;
 		break;
 	  case Variable:
-		delete variable->assertions;
-		delete variable;
+		// delete variable.assertions;
+		// delete variable;
 		break;
 	  case Tuple:
-		delete tuple->members;
+		// delete tuple->members;
 		delete tuple;
 		break;
 	  case Typeof:
-		delete typeexpr->expr;
+		// delete typeexpr->expr;
 		delete typeexpr;
 		break;
+	  case Attr:
+		// delete attr.expr;
+		// delete attr.type;
+		// delete attr;
+		break;
 	  case Builtin:
-		delete builtin;
-		break;
-	  case Attr:
-		delete attr->expr;
-		delete attr->type;
-		delete attr;
+		// delete builtin;
 		break;
 	} // switch
@@ -178,61 +178,64 @@
 		break;
 	  case Basic:
-		newtype->basic->typeSpec = basic->typeSpec;
-		newtype->basic->modifiers = basic->modifiers;
+		newtype->basic.typeSpec = basic.typeSpec;
+		newtype->basic.modifiers = basic.modifiers;
 		break;
 	  case Array:
-		newtype->array->dimension = maybeClone( array->dimension );
-		newtype->array->isVarLen = array->isVarLen;
-		newtype->array->isStatic = array->isStatic;
+		newtype->array.dimension = maybeClone( array.dimension );
+		newtype->array.isVarLen = array.isVarLen;
+		newtype->array.isStatic = array.isStatic;
 		break;
 	  case Function:
-		newtype->function->params = maybeClone( function->params );
-		newtype->function->idList = maybeClone( function->idList );
-		newtype->function->oldDeclList = maybeClone( function->oldDeclList );
-		newtype->function->body = maybeClone( function->body );
-		newtype->function->hasBody = function->hasBody;
-		newtype->function->newStyle = function->newStyle;
+		newtype->function.params = maybeClone( function.params );
+		newtype->function.idList = maybeClone( function.idList );
+		newtype->function.oldDeclList = maybeClone( function.oldDeclList );
+		newtype->function.body = maybeClone( function.body );
+		newtype->function.hasBody = function.hasBody;
+		newtype->function.newStyle = function.newStyle;
 		break;
 	  case Aggregate:
-		newtype->aggregate->params = maybeClone( aggregate->params );
-		newtype->aggregate->actuals = maybeClone( aggregate->actuals );
-		newtype->aggregate->fields = maybeClone( aggregate->fields );
-		newtype->aggregate->name = aggregate->name;
-		newtype->aggregate->kind = aggregate->kind;
-		newtype->aggregate->body = aggregate->body;
+		newtype->aggregate.params = maybeClone( aggregate.params );
+		newtype->aggregate.actuals = maybeClone( aggregate.actuals );
+		newtype->aggregate.fields = maybeClone( aggregate.fields );
+		newtype->aggregate.name = aggregate.name;
+		newtype->aggregate.kind = aggregate.kind;
+		newtype->aggregate.body = aggregate.body;
 		break;
 	  case AggregateInst:
-		newtype->aggInst->aggregate = maybeClone( aggInst->aggregate );
-		newtype->aggInst->params = maybeClone( aggInst->params );
+		newtype->aggInst.aggregate = maybeClone( aggInst.aggregate );
+		newtype->aggInst.params = maybeClone( aggInst.params );
 		break;
 	  case Enum:
-		newtype->enumeration->name = enumeration->name;
-		newtype->enumeration->constants = maybeClone( enumeration->constants );
+		newtype->enumeration.name = enumeration.name;
+		newtype->enumeration.constants = maybeClone( enumeration.constants );
 		break;
 	  case Symbolic:
 	  case SymbolicInst:
-		newtype->symbolic->params = maybeClone( symbolic->params );
-		newtype->symbolic->actuals = maybeClone( symbolic->actuals );
-		newtype->symbolic->assertions = maybeClone( symbolic->assertions );
-		newtype->symbolic->isTypedef = symbolic->isTypedef;
-		newtype->symbolic->name = symbolic->name;
+		newtype->symbolic.params = maybeClone( symbolic.params );
+		newtype->symbolic.actuals = maybeClone( symbolic.actuals );
+		newtype->symbolic.assertions = maybeClone( symbolic.assertions );
+		newtype->symbolic.isTypedef = symbolic.isTypedef;
+		newtype->symbolic.name = symbolic.name;
 		break;
 	  case Variable:
-		newtype->variable->assertions = maybeClone( variable->assertions );
-		newtype->variable->name = variable->name;
-		newtype->variable->tyClass = variable->tyClass;
+		assert( false );
+		// newtype->variable.assertions = maybeClone( variable.assertions );
+		// newtype->variable.name = variable.name;
+		// newtype->variable.tyClass = variable.tyClass;
 		break;
 	  case Tuple:
-		newtype->tuple->members = maybeClone( tuple->members );
+		newtype->tuple = maybeClone( tuple );
 		break;
 	  case Typeof:
-		newtype->typeexpr->expr = maybeClone( typeexpr->expr );
+		newtype->typeexpr = maybeClone( typeexpr );
+		break;
+	  case Attr:
+		assert( false );
+		// newtype->attr.expr = maybeClone( attr.expr );
+		// newtype->attr.type = maybeClone( attr.type );
 		break;
 	  case Builtin:
-		newtype->builtin->type = builtin->type;
-		break;
-	  case Attr:
-		newtype->attr->expr = maybeClone( attr->expr );
-		newtype->attr->type = maybeClone( attr->type );
+		assert( false );
+		// newtype->builtin = builtin;
 		break;
 	} // switch
@@ -268,15 +271,15 @@
 		break;
 	  case Basic:
-		printEnums( basic->modifiers.begin(), basic->modifiers.end(), DeclarationNode::modifierName, os );
-		printEnums( basic->typeSpec.begin(), basic->typeSpec.end(), DeclarationNode::basicTypeName, os );
+		printEnums( basic.modifiers.begin(), basic.modifiers.end(), DeclarationNode::modifierName, os );
+		printEnums( basic.typeSpec.begin(), basic.typeSpec.end(), DeclarationNode::basicTypeName, os );
 		break;
 	  case Array:
-		if ( array->isStatic ) {
+		if ( array.isStatic ) {
 			os << "static ";
 		} // if
-		if ( array->dimension ) {
+		if ( array.dimension ) {
 			os << "array of ";
-			array->dimension->printOneLine( os, indent );
-		} else if ( array->isVarLen ) {
+			array.dimension->printOneLine( os, indent );
+		} else if ( array.isVarLen ) {
 			os << "variable-length array of ";
 		} else {
@@ -289,17 +292,17 @@
 	  case Function:
 		os << "function" << endl;
-		if ( function->params ) {
+		if ( function.params ) {
 			os << string( indent + 2, ' ' ) << "with parameters " << endl;
-			function->params->printList( os, indent + 4 );
+			function.params->printList( os, indent + 4 );
 		} else {
 			os << string( indent + 2, ' ' ) << "with no parameters " << endl;
 		} // if
-		if ( function->idList ) {
+		if ( function.idList ) {
 			os << string( indent + 2, ' ' ) << "with old-style identifier list " << endl;
-			function->idList->printList( os, indent + 4 );
-		} // if
-		if ( function->oldDeclList ) {
+			function.idList->printList( os, indent + 4 );
+		} // if
+		if ( function.oldDeclList ) {
 			os << string( indent + 2, ' ' ) << "with old-style declaration list " << endl;
-			function->oldDeclList->printList( os, indent + 4 );
+			function.oldDeclList->printList( os, indent + 4 );
 		} // if
 		os << string( indent + 2, ' ' ) << "returning ";
@@ -310,68 +313,68 @@
 		} // if
 		os << endl;
-		if ( function->hasBody ) {
+		if ( function.hasBody ) {
 			os << string( indent + 2, ' ' ) << "with body " << endl;
 		} // if
-		if ( function->body ) {
-			function->body->printList( os, indent + 2 );
+		if ( function.body ) {
+			function.body->printList( os, indent + 2 );
 		} // if
 		break;
 	  case Aggregate:
-		os << DeclarationNode::aggregateName[ aggregate->kind ] << ' ' << aggregate->name << endl;
-		if ( aggregate->params ) {
+		os << DeclarationNode::aggregateName[ aggregate.kind ] << ' ' << aggregate.name << endl;
+		if ( aggregate.params ) {
 			os << string( indent + 2, ' ' ) << "with type parameters " << endl;
-			aggregate->params->printList( os, indent + 4 );
-		} // if
-		if ( aggregate->actuals ) {
+			aggregate.params->printList( os, indent + 4 );
+		} // if
+		if ( aggregate.actuals ) {
 			os << string( indent + 2, ' ' ) << "instantiated with actual parameters " << endl;
-			aggregate->actuals->printList( os, indent + 4 );
-		} // if
-		if ( aggregate->fields ) {
+			aggregate.actuals->printList( os, indent + 4 );
+		} // if
+		if ( aggregate.fields ) {
 			os << string( indent + 2, ' ' ) << "with members " << endl;
-			aggregate->fields->printList( os, indent + 4 );
-		} // if
-		if ( aggregate->body ) {
+			aggregate.fields->printList( os, indent + 4 );
+		} // if
+		if ( aggregate.body ) {
 			os << string( indent + 2, ' ' ) << " with body " << endl;
 		} // if
 		break;
 	  case AggregateInst:
-		if ( aggInst->aggregate ) {
+		if ( aggInst.aggregate ) {
 			os << "instance of " ;
-			aggInst->aggregate->print( os, indent );
+			aggInst.aggregate->print( os, indent );
 		} else {
 			os << "instance of an unspecified aggregate ";
 		} // if
-		if ( aggInst->params ) {
+		if ( aggInst.params ) {
 			os << string( indent + 2, ' ' ) << "with parameters " << endl;
-			aggInst->params->printList( os, indent + 2 );
+			aggInst.params->printList( os, indent + 2 );
 		} // if
 		break;
 	  case Enum:
 		os << "enumeration ";
-		if ( enumeration->constants ) {
+		if ( enumeration.constants ) {
 			os << "with constants" << endl;
-			enumeration->constants->printList( os, indent + 2 );
+			enumeration.constants->printList( os, indent + 2 );
 		} // if
 		break;
 	  case SymbolicInst:
-		os << "instance of type " << symbolic->name;
-		if ( symbolic->actuals ) {
+		os << "instance of type " << symbolic.name;
+		if ( symbolic.actuals ) {
 			os << " with parameters" << endl;
-			symbolic->actuals->printList( os, indent + 2 );
+			symbolic.actuals->printList( os, indent + 2 );
 		} // if
 		break;
 	  case Symbolic:
-		if ( symbolic->isTypedef ) {
+		if ( symbolic.isTypedef ) {
 			os << "typedef definition ";
 		} else {
 			os << "type definition ";
 		} // if
-		if ( symbolic->params ) {
+		if ( symbolic.params ) {
 			os << endl << string( indent + 2, ' ' ) << "with parameters" << endl;
-			symbolic->params->printList( os, indent + 2 );
-		} // if
-		if ( symbolic->assertions ) {
+			symbolic.params->printList( os, indent + 2 );
+		} // if
+		if ( symbolic.assertions ) {
 			os << endl << string( indent + 2, ' ' ) << "with assertions" << endl;
-			symbolic->assertions->printList( os, indent + 4 );
+			symbolic.assertions->printList( os, indent + 4 );
 			os << string( indent + 2, ' ' );
 		} // if
@@ -382,32 +385,32 @@
 		break;
 	  case Variable:
-		os << DeclarationNode::typeClassName[ variable->tyClass ] << " variable ";
-		if ( variable->assertions ) {
-			os << endl << string( indent + 2, ' ' ) << "with assertions" << endl;
-			variable->assertions->printList( os, indent + 4 );
-			os << string( indent + 2, ' ' );
-		} // if
+		// os << DeclarationNode::typeClassName[ variable.tyClass ] << " variable ";
+		// if ( variable.assertions ) {
+		// 	os << endl << string( indent + 2, ' ' ) << "with assertions" << endl;
+		// 	variable.assertions->printList( os, indent + 4 );
+		// 	os << string( indent + 2, ' ' );
+		// } // if
 		break;
 	  case Tuple:
 		os << "tuple ";
-		if ( tuple->members ) {
+		if ( tuple ) {
 			os << "with members " << endl;
-			tuple->members->printList( os, indent + 2 );
+			tuple->printList( os, indent + 2 );
 		} // if
 		break;
 	  case Typeof:
 		os << "type-of expression ";
-		if ( typeexpr->expr ) {
-			typeexpr->expr->print( os, indent + 2 );
+		if ( typeexpr ) {
+			typeexpr->print( os, indent + 2 );
 		} // if
 		break;
 	  case Attr:
-		os << "attribute type decl " << attr->name << " applied to ";
-		if ( attr->expr ) {
-			attr->expr->print( os, indent + 2 );
-		} // if
-		if ( attr->type ) {
-			attr->type->print( os, indent + 2 );
-		} // if
+		// os << "attribute type decl " << attr.name << " applied to ";
+		// if ( attr.expr ) {
+		// 	attr.expr->print( os, indent + 2 );
+		// } // if
+		// if ( attr.type ) {
+		// 	attr.type->print( os, indent + 2 );
+		// } // if
 		break;
 	  case Builtin:
@@ -479,4 +482,5 @@
 		return new VarArgsType( buildQualifiers( td ) );
 	  case TypeData::Attr:
+		assert( false );
 		return buildAttr( td );
 	  case TypeData::Symbolic:
@@ -494,16 +498,16 @@
 	switch ( td->kind ) {
 	  case TypeData::Aggregate:
-		if ( ! toplevel && td->aggregate->fields ) {
+		if ( ! toplevel && td->aggregate.fields ) {
 			ret = td->clone();
 		} // if
 		break;
 	  case TypeData::Enum:
-		if ( ! toplevel && td->enumeration->constants ) {
+		if ( ! toplevel && td->enumeration.constants ) {
 			ret = td->clone();
 		} // if
 		break;
 	  case TypeData::AggregateInst:
-		if ( td->aggInst->aggregate ) {
-			ret = typeextractAggregate( td->aggInst->aggregate, false );
+		if ( td->aggInst.aggregate ) {
+			ret = typeextractAggregate( td->aggInst.aggregate, false );
 		} // if
 		break;
@@ -535,9 +539,9 @@
 	BasicType::Kind ret;
 
-	for ( std::list< DeclarationNode::BasicType >::const_iterator i = td->basic->typeSpec.begin(); i != td->basic->typeSpec.end(); ++i ) {
+	for ( std::list< DeclarationNode::BasicType >::const_iterator i = td->basic.typeSpec.begin(); i != td->basic.typeSpec.end(); ++i ) {
 		if ( ! init ) {
 			init = true;
 			if ( *i == DeclarationNode::Void ) {
-				if ( td->basic->typeSpec.size() != 1 || ! td->basic->modifiers.empty() ) {
+				if ( td->basic.typeSpec.size() != 1 || ! td->basic.modifiers.empty() ) {
 					throw SemanticError( "invalid type specifier \"void\" in type: ", td );
 				} else {
@@ -611,5 +615,5 @@
 	} // for
 
-	for ( std::list< DeclarationNode::Modifier >::const_iterator i = td->basic->modifiers.begin(); i != td->basic->modifiers.end(); ++i ) {
+	for ( std::list< DeclarationNode::Modifier >::const_iterator i = td->basic.modifiers.begin(); i != td->basic.modifiers.end(); ++i ) {
 		switch ( *i ) {
 		  case DeclarationNode::Long:
@@ -746,9 +750,9 @@
 	ArrayType * at;
 	if ( td->base ) {
-		at = new ArrayType( buildQualifiers( td ), typebuild( td->base ), maybeBuild< Expression >( td->array->dimension ),
-							td->array->isVarLen, td->array->isStatic );
+		at = new ArrayType( buildQualifiers( td ), typebuild( td->base ), maybeBuild< Expression >( td->array.dimension ),
+							td->array.isVarLen, td->array.isStatic );
 	} else {
 		at = new ArrayType( buildQualifiers( td ), new BasicType( Type::Qualifiers(), BasicType::SignedInt ),
-							maybeBuild< Expression >( td->array->dimension ), td->array->isVarLen, td->array->isStatic );
+							maybeBuild< Expression >( td->array.dimension ), td->array.isVarLen, td->array.isStatic );
 	} // if
 	buildForall( td->forall, at->get_forall() );
@@ -759,16 +763,16 @@
 	assert( td->kind == TypeData::Aggregate );
 	AggregateDecl * at;
-	switch ( td->aggregate->kind ) {
+	switch ( td->aggregate.kind ) {
 	  case DeclarationNode::Struct:
-		at = new StructDecl( td->aggregate->name );
-		buildForall( td->aggregate->params, at->get_parameters() );
+		at = new StructDecl( td->aggregate.name );
+		buildForall( td->aggregate.params, at->get_parameters() );
 		break;
 	  case DeclarationNode::Union:
-		at = new UnionDecl( td->aggregate->name );
-		buildForall( td->aggregate->params, at->get_parameters() );
+		at = new UnionDecl( td->aggregate.name );
+		buildForall( td->aggregate.params, at->get_parameters() );
 		break;
 	  case DeclarationNode::Trait:
-		at = new TraitDecl( td->aggregate->name );
-		buildList( td->aggregate->params, at->get_parameters() );
+		at = new TraitDecl( td->aggregate.name );
+		buildList( td->aggregate.params, at->get_parameters() );
 		break;
 	  default:
@@ -776,6 +780,6 @@
 	} // switch
 
-	buildList( td->aggregate->fields, at->get_members() );
-	at->set_body( td->aggregate->body );
+	buildList( td->aggregate.fields, at->get_members() );
+	at->set_body( td->aggregate.body );
 
 	return at;
@@ -786,17 +790,17 @@
 
 	ReferenceToType * ret;
-	if ( td->aggInst->aggregate->kind == TypeData::Enum ) {
-		ret = new EnumInstType( buildQualifiers( td ), td->aggInst->aggregate->enumeration->name );
+	if ( td->aggInst.aggregate->kind == TypeData::Enum ) {
+		ret = new EnumInstType( buildQualifiers( td ), td->aggInst.aggregate->enumeration.name );
 	} else {
-		assert( td->aggInst->aggregate->kind == TypeData::Aggregate );
-		switch ( td->aggInst->aggregate->aggregate->kind ) {
+		assert( td->aggInst.aggregate->kind == TypeData::Aggregate );
+		switch ( td->aggInst.aggregate->aggregate.kind ) {
 		  case DeclarationNode::Struct:
-			ret = new StructInstType( buildQualifiers( td ), td->aggInst->aggregate->aggregate->name );
+			ret = new StructInstType( buildQualifiers( td ), td->aggInst.aggregate->aggregate.name );
 			break;
 		  case DeclarationNode::Union:
-			ret = new UnionInstType( buildQualifiers( td ), td->aggInst->aggregate->aggregate->name );
+			ret = new UnionInstType( buildQualifiers( td ), td->aggInst.aggregate->aggregate.name );
 			break;
 		  case DeclarationNode::Trait:
-			ret = new TraitInstType( buildQualifiers( td ), td->aggInst->aggregate->aggregate->name );
+			ret = new TraitInstType( buildQualifiers( td ), td->aggInst.aggregate->aggregate.name );
 			break;
 		  default:
@@ -804,5 +808,5 @@
 		} // switch
 	} // if
-	buildList( td->aggInst->params, ret->get_parameters() );
+	buildList( td->aggInst.params, ret->get_parameters() );
 	buildForall( td->forall, ret->get_forall() );
 	return ret;
@@ -813,29 +817,31 @@
 	NamedTypeDecl * ret;
 	assert( td->base );
-	if ( td->symbolic->isTypedef ) {
+	if ( td->symbolic.isTypedef ) {
 		ret = new TypedefDecl( name, sc, typebuild( td->base ) );
 	} else {
 		ret = new TypeDecl( name, sc, typebuild( td->base ), TypeDecl::Any );
 	} // if
-	buildList( td->symbolic->params, ret->get_parameters() );
-	buildList( td->symbolic->assertions, ret->get_assertions() );
+	buildList( td->symbolic.params, ret->get_parameters() );
+	buildList( td->symbolic.assertions, ret->get_assertions() );
 	return ret;
 } // buildSymbolic
 
 TypeDecl * buildVariable( const TypeData * td ) {
-	assert( td->kind == TypeData::Variable );
-	static const TypeDecl::Kind kindMap[] = { TypeDecl::Any, TypeDecl::Ftype, TypeDecl::Dtype };
-
-	TypeDecl * ret = new TypeDecl( td->variable->name, DeclarationNode::NoStorageClass, 0, kindMap[ td->variable->tyClass ] );
-	buildList( td->variable->assertions, ret->get_assertions() );
-	return ret;
+	assert( false );
+	return nullptr;
+	// assert( td->kind == TypeData::Variable );
+	// static const TypeDecl::Kind kindMap[] = { TypeDecl::Any, TypeDecl::Ftype, TypeDecl::Dtype };
+
+	// TypeDecl * ret = new TypeDecl( td->variable.name, DeclarationNode::NoStorageClass, 0, kindMap[ td->variable.tyClass ] );
+	// buildList( td->variable.assertions, ret->get_assertions() );
+	// return ret;
 } // buildSymbolic
 
 EnumDecl * buildEnum( const TypeData * td ) {
 	assert( td->kind == TypeData::Enum );
-	EnumDecl * ret = new EnumDecl( td->enumeration->name );
-	buildList( td->enumeration->constants, ret->get_members() );
+	EnumDecl * ret = new EnumDecl( td->enumeration.name );
+	buildList( td->enumeration.constants, ret->get_members() );
 	std::list< Declaration * >::iterator members = ret->get_members().begin();
-	for ( const DeclarationNode * cur = td->enumeration-> constants; cur != nullptr; cur = dynamic_cast< DeclarationNode * >( cur->get_next() ), ++members ) {
+	for ( const DeclarationNode * cur = td->enumeration. constants; cur != nullptr; cur = dynamic_cast< DeclarationNode * >( cur->get_next() ), ++members ) {
 		if ( cur->has_enumeratorValue() ) {
 			ObjectDecl * member = dynamic_cast< ObjectDecl * >(* members);
@@ -848,6 +854,6 @@
 TypeInstType * buildSymbolicInst( const TypeData * td ) {
 	assert( td->kind == TypeData::SymbolicInst );
-	TypeInstType * ret = new TypeInstType( buildQualifiers( td ), td->symbolic->name, false );
-	buildList( td->symbolic->actuals, ret->get_parameters() );
+	TypeInstType * ret = new TypeInstType( buildQualifiers( td ), td->symbolic.name, false );
+	buildList( td->symbolic.actuals, ret->get_parameters() );
 	buildForall( td->forall, ret->get_forall() );
 	return ret;
@@ -857,5 +863,5 @@
 	assert( td->kind == TypeData::Tuple );
 	TupleType * ret = new TupleType( buildQualifiers( td ) );
-	buildTypeList( td->tuple->members, ret->get_types() );
+	buildTypeList( td->tuple, ret->get_types() );
 	buildForall( td->forall, ret->get_forall() );
 	return ret;
@@ -865,19 +871,21 @@
 	assert( td->kind == TypeData::Typeof );
 	assert( td->typeexpr );
-	assert( td->typeexpr->expr );
-	return new TypeofType( buildQualifiers( td ), td->typeexpr->expr->build() );
+	// assert( td->typeexpr->expr );
+	return new TypeofType( buildQualifiers( td ), td->typeexpr->build() );
 } // buildTypeof
 
 AttrType * buildAttr( const TypeData * td ) {
-	assert( td->kind == TypeData::Attr );
-	assert( td->attr );
-	AttrType * ret;
-	if ( td->attr->expr ) {
-		ret = new AttrType( buildQualifiers( td ), td->attr->name, td->attr->expr->build() );
-	} else {
-		assert( td->attr->type );
-		ret = new AttrType( buildQualifiers( td ), td->attr->name, td->attr->type->buildType() );
-	} // if
-	return ret;
+	assert( false );
+	return nullptr;
+	// assert( td->kind == TypeData::Attr );
+	// // assert( td->attr );
+	// AttrType * ret;
+	// if ( td->attr.expr ) {
+	// 	ret = new AttrType( buildQualifiers( td ), td->attr.name, td->attr.expr->build() );
+	// } else {
+	// 	assert( td->attr.type );
+	// 	ret = new AttrType( buildQualifiers( td ), td->attr.name, td->attr.type->buildType() );
+	// } // if
+	// return ret;
 } // buildAttr
 
@@ -885,7 +893,7 @@
 	if ( td->kind == TypeData::Function ) {
 		FunctionDecl * decl;
-		if ( td->function->hasBody ) {
-			if ( td->function->body ) {
-				Statement * stmt = td->function->body->build();
+		if ( td->function.hasBody ) {
+			if ( td->function.body ) {
+				Statement * stmt = td->function.body->build();
 				CompoundStmt * body = dynamic_cast< CompoundStmt* >( stmt );
 				assert( body );
@@ -898,10 +906,10 @@
 			decl = new FunctionDecl( name, sc, linkage, buildFunction( td ), 0, isInline, isNoreturn );
 		} // if
-		for ( DeclarationNode * cur = td->function->idList; cur != 0; cur = dynamic_cast< DeclarationNode* >( cur->get_next() ) ) {
+		for ( DeclarationNode * cur = td->function.idList; cur != 0; cur = dynamic_cast< DeclarationNode* >( cur->get_next() ) ) {
 			if ( cur->get_name() != "" ) {
 				decl->get_oldIdents().insert( decl->get_oldIdents().end(), cur->get_name() );
 			} // if
 		} // for
-		buildList( td->function->oldDeclList, decl->get_oldDecls() );
+		buildList( td->function.oldDeclList, decl->get_oldDecls() );
 		return decl;
 	} else if ( td->kind == TypeData::Aggregate ) {
@@ -912,4 +920,5 @@
 		return buildSymbolic( td, name, sc );
 	} else if ( td->kind == TypeData::Variable ) {
+		assert( false );
 		return buildVariable( td );
 	} else {
@@ -921,13 +930,13 @@
 FunctionType * buildFunction( const TypeData * td ) {
 	assert( td->kind == TypeData::Function );
-	bool hasEllipsis = td->function->params ? td->function->params->get_hasEllipsis() : true;
-	if ( ! td->function->params ) hasEllipsis = ! td->function->newStyle;
+	bool hasEllipsis = td->function.params ? td->function.params->get_hasEllipsis() : true;
+	if ( ! td->function.params ) hasEllipsis = ! td->function.newStyle;
 	FunctionType * ft = new FunctionType( buildQualifiers( td ), hasEllipsis );
-	buildList( td->function->params, ft->get_parameters() );
+	buildList( td->function.params, ft->get_parameters() );
 	buildForall( td->forall, ft->get_forall() );
 	if ( td->base ) {
 		switch ( td->base->kind ) {
 		  case TypeData::Tuple:
-			buildList( td->base->tuple->members, ft->get_returnVals() );
+			buildList( td->base->tuple, ft->get_returnVals() );
 			break;
 		  default:
Index: src/Parser/TypeData.h
===================================================================
--- src/Parser/TypeData.h	(revision b16898e15cca72a9db8a280714dbc0100e4abffa)
+++ src/Parser/TypeData.h	(revision 3403534e2b90c8ea3761ef2743ab04b0f002e8d8)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 15:18:36 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sun Aug 28 22:39:00 2016
-// Update Count     : 85
+// Last Modified On : Mon Aug 29 22:31:52 2016
+// Update Count     : 110
 //
 
@@ -24,5 +24,5 @@
 struct TypeData {
 	enum Kind { Unknown, Basic, Pointer, Array, Function, Aggregate, AggregateInst,
-				Enum, EnumConstant, Symbolic, SymbolicInst, Variable, Tuple, Typeof, Builtin, Attr } kind;
+				Enum, EnumConstant, Symbolic, SymbolicInst, Variable, Tuple, Typeof, Builtin, Attr };
 
 	struct Basic_t {
@@ -73,28 +73,17 @@
 	};
 
-	struct Variable_t {
-		DeclarationNode::TypeClass tyClass;
-		std::string name;
-		DeclarationNode * assertions;
-	};
+	// struct Tuple_t {
+	// 	DeclarationNode * members;
+	// };
+  
+	// struct Typeof_t {
+	// 	ExpressionNode * expr;
+	// };
 
-	struct Tuple_t {
-		DeclarationNode * members;
-	};
-  
-	struct Typeof_t {
-		ExpressionNode * expr;
-	};
+	// struct Builtin_t {
+	// 	DeclarationNode::BuiltinType type;
+	// };
 
-	struct Builtin_t {
-		DeclarationNode::BuiltinType type;
-	};
-
-	struct Attr_t {
-		std::string name;
-		ExpressionNode * expr;
-		DeclarationNode * type;
-	};
-
+	Kind kind;
 	TypeData * base;
 	typedef std::bitset< DeclarationNode::NoOfQualifier > Qualifiers;
@@ -102,18 +91,15 @@
 	DeclarationNode * forall;
 
-	union {
-		Basic_t * basic;
-		Aggregate_t * aggregate;
-		AggInst_t * aggInst;
-		Array_t * array;
-		Enumeration_t * enumeration;
-		Function_t * function;
-		Symbolic_t * symbolic;
-		Variable_t * variable;
-		Tuple_t * tuple;
-		Typeof_t * typeexpr;
-		Attr_t * attr;
-		Builtin_t * builtin;
-	};
+		Basic_t basic;
+		Aggregate_t aggregate;
+		AggInst_t aggInst;
+		Array_t array;
+		Enumeration_t enumeration;
+		Function_t function;
+		Symbolic_t symbolic;
+		DeclarationNode * tuple;
+		ExpressionNode * typeexpr;
+		//Attr_t attr;
+		// DeclarationNode::BuiltinType builtin;
 
 	TypeData( Kind k = Unknown );
Index: src/main.cc
===================================================================
--- src/main.cc	(revision b16898e15cca72a9db8a280714dbc0100e4abffa)
+++ src/main.cc	(revision 3403534e2b90c8ea3761ef2743ab04b0f002e8d8)
@@ -10,6 +10,6 @@
 // Created On       : Fri May 15 23:12:02 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Aug 20 12:52:22 2016
-// Update Count     : 403
+// Last Modified On : Mon Aug 29 17:34:39 2016
+// Update Count     : 426
 //
 
@@ -75,17 +75,12 @@
 static void dump( list< Declaration * > & translationUnit, ostream & out = cout );
 
-void sigSegvBusHandler( int sig_num ) {
+void backtrace( int start ) {							// skip first N stack frames
 	enum { Frames = 50 };
 	void * array[Frames];
 	int size = backtrace( array, Frames );
-
-	cerr << "*CFA runtime error* program cfa-cpp terminated with "
-		 <<	(sig_num == SIGSEGV ? "segment fault" : "bus error")
-		 << " backtrace:" << endl;
-
 	char ** messages = backtrace_symbols( array, size );
 
-	// skip first stack frame (points here)
-	for ( int i = 2; i < size - 2 && messages != nullptr; i += 1 ) {
+	// skip last 2 stack frames after main
+	for ( int i = start; i < size - 2 && messages != nullptr; i += 1 ) {
 		char * mangled_name = nullptr, * offset_begin = nullptr, * offset_end = nullptr;
 		for ( char *p = messages[i]; *p; ++p ) {        // find parantheses and +offset
@@ -101,4 +96,5 @@
 
 		// if line contains symbol, attempt to demangle
+		int frameNo = i - start;
 		if ( mangled_name && offset_begin && offset_end && mangled_name < offset_begin ) {
 			*mangled_name++ = '\0';
@@ -106,22 +102,37 @@
 			*offset_end++ = '\0';
 
-			int status;
+			int status, frameNo = i - start;
 			char * real_name = __cxxabiv1::__cxa_demangle( mangled_name, 0, 0, &status );
 			if ( status == 0 ) {						// demangling successful ?
-				cerr << "(" << i - 2 << ") " << messages[i] << " : "
+				cerr << "(" << frameNo << ") " << messages[i] << " : "
 					 << real_name << "+" << offset_begin << offset_end << endl;
 
 			} else {									// otherwise, output mangled name
-				cerr << "(" << i - 2 << ") " << messages[i] << " : "
+				cerr << "(" << frameNo << ") " << messages[i] << " : "
 					 << mangled_name << "+" << offset_begin << offset_end << endl;
 			} // if
 			free( real_name );
 		} else {										// otherwise, print the whole line
-			cerr << "(" << i - 2 << ") " << messages[i] << endl;
+			cerr << "(" << frameNo << ") " << messages[i] << endl;
 		} // if
 	} // for
+
 	free( messages );
+} // backtrace
+
+void sigSegvBusHandler( int sig_num ) {
+	cerr << "*CFA runtime error* program cfa-cpp terminated with "
+		 <<	(sig_num == SIGSEGV ? "segment fault" : "bus error")
+		 << " backtrace:" << endl;
+	backtrace( 2 );										// skip first 2 stack frames
 	exit( EXIT_FAILURE );
 } // sigSegvBusHandler
+
+void sigAbortHandler( int sig_num ) {
+	backtrace( 6 );										// skip first 6 stack frames
+	signal( SIGABRT, SIG_DFL);							// reset default signal handler
+    raise( SIGABRT );									// reraise SIGABRT
+} // sigAbortHandler
+
 
 int main( int argc, char * argv[] ) {
@@ -133,4 +144,5 @@
 	signal( SIGSEGV, sigSegvBusHandler );
 	signal( SIGBUS, sigSegvBusHandler );
+	signal( SIGABRT, sigAbortHandler );
 
 	parse_cmdline( argc, argv, filename );				// process command-line arguments
