% "chapters/value.tex"
%	$Id: value.tex,v 1.2 2005/05/08 20:50:41 fang Exp $

\chapter{Parameter Values}
\label{sec:values}

The chapter describes the format of values and value collections.  
\pint s and \pbool s have value semantics, and thus, 
are treated differently than physical instances, which have alias semantics.  

% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
\section{Value Collections}
\label{sec:values:collection}

Value collections are very similar in structure to 
virtual instance collections, 
described in Section~\ref{sec:instance:collection}.

\begin{enumerate}
\item pointer: back-reference to parent namespace or definition
\item string: name of this value collection
\item map of value entries that are created and evaluated
	during the unroll phase.
	Each map entry contains:
	\begin{enumerate}
	\item the index (key) with which it is associated
	\item value stored
	\item instantation flag
		(whether or not the entry has
		truly been created\footnote{This is an artifact of
		\hackt's current implementation, 
		and may be removed in the future.})
	\item valid flag (whether or not value has actually been set)
	\end{enumerate}
\end{enumerate}

For \pint s, the stored value is an integer (4B), 
and for \pbool s, the boolean value and two boolean flag 
are packed together into one byte.  

% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
\section{Value References}
\label{sec:values:reference}

Value references are classified as expressions.  
The content of value references is structured like 
virtual instance references.  

\begin{enumerate}
\item integer (4B): an index into the instantiation statement list
	indicating which statements were in effect (visible) at the
	point of reference.  (This is for catching errors that cannot
	be statically resolved, and can only be resolved at unroll time.)
\item pointer to the (type-specific) referenced value collection
\item pointer to list of index pointers,
	where the individual index pointers may be
	pointers to single integers or integer ranges.
\end{enumerate}

% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %



