Index: doc/LaTeXmacros/common.tex
===================================================================
--- doc/LaTeXmacros/common.tex	(revision df2be83d21a308a102fed7e7bf6c267a2c4041ef)
+++ doc/LaTeXmacros/common.tex	(revision df2be83d21a308a102fed7e7bf6c267a2c4041ef)
@@ -0,0 +1,203 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Names used in the document.
+
+\newcommand{\CFA}{C$\mathbf\forall$\xspace}				% set language symbolic name
+\newcommand{\CFL}{Cforall\xspace}						% set language text name
+\newcommand{\CC}{C\kern-.1em\hbox{+\kern-.25em+}\xspace} % CC symbolic name
+\def\c11{ISO/IEC C} % C11 name (cannot have numbers in latex command name)
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\makeatletter
+% allow escape sequence in lstinline
+%\usepackage{etoolbox}
+%\patchcmd{\lsthk@TextStyle}{\let\lst@DefEsc\@empty}{}{}{\errmessage{failed to patch}}
+
+% make fontsize "small" slightly larger, specifically for san serif (helvetica) in program code
+\renewcommand\small{%
+   \@setfontsize\small{8.5}{11}%
+   \abovedisplayskip 8.5pt \@plus 3pt \@minus 4pt
+   \abovedisplayshortskip \z@ \@plus 2pt
+   \belowdisplayshortskip 4pt \@plus 2pt \@minus 2pt
+   \def\@listi{\leftmargin\leftmargini
+               \topsep 4pt \@plus 2pt \@minus 2pt
+               \parsep 2pt \@pluspt \@minuspt
+               \itemsep \parsep}%
+   \belowdisplayskip \abovedisplayskip
+}
+\usepackage{relsize}									% must be after change to small or selects old size
+
+% reduce size of chapter/section titles
+\def\@makechapterhead#1{%
+  \vspace*{50\p@}%
+  {\parindent \z@ \raggedright \normalfont
+    \ifnum \c@secnumdepth >\m@ne
+        \large\bfseries \@chapapp\space \thechapter
+        \par\nobreak
+        \vskip 5\p@
+    \fi
+    \interlinepenalty\@M
+    \Large \bfseries #1\par\nobreak
+    \vskip 50\p@
+  }}
+\def\@makeschapterhead#1{%
+  \vspace*{50\p@}%
+  {\parindent \z@ \raggedright
+    \normalfont
+    \interlinepenalty\@M
+    \Large \bfseries  #1\par\nobreak
+    \vskip 50\p@
+  }}
+\renewcommand\section{\@startsection{section}{1}{\z@}{-3.0ex \@plus -1ex \@minus -.2ex}{1.0ex \@plus .2ex}{\normalfont\large\bfseries}}
+\renewcommand\subsection{\@startsection{subsection}{2}{\z@}{-2.5ex \@plus -1ex \@minus -.2ex}{1.0ex \@plus .2ex}{\normalfont\normalsize\bfseries}}
+\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}{-2.5ex \@plus -1ex \@minus -.2ex}{1.0ex \@plus .2ex}{\normalfont\normalsize\bfseries}}
+\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}{-2.0ex \@plus -1ex \@minus -.2ex}{-1em}{\normalfont\normalsize\bfseries}}
+
+% index macros
+\newcommand{\italic}[1]{\emph{\hyperpage{#1}}}
+\newcommand{\definition}[1]{\textbf{\hyperpage{#1}}}
+\newcommand{\see}[1]{\emph{see} #1}
+
+% reduce bullet size and spacing for "itemize" macro
+\renewcommand{\labelitemi}{{\raisebox{0.25ex}{\footnotesize$\bullet$}}}
+\renewenvironment{itemize}{\begin{list}{\labelitemi}{\topsep=5pt\itemsep=5pt\parsep=0pt}}{\end{list}}
+
+% Define some commands that produce formatted index entries suitable for cross-references.
+% ``\spec'' produces entries for specifications of entities.  ``\impl'' produces entries for their
+% implementations, and ``\use'' for their uses.
+
+%  \newcommand{\bold}[1]{{\bf #1}}
+%  \def\spec{\@bsphack\begingroup
+%             \def\protect##1{\string##1\space}\@sanitize
+%             \@wrxref{|bold}}
+\def\impl{\@bsphack\begingroup
+          \def\protect##1{\string##1\space}\@sanitize
+          \@wrxref{|definition}}
+\newcommand{\indexcode}[1]{{\lstinline$#1$}}
+\def\use{\@bsphack\begingroup
+         \def\protect##1{\string##1\space}\@sanitize
+         \@wrxref{|hyperpage}}
+\def\@wrxref#1#2{\let\thepage\relax
+    \xdef\@gtempa{\write\@indexfile{\string
+    \indexentry{#2@{\lstinline$#2$}#1}{\thepage}}}\endgroup\@gtempa
+    \if@nobreak \ifvmode\nobreak\fi\fi\@esphack}
+%\newcommand{\use}[1]{\index{#1@{\lstinline$#1$}}}
+%\newcommand{\impl}[1]{\index{\protect#1@{\lstinline$\protect#1$}|definition}}
+
+% inline text and lowercase index: \Index{inline and lowercase index text}
+% inline text and as-in index: \Index[as-is index text]{inline text}
+% inline text but index with different as-is text: \Index[index text]{inline text}
+\newcommand{\Index}{\@ifstar\@sIndex\@Index}
+\newcommand{\@Index}[2][\@empty]{\lowercase{\def\temp{#2}}#2\ifx#1\@empty\index{\temp}\else\index{#1@{\protect#2}}\fi}
+\newcommand{\@sIndex}[2][\@empty]{#2\ifx#1\@empty\index{#2}\else\index{#1@{\protect#2}}\fi}
+
+\newcommand{\newtermFontInline}{\emph}
+\newcommand{\newterm}{\@ifstar\@snewterm\@newterm}
+\newcommand{\@newterm}[2][\@empty]{\lowercase{\def\temp{#2}}{\newtermFontInline{#2}}\ifx#1\@empty\index{\temp}\else\index{#1@{\protect#2}}\fi}
+\newcommand{\@snewterm}[2][\@empty]{{\newtermFontInline{#2}}\ifx#1\@empty\index{#2}\else\index{#1@{\protect#2}}\fi}
+\makeatother
+
+\newenvironment{quote2}{%
+	\list{}{\lstset{resetmargins=true}\leftmargin=\parindent\rightmargin\leftmargin}%
+	\item\relax
+}{%
+	\endlist
+}% quote2
+\newenvironment{rationale}{%
+  \begin{quotation}\noindent$\Box$\enspace
+}{%
+  \hfill\enspace$\Box$\end{quotation}
+}%
+
+% blocks and titles
+\newcommand{\define}[1]{\emph{#1\/}\index{#1}}
+\newcommand{\rewrite}{\(\Rightarrow\)}
+\newcommand{\rewriterules}{\paragraph{Rewrite Rules}~\par\noindent}
+\newcommand{\examples}{\paragraph{Examples}~\par\noindent}
+\newcommand{\semantics}{\paragraph{Semantics}~\par\noindent}
+\newcommand{\constraints}{\paragraph{Constraints}~\par\noindent}
+\newcommand{\predefined}{\paragraph{Predefined Identifiers}~\par\noindent}
+
+% BNF macros
+\def\syntax{\paragraph{Syntax}\trivlist\parindent=.5in\item[\hskip.5in]}
+\let\endsyntax=\endtrivlist
+\newcommand{\lhs}[1]{\par{\emph{#1:}}\index{#1@{\emph{#1}}|italic}}
+\newcommand{\rhs}{\hfil\break\hbox{\hskip1in}}
+\newcommand{\oldlhs}[1]{\emph{#1: \ldots}\index{#1@{\emph{#1}}|italic}}
+\newcommand{\nonterm}[1]{\emph{#1\/}\index{#1@{\emph{#1}}|italic}}
+\newcommand{\opt}{$_{opt}$\ }
+
+% adjust varioref package with default "section" and "page" titles, and optional title with faraway page numbers
+% \VRef{label} => Section 2.7, \VPageref{label} => page 17
+% \VRef[Figure]{label} => Figure 3.4, \VPageref{label} => page 17
+\renewcommand{\reftextfaceafter}{\unskip}
+\renewcommand{\reftextfacebefore}{\unskip}
+\renewcommand{\reftextafter}{\unskip}
+\renewcommand{\reftextbefore}{\unskip}
+\renewcommand{\reftextfaraway}[1]{\unskip, p.~\pageref{#1}}
+\renewcommand{\reftextpagerange}[2]{\unskip, pp.~\pageref{#1}--\pageref{#2}}
+\newcommand{\VRef}[2][Section]{\ifx#1\@empty\else{#1}\nobreakspace\fi\vref{#2}}
+\newcommand{\VPageref}[2][page]{\ifx#1\@empty\else{#1}\nobreakspace\fi\pageref{#2}}
+
+% Go programming language
+\lstdefinelanguage{Golang}{
+	morekeywords=[1]{package,import,func,type,struct,return,defer,panic, recover,select,var,const,iota,},%
+	morekeywords=[2]{string,uint,uint8,uint16,uint32,uint64,int,int8,int16, int32,int64,
+		bool,float32,float64,complex64,complex128,byte,rune,uintptr, error,interface},%
+	morekeywords=[3]{map,slice,make,new,nil,len,cap,copy,close,true,false, delete,append,real,imag,complex,chan,},%
+	morekeywords=[4]{for,break,continue,range,goto,switch,case,fallthrough,if, else,default,},%
+	morekeywords=[5]{Println,Printf,Error,},%
+	sensitive=true,%
+	morecomment=[l]{//},%
+	morecomment=[s]{/*}{*/},%
+	morestring=[b]',%
+	morestring=[b]",%
+	morestring=[s]{`}{`},%
+}
+
+% CFA programming language, based on ANSI C
+\lstdefinelanguage{CFA}[ANSI]{C}{
+	morekeywords={_Alignas,_Alignof,__alignof,__alignof__,asm,__asm,__asm__,_At,_Atomic,__attribute,__attribute__,auto,
+		_Bool,catch,catchResume,choose,_Complex,__complex,__complex__,__const,__const__,disable,dtype,enable,__extension__,
+		fallthru,finally,forall,ftype,_Generic,_Imaginary,inline,__label__,lvalue,_Noreturn,otype,restrict,_Static_assert,
+		_Thread_local,throw,throwResume,trait,try,typeof,__typeof,__typeof__,},
+	moredelim=**[is][\color{red}]{`}{`}, % red highlighting of program text
+}%
+
+\lstset{
+language=CFA,
+columns=flexible,
+basicstyle=\sf\relsize{-1},
+tabsize=4,
+xleftmargin=\parindent,
+escapechar=@,
+mathescape=true,
+keepspaces=true,
+showstringspaces=false,
+showlines=true,
+aboveskip=6pt,
+belowskip=4pt,
+literate={\\`}{\raisebox{0.3ex}{\ttfamily\upshape \hspace*{-2pt}`}}1, % escape \`, otherwise used for red highlighting
+}%
+
+\makeatletter
+% replace/adjust listings characters that look bad in sanserif
+\lst@CCPutMacro
+\lst@ProcessOther{"22}{\lst@ttfamily{"}{\raisebox{0.3ex}{\ttfamily\upshape "}}} % replace double quote
+\lst@ProcessOther{"27}{\lst@ttfamily{'}{\raisebox{0.3ex}{\ttfamily\upshape '\hspace*{-2pt}}}} % replace single quote
+\lst@ProcessOther{"2D}{\lst@ttfamily{-}{\ttfamily\upshape -}} % replace minus
+\lst@ProcessOther{"3C}{\lst@ttfamily{<}{\texttt{<}}} % replace less than
+\lst@ProcessOther{"3E}{\lst@ttfamily{<}{\texttt{>}}} % replace greater than
+\lst@ProcessOther{"5E}{\raisebox{0.4ex}{$\scriptstyle\land\,$}} % replace circumflex
+\lst@ProcessOther{"5F}{\lst@ttfamily{\char95}{{\makebox[1.2ex][c]{\rule{1ex}{0.1ex}}}}} % replace underscore
+\lst@ProcessOther{"60}{\lst@ttfamily{`}{\raisebox{0.3ex}{\ttfamily\upshape \hspace*{-2pt}`}}} % replace backquote
+\lst@ProcessOther{"7E}{\raisebox{0.3ex}{$\scriptstyle\sim\,$}} % replace tilde
+%\lst@ProcessOther{"7E}{\raisebox{-.4ex}[1ex][0pt]{\textasciitilde}} % lower tilde
+\@empty\z@\@empty % NECESSARY DO NOT REMOVE
+\makeatother
+
+% Local Variables: %
+% tab-width: 4 %
+% fill-column: 100 %
+% End: %
Index: doc/LaTeXmacros/indexstyle
===================================================================
--- doc/LaTeXmacros/indexstyle	(revision df2be83d21a308a102fed7e7bf6c267a2c4041ef)
+++ doc/LaTeXmacros/indexstyle	(revision df2be83d21a308a102fed7e7bf6c267a2c4041ef)
@@ -0,0 +1,2 @@
+preamble ""
+postamble ""
Index: doc/bibliography/cfa.bib
===================================================================
--- doc/bibliography/cfa.bib	(revision df2be83d21a308a102fed7e7bf6c267a2c4041ef)
+++ doc/bibliography/cfa.bib	(revision df2be83d21a308a102fed7e7bf6c267a2c4041ef)
@@ -0,0 +1,1 @@
+/usr/local/bibliographies/pl.bib
Index: doc/refrat/Makefile
===================================================================
--- doc/refrat/Makefile	(revision 5ba653c375e2294bf122e14010ce19e3f5bf5358)
+++ doc/refrat/Makefile	(revision df2be83d21a308a102fed7e7bf6c267a2c4041ef)
@@ -1,8 +1,7 @@
 ## Define the appropriate configuration variables.
 
-Macros = 
-TeXLIB = .:${Macros}:
+TeXLIB = .:../bibliography/:../LaTeXmacros/:
 LaTeX  = TEXINPUTS=${TeXLIB} && export TEXINPUTS && latex
-BibTeX = BSTINPUTS=${TeXLIB} && export BSTINPUTS && bibtex
+BibTeX = BIBINPUTS=${TeXLIB} && export BIBINPUTS && bibtex
 
 ## Define the text source files.
@@ -44,5 +43,6 @@
 	dvips $< -o $@
 
-${basename ${DOCUMENT}}.dvi : Makefile ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCES} ${basename ${DOCUMENT}}.tex ${basename ${DOCUMENT}}.bib
+${basename ${DOCUMENT}}.dvi : Makefile ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCES} ${basename ${DOCUMENT}}.tex \
+		../LaTeXmacros/common.tex ../LaTeXmacros/indexstyle ../bibliography/cfa.bib
 	# Conditionally create an empty *.ind (index) file for inclusion until makeindex is run.
 	if [ ! -r ${basename $@}.ind ] ; then touch ${basename $@}.ind ; fi
@@ -54,5 +54,5 @@
 	-${BibTeX} ${basename $@}
 	# Make index from *.aux entries and input index at end of document
-	makeindex -s indexstyle ${basename $@}.idx
+	makeindex -s ../LaTeXmacros/indexstyle ${basename $@}.idx
 	${LaTeX} ${basename $@}.tex
 	# Run again to get index title into table of contents
Index: c/refrat/indexstyle
===================================================================
--- doc/refrat/indexstyle	(revision 5ba653c375e2294bf122e14010ce19e3f5bf5358)
+++ 	(revision )
@@ -1,2 +1,0 @@
-preamble ""
-postamble ""
Index: doc/refrat/refrat.tex
===================================================================
--- doc/refrat/refrat.tex	(revision 5ba653c375e2294bf122e14010ce19e3f5bf5358)
+++ doc/refrat/refrat.tex	(revision df2be83d21a308a102fed7e7bf6c267a2c4041ef)
@@ -11,6 +11,6 @@
 %% Created On       : Wed Apr  6 14:52:25 2016
 %% Last Modified By : Peter A. Buhr
-%% Last Modified On : Wed Apr  6 21:57:27 2016
-%% Update Count     : 2
+%% Last Modified On : Fri Apr  8 18:32:07 2016
+%% Update Count     : 6
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
@@ -36,170 +36,6 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-% Names used in the document.
-
-\newcommand{\CFA}{C$\mathbf\forall$\xspace}	% set language symbolic name
-\newcommand{\CFL}{Cforall\xspace}		% set language text name
-\newcommand{\CC}{C\kern-.1em\hbox{+\kern-.25em+}\xspace} % CC symbolic name
-\def\c11{ISO/IEC C} % C11 name (cannot have numbers in latex command name)
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
 % Bespoke macros used in the document.
-
-\makeatletter
-% allow escape sequence in lstinline
-%\usepackage{etoolbox}
-%\patchcmd{\lsthk@TextStyle}{\let\lst@DefEsc\@empty}{}{}{\errmessage{failed to patch}}
-
-\renewcommand\small{%
-   \@setfontsize\small{8.5}{11}%
-   \abovedisplayskip 8.5pt \@plus 3pt \@minus 4pt
-   \abovedisplayshortskip \z@ \@plus 2pt
-   \belowdisplayshortskip 4pt \@plus 2pt \@minus 2pt
-   \def\@listi{\leftmargin\leftmargini
-               \topsep 4pt \@plus 2pt \@minus 2pt
-               \parsep 2pt \@pluspt \@minuspt
-               \itemsep \parsep}%
-   \belowdisplayskip \abovedisplayskip
-}
-\usepackage{relsize}            % must be after change to small
-
-\renewcommand{\labelitemi}{{\raisebox{0.25ex}{\footnotesize$\bullet$}}}
-\renewenvironment{itemize}{\begin{list}{\labelitemi}{\topsep=5pt\itemsep=5pt\parsep=0pt}}{\end{list}}
-
-%  Reduce size of chapter/section titles
-\def\@makechapterhead#1{%
-  \vspace*{50\p@}%
-  {\parindent \z@ \raggedright \normalfont
-    \ifnum \c@secnumdepth >\m@ne
-        \large\bfseries \@chapapp\space \thechapter
-        \par\nobreak
-        \vskip 5\p@
-    \fi
-    \interlinepenalty\@M
-    \Large \bfseries #1\par\nobreak
-    \vskip 50\p@
-  }}
-\def\@makeschapterhead#1{%
-  \vspace*{50\p@}%
-  {\parindent \z@ \raggedright
-    \normalfont
-    \interlinepenalty\@M
-    \Large \bfseries  #1\par\nobreak
-    \vskip 50\p@
-  }}
-\renewcommand\section{\@startsection{section}{1}{\z@}{-3.0ex \@plus -1ex \@minus -.2ex}{1.0ex \@plus .2ex}{\normalfont\large\bfseries}}
-\renewcommand\subsection{\@startsection{subsection}{2}{\z@}{-2.5ex \@plus -1ex \@minus -.2ex}{1.0ex \@plus .2ex}{\normalfont\normalsize\bfseries}}
-\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}{-2.5ex \@plus -1ex \@minus -.2ex}{1.0ex \@plus .2ex}{\normalfont\normalsize\bfseries}}
-\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}{-2.0ex \@plus -1ex \@minus -.2ex}{-1em}{\normalfont\normalsize\bfseries}}
-
-% index macros
-\newcommand{\italic}[1]{\emph{\hyperpage{#1}}}
-\newcommand{\definition}[1]{\textbf{\hyperpage{#1}}}
-\newcommand{\see}[1]{\emph{see} #1}
-
-% Define some commands that produce formatted index entries suitable for cross-references.
-% ``\spec'' produces entries for specifications of entities.  ``\impl'' produces entries for their
-% implementations, and ``\use'' for their uses.
-
-%  \newcommand{\bold}[1]{{\bf #1}}
-%  \def\spec{\@bsphack\begingroup
-%             \def\protect##1{\string##1\space}\@sanitize
-%             \@wrxref{|bold}}
-\def\impl{\@bsphack\begingroup
-          \def\protect##1{\string##1\space}\@sanitize
-          \@wrxref{|definition}}
-\newcommand{\indexcode}[1]{{\lstinline$#1$}}
-\def\use{\@bsphack\begingroup
-         \def\protect##1{\string##1\space}\@sanitize
-         \@wrxref{|hyperpage}}
-\def\@wrxref#1#2{\let\thepage\relax
-    \xdef\@gtempa{\write\@indexfile{\string
-    \indexentry{#2@{\lstinline$#2$}#1}{\thepage}}}\endgroup\@gtempa
-    \if@nobreak \ifvmode\nobreak\fi\fi\@esphack}
-%\newcommand{\use}[1]{\index{#1@{\lstinline$#1$}}}
-%\newcommand{\impl}[1]{\index{\protect#1@{\lstinline$\protect#1$}|definition}}
-
-% inline text and lowercase index: \Index{inline and lowercase index text}
-% inline text and as-in index: \Index[as-is index text]{inline text}
-% inline text but index with different as-is text: \Index[index text]{inline text}
-\newcommand{\Index}{\@ifstar\@sIndex\@Index}
-\newcommand{\@Index}[2][\@empty]{\lowercase{\def\temp{#2}}#2\ifx#1\@empty\index{\temp}\else\index{#1@{\protect#2}}\fi}
-\newcommand{\@sIndex}[2][\@empty]{#2\ifx#1\@empty\index{#2}\else\index{#1@{\protect#2}}\fi}
-\makeatother
-
-% blocks and titles
-\newenvironment{rationale}{%
-  \begin{quotation}\noindent$\Box$\enspace
-}{%
-  \hfill\enspace$\Box$\end{quotation}
-}%
-\newcommand{\define}[1]{\emph{#1\/}\index{#1}}
-\newcommand{\rewrite}{\(\Rightarrow\)}
-\newcommand{\rewriterules}{\paragraph{Rewrite Rules}~\par\noindent}
-\newcommand{\examples}{\paragraph{Examples}~\par\noindent}
-\newcommand{\semantics}{\paragraph{Semantics}~\par\noindent}
-\newcommand{\constraints}{\paragraph{Constraints}~\par\noindent}
-\newcommand{\predefined}{\paragraph{Predefined Identifiers}~\par\noindent}
-
-% BNF macros
-\def\syntax{\paragraph{Syntax}\trivlist\parindent=.5in\item[\hskip.5in]}
-\let\endsyntax=\endtrivlist
-\newcommand{\lhs}[1]{\par{\emph{#1:}}\index{#1@{\emph{#1}}|italic}}
-\newcommand{\rhs}{\hfil\break\hbox{\hskip1in}}
-\newcommand{\oldlhs}[1]{\emph{#1: \ldots}\index{#1@{\emph{#1}}|italic}}
-\newcommand{\nonterm}[1]{\emph{#1\/}\index{#1@{\emph{#1}}|italic}}
-\newcommand{\opt}{$_{opt}$\ }
-
-% adjust varioref package with default "section" and "page" titles, and optional title with faraway page numbers
-% \VRef{label} => Section 2.7, \VPageref{label} => page 17
-% \VRef[Figure]{label} => Figure 3.4, \VPageref{label} => page 17
-\renewcommand{\reftextfaceafter}{\unskip}
-\renewcommand{\reftextfacebefore}{\unskip}
-\renewcommand{\reftextafter}{\unskip}
-\renewcommand{\reftextbefore}{\unskip}
-\renewcommand{\reftextfaraway}[1]{\unskip, p.~\pageref{#1}}
-\renewcommand{\reftextpagerange}[2]{\unskip, pp.~\pageref{#1}--\pageref{#2}}
-\newcommand{\VRef}[2][Section]{\ifx#1\@empty\else{#1}\nobreakspace\fi\vref{#2}}
-\newcommand{\VPageref}[2][page]{\ifx#1\@empty\else{#1}\nobreakspace\fi\pageref{#2}}
-
-% CFA based on ANSI C
-\lstdefinelanguage{CFA}[ANSI]{C}%
-{morekeywords={_Alignas,_Alignof,__alignof,__alignof__,asm,__asm,__asm__,_At,_Atomic,__attribute,__attribute__,auto,
-    _Bool,catch,catchResume,choose,_Complex,__complex,__complex__,__const,__const__,disable,dtype,enable,__extension__,
-	fallthru,finally,forall,ftype,_Generic,_Imaginary,inline,__label__,lvalue,_Noreturn,otype,restrict,_Static_assert,
-	_Thread_local,throw,throwResume,trait,try,typeof,__typeof,__typeof__,},
-}%
-
-\lstset{
-language=CFA,
-columns=flexible,
-basicstyle=\sf\relsize{-1},
-tabsize=4,
-xleftmargin=\parindent,
-escapechar=@,
-mathescape=true,
-keepspaces=true,
-showstringspaces=false,
-showlines=true,
-aboveskip=6pt,
-belowskip=4pt,
-}%
-
-\makeatletter
-% replace/adjust listings characters that look bad in sanserif
-\lst@CCPutMacro
-\lst@ProcessOther{"22}{\lst@ttfamily{"}{\raisebox{0.3ex}{\ttfamily\upshape "}}} % replace double quote
-\lst@ProcessOther{"27}{\lst@ttfamily{'}{\raisebox{0.3ex}{\ttfamily\upshape '\hspace*{-2pt}}}} % replace single quote
-\lst@ProcessOther{"2D}{\lst@ttfamily{-}{\ttfamily\upshape -}} % replace minus
-\lst@ProcessOther{"3C}{\lst@ttfamily{<}{\texttt{<}}} % replace less than
-\lst@ProcessOther{"3E}{\lst@ttfamily{<}{\texttt{>}}} % replace greater than
-\lst@ProcessOther{"5E}{\raisebox{0.4ex}{$\scriptstyle\land\,$}} % replace circumflex
-\lst@ProcessOther{"5F}{\lst@ttfamily{\char95}{{\makebox[1.2ex][c]{\rule{1ex}{0.1ex}}}}} % replace underscore
-\lst@ProcessOther{"60}{\lst@ttfamily{`}{\raisebox{0.3ex}{\ttfamily\upshape \hspace*{-2pt}`}}} % replace backquote
-\lst@ProcessOther{"7E}{\raisebox{0.3ex}{$\scriptstyle\sim\,$}} % replace tilde
-%\lst@ProcessOther{"7E}{\raisebox{-.4ex}[1ex][0pt]{\textasciitilde}} % lower tilde
-\@empty\z@\@empty
-\makeatother
+\input{common}
 
 \setcounter{secnumdepth}{3}     % number subsubsections
@@ -248,5 +84,5 @@
 
 This document is a reference manual and rationale for \CFA, a polymorphic extension of the C programming language.
-It makes frequent reference to the {\c11} standard \cite{ANS:C11}, and occasionally compares \CFA to {\CC} \cite{c++}.
+It makes frequent reference to the {\c11} standard \cite{C11}, and occasionally compares \CFA to {\CC} \cite{C++}.
 
 The manual deliberately imitates the ordering of the {\c11} standard (although the section numbering differs).
@@ -742,5 +578,5 @@
 
 There are two notable differences between \CFA's overload resolution rules and the rules for
-{\CC} defined in \cite{c++}.
+{\CC} defined in \cite{C++}.
 First, the result type of a function plays a role.
 In {\CC}, a function call must be completely resolved based on the arguments to the call in most circumstances.
@@ -3406,14 +3242,14 @@
 \begin{itemize}
 \item
-Inside a Clu cluster \cite{clu}, the declaration of an instance states which view applies.
+Inside a Clu cluster \cite{CLU}, the declaration of an instance states which view applies.
 Two primitives called \lstinline$up$ and \lstinline$down$ can be used to convert between the views.
 \item
-The Simula class \cite{Simula87} is essentially a record type.
+The Simula class \cite{SIMULA87} is essentially a record type.
 Since the only operations on a record are member selection and assignment, which can not be overloaded, there is never any ambiguity as to whether the abstraction or the implementation view is being used.
 In {\CC}
-\cite{c++}, operations on class instances include assignment and ``\lstinline$&$'', which can be overloaded.
+\cite{C++}, operations on class instances include assignment and ``\lstinline$&$'', which can be overloaded.
 A ``scope resolution'' operator can be used inside the class to specify whether the abstract or implementation version of the operation should be used.
 \item
-An Ada derived type definition \cite{ada} creates a new type from an old type, and also implicitly declares derived subprograms that correspond to the existing subprograms that use the old type as a parameter type or result type.
+An Ada derived type definition \cite{Ada} creates a new type from an old type, and also implicitly declares derived subprograms that correspond to the existing subprograms that use the old type as a parameter type or result type.
 The derived subprograms are clones of the existing subprograms with the old type replaced by the derived type.
 Literals and aggregates of the old type are also cloned.
@@ -4028,5 +3864,5 @@
 
 \bibliographystyle{plain}
-\bibliography{refrat}
+\bibliography{cfa}
 
 
Index: doc/user/Makefile
===================================================================
--- doc/user/Makefile	(revision 5ba653c375e2294bf122e14010ce19e3f5bf5358)
+++ doc/user/Makefile	(revision df2be83d21a308a102fed7e7bf6c267a2c4041ef)
@@ -1,7 +1,7 @@
 ## Define the appropriate configuration variables.
 
-TeXLIB = .::
+TeXLIB = .:../bibliography/:../LaTeXmacros/:
 LaTeX  = TEXINPUTS=${TeXLIB} && export TEXINPUTS && latex
-BibTeX = BSTINPUTS=${TeXLIB} && export BSTINPUTS && bibtex
+BibTeX = BIBINPUTS=${TeXLIB} && export BIBINPUTS && bibtex
 
 ## Define the text source files.
@@ -43,5 +43,6 @@
 	dvips $< -o $@
 
-${basename ${DOCUMENT}}.dvi : Makefile ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCES} ${basename ${DOCUMENT}}.tex ${basename ${DOCUMENT}}.bib /usr/local/bibliographies/pl.bib
+${basename ${DOCUMENT}}.dvi : Makefile ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCES} ${basename ${DOCUMENT}}.tex \
+		../LaTeXmacros/common.tex ../LaTeXmacros/indexstyle ../bibliography/cfa.bib
 	# Conditionally create an empty *.ind (index) file for inclusion until makeindex is run.
 	if [ ! -r ${basename $@}.ind ] ; then touch ${basename $@}.ind ; fi
@@ -53,5 +54,5 @@
 	-${BibTeX} ${basename $@}
 	# Make index from *.aux entries and input index at end of document
-	makeindex -s indexstyle ${basename $@}.idx
+	makeindex -s ../LaTeXmacros/indexstyle ${basename $@}.idx
 	${LaTeX} ${basename $@}.tex
 	# Run again to get index title into table of contents
Index: c/user/indexstyle
===================================================================
--- doc/user/indexstyle	(revision 5ba653c375e2294bf122e14010ce19e3f5bf5358)
+++ 	(revision )
@@ -1,2 +1,0 @@
-preamble ""
-postamble ""
Index: doc/user/user.tex
===================================================================
--- doc/user/user.tex	(revision 5ba653c375e2294bf122e14010ce19e3f5bf5358)
+++ doc/user/user.tex	(revision df2be83d21a308a102fed7e7bf6c267a2c4041ef)
@@ -11,6 +11,6 @@
 %% Created On       : Wed Apr  6 14:53:29 2016
 %% Last Modified By : Peter A. Buhr
-%% Last Modified On : Wed Apr  6 17:37:39 2016
-%% Update Count     : 34
+%% Last Modified On : Fri Apr  8 11:40:53 2016
+%% Update Count     : 42
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
@@ -43,8 +43,4 @@
 % Names used in the document.
 
-\newcommand{\CFA}{C$\mathbf\forall$\xspace}	% set language symbolic name
-\newcommand{\CFL}{Cforall\xspace}		% set language text name
-\newcommand{\CC}{C\kern-.1em\hbox{+\kern-.25em+}\xspace} % CC symbolic name
-\def\c11{ISO/IEC C} % C11 name (cannot have numbers in latex command name)
 \newcommand{\CS}{C\raisebox{-0.9ex}{\large$^\sharp$}\xspace}
 
@@ -52,170 +48,5 @@
 
 % Bespoke macros used in the document.
-
-\makeatletter
-% allow escape sequence in lstinline
-%\usepackage{etoolbox}
-%\patchcmd{\lsthk@TextStyle}{\let\lst@DefEsc\@empty}{}{}{\errmessage{failed to patch}}
-
-\renewcommand\small{%
-   \@setfontsize\small{8.5}{11}%
-   \abovedisplayskip 8.5pt \@plus 3pt \@minus 4pt
-   \abovedisplayshortskip \z@ \@plus 2pt
-   \belowdisplayshortskip 4pt \@plus 2pt \@minus 2pt
-   \def\@listi{\leftmargin\leftmargini
-               \topsep 4pt \@plus 2pt \@minus 2pt
-               \parsep 2pt \@pluspt \@minuspt
-               \itemsep \parsep}%
-   \belowdisplayskip \abovedisplayskip
-}
-\usepackage{relsize}            % must be after change to small
-
-\renewcommand{\labelitemi}{{\raisebox{0.25ex}{\footnotesize$\bullet$}}}
-\renewenvironment{itemize}{\begin{list}{\labelitemi}{\topsep=5pt\itemsep=5pt\parsep=0pt}}{\end{list}}
-
-%  Reduce size of section titles
-\renewcommand\section{\@startsection{section}{1}{\z@}{-3.0ex \@plus -1ex \@minus -.2ex}{1.0ex \@plus .2ex}{\normalfont\large\bfseries}}
-\renewcommand\subsection{\@startsection{subsection}{2}{\z@}{-2.5ex \@plus -1ex \@minus -.2ex}{1.0ex \@plus .2ex}{\normalfont\normalsize\bfseries}}
-\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}{-2.5ex \@plus -1ex \@minus -.2ex}{1.0ex \@plus .2ex}{\normalfont\normalsize\bfseries}}
-\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}{-2.0ex \@plus -1ex \@minus -.2ex}{-1em}{\normalfont\normalsize\bfseries}}
-
-% index macros
-\newcommand{\italic}[1]{\emph{\hyperpage{#1}}}
-\newcommand{\definition}[1]{\textbf{\hyperpage{#1}}}
-\newcommand{\see}[1]{\emph{see} #1}
-
-% Define some commands that produce formatted index entries suitable for cross-references.
-% ``\spec'' produces entries for specifications of entities.  ``\impl'' produces entries for their
-% implementations, and ``\use'' for their uses.
-
-%  \newcommand{\bold}[1]{{\bf #1}}
-%  \def\spec{\@bsphack\begingroup
-%             \def\protect##1{\string##1\space}\@sanitize
-%             \@wrxref{|bold}}
-\def\impl{\@bsphack\begingroup
-          \def\protect##1{\string##1\space}\@sanitize
-          \@wrxref{|definition}}
-\newcommand{\indexcode}[1]{{\lstinline$#1$}}
-\def\use{\@bsphack\begingroup
-         \def\protect##1{\string##1\space}\@sanitize
-         \@wrxref{|hyperpage}}
-\def\@wrxref#1#2{\let\thepage\relax
-    \xdef\@gtempa{\write\@indexfile{\string
-    \indexentry{#2@{\lstinline$#2$}#1}{\thepage}}}\endgroup\@gtempa
-    \if@nobreak \ifvmode\nobreak\fi\fi\@esphack}
-%\newcommand{\use}[1]{\index{#1@{\lstinline$#1$}}}
-%\newcommand{\impl}[1]{\index{\protect#1@{\lstinline$\protect#1$}|definition}}
-
-% inline text and lowercase index: \Index{inline and lowercase index text}
-% inline text and as-in index: \Index[as-is index text]{inline text}
-% inline text but index with different as-is text: \Index[index text]{inline text}
-\newcommand{\Index}{\@ifstar\@sIndex\@Index}
-\newcommand{\@Index}[2][\@empty]{\lowercase{\def\temp{#2}}#2\ifx#1\@empty\index{\temp}\else\index{#1@{\protect#2}}\fi}
-\newcommand{\@sIndex}[2][\@empty]{#2\ifx#1\@empty\index{#2}\else\index{#1@{\protect#2}}\fi}
-
-\newcommand{\newtermFontInline}{\emph}
-\newcommand{\newterm}{\@ifstar\@snewterm\@newterm}
-\newcommand{\@newterm}[2][\@empty]{\lowercase{\def\temp{#2}}{\newtermFontInline{#2}}\ifx#1\@empty\index{\temp}\else\index{#1@{\protect#2}}\fi}
-\newcommand{\@snewterm}[2][\@empty]{{\newtermFontInline{#2}}\ifx#1\@empty\index{#2}\else\index{#1@{\protect#2}}\fi}
-\makeatother
-
-% blocks and titles
-\newenvironment{quote2}{%
-	\list{}{\lstset{resetmargins=true}\leftmargin=\parindent\rightmargin\leftmargin}%
-	\item\relax
-}{%
-	\endlist
-}% quote2
-\newenvironment{rationale}{%
-  \begin{quotation}\noindent$\Box$\enspace
-}{%
-  \hfill\enspace$\Box$\end{quotation}
-}%
-\newcommand{\define}[1]{\emph{#1\/}\index{#1}}
-\newcommand{\rewrite}{\(\Rightarrow\)}
-\newcommand{\rewriterules}{\paragraph{Rewrite Rules}~\par\noindent}
-\newcommand{\examples}{\paragraph{Examples}~\par\noindent}
-\newcommand{\semantics}{\paragraph{Semantics}~\par\noindent}
-\newcommand{\constraints}{\paragraph{Constraints}~\par\noindent}
-\newcommand{\predefined}{\paragraph{Predefined Identifiers}~\par\noindent}
-
-% BNF macros
-\def\syntax{\paragraph{Syntax}\trivlist\parindent=.5in\item[\hskip.5in]}
-\let\endsyntax=\endtrivlist
-\newcommand{\lhs}[1]{\par{\emph{#1:}}\index{#1@{\emph{#1}}|italic}}
-\newcommand{\rhs}{\hfil\break\hbox{\hskip1in}}
-\newcommand{\oldlhs}[1]{\emph{#1: \ldots}\index{#1@{\emph{#1}}|italic}}
-\newcommand{\nonterm}[1]{\emph{#1\/}\index{#1@{\emph{#1}}|italic}}
-\newcommand{\opt}{$_{opt}$\ }
-
-% adjust varioref package with default "section" and "page" titles, and optional title with faraway page numbers
-% \VRef{label} => Section 2.7, \VPageref{label} => page 17
-% \VRef[Figure]{label} => Figure 3.4, \VPageref{label} => page 17
-\renewcommand{\reftextfaceafter}{\unskip}
-\renewcommand{\reftextfacebefore}{\unskip}
-\renewcommand{\reftextafter}{\unskip}
-\renewcommand{\reftextbefore}{\unskip}
-\renewcommand{\reftextfaraway}[1]{\unskip, p.~\pageref{#1}}
-\renewcommand{\reftextpagerange}[2]{\unskip, pp.~\pageref{#1}--\pageref{#2}}
-\newcommand{\VRef}[2][Section]{\ifx#1\@empty\else{#1}\nobreakspace\fi\vref{#2}}
-\newcommand{\VPageref}[2][page]{\ifx#1\@empty\else{#1}\nobreakspace\fi\pageref{#2}}
-
-% Go programming language
-\lstdefinelanguage{Golang}%
-  {morekeywords=[1]{package,import,func,type,struct,return,defer,panic, recover,select,var,const,iota,},%
-   morekeywords=[2]{string,uint,uint8,uint16,uint32,uint64,int,int8,int16, int32,int64,
-		bool,float32,float64,complex64,complex128,byte,rune,uintptr, error,interface},%
-   morekeywords=[3]{map,slice,make,new,nil,len,cap,copy,close,true,false, delete,append,real,imag,complex,chan,},%
-   morekeywords=[4]{for,break,continue,range,goto,switch,case,fallthrough,if, else,default,},%
-   morekeywords=[5]{Println,Printf,Error,},%
-   sensitive=true,%
-   morecomment=[l]{//},%
-   morecomment=[s]{/*}{*/},%
-   morestring=[b]',%
-   morestring=[b]",%
-   morestring=[s]{`}{`},%
-}
-
-% CFA based on ANSI C
-\lstdefinelanguage{CFA}[ANSI]{C}%
-{morekeywords={_Alignas,_Alignof,__alignof,__alignof__,asm,__asm,__asm__,_At,_Atomic,__attribute,__attribute__,auto,
-    _Bool,catch,catchResume,choose,_Complex,__complex,__complex__,__const,__const__,disable,dtype,enable,__extension__,
-	fallthru,finally,forall,ftype,_Generic,_Imaginary,inline,__label__,lvalue,_Noreturn,otype,restrict,_Static_assert,
-	_Thread_local,throw,throwResume,trait,try,typeof,__typeof,__typeof__,},
-  moredelim=**[is][\color{red}]{`}{`},
-}%
-
-\lstset{
-language=CFA,
-columns=flexible,
-basicstyle=\sf\relsize{-1},
-tabsize=4,
-xleftmargin=\parindent,
-escapechar=@,
-mathescape=true,
-keepspaces=true,
-showstringspaces=false,
-showlines=true,
-aboveskip=6pt,
-belowskip=4pt,
-literate={\\`}{\raisebox{0.3ex}{\ttfamily\upshape \hspace*{-2pt}`}}1, % escape \`, otherwise used to highlight in red
-%extendedchars=true,
-}%
-
-\makeatletter
-% replace/adjust listings characters that look bad in sanserif
-\lst@CCPutMacro
-\lst@ProcessOther{"22}{\lst@ttfamily{"}{\raisebox{0.3ex}{\ttfamily\upshape "}}} % replace double quote
-\lst@ProcessOther{"27}{\lst@ttfamily{'}{\raisebox{0.3ex}{\ttfamily\upshape '\hspace*{-2pt}}}} % replace single quote
-\lst@ProcessOther{"2D}{\lst@ttfamily{-}{\ttfamily\upshape -}} % replace minus
-\lst@ProcessOther{"3C}{\lst@ttfamily{<}{\texttt{<}}} % replace less than
-\lst@ProcessOther{"3E}{\lst@ttfamily{<}{\texttt{>}}} % replace greater than
-\lst@ProcessOther{"5E}{\raisebox{0.4ex}{$\scriptstyle\land\,$}} % replace circumflex
-\lst@ProcessOther{"5F}{\lst@ttfamily{\char95}{{\makebox[1.2ex][c]{\rule{1ex}{0.1ex}}}}} % replace underscore
-\lst@ProcessOther{"60}{\lst@ttfamily{`}{\raisebox{0.3ex}{\ttfamily\upshape \hspace*{-2pt}`}}} % replace backquote
-\lst@ProcessOther{"7E}{\raisebox{0.3ex}{$\scriptstyle\sim\,$}} % replace tilde
-%\lst@ProcessOther{"7E}{\raisebox{-.4ex}[1ex][0pt]{\textasciitilde}} % lower tilde
-\@empty\z@\@empty
-\makeatother
+\input{common}
 
 \setcounter{secnumdepth}{3}     % number subsubsections
@@ -4573,6 +4404,58 @@
 
 
+\section{Rational Numbers}
+\label{s:RationalNumbers}
+
+Rational numbers are numbers written as a ratio, i.e., as a fraction, where the numerator (top number) and the denominator (bottom number) are whole numbers.
+When creating and computing with rational numbers, results are constantly reduced to keep the numerator and denominator as small as possible.
+
+\begin{lstlisting}
+// implementation
+struct Rational {
+	long int numerator, denominator;					// invariant: denominator > 0
+}; // Rational
+
+// constants
+extern struct Rational 0;
+extern struct Rational 1;
+
+// constructors
+Rational rational();
+Rational rational( long int n );
+Rational rational( long int n, long int d );
+
+// getter/setter for numerator/denominator
+long int numerator( Rational r );
+long int numerator( Rational r, long int n );
+long int denominator( Rational r );
+long int denominator( Rational r, long int d );
+
+// comparison
+int ?==?( Rational l, Rational r );
+int ?!=?( Rational l, Rational r );
+int ?<?( Rational l, Rational r );
+int ?<=?( Rational l, Rational r );
+int ?>?( Rational l, Rational r );
+int ?>=?( Rational l, Rational r );
+
+// arithmetic
+Rational -?( Rational r );
+Rational ?+?( Rational l, Rational r );
+Rational ?-?( Rational l, Rational r );
+Rational ?*?( Rational l, Rational r );
+Rational ?/?( Rational l, Rational r );
+
+// conversion
+double widen( Rational r );
+Rational narrow( double f, long int md );
+
+// I/O
+forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, Rational * );
+forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, Rational );
+\end{lstlisting}
+
+
 \bibliographystyle{plain}
-\bibliography{/usr/local/bibliographies/pl.bib}
+\bibliography{cfa}
 
 
Index: src/Parser/ExpressionNode.cc
===================================================================
--- src/Parser/ExpressionNode.cc	(revision 5ba653c375e2294bf122e14010ce19e3f5bf5358)
+++ src/Parser/ExpressionNode.cc	(revision df2be83d21a308a102fed7e7bf6c267a2c4041ef)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 13:17:07 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sun Mar 13 12:34:38 2016
-// Update Count     : 272
+// Last Modified On : Fri Apr  8 15:43:05 2016
+// Update Count     : 296
 // 
 
@@ -22,6 +22,8 @@
 
 #include "ParseNode.h"
+#include "TypeData.h"
 #include "SynTree/Constant.h"
 #include "SynTree/Expression.h"
+#include "SynTree/Declaration.h"
 #include "Common/UnimplementedError.h"
 #include "parseutility.h"
@@ -872,4 +874,54 @@
 }
 
+
+CompoundLiteralNode::CompoundLiteralNode( DeclarationNode *type, InitializerNode *kids ) : type( type ), kids( kids ) {}
+CompoundLiteralNode::CompoundLiteralNode( const CompoundLiteralNode &other ) : ExpressionNode( other ), type( other.type ), kids( other.kids ) {}
+
+CompoundLiteralNode::~CompoundLiteralNode() {
+	delete kids;
+	delete type;
+}
+
+CompoundLiteralNode *CompoundLiteralNode::clone() const {
+	return new CompoundLiteralNode( *this );
+}
+
+void CompoundLiteralNode::print( std::ostream &os, int indent ) const {
+	os << string( indent,' ' ) << "CompoundLiteralNode:" << endl;
+
+	os << string( indent + 2, ' ' ) << "type:" << endl;
+	if ( type != 0 )
+		type->print( os, indent + 4 );
+
+	os << string( indent + 2, ' ' ) << "initialization:" << endl;
+	if ( kids != 0 )
+		kids->printList( os, indent + 4 );
+}
+
+void CompoundLiteralNode::printOneLine( std::ostream &os, int indent ) const {
+	os << "( ";
+	if ( type ) type->print( os );
+	os << ", ";
+	if ( kids ) kids->printOneLine( os );
+	os << ") ";
+}
+
+Expression *CompoundLiteralNode::build() const {
+	Declaration * newDecl = type->build();				// compound literal type
+	if ( DeclarationWithType * newDeclWithType = dynamic_cast< DeclarationWithType * >( newDecl ) ) { // non-sue compound-literal type
+		return new CompoundLiteralExpr( newDeclWithType->get_type(), kids->build() );
+	// these types do not have associated type information
+	} else if ( StructDecl * newDeclStructDecl = dynamic_cast< StructDecl * >( newDecl )  ) {
+		return new CompoundLiteralExpr( new StructInstType( Type::Qualifiers(), newDeclStructDecl->get_name() ), kids->build() );
+	} else if ( UnionDecl * newDeclUnionDecl = dynamic_cast< UnionDecl * >( newDecl )  ) {
+		return new CompoundLiteralExpr( new UnionInstType( Type::Qualifiers(), newDeclUnionDecl->get_name() ), kids->build() );
+	} else if ( EnumDecl * newDeclEnumDecl = dynamic_cast< EnumDecl * >( newDecl )  ) {
+		return new CompoundLiteralExpr( new EnumInstType( Type::Qualifiers(), newDeclEnumDecl->get_name() ), kids->build() );
+	} else {
+		assert( false );
+	} // if
+}
+
+
 ExpressionNode *flattenCommas( ExpressionNode *list ) {
 	if ( CompositeExprNode *composite = dynamic_cast< CompositeExprNode * >( list ) ) {
Index: src/Parser/ParseNode.h
===================================================================
--- src/Parser/ParseNode.h	(revision 5ba653c375e2294bf122e14010ce19e3f5bf5358)
+++ src/Parser/ParseNode.h	(revision df2be83d21a308a102fed7e7bf6c267a2c4041ef)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 13:28:16 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Mar  2 17:26:35 2016
-// Update Count     : 190
+// Last Modified On : Fri Apr  8 16:27:20 2016
+// Update Count     : 205
 //
 
@@ -538,4 +538,27 @@
 };
 
+class CompoundLiteralNode : public ExpressionNode {
+  public:
+	CompoundLiteralNode( DeclarationNode *type, InitializerNode *kids );
+	CompoundLiteralNode( const CompoundLiteralNode &type );
+	~CompoundLiteralNode();
+
+	virtual CompoundLiteralNode *clone() const;
+
+	DeclarationNode *get_type() const { return type; }
+	CompoundLiteralNode *set_type( DeclarationNode *t ) { type = t; return this; }
+
+	InitializerNode *get_initializer() const { return kids; }
+	CompoundLiteralNode *set_initializer( InitializerNode *k ) { kids = k; return this; }
+
+	void print( std::ostream &, int indent = 0 ) const;
+	void printOneLine( std::ostream &, int indent = 0 ) const;
+
+	virtual Expression *build() const;
+  private:
+	DeclarationNode *type;
+	InitializerNode *kids;
+};
+
 template< typename SynTreeType, typename NodeType >
 void buildList( const NodeType *firstNode, std::list< SynTreeType *> &outputList ) {
Index: src/Parser/parser.cc
===================================================================
--- src/Parser/parser.cc	(revision 5ba653c375e2294bf122e14010ce19e3f5bf5358)
+++ src/Parser/parser.cc	(revision df2be83d21a308a102fed7e7bf6c267a2c4041ef)
@@ -5180,5 +5180,5 @@
 /* Line 1806 of yacc.c  */
 #line 374 "parser.yy"
-    { (yyval.en) = 0; }
+    { (yyval.en) = new CompoundLiteralNode( (yyvsp[(2) - (7)].decl), new InitializerNode( (yyvsp[(5) - (7)].in), true ) ); }
     break;
 
Index: src/Parser/parser.yy
===================================================================
--- src/Parser/parser.yy	(revision 5ba653c375e2294bf122e14010ce19e3f5bf5358)
+++ src/Parser/parser.yy	(revision df2be83d21a308a102fed7e7bf6c267a2c4041ef)
@@ -10,6 +10,6 @@
 // Created On       : Sat Sep  1 20:22:55 2001
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Mar 24 16:16:16 2016
-// Update Count     : 1498
+// Last Modified On : Fri Apr  8 16:21:55 2016
+// Update Count     : 1508
 // 
 
@@ -372,5 +372,5 @@
 		{ $$ = new CompositeExprNode( new OperatorNode( OperatorNode::DecrPost ), $1 ); }
 	| '(' type_name_no_function ')' '{' initializer_list comma_opt '}' // C99
-		{ $$ = 0; }
+		{ $$ = new CompoundLiteralNode( $2, new InitializerNode( $5, true ) ); }
 	| postfix_expression '{' argument_expression_list '}' // CFA
 		{
Index: src/SymTab/AddVisit.h
===================================================================
--- src/SymTab/AddVisit.h	(revision 5ba653c375e2294bf122e14010ce19e3f5bf5358)
+++ src/SymTab/AddVisit.h	(revision df2be83d21a308a102fed7e7bf6c267a2c4041ef)
@@ -9,7 +9,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Sun May 17 16:14:32 2015
-// Last Modified By : Rob Schluntz
-// Last Modified On : Tue Jul 14 12:26:17 2015
-// Update Count     : 4
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Thu Apr  7 14:42:21 2016
+// Update Count     : 5
 //
 
@@ -27,37 +27,6 @@
 
 	template< typename Visitor >
-	inline void addVisitStatement( Statement *stmt, Visitor &visitor ) {
-		maybeAccept( stmt, visitor );
-///   if ( ! declsToAdd.empty() ) {
-///     CompoundStmt *compound = new CompoundStmt( noLabels );
-///     compound->get_kids().push_back( stmt );
-///     addDecls( declsToAdd, compound->get_kids(), compound->get_kids().end() );
-///   }
-	}
-
-	template< typename Visitor >
 	inline void addVisit(CompoundStmt *compoundStmt, Visitor &visitor) {
 		addVisitStatementList( compoundStmt->get_kids(), visitor );
-	}
-
-	template< typename Visitor >
-	inline void addVisit(IfStmt *ifStmt, Visitor &visitor) {
-		addVisitStatement( ifStmt->get_thenPart(), visitor );
-		addVisitStatement( ifStmt->get_elsePart(), visitor );
-		maybeAccept( ifStmt->get_condition(), visitor );
-	}
-
-	template< typename Visitor >
-	inline void addVisit(WhileStmt *whileStmt, Visitor &visitor) {
-		addVisitStatement( whileStmt->get_body(), visitor );
-		maybeAccept( whileStmt->get_condition(), visitor );
-	}
-
-	template< typename Visitor >
-	inline void addVisit(ForStmt *forStmt, Visitor &visitor) {
-		addVisitStatement( forStmt->get_body(), visitor );
-		acceptAll( forStmt->get_initialization(), visitor );
-		maybeAccept( forStmt->get_condition(), visitor );
-		maybeAccept( forStmt->get_increment(), visitor );
 	}
 
@@ -74,15 +43,9 @@
 	}
 
-	template< typename Visitor >
-	inline void addVisit(CaseStmt *caseStmt, Visitor &visitor) {
-		addVisitStatementList( caseStmt->get_statements(), visitor );
-		maybeAccept( caseStmt->get_condition(), visitor );
-	}
-
-	template< typename Visitor >
-	inline void addVisit(CatchStmt *cathStmt, Visitor &visitor) {
-		addVisitStatement( cathStmt->get_body(), visitor );
-		maybeAccept( cathStmt->get_decl(), visitor );
-	}
+	// template< typename Visitor >
+	// inline void addVisit(CaseStmt *caseStmt, Visitor &visitor) {
+	// 	addVisitStatementList( caseStmt->get_statements(), visitor );
+	// 	maybeAccept( caseStmt->get_condition(), visitor );
+	// }
 } // namespace SymTab
 
Index: src/SymTab/Validate.cc
===================================================================
--- src/SymTab/Validate.cc	(revision 5ba653c375e2294bf122e14010ce19e3f5bf5358)
+++ src/SymTab/Validate.cc	(revision df2be83d21a308a102fed7e7bf6c267a2c4041ef)
@@ -10,6 +10,6 @@
 // Created On       : Sun May 17 21:50:04 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Mar  2 17:31:39 2016
-// Update Count     : 226
+// Last Modified On : Thu Apr  7 16:45:30 2016
+// Update Count     : 243
 //
 
@@ -40,8 +40,11 @@
 #include <list>
 #include <iterator>
+#include "Common/utility.h"
+#include "Common/UniqueName.h"
 #include "Validate.h"
 #include "SynTree/Visitor.h"
 #include "SynTree/Mutator.h"
 #include "SynTree/Type.h"
+#include "SynTree/Expression.h"
 #include "SynTree/Statement.h"
 #include "SynTree/TypeSubstitution.h"
@@ -49,6 +52,5 @@
 #include "FixFunction.h"
 // #include "ImplementationType.h"
-#include "Common/utility.h"
-#include "Common/UniqueName.h"
+#include "GenPoly/DeclMutator.h"
 #include "AddVisit.h"
 #include "MakeLibCfa.h"
@@ -70,11 +72,7 @@
 
 		virtual void visit( CompoundStmt *compoundStmt );
-		virtual void visit( IfStmt *ifStmt );
-		virtual void visit( WhileStmt *whileStmt );
-		virtual void visit( ForStmt *forStmt );
 		virtual void visit( SwitchStmt *switchStmt );
 		virtual void visit( ChooseStmt *chooseStmt );
-		virtual void visit( CaseStmt *caseStmt );
-		virtual void visit( CatchStmt *catchStmt );
+		// virtual void visit( CaseStmt *caseStmt );
 	  private:
 		HoistStruct();
@@ -144,11 +142,7 @@
 
 		virtual void visit( CompoundStmt *compoundStmt );
-		virtual void visit( IfStmt *ifStmt );
-		virtual void visit( WhileStmt *whileStmt );
-		virtual void visit( ForStmt *forStmt );
 		virtual void visit( SwitchStmt *switchStmt );
 		virtual void visit( ChooseStmt *chooseStmt );
-		virtual void visit( CaseStmt *caseStmt );
-		virtual void visit( CatchStmt *catchStmt );
+		// virtual void visit( CaseStmt *caseStmt );
 
 		AutogenerateRoutines() : functionNesting( 0 ) {}
@@ -166,5 +160,4 @@
 		/// and return something if the return type is non-void.
 		static void checkFunctionReturns( std::list< Declaration * > & translationUnit );
-
 	  private:
 		virtual void visit( FunctionDecl * functionDecl );
@@ -202,8 +195,17 @@
 	};
 
+	class CompoundLiteral : public GenPoly::DeclMutator {
+		DeclarationNode::StorageClass storageclass = DeclarationNode::NoStorageClass;
+
+		virtual DeclarationWithType * mutate( ObjectDecl *objectDecl );
+		virtual Expression *mutate( CompoundLiteralExpr *compLitExpr );
+	};
+
 	void validate( std::list< Declaration * > &translationUnit, bool doDebug ) {
 		Pass1 pass1;
 		Pass2 pass2( doDebug, 0 );
 		Pass3 pass3( 0 );
+		CompoundLiteral compoundliteral;
+
 		EliminateTypedef::eliminateTypedef( translationUnit );
 		HoistStruct::hoistStruct( translationUnit );
@@ -211,4 +213,5 @@
 		acceptAll( translationUnit, pass2 );
 		ReturnChecker::checkFunctionReturns( translationUnit );
+		mutateAll( translationUnit, compoundliteral );
 		AutogenerateRoutines::autogenerateRoutines( translationUnit );
 		acceptAll( translationUnit, pass3 );
@@ -292,16 +295,4 @@
 	}
 
-	void HoistStruct::visit( IfStmt *ifStmt ) {
-		addVisit( ifStmt, *this );
-	}
-
-	void HoistStruct::visit( WhileStmt *whileStmt ) {
-		addVisit( whileStmt, *this );
-	}
-
-	void HoistStruct::visit( ForStmt *forStmt ) {
-		addVisit( forStmt, *this );
-	}
-
 	void HoistStruct::visit( SwitchStmt *switchStmt ) {
 		addVisit( switchStmt, *this );
@@ -312,11 +303,7 @@
 	}
 
-	void HoistStruct::visit( CaseStmt *caseStmt ) {
-		addVisit( caseStmt, *this );
-	}
-
-	void HoistStruct::visit( CatchStmt *cathStmt ) {
-		addVisit( cathStmt, *this );
-	}
+	// void HoistStruct::visit( CaseStmt *caseStmt ) {
+	// 	addVisit( caseStmt, *this );
+	// }
 
 	void Pass1::visit( EnumDecl *enumDecl ) {
@@ -874,16 +861,4 @@
 	}
 
-	void AutogenerateRoutines::visit( IfStmt *ifStmt ) {
-		visitStatement( ifStmt );
-	}
-
-	void AutogenerateRoutines::visit( WhileStmt *whileStmt ) {
-		visitStatement( whileStmt );
-	}
-
-	void AutogenerateRoutines::visit( ForStmt *forStmt ) {
-		visitStatement( forStmt );
-	}
-
 	void AutogenerateRoutines::visit( SwitchStmt *switchStmt ) {
 		visitStatement( switchStmt );
@@ -894,11 +869,7 @@
 	}
 
-	void AutogenerateRoutines::visit( CaseStmt *caseStmt ) {
-		visitStatement( caseStmt );
-	}
-
-	void AutogenerateRoutines::visit( CatchStmt *cathStmt ) {
-		visitStatement( cathStmt );
-	}
+	// void AutogenerateRoutines::visit( CaseStmt *caseStmt ) {
+	// 	visitStatement( caseStmt );
+	// }
 
 	void ReturnChecker::checkFunctionReturns( std::list< Declaration * > & translationUnit ) {
@@ -1080,4 +1051,24 @@
 	}
 
+	DeclarationWithType * CompoundLiteral::mutate( ObjectDecl *objectDecl ) {
+		storageclass = objectDecl->get_storageClass();
+		DeclarationWithType * temp = Mutator::mutate( objectDecl );
+		storageclass = DeclarationNode::NoStorageClass;
+		return temp;
+	}
+
+	Expression *CompoundLiteral::mutate( CompoundLiteralExpr *compLitExpr ) {
+		// transform [storage_class] ... (struct S){ 3, ... };
+		// into [storage_class] struct S temp =  { 3, ... };
+		static UniqueName indexName( "_compLit" );
+
+		ObjectDecl *tempvar = new ObjectDecl( indexName.newName(), storageclass, LinkageSpec::C, 0, compLitExpr->get_type(), compLitExpr->get_initializer() );
+		compLitExpr->set_type( 0 );
+		compLitExpr->set_initializer( 0 );
+		delete compLitExpr;
+		DeclarationWithType * newtempvar = mutate( tempvar );
+		addDeclaration( newtempvar );					// add modified temporary to current block
+		return new VariableExpr( newtempvar );
+	}
 } // namespace SymTab
 
Index: src/SynTree/Expression.cc
===================================================================
--- src/SynTree/Expression.cc	(revision 5ba653c375e2294bf122e14010ce19e3f5bf5358)
+++ src/SynTree/Expression.cc	(revision df2be83d21a308a102fed7e7bf6c267a2c4041ef)
@@ -9,7 +9,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Rob Schluntz
-// Last Modified On : Wed Dec 09 14:10:29 2015
-// Update Count     : 34
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Fri Apr  8 17:16:23 2016
+// Update Count     : 40
 //
 
@@ -22,4 +22,5 @@
 
 #include "Type.h"
+#include "Initializer.h"
 #include "Expression.h"
 #include "Declaration.h"
@@ -464,4 +465,21 @@
 
 
+CompoundLiteralExpr::CompoundLiteralExpr( Type * type, Initializer * initializer ) : type( type ), initializer( initializer ) {
+	add_result( type->clone() );
+}
+
+CompoundLiteralExpr::CompoundLiteralExpr( const CompoundLiteralExpr &other ) : Expression( other ), type( maybeClone( other.type ) ), initializer( maybeClone( other.initializer ) ) {}
+
+CompoundLiteralExpr::~CompoundLiteralExpr() {
+	delete initializer;
+	delete type;
+}
+
+void CompoundLiteralExpr::print( std::ostream &os, int indent ) const {
+	os << "Compound Literal Expression: " << std::endl;
+	if ( type ) type->print( os, indent + 2 );
+	if ( initializer ) initializer->print( os, indent + 2 );
+}
+
 
 std::ostream & operator<<( std::ostream & out, Expression * expr ) {
Index: src/SynTree/Expression.h
===================================================================
--- src/SynTree/Expression.h	(revision 5ba653c375e2294bf122e14010ce19e3f5bf5358)
+++ src/SynTree/Expression.h	(revision df2be83d21a308a102fed7e7bf6c267a2c4041ef)
@@ -9,7 +9,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Rob Schluntz
-// Last Modified On : Wed Dec 09 14:10:21 2015
-// Update Count     : 19
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Fri Apr  8 17:18:06 2016
+// Update Count     : 21
 //
 
@@ -577,4 +577,26 @@
 };
 
+/// CompoundLiteralExpr represents a C99 'compound literal'
+class CompoundLiteralExpr : public Expression {
+  public:
+	CompoundLiteralExpr( Type * type, Initializer * initializer );
+	CompoundLiteralExpr( const CompoundLiteralExpr &other );
+	~CompoundLiteralExpr();
+
+	Type * get_type() const { return type; }
+	void set_type( Type * t ) { type = t; }
+
+	Initializer * get_initializer() const { return initializer; }
+	void set_initializer( Initializer * i ) { initializer = i; }
+
+	virtual CompoundLiteralExpr *clone() const { return new CompoundLiteralExpr( *this ); }
+	virtual void accept( Visitor &v ) { v.visit( this ); }
+	virtual Expression *acceptMutator( Mutator &m ) { return m.mutate( this ); }
+	virtual void print( std::ostream &os, int indent = 0 ) const;
+  private:
+	Type * type;
+	Initializer * initializer;
+};
+
 std::ostream & operator<<( std::ostream & out, Expression * expr );
 
Index: src/SynTree/Mutator.cc
===================================================================
--- src/SynTree/Mutator.cc	(revision 5ba653c375e2294bf122e14010ce19e3f5bf5358)
+++ src/SynTree/Mutator.cc	(revision df2be83d21a308a102fed7e7bf6c267a2c4041ef)
@@ -10,6 +10,6 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Mar  2 17:28:20 2016
-// Update Count     : 12
+// Last Modified On : Fri Apr  1 18:05:16 2016
+// Update Count     : 16
 //
 
@@ -342,4 +342,11 @@
 }
 
+Expression *Mutator::mutate( CompoundLiteralExpr *compLitExpr ) {
+	mutateAll( compLitExpr->get_results(), *this );
+	compLitExpr->set_type( maybeMutate( compLitExpr->get_type(), *this ) );
+	compLitExpr->set_initializer( maybeMutate( compLitExpr->get_initializer(), *this ) );
+	return compLitExpr;
+}
+
 Type *Mutator::mutate( VoidType *voidType ) {
 	mutateAll( voidType->get_forall(), *this );
Index: src/SynTree/Mutator.h
===================================================================
--- src/SynTree/Mutator.h	(revision 5ba653c375e2294bf122e14010ce19e3f5bf5358)
+++ src/SynTree/Mutator.h	(revision df2be83d21a308a102fed7e7bf6c267a2c4041ef)
@@ -10,6 +10,6 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Mar  2 17:33:11 2016
-// Update Count     : 9
+// Last Modified On : Fri Apr  1 17:26:56 2016
+// Update Count     : 10
 //
 #include <cassert>
@@ -77,4 +77,5 @@
 	virtual Expression* mutate( AsmExpr *asmExpr );
 	virtual Expression* mutate( UntypedValofExpr *valofExpr );
+	virtual Expression* mutate( CompoundLiteralExpr *compLitExpr );
 
 	virtual Type* mutate( VoidType *basicType );
Index: src/SynTree/SynTree.h
===================================================================
--- src/SynTree/SynTree.h	(revision 5ba653c375e2294bf122e14010ce19e3f5bf5358)
+++ src/SynTree/SynTree.h	(revision df2be83d21a308a102fed7e7bf6c267a2c4041ef)
@@ -10,6 +10,6 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Mar  2 17:29:00 2016
-// Update Count     : 4
+// Last Modified On : Fri Apr  1 16:47:44 2016
+// Update Count     : 5
 //
 
@@ -82,4 +82,5 @@
 class AsmExpr;
 class UntypedValofExpr;
+class CompoundLiteralExpr;
 
 class Type;
Index: src/SynTree/Visitor.cc
===================================================================
--- src/SynTree/Visitor.cc	(revision 5ba653c375e2294bf122e14010ce19e3f5bf5358)
+++ src/SynTree/Visitor.cc	(revision df2be83d21a308a102fed7e7bf6c267a2c4041ef)
@@ -10,6 +10,6 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Mar  2 17:29:23 2016
-// Update Count     : 16
+// Last Modified On : Fri Apr  1 18:05:13 2016
+// Update Count     : 18
 //
 
@@ -289,4 +289,10 @@
 }
 
+void Visitor::visit( CompoundLiteralExpr *compLitExpr ) {
+	acceptAll( compLitExpr->get_results(), *this );
+	maybeAccept( compLitExpr->get_type(), *this );
+	maybeAccept( compLitExpr->get_initializer(), *this );
+}
+
 void Visitor::visit( VoidType *voidType ) {
 	acceptAll( voidType->get_forall(), *this );
Index: src/SynTree/Visitor.h
===================================================================
--- src/SynTree/Visitor.h	(revision 5ba653c375e2294bf122e14010ce19e3f5bf5358)
+++ src/SynTree/Visitor.h	(revision df2be83d21a308a102fed7e7bf6c267a2c4041ef)
@@ -10,6 +10,6 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Mar  2 17:33:35 2016
-// Update Count     : 6
+// Last Modified On : Fri Apr  1 17:26:55 2016
+// Update Count     : 7
 //
 
@@ -77,4 +77,5 @@
 	virtual void visit( AsmExpr *asmExpr );
 	virtual void visit( UntypedValofExpr *valofExpr );
+	virtual void visit( CompoundLiteralExpr *compLitExpr );
 
 	virtual void visit( VoidType *basicType );
Index: src/examples/rational.c
===================================================================
--- src/examples/rational.c	(revision 5ba653c375e2294bf122e14010ce19e3f5bf5358)
+++ src/examples/rational.c	(revision df2be83d21a308a102fed7e7bf6c267a2c4041ef)
@@ -6,11 +6,11 @@
 // file "LICENCE" distributed with Cforall.
 // 
-// rational.c -- 
+// rational.c -- test rational number package
 // 
 // Author           : Peter A. Buhr
 // Created On       : Mon Mar 28 08:43:12 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Apr  7 17:25:44 2016
-// Update Count     : 20
+// Last Modified On : Fri Apr  8 11:27:48 2016
+// Update Count     : 21
 // 
 
Index: src/libcfa/rational
===================================================================
--- src/libcfa/rational	(revision 5ba653c375e2294bf122e14010ce19e3f5bf5358)
+++ src/libcfa/rational	(revision df2be83d21a308a102fed7e7bf6c267a2c4041ef)
@@ -5,30 +5,38 @@
 // file "LICENCE" distributed with Cforall.
 // 
-// rational -- 
+// rational -- Rational numbers are numbers written as a ratio, i.e., as a fraction, where the numerator (top number)
+//     and the denominator (bottom number) are whole numbers. When creating and computing with rational numbers, results
+//     are constantly reduced to keep the numerator and denominator as small as possible.
 // 
 // Author           : Peter A. Buhr
 // Created On       : Wed Apr  6 17:56:25 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Apr  7 17:23:36 2016
-// Update Count     : 9
+// Last Modified On : Fri Apr  8 11:38:27 2016
+// Update Count     : 15
 // 
 
 #include "iostream"
 
+// implementation
 struct Rational {
 	long int numerator, denominator;					// invariant: denominator > 0
 }; // Rational
 
+// constants
 extern struct Rational 0;
 extern struct Rational 1;
 
-long int gcd( long int a, long int b );
-long int simplify( long int *n, long int *d );
-Rational rational();									// constructor
-Rational rational( long int n );						// constructor
-Rational rational( long int n, long int d );			// constructor
+// constructors
+Rational rational();
+Rational rational( long int n );
+Rational rational( long int n, long int d );
+
+// getter/setter for numerator/denominator
 long int numerator( Rational r );
 long int numerator( Rational r, long int n );
+long int denominator( Rational r );
 long int denominator( Rational r, long int d );
+
+// comparison
 int ?==?( Rational l, Rational r );
 int ?!=?( Rational l, Rational r );
@@ -37,4 +45,6 @@
 int ?>?( Rational l, Rational r );
 int ?>=?( Rational l, Rational r );
+
+// arithmetic
 Rational -?( Rational r );
 Rational ?+?( Rational l, Rational r );
@@ -42,6 +52,10 @@
 Rational ?*?( Rational l, Rational r );
 Rational ?/?( Rational l, Rational r );
+
+// conversion
 double widen( Rational r );
 Rational narrow( double f, long int md );
+
+// I/O
 forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, Rational * );
 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, Rational );
Index: src/libcfa/rational.c
===================================================================
--- src/libcfa/rational.c	(revision 5ba653c375e2294bf122e14010ce19e3f5bf5358)
+++ src/libcfa/rational.c	(revision df2be83d21a308a102fed7e7bf6c267a2c4041ef)
@@ -11,6 +11,6 @@
 // Created On       : Wed Apr  6 17:54:28 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Apr  7 17:28:03 2016
-// Update Count     : 12
+// Last Modified On : Fri Apr  8 17:35:05 2016
+// Update Count     : 18
 // 
 
@@ -23,11 +23,15 @@
 } // extern
 
+
+// constants
+
 struct Rational 0 = {0, 1};
 struct Rational 1 = {1, 1};
 
-// Calculate the greatest common denominator of two numbers, the first of which may be negative.  It is used to reduce
-// rationals.
-
-long int gcd( long int a, long int b ) {
+
+// helper
+
+// Calculate greatest common denominator of two numbers, the first of which may be negative. Used to reduce rationals.
+static long int gcd( long int a, long int b ) {
     for ( ;; ) {										// Euclid's algorithm
 		long int r = a % b;
@@ -39,5 +43,5 @@
 } // gcd
 
-long int simplify( long int *n, long int *d ) {
+static long int simplify( long int *n, long int *d ) {
     if ( *d == 0 ) {
 		serr | "Invalid rational number construction: denominator cannot be equal to 0." | endl;
@@ -48,22 +52,22 @@
 } // Rationalnumber::simplify
 
-Rational rational() {									// constructor
-//    r = (Rational){ 0, 1 };
-	Rational t = { 0, 1 };
-	return t;
+
+// constructors
+
+Rational rational() {
+    return (Rational){ 0, 1 };
 } // rational
 
-Rational rational( long int n ) {						// constructor
-//    r = (Rational){ n, 1 };
-	Rational t = { n, 1 };
-	return t;
+Rational rational( long int n ) {
+    return (Rational){ n, 1 };
 } // rational
 
-Rational rational( long int n, long int d ) {			// constructor
+Rational rational( long int n, long int d ) {
     long int t = simplify( &n, &d );					// simplify
-//    r = (Rational){ n / t, d / t };
-	Rational t = { n / t, d / t };
-	return t;
+    return (Rational){ n / t, d / t };
 } // rational
+
+
+// getter/setter for numerator/denominator
 
 long int numerator( Rational r ) {
@@ -79,4 +83,8 @@
 } // numerator
 
+long int denominator( Rational r ) {
+    return r.denominator;
+} // denominator
+
 long int denominator( Rational r, long int d ) {
     long int prev = r.denominator;
@@ -87,4 +95,7 @@
 } // denominator
 
+
+// comparison
+
 int ?==?( Rational l, Rational r ) {
     return l.numerator * r.denominator == l.denominator * r.numerator;
@@ -110,4 +121,7 @@
     return ! ( l < r );
 } // ?>=?
+
+
+// arithmetic
 
 Rational -?( Rational r ) {
@@ -149,4 +163,7 @@
     return t;
 } // ?/?
+
+
+// conversion
 
 double widen( Rational r ) {
@@ -188,4 +205,7 @@
 } // narrow
 
+
+// I/O
+
 forall( dtype istype | istream( istype ) )
 istype * ?|?( istype *is, Rational *r ) {
