Index: src/libcfa/Makefile.am
===================================================================
--- src/libcfa/Makefile.am	(revision e60e0dc41c51d3729b99dd9bd3c6864794d982ce)
+++ src/libcfa/Makefile.am	(revision 5bd0aad2eb20d7e1f1b3a2f5e19678c448dd7e13)
@@ -11,6 +11,6 @@
 ## Created On       : Sun May 31 08:54:01 2015
 ## Last Modified By : Andrew Beach
-## Last Modified On : Wed Jun 28 15:36:00 2017
-## Update Count     : 215
+## Last Modified On : Fri Jun 14 17:00:00 2017
+## Update Count     : 216
 ###############################################################################
 
@@ -51,5 +51,6 @@
 
 libobjs = ${headers:=.o}
-libsrc = libcfa-prelude.c interpose.c libhdr/libdebug.c ${headers:=.c} exception.c
+libsrc = libcfa-prelude.c interpose.c libhdr/libdebug.c ${headers:=.c} \
+	exception.c typeobject.c
 
 # not all platforms support concurrency, add option do disable it
@@ -68,8 +69,14 @@
 	${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -O2 ${EXTRA_FLAGS} -c -o $@ $<
 
+libcfa_a-typeobject.o : typeobject.c
+	${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -O2 ${EXTRA_FLAGS} -c -o $@ $<
+
 concurrency/libcfa_d_a-invoke.o : concurrency/invoke.c
 	${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $<
 
 libcfa_d_a-exception.o : exception.c
+	${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $<
+
+libcfa_d_a-typeobject.o : typeobject.c
 	${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $<
 
Index: src/libcfa/Makefile.in
===================================================================
--- src/libcfa/Makefile.in	(revision e60e0dc41c51d3729b99dd9bd3c6864794d982ce)
+++ src/libcfa/Makefile.in	(revision 5bd0aad2eb20d7e1f1b3a2f5e19678c448dd7e13)
@@ -154,6 +154,7 @@
 	concurrency/coroutine.c concurrency/thread.c \
 	concurrency/kernel.c concurrency/monitor.c exception.c \
-	concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/alarm.c \
-	concurrency/invoke.c concurrency/preemption.c
+	typeobject.c concurrency/CtxSwitch-@MACHINE_TYPE@.S \
+	concurrency/alarm.c concurrency/invoke.c \
+	concurrency/preemption.c
 am__dirstamp = $(am__leading_dot)dirstamp
 @BUILD_CONCURRENCY_TRUE@am__objects_1 = concurrency/libcfa_d_a-coroutine.$(OBJEXT) \
@@ -177,5 +178,6 @@
 	libcfa_d_a-interpose.$(OBJEXT) \
 	libhdr/libcfa_d_a-libdebug.$(OBJEXT) $(am__objects_2) \
-	libcfa_d_a-exception.$(OBJEXT) $(am__objects_3)
+	libcfa_d_a-exception.$(OBJEXT) libcfa_d_a-typeobject.$(OBJEXT) \
+	$(am__objects_3)
 am_libcfa_d_a_OBJECTS = $(am__objects_4)
 libcfa_d_a_OBJECTS = $(am_libcfa_d_a_OBJECTS)
@@ -188,6 +190,7 @@
 	concurrency/coroutine.c concurrency/thread.c \
 	concurrency/kernel.c concurrency/monitor.c exception.c \
-	concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/alarm.c \
-	concurrency/invoke.c concurrency/preemption.c
+	typeobject.c concurrency/CtxSwitch-@MACHINE_TYPE@.S \
+	concurrency/alarm.c concurrency/invoke.c \
+	concurrency/preemption.c
 @BUILD_CONCURRENCY_TRUE@am__objects_5 = concurrency/libcfa_a-coroutine.$(OBJEXT) \
 @BUILD_CONCURRENCY_TRUE@	concurrency/libcfa_a-thread.$(OBJEXT) \
@@ -209,5 +212,6 @@
 	libcfa_a-interpose.$(OBJEXT) \
 	libhdr/libcfa_a-libdebug.$(OBJEXT) $(am__objects_6) \
-	libcfa_a-exception.$(OBJEXT) $(am__objects_7)
+	libcfa_a-exception.$(OBJEXT) libcfa_a-typeobject.$(OBJEXT) \
+	$(am__objects_7)
 am_libcfa_a_OBJECTS = $(am__objects_8)
 libcfa_a_OBJECTS = $(am_libcfa_a_OBJECTS)
@@ -417,5 +421,5 @@
 libobjs = ${headers:=.o}
 libsrc = libcfa-prelude.c interpose.c libhdr/libdebug.c ${headers:=.c} \
-	exception.c $(am__append_4)
+	exception.c typeobject.c $(am__append_4)
 libcfa_a_SOURCES = ${libsrc}
 libcfa_a_CFLAGS = -nodebug -O2
@@ -593,4 +597,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_a-rational.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_a-stdlib.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_a-typeobject.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-assert.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-exception.Po@am__quote@
@@ -604,4 +609,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-rational.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-stdlib.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-typeobject.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/CtxSwitch-@MACHINE_TYPE@.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/libcfa_a-alarm.Po@am__quote@
@@ -928,4 +934,11 @@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-exception.obj `if test -f 'exception.c'; then $(CYGPATH_W) 'exception.c'; else $(CYGPATH_W) '$(srcdir)/exception.c'; fi`
 
+libcfa_d_a-typeobject.obj: typeobject.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-typeobject.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-typeobject.Tpo -c -o libcfa_d_a-typeobject.obj `if test -f 'typeobject.c'; then $(CYGPATH_W) 'typeobject.c'; else $(CYGPATH_W) '$(srcdir)/typeobject.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-typeobject.Tpo $(DEPDIR)/libcfa_d_a-typeobject.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='typeobject.c' object='libcfa_d_a-typeobject.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-typeobject.obj `if test -f 'typeobject.c'; then $(CYGPATH_W) 'typeobject.c'; else $(CYGPATH_W) '$(srcdir)/typeobject.c'; fi`
+
 concurrency/libcfa_d_a-alarm.o: concurrency/alarm.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_d_a-alarm.o -MD -MP -MF concurrency/$(DEPDIR)/libcfa_d_a-alarm.Tpo -c -o concurrency/libcfa_d_a-alarm.o `test -f 'concurrency/alarm.c' || echo '$(srcdir)/'`concurrency/alarm.c
@@ -1228,4 +1241,11 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-exception.obj `if test -f 'exception.c'; then $(CYGPATH_W) 'exception.c'; else $(CYGPATH_W) '$(srcdir)/exception.c'; fi`
+
+libcfa_a-typeobject.obj: typeobject.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-typeobject.obj -MD -MP -MF $(DEPDIR)/libcfa_a-typeobject.Tpo -c -o libcfa_a-typeobject.obj `if test -f 'typeobject.c'; then $(CYGPATH_W) 'typeobject.c'; else $(CYGPATH_W) '$(srcdir)/typeobject.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-typeobject.Tpo $(DEPDIR)/libcfa_a-typeobject.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='typeobject.c' object='libcfa_a-typeobject.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-typeobject.obj `if test -f 'typeobject.c'; then $(CYGPATH_W) 'typeobject.c'; else $(CYGPATH_W) '$(srcdir)/typeobject.c'; fi`
 
 concurrency/libcfa_a-alarm.o: concurrency/alarm.c
@@ -1521,8 +1541,14 @@
 	${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -O2 ${EXTRA_FLAGS} -c -o $@ $<
 
+libcfa_a-typeobject.o : typeobject.c
+	${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -O2 ${EXTRA_FLAGS} -c -o $@ $<
+
 concurrency/libcfa_d_a-invoke.o : concurrency/invoke.c
 	${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $<
 
 libcfa_d_a-exception.o : exception.c
+	${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $<
+
+libcfa_d_a-typeobject.o : typeobject.c
 	${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $<
 
Index: src/libcfa/iostream.c
===================================================================
--- src/libcfa/iostream.c	(revision e60e0dc41c51d3729b99dd9bd3c6864794d982ce)
+++ src/libcfa/iostream.c	(revision 5bd0aad2eb20d7e1f1b3a2f5e19678c448dd7e13)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Jul  6 18:14:17 2017
-// Update Count     : 396
+// Last Modified On : Sun Jul 16 21:12:03 2017
+// Update Count     : 398
 //
 
@@ -125,9 +125,6 @@
 forall( dtype ostype | ostream( ostype ) )
 ostype * ?|?( ostype * os, float _Complex fc ) {
-	os | crealf( fc );
-	_Bool temp = sepDisable( os );						// disable separators within complex value
-	if ( cimagf( fc ) >= 0 ) os | '+';					// negative value prints '-'
-	os | cimagf( fc ) | 'i';
-	sepReset( os, temp );								// reset separator
+	if ( sepPrt( os ) ) fmt( os, "%s", sepGetCur( os ) );
+	fmt( os, "%g%+gi", crealf( fc ), cimagf( fc ) );
 	return os;
 } // ?|?
@@ -135,9 +132,6 @@
 forall( dtype ostype | ostream( ostype ) )
 ostype * ?|?( ostype * os, double _Complex dc ) {
-	os | creal( dc );
-	_Bool temp = sepDisable( os );						// disable separators within complex value
-	if ( cimag( dc ) >= 0 ) os | '+';					// negative value prints '-'
-	os | cimag( dc ) | 'i';
-	sepReset( os, temp );								// reset separator
+	if ( sepPrt( os ) ) fmt( os, "%s", sepGetCur( os ) );
+	fmt( os, "%.*lg%+.*lgi", DBL_DIG, creal( dc ), DBL_DIG, cimag( dc ) );
 	return os;
 } // ?|?
@@ -145,9 +139,6 @@
 forall( dtype ostype | ostream( ostype ) )
 ostype * ?|?( ostype * os, long double _Complex ldc ) {
-	os | creall( ldc );
-	_Bool temp = sepDisable( os );						// disable separators within complex value
-	if ( cimagl( ldc ) >= 0 ) os | '+';					// negative value prints '-'
-	os | cimagl( ldc ) | 'i';
-	sepReset( os, temp );								// reset separator
+	if ( sepPrt( os ) ) fmt( os, "%s", sepGetCur( os ) );
+	fmt( os, "%.*Lg%+.*Lgi", LDBL_DIG, creall( ldc ), LDBL_DIG, cimagl( ldc ) );
 	return os;
 } // ?|?
Index: src/libcfa/typeobject.c
===================================================================
--- src/libcfa/typeobject.c	(revision 5bd0aad2eb20d7e1f1b3a2f5e19678c448dd7e13)
+++ src/libcfa/typeobject.c	(revision 5bd0aad2eb20d7e1f1b3a2f5e19678c448dd7e13)
@@ -0,0 +1,27 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// typeobject.c --
+//
+// Author           : Andrew Beach
+// Created On       : Tus Jul 11 15:10:00 2017
+// Last Modified By : Andrew Beach
+// Last Modified On : Tus Jul 12 16:04:00 2017
+// Update Count     : 0
+//
+
+#include "typeobject.h"
+
+// Takes in two non-null pointers to type_objects.
+int is_parent( struct __cfa__type_object const * parent,
+               struct __cfa__type_object const * child ) {
+	do {
+		if ( parent == child )
+			return 1;
+		child = child->parent;
+	} while ( child );
+	return 0;
+}
Index: src/libcfa/typeobject.h
===================================================================
--- src/libcfa/typeobject.h	(revision 5bd0aad2eb20d7e1f1b3a2f5e19678c448dd7e13)
+++ src/libcfa/typeobject.h	(revision 5bd0aad2eb20d7e1f1b3a2f5e19678c448dd7e13)
@@ -0,0 +1,28 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// typeobject.h -- Builtins for hierarchy objects.
+//
+// Author           : Andrew Beach
+// Created On       : Tus Jul 11 15:08:00 2017
+// Last Modified By : Andrew Beach
+// Last Modified On : Tus Jul 11 16:18:00 2017
+// Update Count     : 0
+//
+
+#pragma once
+#ifndef TYPEOBJECT_H
+#define TYPEOBJECT_H
+
+struct __cfa__type_object {
+    struct __cfa__type_object const * const parent;
+};
+
+// Takes in two non-null pointers to type_objects.
+int is_parent( struct __cfa__type_object const * parent,
+               struct __cfa__type_object const * child );
+
+#endif // TYPEOBJECT_H
