\documentstyle[makeidx]{article}
\makeindex
%\setlength{\oddsidemargin}{.5in}
%\setlength{\evensidemargin}{.5in}
%\setlength{\textwidth}{5.8in}
\begin{document}
%\setlength{\parindent}{0pt}
%\newcounter{bean}
%\begin{list}{\arabic{bean}.}{\usecounter{bean}\setlength{\leftmargin}{0pt}\setlength{\rightmargin}{0pt}\setlength{\listparindent}{20pt}\setlength{\parsep}{5pt}}
%\item[]

\begin{verbatim};; Modified to remove the calls of DO-MUTUAL, which are now commented out.
;; The forms below them in capital letters are presumably the ones that DO-MUTUAL
;; generated.

; *************************************
;  Functions on Integers and Rationals
; *************************************

; integer and rational libraries
\end{verbatim}
\noindent{\sc Event}:   Start with the library {\tt{"r2"}}.

\addvspace{18pt}

\begin{tabbing}{\sc Definition}:\index{ipower} \\  
\=\+{\rm{ipower}}\,({\it{x\/}}, {\it{e\/}})\index{ipower} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{e\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\tt{1}} \\ 
{\bf else }{\rm{itimes}}\,({\it{x\/}}, {\rm{ipower}}\,({\it{x\/}}, {\it{e\/}} $-\;1$)\index{ipower})\index{itimes}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{rpower} \\  
\=\+{\rm{rpower}}\,({\it{x\/}}, {\it{e\/}})\index{rpower} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{e\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\rm{rational}}\,({\tt{1}}, {\tt{1}})\index{rational} \\ 
{\bf else }{\rm{rtimes}}\,({\it{x\/}}, {\rm{rpower}}\,({\it{x\/}}, {\it{e\/}} $-\;1$)\index{rpower})\index{rtimes}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{rleq}$\;\;$
{\rm{rleq}}\,({\it{x\/}}, {\it{y\/}})\index{rleq} $=$ ({\rm{rlessp}}\,({\it{x\/}}, {\it{y\/}})\index{rlessp} $\vee$ {\rm{requal}}\,({\it{x\/}}, {\it{y\/}})\index{requal})
\end{tabbing}



\begin{verbatim};; *****************
;;  ASCII characters
;; *****************

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{ascii\_nul}$\;\;$
{\sc{ascii\_nul}}\index{ascii\_nul} $=$ {\tt{0}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_soh}$\;\;$
{\sc{ascii\_soh}}\index{ascii\_soh} $=$ {\tt{1}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_stx}$\;\;$
{\sc{ascii\_stx}}\index{ascii\_stx} $=$ {\tt{2}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_etx}$\;\;$
{\sc{ascii\_etx}}\index{ascii\_etx} $=$ {\tt{3}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_eot}$\;\;$
{\sc{ascii\_eot}}\index{ascii\_eot} $=$ {\tt{4}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_enq}$\;\;$
{\sc{ascii\_enq}}\index{ascii\_enq} $=$ {\tt{5}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_ack}$\;\;$
{\sc{ascii\_ack}}\index{ascii\_ack} $=$ {\tt{6}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_bel}$\;\;$
{\sc{ascii\_bel}}\index{ascii\_bel} $=$ {\tt{7}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_bs}$\;\;$
{\sc{ascii\_bs}}\index{ascii\_bs} $=$ {\tt{8}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_ht}$\;\;$
{\sc{ascii\_ht}}\index{ascii\_ht} $=$ {\tt{9}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_lf}$\;\;$
{\sc{ascii\_lf}}\index{ascii\_lf} $=$ {\tt{10}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_vt}$\;\;$
{\sc{ascii\_vt}}\index{ascii\_vt} $=$ {\tt{11}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_ff}$\;\;$
{\sc{ascii\_ff}}\index{ascii\_ff} $=$ {\tt{12}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_cr}$\;\;$
{\sc{ascii\_cr}}\index{ascii\_cr} $=$ {\tt{13}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_so}$\;\;$
{\sc{ascii\_so}}\index{ascii\_so} $=$ {\tt{14}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_si}$\;\;$
{\sc{ascii\_si}}\index{ascii\_si} $=$ {\tt{15}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_dle}$\;\;$
{\sc{ascii\_dle}}\index{ascii\_dle} $=$ {\tt{16}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_dc1}$\;\;$
{\sc{ascii\_dc1}}\index{ascii\_dc1} $=$ {\tt{17}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_dc2}$\;\;$
{\sc{ascii\_dc2}}\index{ascii\_dc2} $=$ {\tt{18}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_dc3}$\;\;$
{\sc{ascii\_dc3}}\index{ascii\_dc3} $=$ {\tt{19}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_dc4}$\;\;$
{\sc{ascii\_dc4}}\index{ascii\_dc4} $=$ {\tt{20}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_nak}$\;\;$
{\sc{ascii\_nak}}\index{ascii\_nak} $=$ {\tt{21}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_syn}$\;\;$
{\sc{ascii\_syn}}\index{ascii\_syn} $=$ {\tt{22}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_etb}$\;\;$
{\sc{ascii\_etb}}\index{ascii\_etb} $=$ {\tt{23}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_can}$\;\;$
{\sc{ascii\_can}}\index{ascii\_can} $=$ {\tt{24}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_em}$\;\;$
{\sc{ascii\_em}}\index{ascii\_em} $=$ {\tt{25}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_sub}$\;\;$
{\sc{ascii\_sub}}\index{ascii\_sub} $=$ {\tt{26}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_esc}$\;\;$
{\sc{ascii\_esc}}\index{ascii\_esc} $=$ {\tt{27}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_fs}$\;\;$
{\sc{ascii\_fs}}\index{ascii\_fs} $=$ {\tt{28}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_gs}$\;\;$
{\sc{ascii\_gs}}\index{ascii\_gs} $=$ {\tt{29}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_rs}$\;\;$
{\sc{ascii\_rs}}\index{ascii\_rs} $=$ {\tt{30}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_us}$\;\;$
{\sc{ascii\_us}}\index{ascii\_us} $=$ {\tt{31}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_space}$\;\;$
{\sc{ascii\_space}}\index{ascii\_space} $=$ {\tt{32}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_exclamation\_point}$\;\;$
{\sc{ascii\_exclamation\_point}}\index{ascii\_exclamation\_point} $=$ {\tt{33}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_double\_quote}$\;\;$
{\sc{ascii\_double\_quote}}\index{ascii\_double\_quote} $=$ {\tt{34}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_number\_sign}$\;\;$
{\sc{ascii\_number\_sign}}\index{ascii\_number\_sign} $=$ {\tt{35}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_dollar}$\;\;$
{\sc{ascii\_dollar}}\index{ascii\_dollar} $=$ {\tt{36}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_percent}$\;\;$
{\sc{ascii\_percent}}\index{ascii\_percent} $=$ {\tt{37}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_and}$\;\;$
{\sc{ascii\_and}}\index{ascii\_and} $=$ {\tt{38}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_single\_quote}$\;\;$
{\sc{ascii\_single\_quote}}\index{ascii\_single\_quote} $=$ {\tt{39}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_open\_paren}$\;\;$
{\sc{ascii\_open\_paren}}\index{ascii\_open\_paren} $=$ {\tt{40}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_close\_paren}$\;\;$
{\sc{ascii\_close\_paren}}\index{ascii\_close\_paren} $=$ {\tt{41}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_star}$\;\;$
{\sc{ascii\_star}}\index{ascii\_star} $=$ {\tt{42}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_plus}$\;\;$
{\sc{ascii\_plus}}\index{ascii\_plus} $=$ {\tt{43}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_comma}$\;\;$
{\sc{ascii\_comma}}\index{ascii\_comma} $=$ {\tt{44}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_dash}$\;\;$
{\sc{ascii\_dash}}\index{ascii\_dash} $=$ {\tt{45}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_dot}$\;\;$
{\sc{ascii\_dot}}\index{ascii\_dot} $=$ {\tt{46}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_slash}$\;\;$
{\sc{ascii\_slash}}\index{ascii\_slash} $=$ {\tt{47}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_0}$\;\;$
{\sc{ascii\_0}}\index{ascii\_0} $=$ {\tt{48}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_1}$\;\;$
{\sc{ascii\_1}}\index{ascii\_1} $=$ {\tt{49}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_2}$\;\;$
{\sc{ascii\_2}}\index{ascii\_2} $=$ {\tt{50}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_3}$\;\;$
{\sc{ascii\_3}}\index{ascii\_3} $=$ {\tt{51}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_4}$\;\;$
{\sc{ascii\_4}}\index{ascii\_4} $=$ {\tt{52}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_5}$\;\;$
{\sc{ascii\_5}}\index{ascii\_5} $=$ {\tt{53}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_6}$\;\;$
{\sc{ascii\_6}}\index{ascii\_6} $=$ {\tt{54}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_7}$\;\;$
{\sc{ascii\_7}}\index{ascii\_7} $=$ {\tt{55}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_8}$\;\;$
{\sc{ascii\_8}}\index{ascii\_8} $=$ {\tt{56}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_9}$\;\;$
{\sc{ascii\_9}}\index{ascii\_9} $=$ {\tt{57}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_colon}$\;\;$
{\sc{ascii\_colon}}\index{ascii\_colon} $=$ {\tt{58}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_semicolon}$\;\;$
{\sc{ascii\_semicolon}}\index{ascii\_semicolon} $=$ {\tt{59}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_lt}$\;\;$
{\sc{ascii\_lt}}\index{ascii\_lt} $=$ {\tt{60}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_equal}$\;\;$
{\sc{ascii\_equal}}\index{ascii\_equal} $=$ {\tt{61}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_gt}$\;\;$
{\sc{ascii\_gt}}\index{ascii\_gt} $=$ {\tt{62}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_question}$\;\;$
{\sc{ascii\_question}}\index{ascii\_question} $=$ {\tt{63}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_at}$\;\;$
{\sc{ascii\_at}}\index{ascii\_at} $=$ {\tt{64}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_a}$\;\;$
{\sc{ascii\_a}}\index{ascii\_a} $=$ {\tt{65}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_b}$\;\;$
{\sc{ascii\_b}}\index{ascii\_b} $=$ {\tt{66}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_c}$\;\;$
{\sc{ascii\_c}}\index{ascii\_c} $=$ {\tt{67}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_d}$\;\;$
{\sc{ascii\_d}}\index{ascii\_d} $=$ {\tt{68}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_e}$\;\;$
{\sc{ascii\_e}}\index{ascii\_e} $=$ {\tt{69}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_f}$\;\;$
{\sc{ascii\_f}}\index{ascii\_f} $=$ {\tt{70}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_g}$\;\;$
{\sc{ascii\_g}}\index{ascii\_g} $=$ {\tt{71}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_h}$\;\;$
{\sc{ascii\_h}}\index{ascii\_h} $=$ {\tt{72}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_i}$\;\;$
{\sc{ascii\_i}}\index{ascii\_i} $=$ {\tt{73}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_j}$\;\;$
{\sc{ascii\_j}}\index{ascii\_j} $=$ {\tt{74}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_k}$\;\;$
{\sc{ascii\_k}}\index{ascii\_k} $=$ {\tt{75}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_l}$\;\;$
{\sc{ascii\_l}}\index{ascii\_l} $=$ {\tt{76}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_m}$\;\;$
{\sc{ascii\_m}}\index{ascii\_m} $=$ {\tt{77}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_n}$\;\;$
{\sc{ascii\_n}}\index{ascii\_n} $=$ {\tt{78}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_o}$\;\;$
{\sc{ascii\_o}}\index{ascii\_o} $=$ {\tt{79}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_p}$\;\;$
{\sc{ascii\_p}}\index{ascii\_p} $=$ {\tt{80}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_q}$\;\;$
{\sc{ascii\_q}}\index{ascii\_q} $=$ {\tt{81}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_r}$\;\;$
{\sc{ascii\_r}}\index{ascii\_r} $=$ {\tt{82}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_s}$\;\;$
{\sc{ascii\_s}}\index{ascii\_s} $=$ {\tt{83}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_t}$\;\;$
{\sc{ascii\_t}}\index{ascii\_t} $=$ {\tt{84}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_u}$\;\;$
{\sc{ascii\_u}}\index{ascii\_u} $=$ {\tt{85}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_v}$\;\;$
{\sc{ascii\_v}}\index{ascii\_v} $=$ {\tt{86}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_w}$\;\;$
{\sc{ascii\_w}}\index{ascii\_w} $=$ {\tt{87}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_x}$\;\;$
{\sc{ascii\_x}}\index{ascii\_x} $=$ {\tt{88}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_y}$\;\;$
{\sc{ascii\_y}}\index{ascii\_y} $=$ {\tt{89}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_z}$\;\;$
{\sc{ascii\_z}}\index{ascii\_z} $=$ {\tt{90}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_open\_bracket}$\;\;$
{\sc{ascii\_open\_bracket}}\index{ascii\_open\_bracket} $=$ {\tt{91}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_backslash}$\;\;$
{\sc{ascii\_backslash}}\index{ascii\_backslash} $=$ {\tt{92}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_close\_bracket}$\;\;$
{\sc{ascii\_close\_bracket}}\index{ascii\_close\_bracket} $=$ {\tt{93}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_caret}$\;\;$
{\sc{ascii\_caret}}\index{ascii\_caret} $=$ {\tt{94}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_underscore}$\;\;$
{\sc{ascii\_underscore}}\index{ascii\_underscore} $=$ {\tt{95}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_back\_quote}$\;\;$
{\sc{ascii\_back\_quote}}\index{ascii\_back\_quote} $=$ {\tt{96}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_lc\_a}$\;\;$
{\sc{ascii\_lc\_a}}\index{ascii\_lc\_a} $=$ {\tt{97}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_lc\_b}$\;\;$
{\sc{ascii\_lc\_b}}\index{ascii\_lc\_b} $=$ {\tt{98}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_lc\_c}$\;\;$
{\sc{ascii\_lc\_c}}\index{ascii\_lc\_c} $=$ {\tt{99}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_lc\_d}$\;\;$
{\sc{ascii\_lc\_d}}\index{ascii\_lc\_d} $=$ {\tt{100}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_lc\_e}$\;\;$
{\sc{ascii\_lc\_e}}\index{ascii\_lc\_e} $=$ {\tt{101}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_lc\_f}$\;\;$
{\sc{ascii\_lc\_f}}\index{ascii\_lc\_f} $=$ {\tt{102}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_lc\_g}$\;\;$
{\sc{ascii\_lc\_g}}\index{ascii\_lc\_g} $=$ {\tt{103}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_lc\_h}$\;\;$
{\sc{ascii\_lc\_h}}\index{ascii\_lc\_h} $=$ {\tt{104}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_lc\_i}$\;\;$
{\sc{ascii\_lc\_i}}\index{ascii\_lc\_i} $=$ {\tt{105}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_lc\_j}$\;\;$
{\sc{ascii\_lc\_j}}\index{ascii\_lc\_j} $=$ {\tt{106}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_lc\_k}$\;\;$
{\sc{ascii\_lc\_k}}\index{ascii\_lc\_k} $=$ {\tt{107}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_lc\_l}$\;\;$
{\sc{ascii\_lc\_l}}\index{ascii\_lc\_l} $=$ {\tt{108}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_lc\_m}$\;\;$
{\sc{ascii\_lc\_m}}\index{ascii\_lc\_m} $=$ {\tt{109}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_lc\_n}$\;\;$
{\sc{ascii\_lc\_n}}\index{ascii\_lc\_n} $=$ {\tt{110}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_lc\_o}$\;\;$
{\sc{ascii\_lc\_o}}\index{ascii\_lc\_o} $=$ {\tt{111}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_lc\_p}$\;\;$
{\sc{ascii\_lc\_p}}\index{ascii\_lc\_p} $=$ {\tt{112}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_lc\_q}$\;\;$
{\sc{ascii\_lc\_q}}\index{ascii\_lc\_q} $=$ {\tt{113}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_lc\_r}$\;\;$
{\sc{ascii\_lc\_r}}\index{ascii\_lc\_r} $=$ {\tt{114}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_lc\_s}$\;\;$
{\sc{ascii\_lc\_s}}\index{ascii\_lc\_s} $=$ {\tt{115}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_lc\_t}$\;\;$
{\sc{ascii\_lc\_t}}\index{ascii\_lc\_t} $=$ {\tt{116}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_lc\_u}$\;\;$
{\sc{ascii\_lc\_u}}\index{ascii\_lc\_u} $=$ {\tt{117}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_lc\_v}$\;\;$
{\sc{ascii\_lc\_v}}\index{ascii\_lc\_v} $=$ {\tt{118}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_lc\_w}$\;\;$
{\sc{ascii\_lc\_w}}\index{ascii\_lc\_w} $=$ {\tt{119}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_lc\_x}$\;\;$
{\sc{ascii\_lc\_x}}\index{ascii\_lc\_x} $=$ {\tt{120}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_lc\_y}$\;\;$
{\sc{ascii\_lc\_y}}\index{ascii\_lc\_y} $=$ {\tt{121}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_lc\_z}$\;\;$
{\sc{ascii\_lc\_z}}\index{ascii\_lc\_z} $=$ {\tt{122}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_open\_brace}$\;\;$
{\sc{ascii\_open\_brace}}\index{ascii\_open\_brace} $=$ {\tt{123}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_vertical\_bar}$\;\;$
{\sc{ascii\_vertical\_bar}}\index{ascii\_vertical\_bar} $=$ {\tt{124}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_close\_brace}$\;\;$
{\sc{ascii\_close\_brace}}\index{ascii\_close\_brace} $=$ {\tt{125}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_tilde}$\;\;$
{\sc{ascii\_tilde}}\index{ascii\_tilde} $=$ {\tt{126}}
\end{tabbing}
\begin{tabbing}{\sc Definition}:\index{ascii\_del}$\;\;$
{\sc{ascii\_del}}\index{ascii\_del} $=$ {\tt{127}}
\end{tabbing}



\begin{verbatim};; ***********
;;  Utilities
;; ***********

; ---------------------------------
;  ASCII character (list) utilities
; ---------------------------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{ascii\_characterp} \\  
{\rm{ascii\_characterp}}\,({\it{c\/}})\index{ascii\_characterp} $=$ (({\it{c\/}} $\in\;${\bf{N}}${}$) $\wedge$ ({\tt{0}} $\leq$ {\it{c\/}}) $\wedge$ ({\it{c\/}} $\leq$ {\tt{127}}))
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{ascii\_character\_listp} \\  
\=\+{\rm{ascii\_character\_listp}}\,({\it{x\/}})\index{ascii\_character\_listp} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\it{x\/}} $=$ {\tt{0}} \\ 
{\bf else }\=\+{\rm{ascii\_characterp}}\,({\rm{car}}\,({\it{x\/}}))\index{ascii\_characterp} \\ 
$\wedge$$\;\;\;\;${\rm{ascii\_character\_listp}}\,({\rm{cdr}}\,({\it{x\/}}))\index{ascii\_character\_listp}\-$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{is\_digit} \\  
{\rm{is\_digit}}\,({\it{x\/}})\index{is\_digit} $=$ (({\it{x\/}} $\in\;${\bf{N}}${}$) $\wedge$ ({\sc{ascii\_0}}\index{ascii\_0} $\leq$ {\it{x\/}}) $\wedge$ ({\it{x\/}} $\leq$ {\sc{ascii\_9}}\index{ascii\_9}))
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{is\_letter} \\  
\=\+{\rm{is\_letter}}\,({\it{x\/}})\index{is\_letter} \\ 
$=$$\;\;\;\;$(\=\+({\it{x\/}} $\in\;${\bf{N}}${}$) \\ 
$\wedge$$\;\;\;\;$(\=\+(({\sc{ascii\_a}}\index{ascii\_a} $\leq$ {\it{x\/}}) $\wedge$ ({\it{x\/}} $\leq$ {\sc{ascii\_z}}\index{ascii\_z})) \\ 
$\vee$$\;\;\;\;$(({\sc{ascii\_lc\_a}}\index{ascii\_lc\_a} $\leq$ {\it{x\/}}) $\wedge$ ({\it{x\/}} $\leq$ {\sc{ascii\_lc\_z}}\index{ascii\_lc\_z})))\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{printable\_char\_ordp} \\  
\=\+{\rm{printable\_char\_ordp}}\,({\it{x\/}})\index{printable\_char\_ordp} \\ 
$=$$\;\;\;\;$(({\it{x\/}} $\in\;${\bf{N}}${}$) $\wedge$ ({\sc{ascii\_space}}\index{ascii\_space} $\leq$ {\it{x\/}}) $\wedge$ ({\it{x\/}} $\leq$ {\sc{ascii\_tilde}}\index{ascii\_tilde}))\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{upper\_case} \\  
\=\+{\rm{upper\_case}}\,({\it{c\/}})\index{upper\_case} \\ 
$=$$\;\;\;\;$\=\+{\bf if }({\sc{ascii\_lc\_a}}\index{ascii\_lc\_a} $\leq$ {\it{c\/}}) $\wedge$ ({\it{c\/}} $\leq$ {\sc{ascii\_lc\_z}}\index{ascii\_lc\_z})$\;\;${\bf then }{\it{c\/}} $-$ {\tt{32}} \\ 
{\bf else }{\it{c\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{uc\_list} \\  
\=\+{\rm{uc\_list}}\,({\it{u\/}})\index{uc\_list} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{u\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\it{u\/}} \\ 
{\bf else }{\rm{cons}}\,({\rm{upper\_case}}\,({\rm{car}}\,({\it{u\/}}))\index{upper\_case}, {\rm{uc\_list}}\,({\rm{cdr}}\,({\it{u\/}}))\index{uc\_list})$\;${\bf  endif}\-\-
\end{tabbing}



\begin{verbatim}; ------------------
;  Number Utilities
; ------------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{number\_list2} \\  
\=\+{\rm{number\_list2}}\,({\it{hi\/}}, {\it{lo\/}}, {\it{nl\/}})\index{number\_list2} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{hi\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\rm{cons}}\,({\it{lo\/}}, {\it{nl\/}}) \\ 
{\bf else }{\rm{number\_list2}}\,({\it{hi\/}} $-\;1$, {\it{lo\/}}, {\rm{cons}}\,({\rm{iplus}}\,({\it{hi\/}}, {\it{lo\/}})\index{iplus}, {\it{nl\/}}))\index{number\_list2}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{number\_list} \\  
\=\+{\rm{number\_list}}\,({\it{lo\/}}, {\it{hi\/}})\index{number\_list} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{ileq}}\,({\it{lo\/}}, {\it{hi\/}})\index{ileq}$\;\;${\bf then }{\rm{number\_list2}}\,({\rm{idifference}}\,({\it{hi\/}}, {\it{lo\/}})\index{idifference}, {\it{lo\/}}, {\bf{nil}})\index{number\_list2} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{number\_to\_char\_list} \\  
\=\+{\rm{number\_to\_char\_list}}\,({\it{x\/}})\index{number\_to\_char\_list} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\in\;${\bf{N}}${}$ \\ 
{\bf then }\=\+{\bf let }\=\+{\it{q\/}}{\bf $\;$ be$\;\;$}{\it{x\/}} $\div$ {\tt{10}}, \\ 
{\it{r\/}}{\bf $\;$ be$\;\;$}{\rm{cons}}\,(({\it{x\/}} ${}${\bf{mod}}${}$ {\tt{10}}) $+$ {\sc{ascii\_0}}\index{ascii\_0}, {\tt{0}})\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{q\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\it{r\/}} \\ 
{\bf else }{\rm{append}}\,({\rm{number\_to\_char\_list}}\,({\it{q\/}})\index{number\_to\_char\_list}, {\it{r\/}})$\;${\bf  endif}\-$\;${\bf  endlet}\- \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}



\begin{verbatim}; ----------------
;  List Utilities
; ----------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{intersection} \\  
\=\+{\rm{intersection}}\,({\it{x\/}}, {\it{y\/}})\index{intersection} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf elseif }{\rm{car}}\,({\it{x\/}}) $\in$ {\it{y\/}}$\;\;${\bf then }{\rm{cons}}\,({\rm{car}}\,({\it{x\/}}), {\rm{intersection}}\,({\rm{cdr}}\,({\it{x\/}}), {\it{y\/}})\index{intersection}) \\ 
{\bf else }{\rm{intersection}}\,({\rm{cdr}}\,({\it{x\/}}), {\it{y\/}})\index{intersection}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{length} \\  
\=\+{\rm{length}}\,({\it{l\/}})\index{length} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{l\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\sc{zero}} \\ 
{\bf else }$1\;+$ {\rm{length}}\,({\rm{cdr}}\,({\it{l\/}}))\index{length}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{ncopies} \\  
\=\+{\rm{ncopies}}\,({\it{n\/}}, {\it{x\/}})\index{ncopies} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf else }{\rm{cons}}\,({\it{x\/}}, {\rm{ncopies}}\,({\it{n\/}} $-\;1$, {\it{x\/}})\index{ncopies})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{nth} \\  
\=\+{\rm{nth}}\,({\it{i\/}}, {\it{s\/}})\index{nth} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{s\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf elseif }{\it{i\/}} $=$ {\tt{1}}$\;\;${\bf then }{\rm{car}}\,({\it{s\/}}) \\ 
{\bf else }{\rm{nth}}\,({\it{i\/}} $-\;1$, {\rm{cdr}}\,({\it{s\/}}))\index{nth}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{rcar} \\  
\=\+{\rm{rcar}}\,({\it{x\/}})\index{rcar} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf elseif }{\rm{cdr}}\,({\it{x\/}}) $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\rm{car}}\,({\it{x\/}}) \\ 
{\bf else }{\rm{rcar}}\,({\rm{cdr}}\,({\it{x\/}}))\index{rcar}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{rcdr} \\  
\=\+{\rm{rcdr}}\,({\it{x\/}})\index{rcdr} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\it{x\/}} \\ 
{\bf elseif }{\rm{cdr}}\,({\it{x\/}}) $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\rm{cdr}}\,({\it{x\/}}) \\ 
{\bf else }{\rm{cons}}\,({\rm{car}}\,({\it{x\/}}), {\rm{rcdr}}\,({\rm{cdr}}\,({\it{x\/}}))\index{rcdr})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp\_rcdr \\ \index{lessp\_rcdr}
{\rm{listp}}\,({\it{s\/}}) $\rightarrow$ ({\rm{count}}\,({\rm{rcdr}}\,({\it{s\/}})\index{rcdr}) $<$ {\rm{count}}\,({\it{s\/}}))
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{rcons} \\  
\=\+{\rm{rcons}}\,({\it{x\/}}, {\it{y\/}})\index{rcons} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\rm{cons}}\,({\it{y\/}}, {\it{x\/}}) \\ 
{\bf else }{\rm{cons}}\,({\rm{car}}\,({\it{x\/}}), {\rm{rcons}}\,({\rm{cdr}}\,({\it{x\/}}), {\it{y\/}})\index{rcons})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rcar\_rcons \\ \index{rcar\_rcons}
{\rm{rcar}}\,({\rm{rcons}}\,({\it{x\/}}, {\it{y\/}})\index{rcons})\index{rcar} $=$ {\it{y\/}}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rcdr\_rcons \\ \index{rcdr\_rcons}
{\rm{rcdr}}\,({\rm{rcons}}\,({\it{x\/}}, {\it{y\/}})\index{rcons})\index{rcdr} $=$ {\it{x\/}}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{remove} \\  
\=\+{\rm{remove}}\,({\it{e\/}}, {\it{s\/}})\index{remove} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{s\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\it{s\/}} \\ 
{\bf elseif }{\rm{car}}\,({\it{s\/}}) $=$ {\it{e\/}}$\;\;${\bf then }{\rm{remove}}\,({\it{e\/}}, {\rm{cdr}}\,({\it{s\/}}))\index{remove} \\ 
{\bf else }{\rm{cons}}\,({\rm{car}}\,({\it{s\/}}), {\rm{remove}}\,({\it{e\/}}, {\rm{cdr}}\,({\it{s\/}}))\index{remove})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp\_remove\_length \\ \index{lessp\_remove\_length}
({\it{e\/}} $\in$ {\it{s\/}}) $\rightarrow$ ({\rm{length}}\,({\rm{remove}}\,({\it{e\/}}, {\it{s\/}})\index{remove})\index{length} $<$ {\rm{length}}\,({\it{s\/}})\index{length})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{set\_difference} \\  
\=\+{\rm{set\_difference}}\,({\it{x\/}}, {\it{y\/}})\index{set\_difference} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\it{x\/}} \\ 
{\bf elseif }{\rm{car}}\,({\it{x\/}}) $\in$ {\it{y\/}}$\;\;${\bf then }{\rm{set\_difference}}\,({\rm{cdr}}\,({\it{x\/}}), {\it{y\/}})\index{set\_difference} \\ 
{\bf else }{\rm{cons}}\,({\rm{car}}\,({\it{x\/}}), {\rm{set\_difference}}\,({\rm{cdr}}\,({\it{x\/}}), {\it{y\/}})\index{set\_difference})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{subsetp} \\  
\=\+{\rm{subsetp}}\,({\it{x\/}}, {\it{y\/}})\index{subsetp} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{t}} \\ 
{\bf else }({\rm{car}}\,({\it{x\/}}) $\in$ {\it{y\/}}) $\wedge$ {\rm{subsetp}}\,({\rm{cdr}}\,({\it{x\/}}), {\it{y\/}})\index{subsetp}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{set\_equal}$\;\;$
{\rm{set\_equal}}\,({\it{x\/}}, {\it{y\/}})\index{set\_equal} $=$ ({\rm{subsetp}}\,({\it{x\/}}, {\it{y\/}})\index{subsetp} $\wedge$ {\rm{subsetp}}\,({\it{y\/}}, {\it{x\/}})\index{subsetp})
\end{tabbing}



\begin{verbatim}; ****************
;  Key-Value Maps
; ****************

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{empty\_map}$\;\;$
{\sc{empty\_map}}\index{empty\_map} $=$ {\bf{nil}}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{map\_entry}$\;\;$
{\rm{map\_entry}}\,({\it{k\/}}, {\it{v\/}})\index{map\_entry} $=$ {\rm{cons}}\,({\it{k\/}}, {\it{v\/}})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{in\_map}$\;\;$
{\rm{in\_map}}\,({\it{m\/}}, {\it{k\/}})\index{in\_map} $=$ {\rm{assoc}}\,({\it{k\/}}, {\it{m\/}})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{add\_to\_map} \\  
\=\+{\rm{add\_to\_map}}\,({\it{m\/}}, {\it{k\/}}, {\it{v\/}})\index{add\_to\_map} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{m\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\rm{list}}\,({\rm{map\_entry}}\,({\it{k\/}}, {\it{v\/}})\index{map\_entry}) \\ 
{\bf elseif }{\rm{caar}}\,({\it{m\/}}) $=$ {\it{k\/}}$\;\;${\bf then }{\rm{cons}}\,({\rm{map\_entry}}\,({\it{k\/}}, {\it{v\/}})\index{map\_entry}, {\rm{cdr}}\,({\it{m\/}})) \\ 
{\bf else }{\rm{cons}}\,({\rm{car}}\,({\it{m\/}}), {\rm{add\_to\_map}}\,({\rm{cdr}}\,({\it{m\/}}), {\it{k\/}}, {\it{v\/}})\index{add\_to\_map})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mapped\_value} \\  
\=\+{\rm{mapped\_value}}\,({\it{m\/}}, {\it{k\/}})\index{mapped\_value} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{v\/}}{\bf $\;$ be$\;\;$}{\rm{assoc}}\,({\it{k\/}}, {\it{m\/}})\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{listp}}\,({\it{v\/}})$\;\;${\bf then }{\rm{cdr}}\,({\it{v\/}}) \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{all\_matches} \\  
\=\+{\rm{all\_matches}}\,({\it{k\/}}, {\it{m\/}})\index{all\_matches} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{m\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf elseif }{\it{k\/}} $=$ {\rm{caar}}\,({\it{m\/}})$\;\;${\bf then }{\rm{cons}}\,({\rm{cdar}}\,({\it{m\/}}), {\rm{all\_matches}}\,({\it{k\/}}, {\rm{cdr}}\,({\it{m\/}}))\index{all\_matches}) \\ 
{\bf else }{\rm{all\_matches}}\,({\it{k\/}}, {\rm{cdr}}\,({\it{m\/}}))\index{all\_matches}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{keys} \\  
\=\+{\rm{keys}}\,({\it{x\/}})\index{keys} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf else }{\rm{cons}}\,({\rm{caar}}\,({\it{x\/}}), {\rm{keys}}\,({\rm{cdr}}\,({\it{x\/}}))\index{keys})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{key\_values} \\  
\=\+{\rm{key\_values}}\,({\it{x\/}})\index{key\_values} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf else }{\rm{cons}}\,({\rm{cdar}}\,({\it{x\/}}), {\rm{key\_values}}\,({\rm{cdr}}\,({\it{x\/}}))\index{key\_values})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{key\_value\_mapp} \\  
\=\+{\rm{key\_value\_mapp}}\,({\it{m\/}})\index{key\_value\_mapp} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{m\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\it{m\/}} $=$ {\bf{nil}} \\ 
{\bf else }{\rm{listp}}\,({\rm{car}}\,({\it{m\/}})) $\wedge$ {\rm{key\_value\_mapp}}\,({\rm{cdr}}\,({\it{m\/}}))\index{key\_value\_mapp}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp\_keys \\ \index{lessp\_keys}
({\rm{key\_value\_mapp}}\,({\it{m\/}})\index{key\_value\_mapp} $\wedge$ {\rm{listp}}\,({\it{m\/}})) $\rightarrow$ ({\rm{count}}\,({\rm{keys}}\,({\it{m\/}})\index{keys}) $<$ {\rm{count}}\,({\it{m\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp\_key\_values \\ \index{lessp\_key\_values}
({\rm{key\_value\_mapp}}\,({\it{m\/}})\index{key\_value\_mapp} $\wedge$ {\rm{listp}}\,({\it{m\/}})) $\rightarrow$ ({\rm{count}}\,({\rm{key\_values}}\,({\it{m\/}})\index{key\_values}) $<$ {\rm{count}}\,({\it{m\/}}))
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{pair\_list\_map} \\  
\=\+{\rm{pair\_list\_map}}\,({\it{x\/}}, {\it{y\/}})\index{pair\_list\_map} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf else }{\rm{cons}}\,({\rm{map\_entry}}\,({\rm{car}}\,({\it{x\/}}), {\rm{car}}\,({\it{y\/}}))\index{map\_entry}, {\rm{pair\_list\_map}}\,({\rm{cdr}}\,({\it{x\/}}), {\rm{cdr}}\,({\it{y\/}}))\index{pair\_list\_map})$\;${\bf  endif}\-\-
\end{tabbing}



\begin{verbatim}; *******
;  Trees
; *******

\end{verbatim}
\noindent{\sc Event}:   Add the shell {\it{mk\_tree\/}}\index{mk\_tree}, with recognizer function symbol {\it{treep\/}} and 2 accessors: {\it{root\/}}, with type restriction (none-of) and default value false; {\it{subtrees\/}}, with type restriction (none-of) and default value false.

\addvspace{18pt}



\begin{verbatim}; *****************************
;  Productions and Parse Trees
; *****************************

; A grammar symbol is a litatom, representing either a terminal or a
; nonterminal in the grammar.  A terminal grammar symbol is called a token.

; (prodn x y) is the representation of "x ::= y" and
; (lhs (prodn x y)) = x & (rhs (prodn x y)) = y.
;
; The left-hand-side (lhs) of a production (prodn) is a nonterminal grammar
; symbol.  The right-hand-side (rhs) of a production is either a grammar
; symbol or a list of grammar symbols.  The grammar symbols in a production
; may be tagged (see below).  

\end{verbatim}
\noindent{\sc Event}:   Add the shell {\it{prodn\/}}\index{prodn}, with recognizer function symbol {\it{prodnp\/}} and 2 accessors: {\it{lhs\/}}, with type restriction (none-of) and default value false; {\it{rhs\/}}, with type restriction (none-of) and default value false.

\addvspace{18pt}


\begin{verbatim}; (tag grammar_symbol the_tag) constructs a tagged grammar symbol.
; (gsymbol (tag grammar_symbol the_tag)) = grammar_symbol and
; (label (tag grammar_symbol the_tag)) = the_tag.
;
; Grammar symbols in productions are tagged so that semantic functions can be
; converted mechanically to report form, where the tags are thought to clarify
; the presentation.


\end{verbatim}
\noindent{\sc Event}:   Add the shell {\it{tag\/}}\index{tag}, with recognizer function symbol {\it{taggedp\/}} and 2 accessors: {\it{gsymbol\/}}, with type restriction (none-of) and default value false; {\it{label\/}}, with type restriction (none-of) and default value false.

\addvspace{18pt}


\begin{verbatim}; (mk_tree r s) is the representation of a parse tree and
; (root (mk_tree r s)) = r & (subtrees (mk_tree r s)) = s.
;
; The root of a parse tree is a grammar symbol, representing a terminal or a
; nonterminal.  Grammar symbols in parse trees are not tagged.  If the root
; represents a terminal, the parse tree is a leaf and its subtrees part is a
; representation of the lexeme that matched the terminal grammar symbol
; (token).  Otherwise, the root represents a nonterminal, and the subtrees
; part is a parse tree or a list of parse trees.  



; ********************
;   Parse Tree Leaves
; ********************

; A leaf of a parse tree is a parse tree whose root is a terminal grammar
; symbol (token) and whose subtrees part is the list of characters (lexeme)
; that matched the token.  The last cdr of the character list should be zero,
; not nil.


\end{verbatim}\begin{tabbing}{\sc Definition}:\index{reserved\_words} \\  
\=\+{\sc{reserved\_words}}\index{reserved\_words} \\ 
$=$$\;\;\;\;${\tt{'}}{\tt{(}}\=\+{\tt{adjoin}}{\tt{ }}{\tt{all}}{\tt{ }}{\tt{and}}{\tt{ }}{\tt{append}}{\tt{ }}{\tt{array}}{\tt{ }}{\tt{assert}}{\tt{ }}{\tt{assume}}{\tt{ }}{\tt{await}} \\ 
{\tt{before}}{\tt{ }}{\tt{begin}}{\tt{ }}{\tt{behind}}{\tt{ }}{\tt{binary}}{\tt{ }}{\tt{block}}{\tt{ }}{\tt{buffer}}{\tt{ }}{\tt{case}}{\tt{ }}{\tt{cblock}} \\ 
{\tt{centry}}{\tt{ }}{\tt{cexit}}{\tt{ }}{\tt{cobegin}}{\tt{ }}{\tt{cond}}{\tt{ }}{\tt{const}}{\tt{ }}{\tt{decimal}}{\tt{ }}{\tt{difference}} \\ 
{\tt{div}}{\tt{ }}{\tt{each}}{\tt{ }}{\tt{element}}{\tt{ }}{\tt{elif}}{\tt{ }}{\tt{else}}{\tt{ }}{\tt{end}}{\tt{ }}{\tt{entry}}{\tt{ }}{\tt{eq}}{\tt{ }}{\tt{exit}}{\tt{ }}{\tt{extends}} \\ 
{\tt{fi}}{\tt{ }}{\tt{from}}{\tt{ }}{\tt{function}}{\tt{ }}{\tt{ge}}{\tt{ }}{\tt{give}}{\tt{ }}{\tt{gt}}{\tt{ }}{\tt{hex}}{\tt{ }}{\tt{hold}}{\tt{ }}{\tt{if}}{\tt{ }}{\tt{iff}}{\tt{ }}{\tt{imp}}{\tt{ }}{\tt{input}} \\ 
{\tt{in}}{\tt{ }}{\tt{into}}{\tt{ }}{\tt{initially}}{\tt{ }}{\tt{intersect}}{\tt{ }}{\tt{is}}{\tt{ }}{\tt{keep}}{\tt{ }}{\tt{le}}{\tt{ }}{\tt{leave}}{\tt{ }}{\tt{lemma}} \\ 
{\tt{loop}}{\tt{ }}{\tt{lt}}{\tt{ }}{\tt{mapomit}}{\tt{ }}{\tt{mapping}}{\tt{ }}{\tt{mod}}{\tt{ }}{\tt{move}}{\tt{ }}{\tt{name}}{\tt{ }}{\tt{ne}}{\tt{ }}{\tt{new}}{\tt{ }}{\tt{normal}} \\ 
{\tt{not}}{\tt{ }}{\tt{octal}}{\tt{ }}{\tt{of}}{\tt{ }}{\tt{omit}}{\tt{ }}{\tt{on}}{\tt{ }}{\tt{or}}{\tt{ }}{\tt{otherwise}}{\tt{ }}{\tt{output}}{\tt{ }}{\tt{pending}} \\ 
{\tt{procedure}}{\tt{ }}{\tt{prove}}{\tt{ }}{\tt{receive}}{\tt{ }}{\tt{record}}{\tt{ }}{\tt{remove}}{\tt{ }}{\tt{scope}}{\tt{ }}{\tt{send}}{\tt{ }}{\tt{seq}} \\ 
{\tt{seqomit}}{\tt{ }}{\tt{sequence}}{\tt{ }}{\tt{set}}{\tt{ }}{\tt{signal}}{\tt{ }}{\tt{some}}{\tt{ }}{\tt{sub}}{\tt{ }}{\tt{then}}{\tt{ }}{\tt{to}}{\tt{ }}{\tt{type}} \\ 
{\tt{union}}{\tt{ }}{\tt{unless}}{\tt{ }}{\tt{var}}{\tt{ }}{\tt{when}}{\tt{ }}{\tt{with}}{\tt{ }}{\tt{alias}}{\tt{ }}{\tt{export}}{\tt{ }}{\tt{import}} \\ 
{\tt{multiplecond}}{\tt{ }}{\tt{none}}{\tt{ }}{\tt{space}}{\tt{ }}{\tt{string}}{\tt{ }}{\tt{value}}{\tt{)}}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{special\_symbol\_map} \\  
\=\+{\sc{special\_symbol\_map}}\index{special\_symbol\_map} \\ 
$=$$\;\;\;\;${\rm{list}}\,(\=\+{\rm{cons}}\,({\tt{'}}{\tt{and}}, {\rm{cons}}\,({\sc{ascii\_and}}\index{ascii\_and}, {\tt{0}})), \\ 
{\rm{cons}}\,({\tt{'}}{\tt{append}}, {\rm{cons}}\,({\sc{ascii\_at}}\index{ascii\_at}, {\tt{0}})), \\ 
{\rm{cons}}\,({\tt{'}}{\tt{close\_paren}}, {\rm{cons}}\,({\sc{ascii\_close\_paren}}\index{ascii\_close\_paren}, {\tt{0}})), \\ 
{\rm{cons}}\,({\tt{'}}{\tt{colon}}, {\rm{cons}}\,({\sc{ascii\_colon}}\index{ascii\_colon}, {\tt{0}})), \\ 
{\rm{cons}}\,({\tt{'}}{\tt{colon\_equal}}, {\rm{cons}}\,({\sc{ascii\_colon}}\index{ascii\_colon}, {\rm{cons}}\,({\sc{ascii\_equal}}\index{ascii\_equal}, {\tt{0}}))), \\ 
{\rm{cons}}\,({\tt{'}}{\tt{colon\_gt}}, {\rm{cons}}\,({\sc{ascii\_colon}}\index{ascii\_colon}, {\rm{cons}}\,({\sc{ascii\_gt}}\index{ascii\_gt}, {\tt{0}}))), \\ 
{\rm{cons}}\,({\tt{'}}{\tt{comma}}, {\rm{cons}}\,({\sc{ascii\_comma}}\index{ascii\_comma}, {\tt{0}})), \\ 
{\rm{cons}}\,({\tt{'}}{\tt{dot}}, {\rm{cons}}\,({\sc{ascii\_dot}}\index{ascii\_dot}, {\tt{0}})), \\ 
{\rm{cons}}\,({\tt{'}}{\tt{dot\_dot}}, {\rm{cons}}\,({\sc{ascii\_dot}}\index{ascii\_dot}, {\rm{cons}}\,({\sc{ascii\_dot}}\index{ascii\_dot}, {\tt{0}}))), \\ 
{\rm{cons}}\,({\tt{'}}{\tt{equal}}, {\rm{cons}}\,({\sc{ascii\_equal}}\index{ascii\_equal}, {\tt{0}})), \\ 
{\rm{cons}}\,({\tt{'}}{\tt{gt}}, {\rm{cons}}\,({\sc{ascii\_gt}}\index{ascii\_gt}, {\tt{0}})), \\ 
{\rm{cons}}\,({\tt{'}}{\tt{imp}}, {\rm{cons}}\,({\sc{ascii\_dash}}\index{ascii\_dash}, {\rm{cons}}\,({\sc{ascii\_gt}}\index{ascii\_gt}, {\tt{0}}))), \\ 
{\rm{cons}}\,({\tt{'}}{\tt{lt}}, {\rm{cons}}\,({\sc{ascii\_lt}}\index{ascii\_lt}, {\tt{0}})), \\ 
{\rm{cons}}\,({\tt{'}}{\tt{lt\_colon}}, {\rm{cons}}\,({\sc{ascii\_lt}}\index{ascii\_lt}, {\rm{cons}}\,({\sc{ascii\_colon}}\index{ascii\_colon}, {\tt{0}}))), \\ 
{\rm{cons}}\,({\tt{'}}{\tt{minus}}, {\rm{cons}}\,({\sc{ascii\_dash}}\index{ascii\_dash}, {\tt{0}})), \\ 
{\rm{cons}}\,({\tt{'}}{\tt{open\_paren}}, {\rm{cons}}\,({\sc{ascii\_open\_paren}}\index{ascii\_open\_paren}, {\tt{0}})), \\ 
{\rm{cons}}\,({\tt{'}}{\tt{plus}}, {\rm{cons}}\,({\sc{ascii\_plus}}\index{ascii\_plus}, {\tt{0}})), \\ 
{\rm{cons}}\,({\tt{'}}{\tt{semi\_colon}}, {\rm{cons}}\,({\sc{ascii\_semicolon}}\index{ascii\_semicolon}, {\tt{0}})), \\ 
{\rm{cons}}\,({\tt{'}}{\tt{slash}}, {\rm{cons}}\,({\sc{ascii\_slash}}\index{ascii\_slash}, {\tt{0}})), \\ 
{\rm{cons}}\,({\tt{'}}{\tt{star}}, {\rm{cons}}\,({\sc{ascii\_star}}\index{ascii\_star}, {\tt{0}})), \\ 
{\rm{cons}}\,({\tt{'}}{\tt{star\_star}}, {\rm{cons}}\,({\sc{ascii\_star}}\index{ascii\_star}, {\rm{cons}}\,({\sc{ascii\_star}}\index{ascii\_star}, {\tt{0}}))))\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{special\_symbols}$\;\;$
{\sc{special\_symbols}}\index{special\_symbols} $=$ {\rm{keys}}\,({\sc{special\_symbol\_map}}\index{special\_symbol\_map})\index{keys}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{tokens} \\  
\=\+{\sc{tokens}}\index{tokens} \\ 
$=$$\;\;\;\;${\rm{append}}\,(\=\+{\tt{'}}{\tt{(}}\=\+{\tt{digit\_list}}{\tt{ }}{\tt{identifier}}{\tt{ }}{\tt{character\_value}} \\ 
{\tt{string\_value}}{\tt{ }}{\tt{entry\_value}}{\tt{)}}\-, \\ 
{\sc{reserved\_words}}\index{reserved\_words} $\cup$ {\sc{special\_symbols}}\index{special\_symbols})\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{tokenp}$\;\;$
{\rm{tokenp}}\,({\it{x\/}})\index{tokenp} $=$ ({\it{x\/}} $\in$ {\sc{tokens}}\index{tokens})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{leafp} \\  
\=\+{\rm{leafp}}\,({\it{x\/}})\index{leafp} \\ 
$=$$\;\;\;\;$({\rm{treep}}\,({\it{x\/}})\index{treep} $\wedge$ {\rm{tokenp}}\,({\rm{root}}\,({\it{x\/}})\index{root})\index{tokenp} $\wedge$ {\rm{ascii\_character\_listp}}\,({\rm{subtrees}}\,({\it{x\/}})\index{subtrees})\index{ascii\_character\_listp})\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{lexeme} \\  
\=\+{\rm{lexeme}}\,({\it{x\/}})\index{lexeme} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{leafp}}\,({\it{x\/}})\index{leafp}$\;\;${\bf then }{\rm{subtrees}}\,({\it{x\/}})\index{subtrees} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}



\begin{verbatim}; =========================
;  Recognizers for Lexemes
; =========================

; ----------------------
;  Reserved Word Lexeme
; ----------------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{reserved\_word\_lexemep} \\  
{\rm{reserved\_word\_lexemep}}\,({\it{x\/}})\index{reserved\_word\_lexemep} $=$ ({\rm{pack}}\,({\rm{uc\_list}}\,({\it{x\/}})\index{uc\_list}) $\in$ {\sc{reserved\_words}}\index{reserved\_words})
\end{tabbing}


\begin{verbatim}; -----------------------
;  Special Symbol Lexeme
; -----------------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{close\_bracket\_lexeme}$\;\;$
{\sc{close\_bracket\_lexeme}}\index{close\_bracket\_lexeme} $=$ {\rm{cons}}\,({\sc{ascii\_close\_bracket}}\index{ascii\_close\_bracket}, {\tt{0}})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{close\_paren\_lexeme}$\;\;$
{\sc{close\_paren\_lexeme}}\index{close\_paren\_lexeme} $=$ {\rm{cons}}\,({\sc{ascii\_close\_paren}}\index{ascii\_close\_paren}, {\tt{0}})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{open\_bracket\_lexeme}$\;\;$
{\sc{open\_bracket\_lexeme}}\index{open\_bracket\_lexeme} $=$ {\rm{cons}}\,({\sc{ascii\_open\_bracket}}\index{ascii\_open\_bracket}, {\tt{0}})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{open\_paren\_lexeme}$\;\;$
{\sc{open\_paren\_lexeme}}\index{open\_paren\_lexeme} $=$ {\rm{cons}}\,({\sc{ascii\_open\_paren}}\index{ascii\_open\_paren}, {\tt{0}})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{special\_symbol\_lexemes} \\  
\=\+{\sc{special\_symbol\_lexemes}}\index{special\_symbol\_lexemes} \\ 
$=$$\;\;\;\;${\rm{append}}\,(\=\+{\rm{list}}\,({\sc{open\_bracket\_lexeme}}\index{open\_bracket\_lexeme}, {\sc{close\_bracket\_lexeme}}\index{close\_bracket\_lexeme}), \\ 
{\rm{key\_values}}\,({\sc{special\_symbol\_map}}\index{special\_symbol\_map})\index{key\_values})\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{special\_symbol\_lexemep} \\  
{\rm{special\_symbol\_lexemep}}\,({\it{x\/}})\index{special\_symbol\_lexemep} $=$ ({\it{x\/}} $\in$ {\sc{special\_symbol\_lexemes}}\index{special\_symbol\_lexemes})
\end{tabbing}


\begin{verbatim}; ------------------------
;  Character Value Lexeme
; ------------------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{character\_value\_lexemep} \\  
\=\+{\rm{character\_value\_lexemep}}\,({\it{x\/}})\index{character\_value\_lexemep} \\ 
$=$$\;\;\;\;$(\=\+({\rm{length}}\,({\it{x\/}})\index{length} $=$ {\tt{3}}) \\ 
$\wedge$$\;\;\;\;$({\rm{car}}\,({\it{x\/}}) $=$ {\sc{ascii\_single\_quote}}\index{ascii\_single\_quote}) \\ 
$\wedge$$\;\;\;\;${\rm{printable\_char\_ordp}}\,({\rm{cadr}}\,({\it{x\/}}))\index{printable\_char\_ordp} \\ 
$\wedge$$\;\;\;\;$({\rm{rcar}}\,({\it{x\/}})\index{rcar} $=$ {\sc{ascii\_single\_quote}}\index{ascii\_single\_quote}) \\ 
$\wedge$$\;\;\;\;$({\rm{cdddr}}\,({\it{x\/}}) $=$ {\tt{0}}))\-\-
\end{tabbing}


\begin{verbatim}; -------------------
;  Digit List Lexeme
; -------------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{is\_hexdigit} \\  
\=\+{\rm{is\_hexdigit}}\,({\it{d\/}})\index{is\_hexdigit} \\ 
$=$$\;\;\;\;$(\=\+{\rm{is\_digit}}\,({\it{d\/}})\index{is\_digit} \\ 
$\vee$$\;\;\;\;$(({\sc{ascii\_a}}\index{ascii\_a} $\leq$ {\rm{upper\_case}}\,({\it{d\/}})\index{upper\_case}) $\wedge$ ({\rm{upper\_case}}\,({\it{d\/}})\index{upper\_case} $\leq$ {\sc{ascii\_f}}\index{ascii\_f})))\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{is\_hexdigit\_list} \\  
\=\+{\rm{is\_hexdigit\_list}}\,({\it{x\/}})\index{is\_hexdigit\_list} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\it{x\/}} $=$ {\tt{0}} \\ 
{\bf else }{\rm{is\_hexdigit}}\,({\rm{car}}\,({\it{x\/}}))\index{is\_hexdigit} $\wedge$ {\rm{is\_hexdigit\_list}}\,({\rm{cdr}}\,({\it{x\/}}))\index{is\_hexdigit\_list}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{digit\_list\_lexemep} \\  
\=\+{\rm{digit\_list\_lexemep}}\,({\it{x\/}})\index{digit\_list\_lexemep} \\ 
$=$$\;\;\;\;$({\rm{listp}}\,({\it{x\/}}) $\wedge$ {\rm{is\_digit}}\,({\rm{car}}\,({\it{x\/}}))\index{is\_digit} $\wedge$ {\rm{is\_hexdigit\_list}}\,({\rm{cdr}}\,({\it{x\/}}))\index{is\_hexdigit\_list})\-
\end{tabbing}


\begin{verbatim}; ------------------------------------
;  Entry Value and Identifier Lexemes
; ------------------------------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{identifier\_lexeme\_form} \\  
\=\+{\rm{identifier\_lexeme\_form}}\,({\it{x\/}})\index{identifier\_lexeme\_form} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\it{x\/}} $=$ {\tt{0}} \\ 
{\bf elseif }{\rm{car}}\,({\it{x\/}}) $=$ {\sc{ascii\_underscore}}\index{ascii\_underscore} \\ 
{\bf then }\=\+{\rm{listp}}\,({\rm{cdr}}\,({\it{x\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{cadr}}\,({\it{x\/}}) $\not=$ {\sc{ascii\_underscore}}\index{ascii\_underscore}) \\ 
$\wedge$$\;\;\;\;${\rm{identifier\_lexeme\_form}}\,({\rm{cdr}}\,({\it{x\/}}))\index{identifier\_lexeme\_form}\- \\ 
{\bf else }\=\+({\rm{is\_letter}}\,({\rm{car}}\,({\it{x\/}}))\index{is\_letter} $\vee$ {\rm{is\_digit}}\,({\rm{car}}\,({\it{x\/}}))\index{is\_digit}) \\ 
$\wedge$$\;\;\;\;${\rm{identifier\_lexeme\_form}}\,({\rm{cdr}}\,({\it{x\/}}))\index{identifier\_lexeme\_form}\-$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{identifier\_lexemep} \\  
\=\+{\rm{identifier\_lexemep}}\,({\it{x\/}})\index{identifier\_lexemep} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{x\/}}) \\ 
{\bf then }\=\+{\rm{is\_letter}}\,({\rm{car}}\,({\it{x\/}}))\index{is\_letter} \\ 
$\wedge$$\;\;\;\;${\rm{identifier\_lexeme\_form}}\,({\it{x\/}})\index{identifier\_lexeme\_form} \\ 
$\wedge$$\;\;\;\;$({\rm{pack}}\,({\rm{uc\_list}}\,({\it{x\/}})\index{uc\_list}) $\not\in$ {\sc{reserved\_words}}\index{reserved\_words})\- \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{entry\_value\_lexemep} \\  
\=\+{\rm{entry\_value\_lexemep}}\,({\it{x\/}})\index{entry\_value\_lexemep} \\ 
$=$$\;\;\;\;$(\=\+{\rm{listp}}\,({\it{x\/}}) \\ 
$\wedge$$\;\;\;\;${\rm{identifier\_lexemep}}\,({\rm{rcdr}}\,({\it{x\/}})\index{rcdr})\index{identifier\_lexemep} \\ 
$\wedge$$\;\;\;\;$({\rm{rcar}}\,({\it{x\/}})\index{rcar} $=$ {\sc{ascii\_single\_quote}}\index{ascii\_single\_quote}))\-\-
\end{tabbing}


\begin{verbatim}; ---------------------
;  String Value Lexeme
; ---------------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{string\_char\_listp} \\  
\=\+{\rm{string\_char\_listp}}\,({\it{s\/}})\index{string\_char\_listp} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{s\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\it{s\/}} $=$ {\tt{0}} \\ 
{\bf elseif }{\rm{car}}\,({\it{s\/}}) $=$ {\sc{ascii\_double\_quote}}\index{ascii\_double\_quote} \\ 
{\bf then }\=\+{\rm{listp}}\,({\rm{cdr}}\,({\it{s\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{cadr}}\,({\it{s\/}}) $=$ {\sc{ascii\_double\_quote}}\index{ascii\_double\_quote}) \\ 
$\wedge$$\;\;\;\;${\rm{string\_char\_listp}}\,({\rm{cddr}}\,({\it{s\/}}))\index{string\_char\_listp}\- \\ 
{\bf else }{\rm{ascii\_characterp}}\,({\rm{car}}\,({\it{s\/}}))\index{ascii\_characterp} $\wedge$ {\rm{string\_char\_listp}}\,({\rm{cdr}}\,({\it{s\/}}))\index{string\_char\_listp}$\;${\bf  endif}\-\-
\end{tabbing}
	  
\begin{tabbing}{\sc Definition}:\index{string\_value\_lexemep} \\  
\=\+{\rm{string\_value\_lexemep}}\,({\it{x\/}})\index{string\_value\_lexemep} \\ 
$=$$\;\;\;\;$(\=\+({\rm{length}}\,({\it{x\/}})\index{length} $\geq$ {\tt{2}}) \\ 
$\wedge$$\;\;\;\;$({\rm{car}}\,({\it{x\/}}) $=$ {\sc{ascii\_double\_quote}}\index{ascii\_double\_quote}) \\ 
$\wedge$$\;\;\;\;$({\rm{rcar}}\,({\it{x\/}})\index{rcar} $=$ {\sc{ascii\_double\_quote}}\index{ascii\_double\_quote}) \\ 
$\wedge$$\;\;\;\;${\rm{string\_char\_listp}}\,({\rm{rcdr}}\,({\rm{cdr}}\,({\it{x\/}}))\index{rcdr})\index{string\_char\_listp})\-\-
\end{tabbing}



\begin{verbatim}; ===================================
;  Recognizers for Parse Tree Leaves
; ===================================

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{reserved\_wordp} \\  
\=\+{\rm{reserved\_wordp}}\,({\it{x\/}})\index{reserved\_wordp} \\ 
$=$$\;\;\;\;$(\=\+{\rm{leafp}}\,({\it{x\/}})\index{leafp} \\ 
$\wedge$$\;\;\;\;$({\rm{root}}\,({\it{x\/}})\index{root} $\in$ {\sc{reserved\_words}}\index{reserved\_words}) \\ 
$\wedge$$\;\;\;\;$({\rm{uc\_list}}\,({\rm{lexeme}}\,({\it{x\/}})\index{lexeme})\index{uc\_list} $=$ {\rm{uc\_list}}\,({\rm{unpack}}\,({\rm{root}}\,({\it{x\/}})\index{root}))\index{uc\_list}))\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{special\_symbolp} \\  
\=\+{\rm{special\_symbolp}}\,({\it{x\/}})\index{special\_symbolp} \\ 
$=$$\;\;\;\;$(\=\+{\rm{leafp}}\,({\it{x\/}})\index{leafp} \\ 
$\wedge$$\;\;\;\;$({\rm{root}}\,({\it{x\/}})\index{root} $\in$ {\sc{special\_symbols}}\index{special\_symbols}) \\ 
$\wedge$$\;\;\;\;$\=\+{\bf case on }{\rm{root}}\,({\it{x\/}})\index{root}: \\ 
{\bf case = }{\it{open\_paren\/}} \\ 
{\bf then }\=\+{\rm{lexeme}}\,({\it{x\/}})\index{lexeme} \\ 
$\in$$\;\;\;\;${\rm{list}}\,({\sc{open\_paren\_lexeme}}\index{open\_paren\_lexeme}, {\sc{open\_bracket\_lexeme}}\index{open\_bracket\_lexeme})\- \\ 
{\bf case = }{\it{close\_paren\/}} \\ 
{\bf $\;\;$then }\=\+{\rm{lexeme}}\,({\it{x\/}})\index{lexeme} \\ 
$\in$$\;\;\;\;${\rm{list}}\,({\sc{close\_paren\_lexeme}}\index{close\_paren\_lexeme}, {\sc{close\_bracket\_lexeme}}\index{close\_bracket\_lexeme})\- \\ 
{\bf otherwise }\=\+{\rm{lexeme}}\,({\it{x\/}})\index{lexeme} \\ 
$=$$\;\;\;\;${\rm{mapped\_value}}\,({\sc{special\_symbol\_map}}\index{special\_symbol\_map}, {\rm{root}}\,({\it{x\/}})\index{root})\index{mapped\_value}\-$\;${\bf  endcase}\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{character\_valuep} \\  
\=\+{\rm{character\_valuep}}\,({\it{x\/}})\index{character\_valuep} \\ 
$=$$\;\;\;\;$(\=\+{\rm{leafp}}\,({\it{x\/}})\index{leafp} \\ 
$\wedge$$\;\;\;\;$({\rm{root}}\,({\it{x\/}})\index{root} $=$ {\tt{'}}{\tt{character\_value}}) \\ 
$\wedge$$\;\;\;\;${\rm{character\_value\_lexemep}}\,({\rm{lexeme}}\,({\it{x\/}})\index{lexeme})\index{character\_value\_lexemep})\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{digit\_listp} \\  
\=\+{\rm{digit\_listp}}\,({\it{x\/}})\index{digit\_listp} \\ 
$=$$\;\;\;\;$(\=\+{\rm{leafp}}\,({\it{x\/}})\index{leafp} \\ 
$\wedge$$\;\;\;\;$({\rm{root}}\,({\it{x\/}})\index{root} $=$ {\tt{'}}{\tt{digit\_list}}) \\ 
$\wedge$$\;\;\;\;${\rm{digit\_list\_lexemep}}\,({\rm{lexeme}}\,({\it{x\/}})\index{lexeme})\index{digit\_list\_lexemep})\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{entry\_valuep} \\  
\=\+{\rm{entry\_valuep}}\,({\it{x\/}})\index{entry\_valuep} \\ 
$=$$\;\;\;\;$(\=\+{\rm{leafp}}\,({\it{x\/}})\index{leafp} \\ 
$\wedge$$\;\;\;\;$({\rm{root}}\,({\it{x\/}})\index{root} $=$ {\tt{'}}{\tt{entry\_value}}) \\ 
$\wedge$$\;\;\;\;${\rm{entry\_value\_lexemep}}\,({\rm{lexeme}}\,({\it{x\/}})\index{lexeme})\index{entry\_value\_lexemep})\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{identifierp} \\  
\=\+{\rm{identifierp}}\,({\it{x\/}})\index{identifierp} \\ 
$=$$\;\;\;\;$(\=\+{\rm{leafp}}\,({\it{x\/}})\index{leafp} \\ 
$\wedge$$\;\;\;\;$({\rm{root}}\,({\it{x\/}})\index{root} $=$ {\tt{'}}{\tt{identifier}}) \\ 
$\wedge$$\;\;\;\;${\rm{identifier\_lexemep}}\,({\rm{lexeme}}\,({\it{x\/}})\index{lexeme})\index{identifier\_lexemep})\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{string\_valuep} \\  
\=\+{\rm{string\_valuep}}\,({\it{x\/}})\index{string\_valuep} \\ 
$=$$\;\;\;\;$(\=\+{\rm{leafp}}\,({\it{x\/}})\index{leafp} \\ 
$\wedge$$\;\;\;\;$({\rm{root}}\,({\it{x\/}})\index{root} $=$ {\tt{'}}{\tt{string\_value}}) \\ 
$\wedge$$\;\;\;\;${\rm{string\_value\_lexemep}}\,({\rm{lexeme}}\,({\it{x\/}})\index{lexeme})\index{string\_value\_lexemep})\-\-
\end{tabbing}



\begin{verbatim}; **********************************************
;  Relation between Parse Trees and Productions
; **********************************************

; ===================
;  The Gypsy Grammar
; ===================

\end{verbatim}
\noindent{\sc Event}:   Introduce the function symbol {\it gypsy\_grammar\index{gypsy\_grammar}\/} of 0 arguments.

\addvspace{18pt}


\begin{verbatim}; =============================================
;  First Rule Used in Derivation of Parse Tree
; =============================================

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{mk\_rhs} \\  
\=\+{\rm{mk\_rhs}}\,({\it{pt\/}})\index{mk\_rhs} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{treep}}\,({\it{pt\/}})\index{treep}$\;\;${\bf then }{\rm{root}}\,({\it{pt\/}})\index{root} \\ 
{\bf elseif }{\rm{listp}}\,({\it{pt\/}})$\;\;${\bf then }{\rm{cons}}\,({\rm{mk\_rhs}}\,({\rm{car}}\,({\it{pt\/}}))\index{mk\_rhs}, {\rm{mk\_rhs}}\,({\rm{cdr}}\,({\it{pt\/}}))\index{mk\_rhs}) \\ 
{\bf else }{\it{pt\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mk\_rule} \\  
\=\+{\rm{mk\_rule}}\,({\it{pt\/}})\index{mk\_rule} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{treep}}\,({\it{pt\/}})\index{treep}$\;\;${\bf then }{\rm{prodn}}\,({\rm{root}}\,({\it{pt\/}})\index{root}, {\rm{mk\_rhs}}\,({\rm{subtrees}}\,({\it{pt\/}})\index{subtrees})\index{mk\_rhs})\index{prodn} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{verbatim}; =========================
;  Well-Formed Parse Trees
; =========================

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{parse\_tree\_leafp} \\  
\=\+{\rm{parse\_tree\_leafp}}\,({\it{pt\/}})\index{parse\_tree\_leafp} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{leafp}}\,({\it{pt\/}})\index{leafp} \\ 
{\bf then }\=\+{\bf case on }{\rm{root}}\,({\it{pt\/}})\index{root}: \\ 
{\bf case = }{\it{character\_value\/}} \\ 
{\bf then }{\rm{character\_valuep}}\,({\it{pt\/}})\index{character\_valuep} \\ 
{\bf case = }{\it{digit\_list\/}} \\ 
{\bf $\;\;$then }{\rm{digit\_listp}}\,({\it{pt\/}})\index{digit\_listp} \\ 
{\bf case = }{\it{entry\_value\/}} \\ 
{\bf $\;\;$then }{\rm{entry\_valuep}}\,({\it{pt\/}})\index{entry\_valuep} \\ 
{\bf case = }{\it{identifier\/}} \\ 
{\bf $\;\;$then }{\rm{identifierp}}\,({\it{pt\/}})\index{identifierp} \\ 
{\bf case = }{\it{string\_value\/}} \\ 
{\bf $\;\;$then }{\rm{string\_valuep}}\,({\it{pt\/}})\index{string\_valuep} \\ 
{\bf otherwise }{\rm{reserved\_wordp}}\,({\it{pt\/}})\index{reserved\_wordp} $\vee$ {\rm{special\_symbolp}}\,({\it{pt\/}})\index{special\_symbolp}$\;${\bf  endcase}\- \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\-\-
\end{tabbing}



\noindent{\sc Event}:   Disable tokenp.

\addvspace{18pt}

\noindent{\sc Event}:   Disable parse\_tree\_leafp.

\addvspace{18pt}

\noindent{\sc Event}:   Disable mk\_rule.

\addvspace{18pt}

\begin{verbatim}#|
(do-mutual '(

(defn parse_treep (pt)
  (if (treep pt)
      (if (tokenp (root pt))
	  (parse_tree_leafp pt)
	(and (litatom (root pt))
	     (member (mk_rule pt) (Gypsy_grammar))
	     (if (treep (subtrees pt))
		 (parse_treep (subtrees pt))
	       (parse_tree_listp (subtrees pt)))))
	       ; & (correct_precedence_rule_application pt)
    F)
  ( (lessp (count pt)) ))

(defn parse_tree_listp (sts)
  (if (listp sts)
      (and (parse_treep (car sts))
	   (parse_tree_listp (cdr sts)))
    (equal sts nil))
  ( (lessp (count sts)) ))

))
|#

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{mutual-parse\_tree\_listp-parse!\_treep} \\  
\=\+{\rm{mutual-parse\_tree\_listp-parse\_treep}}\,({\it{mutual-flg\/}}, {\it{pt\/}}, {\it{sts\/}})\index{mutual-parse\_tree\_listp-parse!\_treep} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{mutual-flg\/}} $=$ {\tt{'}}{\tt{parse\_tree\_listp}} \\ 
{\bf then }\=\+{\bf if }{\rm{listp}}\,({\it{sts\/}}) \\ 
{\bf then }\=\+{\rm{mutual-parse\_tree\_listp-parse\_treep}}\,(\=\+{\tt{'}}{\tt{parse\_treep}}, \\ 
{\rm{car}}\,({\it{sts\/}}), \\ 
{\bf{t}})\-\index{mutual-parse\_tree\_listp-parse!\_treep} \\ 
$\wedge$$\;\;\;\;${\rm{mutual-parse\_tree\_listp-parse\_treep}}\,(\=\+{\tt{'}}{\tt{parse\_tree\_listp}}, \\ 
{\bf{t}}, \\ 
{\rm{cdr}}\,({\it{sts\/}}))\-\index{mutual-parse\_tree\_listp-parse!\_treep}\- \\ 
{\bf else }{\it{sts\/}} $=$ {\bf{nil}}$\;${\bf  endif}\- \\ 
{\bf elseif }{\rm{treep}}\,({\it{pt\/}})\index{treep} \\ 
{\bf then }\=\+{\bf if }{\rm{tokenp}}\,({\rm{root}}\,({\it{pt\/}})\index{root})\index{tokenp}$\;\;${\bf then }{\rm{parse\_tree\_leafp}}\,({\it{pt\/}})\index{parse\_tree\_leafp} \\ 
{\bf else }\=\+{\rm{litatom}}\,({\rm{root}}\,({\it{pt\/}})\index{root}) \\ 
$\wedge$$\;\;\;\;$({\rm{mk\_rule}}\,({\it{pt\/}})\index{mk\_rule} $\in$ {\sc{gypsy\_grammar}}\index{gypsy\_grammar}) \\ 
$\wedge$$\;\;\;\;$\=\+{\bf if }{\rm{treep}}\,({\rm{subtrees}}\,({\it{pt\/}})\index{subtrees})\index{treep} \\ 
{\bf then }{\rm{mutual-parse\_tree\_listp-parse\_treep}}\,(\=\+{\tt{'}}{\tt{parse\_treep}}, \\ 
{\rm{subtrees}}\,({\it{pt\/}})\index{subtrees}, \\ 
{\bf{t}})\-\index{mutual-parse\_tree\_listp-parse!\_treep} \\ 
{\bf else }{\rm{mutual-parse\_tree\_listp-parse\_treep}}\,(\=\+{\tt{'}}{\tt{parse\_tree\_listp}}, \\ 
{\bf{t}}, \\ 
{\rm{subtrees}}\,({\it{pt\/}})\index{subtrees})\-\index{mutual-parse\_tree\_listp-parse!\_treep}$\;${\bf  endif}\-\-$\;${\bf  endif}\- \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{parse\_tree\_listp} \\  
\=\+{\rm{parse\_tree\_listp}}\,({\it{sts\/}})\index{parse\_tree\_listp} \\ 
$=$$\;\;\;\;${\rm{mutual-parse\_tree\_listp-parse\_treep}}\,({\tt{'}}{\tt{parse\_tree\_listp}}, {\bf{t}}, {\it{sts\/}})\index{mutual-parse\_tree\_listp-parse!\_treep}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{parse\_treep} \\  
\=\+{\rm{parse\_treep}}\,({\it{pt\/}})\index{parse\_treep} \\ 
$=$$\;\;\;\;${\rm{mutual-parse\_tree\_listp-parse\_treep}}\,({\tt{'}}{\tt{parse\_treep}}, {\it{pt\/}}, {\bf{t}})\index{mutual-parse\_tree\_listp-parse!\_treep}\-
\end{tabbing}


\noindent{\sc Event}:   Enable tokenp.

\addvspace{18pt}

\noindent{\sc Event}:   Enable parse\_tree\_leafp.

\addvspace{18pt}

\noindent{\sc Event}:   Enable mk\_rule.

\addvspace{18pt}


\begin{tabbing}{\sc Conservative Axiom}:  pt\_intro \\ \index{pt\_intro}
($\neg$ {\rm{parse\_treep}}\,({\rm{pt}}\,({\it{s\/}}, {\it{nt\/}})\index{pt})\index{parse\_treep}) $\rightarrow$ ({\rm{pt}}\,({\it{s\/}}, {\it{nt\/}})\index{pt} $=$ {\bf{nil}})
\end{tabbing}\noindent Simultaneously, we introduce the new function symbol {\it pt\/}.


\begin{verbatim}; ================================
;  Parse Tree/Production Matching
; ================================

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{untag} \\  
\=\+{\rm{untag}}\,({\it{pr\/}})\index{untag} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{prodnp}}\,({\it{pr\/}})\index{prodnp}$\;\;${\bf then }{\rm{prodn}}\,({\rm{untag}}\,({\rm{lhs}}\,({\it{pr\/}})\index{lhs})\index{untag}, {\rm{untag}}\,({\rm{rhs}}\,({\it{pr\/}})\index{rhs})\index{untag})\index{prodn} \\ 
{\bf elseif }{\rm{taggedp}}\,({\it{pr\/}})\index{taggedp}$\;\;${\bf then }{\rm{gsymbol}}\,({\it{pr\/}})\index{gsymbol} \\ 
{\bf elseif }{\rm{listp}}\,({\it{pr\/}})$\;\;${\bf then }{\rm{cons}}\,({\rm{untag}}\,({\rm{car}}\,({\it{pr\/}}))\index{untag}, {\rm{untag}}\,({\rm{cdr}}\,({\it{pr\/}}))\index{untag}) \\ 
{\bf else }{\it{pr\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{rule} \\  
\=\+{\rm{rule}}\,({\it{pt\/}}, {\it{pr\/}})\index{rule} \\ 
$=$$\;\;\;\;$(\=\+{\rm{parse\_treep}}\,({\it{pt\/}})\index{parse\_treep} \\ 
$\wedge$$\;\;\;\;$({\rm{mk\_rule}}\,({\it{pt\/}})\index{mk\_rule} $=$ {\rm{untag}}\,({\it{pr\/}})\index{untag}) \\ 
$\wedge$$\;\;\;\;$({\rm{untag}}\,({\it{pr\/}})\index{untag} $\in$ {\sc{gypsy\_grammar}}\index{gypsy\_grammar}))\-\-
\end{tabbing}



\begin{verbatim}; ********************
;  Functions on trees
; ********************

; -----------
;  Tree Size
; -----------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{tree\_size} \\  
\=\+{\rm{tree\_size}}\,({\it{x\/}})\index{tree\_size} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{treep}}\,({\it{x\/}})\index{treep}$\;\;${\bf then }$1\;+$ {\rm{tree\_size}}\,({\rm{subtrees}}\,({\it{x\/}})\index{subtrees})\index{tree\_size} \\ 
{\bf elseif }{\rm{listp}}\,({\it{x\/}})$\;\;${\bf then }$1\;+$ ({\rm{tree\_size}}\,({\rm{car}}\,({\it{x\/}}))\index{tree\_size} $+$ {\rm{tree\_size}}\,({\rm{cdr}}\,({\it{x\/}}))\index{tree\_size}) \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{verbatim}; ---------------
;  Tree Equality
; ---------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{leaf\_equal} \\  
\=\+{\rm{leaf\_equal}}\,({\it{t1\/}}, {\it{t2\/}})\index{leaf\_equal} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{leafp}}\,({\it{t1\/}})\index{leafp} $\wedge$ {\rm{leafp}}\,({\it{t2\/}})\index{leafp} \\ 
{\bf then }\=\+({\rm{root}}\,({\it{t1\/}})\index{root} $=$ {\rm{root}}\,({\it{t2\/}})\index{root}) \\ 
$\wedge$$\;\;\;\;$\=\+{\bf if }\=\+{\rm{root}}\,({\it{t1\/}})\index{root} \\ 
$\in$$\;\;\;\;${\tt{'}}{\tt{(}}{\tt{character\_value}}{\tt{ }}{\tt{string\_value}}{\tt{)}}\- \\ 
{\bf then }{\rm{lexeme}}\,({\it{t1\/}})\index{lexeme} $=$ {\rm{lexeme}}\,({\it{t2\/}})\index{lexeme} \\ 
{\bf else }{\rm{uc\_list}}\,({\rm{lexeme}}\,({\it{t1\/}})\index{lexeme})\index{uc\_list} $=$ {\rm{uc\_list}}\,({\rm{lexeme}}\,({\it{t2\/}})\index{lexeme})\index{uc\_list}$\;${\bf  endif}\-\- \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{tree\_equal} \\  
\=\+{\rm{tree\_equal}}\,({\it{t1\/}}, {\it{t2\/}})\index{tree\_equal} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{leafp}}\,({\it{t1\/}})\index{leafp}$\;\;${\bf then }{\rm{leaf\_equal}}\,({\it{t1\/}}, {\it{t2\/}})\index{leaf\_equal} \\ 
{\bf elseif }{\rm{treep}}\,({\it{t1\/}})\index{treep} \\ 
{\bf then }\=\+{\rm{treep}}\,({\it{t2\/}})\index{treep} \\ 
$\wedge$$\;\;\;\;$({\rm{root}}\,({\it{t1\/}})\index{root} $=$ {\rm{root}}\,({\it{t2\/}})\index{root}) \\ 
$\wedge$$\;\;\;\;${\rm{tree\_equal}}\,({\rm{subtrees}}\,({\it{t1\/}})\index{subtrees}, {\rm{subtrees}}\,({\it{t2\/}})\index{subtrees})\index{tree\_equal}\- \\ 
{\bf elseif }{\rm{listp}}\,({\it{t1\/}}) \\ 
{\bf then }\=\+{\rm{listp}}\,({\it{t2\/}}) \\ 
$\wedge$$\;\;\;\;${\rm{tree\_equal}}\,({\rm{car}}\,({\it{t1\/}}), {\rm{car}}\,({\it{t2\/}}))\index{tree\_equal} \\ 
$\wedge$$\;\;\;\;${\rm{tree\_equal}}\,({\rm{cdr}}\,({\it{t1\/}}), {\rm{cdr}}\,({\it{t2\/}}))\index{tree\_equal}\- \\ 
{\bf else }{\it{t1\/}} $=$ {\it{t2\/}}$\;${\bf  endif}\-\-
\end{tabbing}
      

\begin{verbatim}; ----------
;  Subtrees
; ----------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{list\_subtree} \\  
\=\+{\rm{list\_subtree}}\,({\it{x\/}}, {\it{n\/}}, {\it{i\/}})\index{list\_subtree} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf elseif }{\rm{treep}}\,({\rm{car}}\,({\it{x\/}}))\index{treep} $\wedge$ ({\rm{root}}\,({\rm{car}}\,({\it{x\/}}))\index{root} $=$ {\it{n\/}}) \\ 
{\bf then }\=\+{\bf if }{\it{i\/}} $=$ {\tt{1}}$\;\;${\bf then }{\rm{car}}\,({\it{x\/}}) \\ 
{\bf else }{\rm{list\_subtree}}\,({\rm{cdr}}\,({\it{x\/}}), {\it{n\/}}, {\it{i\/}} $-\;1$)\index{list\_subtree}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{list\_subtree}}\,({\rm{cdr}}\,({\it{x\/}}), {\it{n\/}}, {\it{i\/}})\index{list\_subtree}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{subtree} \\  
\=\+{\rm{subtree}}\,({\it{x\/}}, {\it{n\/}})\index{subtree} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{treep}}\,({\it{x\/}})\index{treep} \\ 
{\bf then }\=\+{\bf if }{\rm{treep}}\,({\rm{subtrees}}\,({\it{x\/}})\index{subtrees})\index{treep} \\ 
{\bf then }\=\+{\bf if }{\rm{root}}\,({\rm{subtrees}}\,({\it{x\/}})\index{subtrees})\index{root} $=$ {\it{n\/}}$\;\;${\bf then }{\rm{subtrees}}\,({\it{x\/}})\index{subtrees} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{list\_subtree}}\,({\rm{subtrees}}\,({\it{x\/}})\index{subtrees}, {\it{n\/}}, {\tt{1}})\index{list\_subtree}$\;${\bf  endif}\- \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{subtree\_body} \\  
\=\+{\rm{subtree\_body}}\,({\it{x\/}}, {\it{n\/}})\index{subtree\_body} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{treep}}\,({\rm{subtree}}\,({\it{x\/}}, {\it{n\/}})\index{subtree})\index{treep}$\;\;${\bf then }{\rm{subtrees}}\,({\rm{subtree}}\,({\it{x\/}}, {\it{n\/}})\index{subtree})\index{subtrees} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{subtree\_i} \\  
\=\+{\rm{subtree\_i}}\,({\it{x\/}}, {\it{n\/}}, {\it{i\/}})\index{subtree\_i} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{treep}}\,({\it{x\/}})\index{treep}$\;\;${\bf then }{\rm{list\_subtree}}\,({\rm{subtrees}}\,({\it{x\/}})\index{subtrees}, {\it{n\/}}, {\it{i\/}})\index{list\_subtree} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp\_list\_subtree\_size \\ \index{lessp\_list\_subtree\_size}
\=\+({\rm{tree\_size}}\,({\rm{list\_subtree}}\,({\it{x\/}}, {\it{n\/}}, {\it{i\/}})\index{list\_subtree})\index{tree\_size} $\not=$ {\tt{0}}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{tree\_size}}\,({\rm{list\_subtree}}\,({\it{x\/}}, {\it{n\/}}, {\it{i\/}})\index{list\_subtree})\index{tree\_size} $<$ {\rm{tree\_size}}\,({\it{x\/}})\index{tree\_size})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp\_subtree\_size \\ \index{lessp\_subtree\_size}
{\rm{treep}}\,({\it{x\/}})\index{treep} $\rightarrow$ ({\rm{tree\_size}}\,({\rm{subtree}}\,({\it{x\/}}, {\it{n\/}})\index{subtree})\index{tree\_size} $<$ {\rm{tree\_size}}\,({\it{x\/}})\index{tree\_size})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp\_subtree\_i\_size \\ \index{lessp\_subtree\_i\_size}
{\rm{treep}}\,({\it{x\/}})\index{treep} $\rightarrow$ ({\rm{tree\_size}}\,({\rm{subtree\_i}}\,({\it{x\/}}, {\it{n\/}}, {\it{i\/}})\index{subtree\_i})\index{tree\_size} $<$ {\rm{tree\_size}}\,({\it{x\/}})\index{tree\_size})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  tree\_size\_not\_zero \\ \index{tree\_size\_not\_zero}
{\rm{treep}}\,({\it{x\/}})\index{treep} $\rightarrow$ ({\rm{tree\_size}}\,({\it{x\/}})\index{tree\_size} $\not=$ {\tt{0}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp\_subtree\_body\_size \\ \index{lessp\_subtree\_body\_size}
{\rm{treep}}\,({\it{x\/}})\index{treep} $\rightarrow$ ({\rm{tree\_size}}\,({\rm{subtree\_body}}\,({\it{x\/}}, {\it{n\/}})\index{subtree\_body})\index{tree\_size} $<$ {\rm{tree\_size}}\,({\it{x\/}})\index{tree\_size})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rule\_imp\_treep \\ \index{rule\_imp\_treep}
{\rm{rule}}\,({\it{u\/}}, {\rm{prodn}}\,({\it{x\/}}, {\it{y\/}})\index{prodn})\index{rule} $\rightarrow$ {\rm{treep}}\,({\it{u\/}})\index{treep}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rule\_imp\_lessp\_subtree\_size \\ \index{rule\_imp\_lessp\_subtree\_size}
{\rm{rule}}\,({\it{u\/}}, {\rm{prodn}}\,({\it{x\/}}, {\it{y\/}})\index{prodn})\index{rule} $\rightarrow$ ({\rm{tree\_size}}\,({\rm{subtree}}\,({\it{u\/}}, {\it{z\/}})\index{subtree})\index{tree\_size} $<$ {\rm{tree\_size}}\,({\it{u\/}})\index{tree\_size})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rule\_imp\_lessp\_subtree\_i\_size \\ \index{rule\_imp\_lessp\_subtree\_i\_si!ze}
{\rm{rule}}\,({\it{u\/}}, {\rm{prodn}}\,({\it{x\/}}, {\it{y\/}})\index{prodn})\index{rule} $\rightarrow$ ({\rm{tree\_size}}\,({\rm{subtree\_i}}\,({\it{u\/}}, {\it{z\/}}, {\it{i\/}})\index{subtree\_i})\index{tree\_size} $<$ {\rm{tree\_size}}\,({\it{u\/}})\index{tree\_size})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{subtreep} \\  
\=\+{\rm{subtreep}}\,({\it{t1\/}}, {\it{t2\/}})\index{subtreep} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{tree\_equal}}\,({\it{t1\/}}, {\it{t2\/}})\index{tree\_equal}$\;\;${\bf then }{\bf{t}} \\ 
{\bf elseif }{\rm{listp}}\,({\it{t2\/}})$\;\;${\bf then }{\rm{subtreep}}\,({\it{t1\/}}, {\rm{car}}\,({\it{t2\/}}))\index{subtreep} $\vee$ {\rm{subtreep}}\,({\it{t1\/}}, {\rm{cdr}}\,({\it{t2\/}}))\index{subtreep} \\ 
{\bf elseif }{\rm{leafp}}\,({\it{t2\/}})\index{leafp}$\;\;${\bf then }{\bf{f}} \\ 
{\bf elseif }{\rm{treep}}\,({\it{t2\/}})\index{treep}$\;\;${\bf then }{\rm{subtreep}}\,({\it{t1\/}}, {\rm{subtrees}}\,({\it{t2\/}})\index{subtrees})\index{subtreep} \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{verbatim}; -------------------
;  Tree Substitution
; -------------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{subst\_tree} \\  
\=\+{\rm{subst\_tree}}\,({\it{t1\/}}, {\it{t2\/}}, {\it{t3\/}})\index{subst\_tree} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{tree\_equal}}\,({\it{t2\/}}, {\it{t3\/}})\index{tree\_equal}$\;\;${\bf then }{\it{t1\/}} \\ 
{\bf elseif }{\rm{listp}}\,({\it{t3\/}}) \\ 
{\bf then }{\rm{cons}}\,({\rm{subst\_tree}}\,({\it{t1\/}}, {\it{t2\/}}, {\rm{car}}\,({\it{t3\/}}))\index{subst\_tree}, {\rm{subst\_tree}}\,({\it{t1\/}}, {\it{t2\/}}, {\rm{cdr}}\,({\it{t3\/}}))\index{subst\_tree}) \\ 
{\bf elseif }{\rm{leafp}}\,({\it{t3\/}})\index{leafp}$\;\;${\bf then }{\it{t3\/}} \\ 
{\bf elseif }{\rm{treep}}\,({\it{t3\/}})\index{treep} \\ 
{\bf then }{\rm{mk\_tree}}\,({\rm{root}}\,({\it{t3\/}})\index{root}, {\rm{subst\_tree}}\,({\it{t1\/}}, {\it{t2\/}}, {\rm{subtrees}}\,({\it{t3\/}})\index{subtrees})\index{subst\_tree})\index{mk\_tree} \\ 
{\bf else }{\it{t3\/}}$\;${\bf  endif}\-\-
\end{tabbing}



\begin{verbatim}; *******************
;  Tree Constructors
; *******************

; --------
;  Leaves
; --------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{mk\_reserved\_word} \\  
\=\+{\rm{mk\_reserved\_word}}\,({\it{k\/}})\index{mk\_reserved\_word} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{k\/}} $\in$ {\sc{reserved\_words}}\index{reserved\_words}$\;\;${\bf then }{\rm{mk\_tree}}\,({\it{k\/}}, {\rm{unpack}}\,({\it{k\/}}))\index{mk\_tree} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{special\_symbol\_lexeme} \\  
\=\+{\rm{special\_symbol\_lexeme}}\,({\it{x\/}})\index{special\_symbol\_lexeme} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{in\_map}}\,({\sc{special\_symbol\_map}}\index{special\_symbol\_map}, {\it{x\/}})\index{in\_map} \\ 
{\bf then }{\rm{mapped\_value}}\,({\sc{special\_symbol\_map}}\index{special\_symbol\_map}, {\it{x\/}})\index{mapped\_value} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mk\_special\_symbol} \\  
\=\+{\rm{mk\_special\_symbol}}\,({\it{x\/}})\index{mk\_special\_symbol} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{r\/}}{\bf $\;$ be$\;\;$}{\rm{special\_symbol\_lexeme}}\,({\it{x\/}})\index{special\_symbol\_lexeme}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{listp}}\,({\it{r\/}})$\;\;${\bf then }{\rm{mk\_tree}}\,({\it{x\/}}, {\it{r\/}})\index{mk\_tree} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mk\_unary\_operator} \\  
\=\+{\rm{mk\_unary\_operator}}\,({\it{x\/}})\index{mk\_unary\_operator} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\in$ {\sc{reserved\_words}}\index{reserved\_words} \\ 
{\bf then }{\rm{mk\_tree}}\,({\tt{'}}{\tt{unary\_operator}}, {\rm{mk\_reserved\_word}}\,({\it{x\/}})\index{mk\_reserved\_word})\index{mk\_tree} \\ 
{\bf else }{\rm{mk\_tree}}\,({\tt{'}}{\tt{unary\_operator}}, {\rm{mk\_special\_symbol}}\,({\it{x\/}})\index{mk\_special\_symbol})\index{mk\_tree}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mk\_digit\_list} \\  
\=\+{\rm{mk\_digit\_list}}\,({\it{e\/}})\index{mk\_digit\_list} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{digit\_listp}}\,({\it{e\/}})\index{digit\_listp}$\;\;${\bf then }{\it{e\/}} \\ 
{\bf elseif }{\it{e\/}} $\in\;${\bf{N}}${}$$\;\;${\bf then }{\rm{mk\_tree}}\,({\tt{'}}{\tt{digit\_list}}, {\rm{number\_to\_char\_list}}\,({\it{e\/}})\index{number\_to\_char\_list})\index{mk\_tree} \\ 
{\bf else }{\rm{mk\_tree}}\,({\tt{'}}{\tt{digit\_list}}, {\it{e\/}})\index{mk\_tree}$\;${\bf  endif}\-\-
\end{tabbing} \begin{verbatim}; Check e?

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{mk\_identifier\_lexeme} \\  
\=\+{\rm{mk\_identifier\_lexeme}}\,({\it{id\/}})\index{mk\_identifier\_lexeme} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{n\/}}{\bf $\;$ be$\;\;$}\=\+{\bf if }{\rm{litatom}}\,({\it{id\/}})$\;\;${\bf then }{\rm{unpack}}\,({\it{id\/}}) \\ 
{\bf else }{\it{id\/}}$\;${\bf  endif}\-\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{n\/}} $=$ {\rm{unpack}}\,({\tt{'}}{\tt{nil\~}})$\;\;${\bf then }{\rm{unpack}}\,({\bf{nil}}) \\ 
{\bf elseif }{\rm{identifier\_lexemep}}\,({\it{n\/}})\index{identifier\_lexemep}$\;\;${\bf then }{\it{n\/}} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mk\_identifier} \\  
\=\+{\rm{mk\_identifier}}\,({\it{id\/}})\index{mk\_identifier} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{root}}\,({\it{id\/}})\index{root} $=$ {\tt{'}}{\tt{identifier}}$\;\;${\bf then }{\it{id\/}} \\ 
{\bf else }\=\+{\bf let }\=\+{\it{n\/}}{\bf $\;$ be$\;\;$}{\rm{mk\_identifier\_lexeme}}\,({\it{id\/}})\index{mk\_identifier\_lexeme}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{identifier\_lexemep}}\,({\it{n\/}})\index{identifier\_lexemep} \\ 
{\bf then }{\rm{mk\_tree}}\,({\tt{'}}{\tt{identifier}}, {\it{n\/}})\index{mk\_tree} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mk\_entry\_value\_lexeme} \\  
\=\+{\rm{mk\_entry\_value\_lexeme}}\,({\it{id\/}})\index{mk\_entry\_value\_lexeme} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{n1\/}}{\bf $\;$ be$\;\;$}\=\+{\bf if }{\rm{litatom}}\,({\it{id\/}})$\;\;${\bf then }{\rm{unpack}}\,({\it{id\/}}) \\ 
{\bf else }{\it{id\/}}$\;${\bf  endif}\-\- \\ 
{\bf in} \\ 
\=\+{\bf let }\=\+{\it{n2\/}}{\bf $\;$ be$\;\;$}\=\+{\bf if }{\rm{rcar}}\,({\it{n1\/}})\index{rcar} $=$ {\sc{ascii\_single\_quote}}\index{ascii\_single\_quote} \\ 
{\bf then }{\rm{mk\_identifier\_lexeme}}\,({\rm{rcdr}}\,({\it{n1\/}})\index{rcdr})\index{mk\_identifier\_lexeme} \\ 
{\bf else }{\rm{mk\_identifier\_lexeme}}\,({\it{n1\/}})\index{mk\_identifier\_lexeme}$\;${\bf  endif}\-\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{identifier\_lexemep}}\,({\it{n2\/}})\index{identifier\_lexemep} \\ 
{\bf then }{\rm{rcons}}\,({\it{n2\/}}, {\sc{ascii\_single\_quote}}\index{ascii\_single\_quote})\index{rcons} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endlet}\-\-
\end{tabbing}
	
\begin{tabbing}{\sc Definition}:\index{mk\_entry\_value} \\  
\=\+{\rm{mk\_entry\_value}}\,({\it{id\/}})\index{mk\_entry\_value} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{root}}\,({\it{id\/}})\index{root} $=$ {\tt{'}}{\tt{entry\_value}}$\;\;${\bf then }{\it{id\/}} \\ 
{\bf elseif }{\rm{root}}\,({\it{id\/}})\index{root} $=$ {\tt{'}}{\tt{identifier}} \\ 
{\bf then }{\rm{mk\_tree}}\,({\tt{'}}{\tt{entry\_value}}, {\rm{rcons}}\,({\rm{lexeme}}\,({\it{id\/}})\index{lexeme}, {\sc{ascii\_single\_quote}}\index{ascii\_single\_quote})\index{rcons})\index{mk\_tree} \\ 
{\bf else }\=\+{\bf let }\=\+{\it{n\/}}{\bf $\;$ be$\;\;$}{\rm{mk\_entry\_value\_lexeme}}\,({\it{id\/}})\index{mk\_entry\_value\_lexeme}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{entry\_value\_lexemep}}\,({\it{n\/}})\index{entry\_value\_lexemep} \\ 
{\bf then }{\rm{mk\_tree}}\,({\tt{'}}{\tt{entry\_value}}, {\it{n\/}})\index{mk\_tree} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endif}\-\-
\end{tabbing}
      

\begin{verbatim}; need:  CHARACTER_VALUE STRING_VALUE


; ------------
;  Non-Leaves
; ------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{mk\_empty}$\;\;$
{\sc{mk\_empty}}\index{mk\_empty} $=$ {\rm{mk\_tree}}\,({\tt{'}}{\tt{empty}}, {\bf{nil}})\index{mk\_tree}
\end{tabbing}

\begin{verbatim}; Some (all?) of the following need work.

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{mk\_number} \\  
\=\+{\rm{mk\_number}}\,({\it{e\/}})\index{mk\_number} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{e\/}} $\in\;${\bf{N}}${}$$\;\;${\bf then }{\rm{mk\_tree}}\,({\tt{'}}{\tt{number}}, {\rm{mk\_digit\_list}}\,({\it{e\/}})\index{mk\_digit\_list})\index{mk\_tree} \\ 
{\bf else }{\rm{mk\_tree}}\,({\tt{'}}{\tt{number}}, {\it{e\/}})\index{mk\_tree}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mk\_literal\_value} \\  
\=\+{\rm{mk\_literal\_value}}\,({\it{e\/}})\index{mk\_literal\_value} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{e\/}} $\in\;${\bf{N}}${}$$\;\;${\bf then }{\rm{mk\_tree}}\,({\tt{'}}{\tt{literal\_value}}, {\rm{mk\_number}}\,({\it{e\/}})\index{mk\_number})\index{mk\_tree} \\ 
{\bf else }{\rm{mk\_tree}}\,({\tt{'}}{\tt{literal\_value}}, {\it{e\/}})\index{mk\_tree}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mk\_primary\_value} \\  
\=\+{\rm{mk\_primary\_value}}\,({\it{e\/}})\index{mk\_primary\_value} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{e\/}} $\in\;${\bf{N}}${}$$\;\;${\bf then }{\rm{mk\_tree}}\,({\tt{'}}{\tt{primary\_value}}, {\rm{mk\_literal\_value}}\,({\it{e\/}})\index{mk\_literal\_value})\index{mk\_tree} \\ 
{\bf elseif }{\rm{litatom}}\,({\it{e\/}})$\;\;${\bf then }{\rm{mk\_tree}}\,({\tt{'}}{\tt{primary\_value}}, {\rm{mk\_identifier}}\,({\it{e\/}})\index{mk\_identifier})\index{mk\_tree} \\ 
{\bf else }{\rm{mk\_tree}}\,({\tt{'}}{\tt{primary\_value}}, {\it{e\/}})\index{mk\_tree}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mk\_modified\_primary\_value} \\  
\=\+{\rm{mk\_modified\_primary\_value}}\,({\it{e\/}})\index{mk\_modified\_primary\_value} \\ 
$=$$\;\;\;\;${\rm{mk\_tree}}\,({\tt{'}}{\tt{modified\_primary\_value}}, {\rm{mk\_primary\_value}}\,({\it{e\/}})\index{mk\_primary\_value})\index{mk\_tree}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mk\_expression} \\  
\=\+{\rm{mk\_expression}}\,({\it{e\/}})\index{mk\_expression} \\ 
$=$$\;\;\;\;$\=\+{\bf if }({\it{e\/}} $\in\;${\bf{N}}${}$) $\vee$ {\rm{litatom}}\,({\it{e\/}}) \\ 
{\bf then }{\rm{mk\_tree}}\,({\tt{'}}{\tt{expression}}, {\rm{mk\_modified\_primary\_value}}\,({\it{e\/}})\index{mk\_modified\_primary\_value})\index{mk\_tree} \\ 
{\bf else }{\rm{mk\_tree}}\,({\tt{'}}{\tt{expression}}, {\it{e\/}})\index{mk\_tree}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mk\_scalar\_const\_unit} \\  
\=\+{\rm{mk\_scalar\_const\_unit}}\,({\it{n\/}}, {\it{v\/}}, {\it{q\/}})\index{mk\_scalar\_const\_unit} \\ 
$=$$\;\;\;\;${\rm{mk\_tree}}\,(\=\+{\tt{'}}{\tt{constant\_declaration}}, \\ 
{\rm{list}}\,(\=\+{\rm{mk\_reserved\_word}}\,({\tt{'}}{\tt{const}})\index{mk\_reserved\_word}, \\ 
{\rm{mk\_identifier}}\,({\it{v\/}})\index{mk\_identifier}, \\ 
{\rm{mk\_special\_symbol}}\,({\tt{'}}{\tt{colon}})\index{mk\_special\_symbol}, \\ 
{\rm{mk\_tree}}\,({\tt{'}}{\tt{type\_specification}}, {\it{n\/}})\index{mk\_tree}, \\ 
{\rm{mk\_special\_symbol}}\,({\tt{'}}{\tt{colon\_equal}})\index{mk\_special\_symbol}, \\ 
{\rm{mk\_tree}}\,({\tt{'}}{\tt{constant\_body}}, {\rm{mk\_expression}}\,({\it{q\/}})\index{mk\_expression})\index{mk\_tree})\-)\-\index{mk\_tree}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mk\_named\_unit} \\  
\=\+{\rm{mk\_named\_unit}}\,({\it{u\/}}, {\it{s\/}})\index{mk\_named\_unit} \\ 
$=$$\;\;\;\;${\rm{mk\_tree}}\,(\=\+{\tt{'}}{\tt{name\_declaration}}, \\ 
{\rm{list}}\,(\=\+{\rm{mk\_reserved\_word}}\,({\tt{'}}{\tt{name}})\index{mk\_reserved\_word}, \\ 
{\rm{mk\_tree}}\,({\tt{'}}{\tt{local\_aliases}}, {\it{u\/}})\index{mk\_tree}, \\ 
{\rm{mk\_reserved\_word}}\,({\tt{'}}{\tt{from}})\index{mk\_reserved\_word}, \\ 
{\it{s\/}})\-)\-\index{mk\_tree}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mk\_single\_formal\_data\_paramete!r} \\  
\=\+{\rm{mk\_single\_formal\_data\_parameter}}\,({\it{a\/}}, {\it{p\/}}, {\it{ft\/}})\index{mk\_single\_formal\_data\_paramete!r} \\ 
$=$$\;\;\;\;${\rm{mk\_tree}}\,(\=\+{\tt{'}}{\tt{similar\_formal\_data\_parameters}}, \\ 
{\rm{list}}\,(\=\+{\rm{mk\_tree}}\,(\=\+{\tt{'}}{\tt{opt\_access\_specification}}, \\ 
{\rm{mk\_reserved\_word}}\,({\it{a\/}})\index{mk\_reserved\_word})\-\index{mk\_tree}, \\ 
{\rm{mk\_tree}}\,({\tt{'}}{\tt{identifier\_list}}, {\it{p\/}})\index{mk\_tree}, \\ 
{\rm{mk\_special\_symbol}}\,({\tt{'}}{\tt{colon}})\index{mk\_special\_symbol}, \\ 
{\it{ft\/}})\-)\-\index{mk\_tree}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mk\_arg\_list} \\  
\=\+{\rm{mk\_arg\_list}}\,({\it{x\/}})\index{mk\_arg\_list} \\ 
$=$$\;\;\;\;${\rm{mk\_tree}}\,(\=\+{\tt{'}}{\tt{arg\_list}}, \\ 
{\rm{list}}\,(\=\+{\rm{mk\_special\_symbol}}\,({\tt{'}}{\tt{open\_paren}})\index{mk\_special\_symbol}, \\ 
{\it{x\/}}, \\ 
{\rm{mk\_special\_symbol}}\,({\tt{'}}{\tt{close\_paren}})\index{mk\_special\_symbol})\-)\-\index{mk\_tree}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mk\_actual} \\  
\=\+{\rm{mk\_actual}}\,({\it{n\/}})\index{mk\_actual} \\ 
$=$$\;\;\;\;${\rm{mk\_tree}}\,(\=\+{\tt{'}}{\tt{expression}}, \\ 
{\rm{mk\_tree}}\,(\=\+{\tt{'}}{\tt{modified\_primary\_value}}, \\ 
{\rm{mk\_tree}}\,({\tt{'}}{\tt{primary\_value}}, {\rm{mk\_identifier}}\,({\it{n\/}})\index{mk\_identifier})\index{mk\_tree})\-\index{mk\_tree})\-\index{mk\_tree}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mk\_actual\_list} \\  
\=\+{\rm{mk\_actual\_list}}\,({\it{as\/}}, {\it{n\/}})\index{mk\_actual\_list} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{as\/}} $=$ {\bf{nil}}$\;\;${\bf then }{\rm{mk\_tree}}\,({\tt{'}}{\tt{value\_list}}, {\rm{mk\_actual}}\,({\it{n\/}})\index{mk\_actual})\index{mk\_tree} \\ 
{\bf else }{\rm{mk\_tree}}\,(\=\+{\tt{'}}{\tt{value\_list}}, \\ 
{\rm{list}}\,({\it{as\/}}, {\rm{mk\_special\_symbol}}\,({\tt{'}}{\tt{comma}})\index{mk\_special\_symbol}, {\rm{mk\_actual}}\,({\it{n\/}})\index{mk\_actual}))\-\index{mk\_tree}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{namelist\_to\_actuals} \\  
\=\+{\rm{namelist\_to\_actuals}}\,({\it{ns\/}}, {\it{as\/}})\index{namelist\_to\_actuals} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{ns\/}} $\simeq\;${{\bf{nil}}}${}$ \\ 
{\bf then }\=\+{\bf if }{\it{as\/}} $=$ {\bf{nil}}$\;\;${\bf then }{\it{as\/}} \\ 
{\bf else }{\rm{mk\_arg\_list}}\,({\it{as\/}})\index{mk\_arg\_list}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{namelist\_to\_actuals}}\,({\rm{cdr}}\,({\it{ns\/}}), {\rm{mk\_actual\_list}}\,({\it{as\/}}, {\rm{car}}\,({\it{ns\/}}))\index{mk\_actual\_list})\index{namelist\_to\_actuals}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mk\_component\_selectors} \\  
{\rm{mk\_component\_selectors}}\,({\it{x\/}})\index{mk\_component\_selectors} $=$ {\rm{mk\_tree}}\,({\tt{'}}{\tt{component\_selectors}}, {\it{x\/}})\index{mk\_tree}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mk\_value\_modifiers} \\  
\=\+{\rm{mk\_value\_modifiers}}\,({\it{x\/}})\index{mk\_value\_modifiers} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{root}}\,({\it{x\/}})\index{root} $=$ {\tt{'}}{\tt{arg\_list}} \\ 
{\bf then }{\rm{mk\_tree}}\,({\tt{'}}{\tt{value\_modifiers}}, {\rm{mk\_component\_selectors}}\,({\it{x\/}})\index{mk\_component\_selectors})\index{mk\_tree} \\ 
{\bf else }{\rm{mk\_tree}}\,({\tt{'}}{\tt{value\_modifiers}}, {\it{x\/}})\index{mk\_tree}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mk\_true\_expression} \\  
\=\+{\sc{mk\_true\_expression}}\index{mk\_true\_expression} \\ 
$=$$\;\;\;\;${\rm{mk\_tree}}\,(\=\+{\tt{'}}{\tt{expression}}, \\ 
{\rm{mk\_tree}}\,(\=\+{\tt{'}}{\tt{modified\_primary\_value}}, \\ 
{\rm{mk\_primary\_value}}\,({\tt{'}}{\tt{true}})\index{mk\_primary\_value})\-\index{mk\_tree})\-\index{mk\_tree}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mk\_identifier\_list} \\  
\=\+{\rm{mk\_identifier\_list}}\,({\it{is\/}}, {\it{i\/}})\index{mk\_identifier\_list} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{is\/}} $=$ {\bf{nil}}$\;\;${\bf then }{\rm{mk\_tree}}\,({\tt{'}}{\tt{identifier\_list}}, {\it{i\/}})\index{mk\_tree} \\ 
{\bf else }{\rm{mk\_tree}}\,(\=\+{\tt{'}}{\tt{identifier\_list}}, \\ 
{\rm{list}}\,({\it{is\/}}, {\rm{mk\_special\_symbol}}\,({\tt{'}}{\tt{comma}})\index{mk\_special\_symbol}, {\it{i\/}}))\-\index{mk\_tree}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mk\_bound\_expression} \\  
\=\+{\rm{mk\_bound\_expression}}\,({\it{qn\/}}, {\it{ts\/}}, {\it{be\/}})\index{mk\_bound\_expression} \\ 
$=$$\;\;\;\;${\rm{mk\_tree}}\,(\=\+{\tt{'}}{\tt{bound\_expression}}, \\ 
{\rm{list}}\,(\=\+{\it{qn\/}}, \\ 
{\rm{mk\_special\_symbol}}\,({\tt{'}}{\tt{colon}})\index{mk\_special\_symbol}, \\ 
{\it{ts\/}}, \\ 
{\rm{mk\_special\_symbol}}\,({\tt{'}}{\tt{comma}})\index{mk\_special\_symbol}, \\ 
{\it{be\/}})\-)\-\index{mk\_tree}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mk\_quantified\_expression} \\  
\=\+{\rm{mk\_quantified\_expression}}\,({\it{qf\/}}, {\it{qn\/}}, {\it{ts\/}}, {\it{be\/}})\index{mk\_quantified\_expression} \\ 
$=$$\;\;\;\;${\rm{mk\_tree}}\,(\=\+{\tt{'}}{\tt{expression}}, \\ 
{\rm{list}}\,(\=\+\=\+{\bf if }{\rm{litatom}}\,({\it{qf\/}})$\;\;${\bf then }{\rm{mk\_reserved\_word}}\,({\it{qf\/}})\index{mk\_reserved\_word} \\ 
{\bf else }{\it{qf\/}}$\;${\bf  endif}\-, \\ 
{\rm{mk\_bound\_expression}}\,({\it{qn\/}}, {\it{ts\/}}, {\it{be\/}})\index{mk\_bound\_expression})\-)\-\index{mk\_tree}\-
\end{tabbing}



\begin{verbatim};; ********
;;  errors
;; ********

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{mk\_error}$\;\;$
{\rm{mk\_error}}\,({\it{y\/}})\index{mk\_error} $=$ {\rm{mk\_tree}}\,({\tt{'}}{\tt{error*}}, {\it{y\/}})\index{mk\_tree}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mk\_error\_decl}$\;\;$
{\rm{mk\_error\_decl}}\,({\it{y\/}})\index{mk\_error\_decl} $=$ {\rm{mk\_error}}\,({\it{y\/}})\index{mk\_error}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{errorp}$\;\;$
{\rm{errorp}}\,({\it{x\/}})\index{errorp} $=$ ({\rm{treep}}\,({\it{x\/}})\index{treep} $\wedge$ ({\rm{root}}\,({\it{x\/}})\index{root} $=$ {\tt{'}}{\tt{error*}}))
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{error\_msg} \\  
\=\+{\rm{error\_msg}}\,({\it{x\/}})\index{error\_msg} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{errorp}}\,({\it{x\/}})\index{errorp}$\;\;${\bf then }{\rm{subtrees}}\,({\it{x\/}})\index{subtrees} \\ 
{\bf else }{\tt{'}}{\tt{(}}{\tt{no}}{\tt{ }}{\tt{error}}{\tt{ }}{\tt{message}}{\tt{)}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{actual\_formal\_type\_error} \\  
\=\+{\rm{actual\_formal\_type\_error}}\,({\it{a\/}}, {\it{ft\/}})\index{actual\_formal\_type\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{actual}}, \\ 
{\tt{'}}{\tt{parameter}}, \\ 
{\it{a\/}}, \\ 
{\tt{'}}{\tt{is}}, \\ 
{\tt{'}}{\tt{not}}, \\ 
{\tt{'}}{\tt{in}}, \\ 
{\tt{'}}{\tt{formal}}, \\ 
{\tt{'}}{\tt{type}}, \\ 
{\it{ft\/}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{adjoin\_args\_error} \\  
\=\+{\rm{adjoin\_args\_error}}\,({\it{v\/}})\index{adjoin\_args\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{cannot}}, \\ 
{\tt{'}}{\tt{adjoin}}, \\ 
{\tt{'}}{\tt{to}}, \\ 
{\it{v\/}}, \\ 
{\tt{'}}{\tt{because}}, \\ 
{\tt{'}}{\tt{it}}, \\ 
{\tt{'}}{\tt{is}}, \\ 
{\tt{'}}{\tt{not}}, \\ 
{\tt{'}}{\tt{a}}, \\ 
{\tt{'}}{\tt{set}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{alias\_id\_error} \\  
\=\+{\rm{alias\_id\_error}}\,({\it{i\/}}, {\it{sn\/}})\index{alias\_id\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error\_decl}}\,({\rm{cons}}\,(\=\+{\it{sn\/}}, \\ 
{\rm{append}}\,(\=\+{\tt{'}}{\tt{(}}{\tt{is}}{\tt{ }}{\tt{not}}{\tt{ }}{\tt{the}}{\tt{ }}{\tt{home}}{\tt{ }}{\tt{scope}}{\tt{ }}{\tt{of}}{\tt{ }}{\tt{unit}}{\tt{)}}, \\ 
{\rm{list}}\,({\it{i\/}}))\-)\-)\index{mk\_error\_decl}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{append\_args\_error} \\  
\=\+{\rm{append\_args\_error}}\,({\it{v1\/}}, {\it{v2\/}})\index{append\_args\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{append}}, \\ 
{\tt{'}}{\tt{is}}, \\ 
{\tt{'}}{\tt{not}}, \\ 
{\tt{'}}{\tt{defined}}, \\ 
{\tt{'}}{\tt{on}}, \\ 
{\it{v1\/}}, \\ 
{\tt{'}}{\tt{and}}, \\ 
{\it{v2\/}}, \\ 
{\tt{'}}{\tt{because}}, \\ 
{\tt{'}}{\tt{they}}, \\ 
{\tt{'}}{\tt{are}}, \\ 
{\tt{'}}{\tt{not}}, \\ 
{\tt{'}}{\tt{sequences}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{array\_index\_error} \\  
\=\+{\rm{array\_index\_error}}\,({\it{id\/}})\index{array\_index\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{array}}, \\ 
{\tt{'}}{\tt{index}}, \\ 
{\tt{'}}{\tt{type}}, \\ 
{\it{id\/}}, \\ 
{\tt{'}}{\tt{is}}, \\ 
{\tt{'}}{\tt{not}}, \\ 
{\tt{'}}{\tt{a}}, \\ 
{\tt{'}}{\tt{nonrational}}, \\ 
{\tt{'}}{\tt{simple}}, \\ 
{\tt{'}}{\tt{type}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{bad\_string\_error} \\  
\=\+{\rm{bad\_string\_error}}\,({\it{s\/}})\index{bad\_string\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,({\it{s\/}}, {\tt{'}}{\tt{is}}, {\tt{'}}{\tt{not}}, {\tt{'}}{\tt{a}}, {\tt{'}}{\tt{well\_formed}}, {\tt{'}}{\tt{string}}))\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{bad\_value\_modifiers\_error} \\  
\=\+{\rm{bad\_value\_modifiers\_error}}\,({\it{x\/}})\index{bad\_value\_modifiers\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,({\tt{'}}{\tt{ill\_formed}}, {\tt{'}}{\tt{value\_modifiers}}, {\it{x\/}}))\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{character\_error} \\  
{\rm{character\_error}}\,({\it{x\/}})\index{character\_error} $=$ {\rm{mk\_error}}\,({\rm{list}}\,({\it{x\/}}, {\tt{'}}{\tt{is}}, {\tt{'}}{\tt{not}}, {\tt{'}}{\tt{a}}, {\tt{'}}{\tt{character}}))\index{mk\_error}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{colon\_gt\_args\_error} \\  
\=\+{\sc{colon\_gt\_args\_error}}\index{colon\_gt\_args\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\tt{'}}{\tt{(}}{\tt{can}}{\tt{ }}{\tt{colon\_gt}}{\tt{ }}{\tt{only}}{\tt{ }}{\tt{to}}{\tt{ }}{\tt{sequences}}{\tt{)}})\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{component\_assign\_error} \\  
\=\+{\rm{component\_assign\_error}}\,({\it{x\/}})\index{component\_assign\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{components}}, \\ 
{\tt{'}}{\tt{of}}, \\ 
{\tt{'}}{\tt{value}}, \\ 
{\it{x\/}}, \\ 
{\tt{'}}{\tt{cannot}}, \\ 
{\tt{'}}{\tt{be}}, \\ 
{\tt{'}}{\tt{assigned}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{condition\_params\_error} \\  
\=\+{\rm{condition\_params\_error}}\,({\it{e\/}})\index{condition\_params\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{expression}}, \\ 
{\it{e\/}}, \\ 
{\tt{'}}{\tt{should}}, \\ 
{\tt{'}}{\tt{not}}, \\ 
{\tt{'}}{\tt{have}}, \\ 
{\tt{'}}{\tt{actual}}, \\ 
{\tt{'}}{\tt{condition}}, \\ 
{\tt{'}}{\tt{parameters}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{difference\_args\_error} \\  
\=\+{\rm{difference\_args\_error}}\,({\it{v1\/}}, {\it{v2\/}})\index{difference\_args\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{difference}}, \\ 
{\tt{'}}{\tt{is}}, \\ 
{\tt{'}}{\tt{not}}, \\ 
{\tt{'}}{\tt{defined}}, \\ 
{\tt{'}}{\tt{on}}, \\ 
{\it{v1\/}}, \\ 
{\tt{'}}{\tt{and}}, \\ 
{\it{v2\/}}, \\ 
{\tt{'}}{\tt{because}}, \\ 
{\tt{'}}{\tt{they}}, \\ 
{\tt{'}}{\tt{are}}, \\ 
{\tt{'}}{\tt{neither}}, \\ 
{\tt{'}}{\tt{mappings}}, \\ 
{\tt{'}}{\tt{nor}}, \\ 
{\tt{'}}{\tt{sets}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{domain\_arg\_error} \\  
\=\+{\sc{domain\_arg\_error}}\index{domain\_arg\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\tt{'}}{\tt{(}}{\tt{domain}}{\tt{ }}{\tt{is}}{\tt{ }}{\tt{defined}}{\tt{ }}{\tt{only}}{\tt{ }}{\tt{on}}{\tt{ }}{\tt{mappings}}{\tt{)}})\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{duplicate\_field\_names\_error} \\  
\=\+{\rm{duplicate\_field\_names\_error}}\,({\it{d\/}})\index{duplicate\_field\_names\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,({\it{d\/}}, {\tt{'}}{\tt{has}}, {\tt{'}}{\tt{duplicate}}, {\tt{'}}{\tt{field}}, {\tt{'}}{\tt{names}}))\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{duplicate\_param\_names\_error} \\  
\=\+{\rm{duplicate\_param\_names\_error}}\,({\it{n\/}})\index{duplicate\_param\_names\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,({\tt{'}}{\tt{duplicate}}, {\tt{'}}{\tt{formal}}, {\tt{'}}{\tt{parameter}}, {\tt{'}}{\tt{names}}, {\it{n\/}}))\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{each\_id\_type\_error} \\  
\=\+{\rm{each\_id\_type\_error}}\,({\it{e\/}}, {\it{c\/}})\index{each\_id\_type\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{the}}, \\ 
{\tt{'}}{\tt{bound}}, \\ 
{\tt{'}}{\tt{identifier}}, \\ 
{\tt{'}}{\tt{type}}, \\ 
{\tt{'}}{\tt{in}}, \\ 
{\it{e\/}}, \\ 
{\tt{'}}{\tt{of}}, \\ 
{\tt{'}}{\tt{scope}}, \\ 
{\it{c\/}}, \\ 
{\tt{'}}{\tt{is}}, \\ 
{\tt{'}}{\tt{not}}, \\ 
{\tt{'}}{\tt{a}}, \\ 
{\tt{'}}{\tt{bounded}}, \\ 
{\tt{'}}{\tt{index}}, \\ 
{\tt{'}}{\tt{type}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{empty\_seq\_error} \\  
\=\+{\rm{empty\_seq\_error}}\,({\it{fn\/}}, {\it{s\/}})\index{empty\_seq\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,({\it{fn\/}}, {\tt{'}}{\tt{of}}, {\tt{'}}{\tt{an}}, {\tt{'}}{\tt{empty}}, {\tt{'}}{\tt{sequence}}, {\it{s\/}}))\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{empty\_type\_error} \\  
{\rm{empty\_type\_error}}\,({\it{td\/}})\index{empty\_type\_error} $=$ {\rm{mk\_error}}\,({\rm{list}}\,({\tt{'}}{\tt{type}}, {\it{td\/}}, {\tt{'}}{\tt{is}}, {\tt{'}}{\tt{empty}}))\index{mk\_error}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{entry\_not\_true\_error} \\  
\=\+{\rm{entry\_not\_true\_error}}\,({\it{fn\/}}, {\it{sn\/}})\index{entry\_not\_true\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{the}}, \\ 
{\tt{'}}{\tt{entry}}, \\ 
{\tt{'}}{\tt{spec}}, \\ 
{\tt{'}}{\tt{is}}, \\ 
{\tt{'}}{\tt{not}}, \\ 
{\tt{'}}{\tt{true}}, \\ 
{\tt{'}}{\tt{for}}, \\ 
{\tt{'}}{\tt{function}}, \\ 
{\it{fn\/}}, \\ 
{\tt{'}}{\tt{in}}, \\ 
{\tt{'}}{\tt{scope}}, \\ 
{\it{sn\/}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{field\_name\_reserved\_error} \\  
\=\+{\rm{field\_name\_reserved\_error}}\,({\it{fds\/}})\index{field\_name\_reserved\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{reserved}}, \\ 
{\tt{'}}{\tt{identifier}}, \\ 
{\tt{'}}{\tt{cannot}}, \\ 
{\tt{'}}{\tt{be}}, \\ 
{\tt{'}}{\tt{used}}, \\ 
{\tt{'}}{\tt{as}}, \\ 
{\tt{'}}{\tt{a}}, \\ 
{\tt{'}}{\tt{record}}, \\ 
{\tt{'}}{\tt{field}}, \\ 
{\tt{'}}{\tt{name}}, \\ 
{\tt{'}}{\tt{in}}, \\ 
{\it{fds\/}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{first\_arg\_error} \\  
\=\+{\sc{first\_arg\_error}}\index{first\_arg\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\tt{'}}{\tt{(}}{\tt{first}}{\tt{ }}{\tt{is}}{\tt{ }}{\tt{defined}}{\tt{ }}{\tt{only}}{\tt{ }}{\tt{on}}{\tt{ }}{\tt{sequences}}{\tt{)}})\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{function\_access\_error} \\  
\=\+{\rm{function\_access\_error}}\,({\it{fp\/}})\index{function\_access\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{function}}, \\ 
{\tt{'}}{\tt{formal}}, \\ 
{\tt{'}}{\tt{parameter}}, \\ 
{\tt{'}}{\tt{cannot}}, \\ 
{\tt{'}}{\tt{be}}, \\ 
{\tt{'}}{\tt{var}}, \\ 
{\it{fp\/}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{if\_test\_not\_boolean\_error} \\  
\=\+{\rm{if\_test\_not\_boolean\_error}}\,({\it{e\/}}, {\it{sn\/}})\index{if\_test\_not\_boolean\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{the}}, \\ 
{\tt{'}}{\tt{if}}, \\ 
{\tt{'}}{\tt{test}}, \\ 
{\tt{'}}{\tt{of}}, \\ 
{\tt{'}}{\tt{expression}}, \\ 
{\it{e\/}}, \\ 
{\tt{'}}{\tt{in}}, \\ 
{\tt{'}}{\tt{scope}}, \\ 
{\it{sn\/}}, \\ 
{\tt{'}}{\tt{is}}, \\ 
{\tt{'}}{\tt{not}}, \\ 
{\tt{'}}{\tt{a}}, \\ 
{\tt{'}}{\tt{boolean}}, \\ 
{\tt{'}}{\tt{valued}}, \\ 
{\tt{'}}{\tt{expression}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{in\_arg\_error} \\  
\=\+{\rm{in\_arg\_error}}\,({\it{v\/}})\index{in\_arg\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{in}}, \\ 
{\tt{'}}{\tt{is}}, \\ 
{\tt{'}}{\tt{not}}, \\ 
{\tt{'}}{\tt{defined}}, \\ 
{\tt{'}}{\tt{on}}, \\ 
{\it{v\/}}, \\ 
{\tt{'}}{\tt{because}}, \\ 
{\tt{'}}{\tt{it}}, \\ 
{\tt{'}}{\tt{is}}, \\ 
{\tt{'}}{\tt{neither}}, \\ 
{\tt{'}}{\tt{a}}, \\ 
{\tt{'}}{\tt{sequence}}, \\ 
{\tt{'}}{\tt{nor}}, \\ 
{\tt{'}}{\tt{a}}, \\ 
{\tt{'}}{\tt{set}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{indeterminate\_fn\_result\_erro!r} \\  
\=\+{\rm{indeterminate\_fn\_result\_error}}\,({\it{fn\/}}, {\it{sn\/}})\index{indeterminate\_fn\_result\_erro!r} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{function}}, \\ 
{\it{fn\/}}, \\ 
{\tt{'}}{\tt{of}}, \\ 
{\tt{'}}{\tt{scope}}, \\ 
{\it{sn\/}}, \\ 
{\tt{'}}{\tt{returned}}, \\ 
{\tt{'}}{\tt{an}}, \\ 
{\tt{'}}{\tt{indeterminate}}, \\ 
{\tt{'}}{\tt{value}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{intersect\_args\_error} \\  
\=\+{\rm{intersect\_args\_error}}\,({\it{v1\/}}, {\it{v2\/}})\index{intersect\_args\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{intersect}}, \\ 
{\tt{'}}{\tt{is}}, \\ 
{\tt{'}}{\tt{not}}, \\ 
{\tt{'}}{\tt{defined}}, \\ 
{\tt{'}}{\tt{on}}, \\ 
{\it{v1\/}}, \\ 
{\tt{'}}{\tt{and}}, \\ 
{\it{v2\/}}, \\ 
{\tt{'}}{\tt{because}}, \\ 
{\tt{'}}{\tt{they}}, \\ 
{\tt{'}}{\tt{are}}, \\ 
{\tt{'}}{\tt{neither}}, \\ 
{\tt{'}}{\tt{mappings}}, \\ 
{\tt{'}}{\tt{nor}}, \\ 
{\tt{'}}{\tt{sets}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{last\_arg\_error} \\  
\=\+{\sc{last\_arg\_error}}\index{last\_arg\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\tt{'}}{\tt{(}}{\tt{last}}{\tt{ }}{\tt{is}}{\tt{ }}{\tt{defined}}{\tt{ }}{\tt{only}}{\tt{ }}{\tt{on}}{\tt{ }}{\tt{sequences}}{\tt{)}})\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{lower\_pred\_error} \\  
\=\+{\rm{lower\_pred\_error}}\,({\it{td\/}})\index{lower\_pred\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,({\tt{'}}{\tt{pred}}, {\tt{'}}{\tt{of}}, {\tt{'}}{\tt{lower}}, {\tt{'}}{\tt{of}}, {\tt{'}}{\tt{type}}, {\it{td\/}}))\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{lt\_colon\_args\_error} \\  
\=\+{\sc{lt\_colon\_args\_error}}\index{lt\_colon\_args\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\tt{'}}{\tt{(}}{\tt{can}}{\tt{ }}{\tt{lt\_colon}}{\tt{ }}{\tt{only}}{\tt{ }}{\tt{to}}{\tt{ }}{\tt{sequences}}{\tt{)}})\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{many\_post\_conditions\_error} \\  
\=\+{\rm{many\_post\_conditions\_error}}\,({\it{u\/}}, {\it{c\/}})\index{many\_post\_conditions\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\it{u\/}}, \\ 
{\tt{'}}{\tt{has}}, \\ 
{\tt{'}}{\tt{more}}, \\ 
{\tt{'}}{\tt{than}}, \\ 
{\tt{'}}{\tt{one}}, \\ 
{\tt{'}}{\tt{exit}}, \\ 
{\tt{'}}{\tt{specification}}, \\ 
{\tt{'}}{\tt{for}}, \\ 
{\tt{'}}{\tt{condition}}, \\ 
{\it{c\/}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{many\_scope\_error} \\  
\=\+{\rm{many\_scope\_error}}\,({\it{sn\/}})\index{many\_scope\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error\_decl}}\,({\rm{append}}\,(\=\+{\tt{'}}{\tt{(}}{\tt{there}}{\tt{ }}{\tt{are}}{\tt{ }}{\tt{several}}{\tt{ }}{\tt{scopes}}{\tt{ }}{\tt{named}}{\tt{)}}, \\ 
{\rm{list}}\,({\it{sn\/}}))\-)\index{mk\_error\_decl}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{many\_unit\_error} \\  
\=\+{\rm{many\_unit\_error}}\,({\it{i\/}}, {\it{sn\/}})\index{many\_unit\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error\_decl}}\,({\rm{cons}}\,(\=\+{\tt{'}}{\tt{scope}}, \\ 
{\rm{cons}}\,(\=\+{\it{sn\/}}, \\ 
{\rm{append}}\,(\=\+{\tt{'}}{\tt{(}}{\tt{has}}{\tt{ }}{\tt{several}}{\tt{ }}{\tt{units}}{\tt{ }}{\tt{named}}{\tt{)}}, \\ 
{\rm{list}}\,({\it{i\/}}))\-)\-)\-)\index{mk\_error\_decl}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mapping\_merge\_error} \\  
\=\+{\rm{mapping\_merge\_error}}\,({\it{v1\/}}, {\it{v2\/}})\index{mapping\_merge\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{mappings}}, \\ 
{\it{v1\/}}, \\ 
{\tt{'}}{\tt{and}}, \\ 
{\it{v2\/}}, \\ 
{\tt{'}}{\tt{have}}, \\ 
{\tt{'}}{\tt{elements}}, \\ 
{\tt{'}}{\tt{with}}, \\ 
{\tt{'}}{\tt{the}}, \\ 
{\tt{'}}{\tt{same}}, \\ 
{\tt{'}}{\tt{selector}}, \\ 
{\tt{'}}{\tt{and}}, \\ 
{\tt{'}}{\tt{different}}, \\ 
{\tt{'}}{\tt{component}}, \\ 
{\tt{'}}{\tt{values}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mapping\_selector\_type\_error} \\  
\=\+{\rm{mapping\_selector\_type\_error}}\,({\it{sd\/}})\index{mapping\_selector\_type\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{mapping}}, \\ 
{\tt{'}}{\tt{selector}}, \\ 
{\tt{'}}{\tt{type}}, \\ 
{\it{sd\/}}, \\ 
{\tt{'}}{\tt{is}}, \\ 
{\tt{'}}{\tt{not}}, \\ 
{\tt{'}}{\tt{an}}, \\ 
{\tt{'}}{\tt{equality}}, \\ 
{\tt{'}}{\tt{type}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{max\_arg\_error} \\  
\=\+{\sc{max\_arg\_error}}\index{max\_arg\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\tt{'}}{\tt{(}}{\tt{max}}{\tt{ }}{\tt{is}}{\tt{ }}{\tt{defined}}{\tt{ }}{\tt{only}}{\tt{ }}{\tt{on}}{\tt{ }}{\tt{simple}}{\tt{ }}{\tt{types}}{\tt{)}})\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{min\_arg\_error} \\  
\=\+{\sc{min\_arg\_error}}\index{min\_arg\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\tt{'}}{\tt{(}}{\tt{min}}{\tt{ }}{\tt{is}}{\tt{ }}{\tt{defined}}{\tt{ }}{\tt{only}}{\tt{ }}{\tt{on}}{\tt{ }}{\tt{simple}}{\tt{ }}{\tt{types}}{\tt{)}})\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{n\_too\_small} \\  
{\sc{n\_too\_small}}\index{n\_too\_small} $=$ {\rm{mk\_error}}\,({\rm{list}}\,({\tt{'}}{\tt{n}}, {\tt{'}}{\tt{is}}, {\tt{'}}{\tt{too}}, {\tt{'}}{\tt{small}}))\index{mk\_error}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{name\_already\_in\_use\_error} \\  
\=\+{\rm{name\_already\_in\_use\_error}}\,({\it{n\/}})\index{name\_already\_in\_use\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,({\tt{'}}{\tt{the}}, {\tt{'}}{\tt{name}}, {\it{n\/}}, {\tt{'}}{\tt{is}}, {\tt{'}}{\tt{already}}, {\tt{'}}{\tt{in}}, {\tt{'}}{\tt{use}}))\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{negative\_exponent\_error} \\  
{\sc{negative\_exponent\_error}}\index{negative\_exponent\_error} $=$ {\rm{mk\_error}}\,({\tt{'}}{\tt{(}}{\tt{negative}}{\tt{ }}{\tt{exponent}}{\tt{)}})\index{mk\_error}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{no\_function\_defn\_error} \\  
\=\+{\rm{no\_function\_defn\_error}}\,({\it{fn\/}}, {\it{sn\/}})\index{no\_function\_defn\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,({\it{fn\/}}, {\tt{'}}{\tt{in}}, {\tt{'}}{\tt{scope}}, {\it{sn\/}}, {\tt{'}}{\tt{has}}, {\tt{'}}{\tt{no}}, {\tt{'}}{\tt{definition}}))\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{no\_scope\_error} \\  
\=\+{\rm{no\_scope\_error}}\,({\it{sn\/}})\index{no\_scope\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error\_decl}}\,({\rm{append}}\,({\tt{'}}{\tt{(}}{\tt{there}}{\tt{ }}{\tt{is}}{\tt{ }}{\tt{no}}{\tt{ }}{\tt{scope}}{\tt{)}}, {\rm{list}}\,({\it{sn\/}})))\index{mk\_error\_decl}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{no\_such\_component\_error} \\  
\=\+{\rm{no\_such\_component\_error}}\,({\it{s\/}}, {\it{i\/}})\index{no\_such\_component\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,({\it{s\/}}, {\tt{'}}{\tt{has}}, {\tt{'}}{\tt{no}}, {\tt{'}}{\tt{component}}, {\it{i\/}}))\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{no\_such\_field\_error} \\  
{\rm{no\_such\_field\_error}}\,({\it{r\/}}, {\it{n\/}})\index{no\_such\_field\_error} $=$ {\rm{mk\_error}}\,({\rm{list}}\,({\it{r\/}}, {\tt{'}}{\tt{has}}, {\tt{'}}{\tt{no}}, {\tt{'}}{\tt{field}}, {\it{n\/}}))\index{mk\_error}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{no\_unit\_error} \\  
\=\+{\rm{no\_unit\_error}}\,({\it{i\/}}, {\it{sn\/}})\index{no\_unit\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error\_decl}}\,({\rm{list}}\,({\tt{'}}{\tt{unit}}, {\it{i\/}}, {\tt{'}}{\tt{is}}, {\tt{'}}{\tt{not}}, {\tt{'}}{\tt{in}}, {\tt{'}}{\tt{scope}}, {\it{sn\/}}))\index{mk\_error\_decl}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{non\_simple\_subrange\_type\_er!ror} \\  
\=\+{\rm{non\_simple\_subrange\_type\_error}}\,({\it{td\/}})\index{non\_simple\_subrange\_type\_er!ror} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,({\tt{'}}{\tt{subrange}}, {\tt{'}}{\tt{of}}, {\tt{'}}{\tt{non-simple}}, {\tt{'}}{\tt{type}}, {\it{td\/}}))\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{nonfirst\_arg\_error} \\  
\=\+{\sc{nonfirst\_arg\_error}}\index{nonfirst\_arg\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\tt{'}}{\tt{(}}{\tt{nonfirst}}{\tt{ }}{\tt{is}}{\tt{ }}{\tt{defined}}{\tt{ }}{\tt{only}}{\tt{ }}{\tt{on}}{\tt{ }}{\tt{sequences}}{\tt{)}})\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{nonlast\_arg\_error} \\  
\=\+{\sc{nonlast\_arg\_error}}\index{nonlast\_arg\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\tt{'}}{\tt{(}}{\tt{nonlast}}{\tt{ }}{\tt{is}}{\tt{ }}{\tt{defined}}{\tt{ }}{\tt{only}}{\tt{ }}{\tt{on}}{\tt{ }}{\tt{sequences}}{\tt{)}})\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{not\_array\_error} \\  
{\rm{not\_array\_error}}\,({\it{x\/}})\index{not\_array\_error} $=$ {\rm{mk\_error}}\,({\rm{list}}\,({\it{x\/}}, {\tt{'}}{\tt{is}}, {\tt{'}}{\tt{not}}, {\tt{'}}{\tt{an}}, {\tt{'}}{\tt{array}}))\index{mk\_error}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{not\_binary\_op\_error} \\  
\=\+{\rm{not\_binary\_op\_error}}\,({\it{op\/}})\index{not\_binary\_op\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,({\it{op\/}}, {\tt{'}}{\tt{is}}, {\tt{'}}{\tt{not}}, {\tt{'}}{\tt{a}}, {\tt{'}}{\tt{binary}}, {\tt{'}}{\tt{operator}}))\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{not\_defined\_on\_type\_error} \\  
\=\+{\rm{not\_defined\_on\_type\_error}}\,({\it{op\/}}, {\it{td\/}})\index{not\_defined\_on\_type\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,({\it{op\/}}, {\tt{'}}{\tt{is}}, {\tt{'}}{\tt{not}}, {\tt{'}}{\tt{defined}}, {\tt{'}}{\tt{on}}, {\tt{'}}{\tt{type}}, {\it{td\/}}))\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{not\_equality\_type\_error} \\  
\=\+{\rm{not\_equality\_type\_error}}\,({\it{td\/}})\index{not\_equality\_type\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,({\it{td\/}}, {\tt{'}}{\tt{is}}, {\tt{'}}{\tt{not}}, {\tt{'}}{\tt{an}}, {\tt{'}}{\tt{equality}}, {\tt{'}}{\tt{type}}))\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{not\_expression\_error} \\  
\=\+{\rm{not\_expression\_error}}\,({\it{e\/}})\index{not\_expression\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,({\it{e\/}}, {\tt{'}}{\tt{is}}, {\tt{'}}{\tt{not}}, {\tt{'}}{\tt{an}}, {\tt{'}}{\tt{expression}}))\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{not\_function\_or\_const\_error} \\  
\=\+{\rm{not\_function\_or\_const\_error}}\,({\it{fn\/}}, {\it{sn\/}})\index{not\_function\_or\_const\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\it{fn\/}}, \\ 
{\tt{'}}{\tt{of}}, \\ 
{\tt{'}}{\tt{scope}}, \\ 
{\it{sn\/}}, \\ 
{\tt{'}}{\tt{is}}, \\ 
{\tt{'}}{\tt{not}}, \\ 
{\tt{'}}{\tt{a}}, \\ 
{\tt{'}}{\tt{function}}, \\ 
{\tt{'}}{\tt{or}}, \\ 
{\tt{'}}{\tt{constant}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{not\_in\_set\_error} \\  
{\rm{not\_in\_set\_error}}\,({\it{e\/}}, {\it{s\/}})\index{not\_in\_set\_error} $=$ {\rm{mk\_error}}\,({\rm{list}}\,({\it{e\/}}, {\tt{'}}{\tt{is}}, {\tt{'}}{\tt{not}}, {\tt{'}}{\tt{in}}, {\tt{'}}{\tt{set}}, {\it{s\/}}))\index{mk\_error}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{not\_in\_type\_error} \\  
{\rm{not\_in\_type\_error}}\,({\it{v\/}}, {\it{td\/}})\index{not\_in\_type\_error} $=$ {\rm{mk\_error}}\,({\rm{list}}\,({\it{v\/}}, {\tt{'}}{\tt{is}}, {\tt{'}}{\tt{not}}, {\tt{'}}{\tt{in}}, {\tt{'}}{\tt{type}}, {\it{td\/}}))\index{mk\_error}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{not\_mapping\_error} \\  
{\rm{not\_mapping\_error}}\,({\it{x\/}})\index{not\_mapping\_error} $=$ {\rm{mk\_error}}\,({\rm{list}}\,({\it{x\/}}, {\tt{'}}{\tt{is}}, {\tt{'}}{\tt{not}}, {\tt{'}}{\tt{a}}, {\tt{'}}{\tt{mapping}}))\index{mk\_error}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{not\_mapping\_type\_error} \\  
\=\+{\rm{not\_mapping\_type\_error}}\,({\it{td\/}})\index{not\_mapping\_type\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,({\it{td\/}}, {\tt{'}}{\tt{is}}, {\tt{'}}{\tt{not}}, {\tt{'}}{\tt{a}}, {\tt{'}}{\tt{mapping}}, {\tt{'}}{\tt{type}}))\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{not\_range\_error} \\  
\=\+{\rm{not\_range\_error}}\,({\it{r\/}}, {\it{sn\/}})\index{not\_range\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,({\it{r\/}}, {\tt{'}}{\tt{of}}, {\tt{'}}{\tt{scope}}, {\it{sn\/}}, {\tt{'}}{\tt{is}}, {\tt{'}}{\tt{not}}, {\tt{'}}{\tt{a}}, {\tt{'}}{\tt{range}}))\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{not\_record\_error} \\  
{\rm{not\_record\_error}}\,({\it{x\/}})\index{not\_record\_error} $=$ {\rm{mk\_error}}\,({\rm{list}}\,({\it{x\/}}, {\tt{'}}{\tt{is}}, {\tt{'}}{\tt{not}}, {\tt{'}}{\tt{a}}, {\tt{'}}{\tt{record}}))\index{mk\_error}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{not\_record\_fields\_error} \\  
\=\+{\rm{not\_record\_fields\_error}}\,({\it{s\/}}, {\it{sn\/}})\index{not\_record\_fields\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\it{s\/}}, \\ 
{\tt{'}}{\tt{of}}, \\ 
{\tt{'}}{\tt{scope}}, \\ 
{\it{sn\/}}, \\ 
{\tt{'}}{\tt{is}}, \\ 
{\tt{'}}{\tt{not}}, \\ 
{\tt{'}}{\tt{a}}, \\ 
{\tt{'}}{\tt{parse}}, \\ 
{\tt{'}}{\tt{tree}}, \\ 
{\tt{'}}{\tt{for}}, \\ 
{\tt{'}}{\tt{record}}, \\ 
{\tt{'}}{\tt{field}}, \\ 
{\tt{'}}{\tt{names}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{not\_selectable\_error} \\  
\=\+{\rm{not\_selectable\_error}}\,({\it{x\/}})\index{not\_selectable\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,({\tt{'}}{\tt{components}}, {\tt{'}}{\tt{of}}, {\it{x\/}}, {\tt{'}}{\tt{cannot}}, {\tt{'}}{\tt{be}}, {\tt{'}}{\tt{selected}}))\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{not\_sequence\_error} \\  
{\rm{not\_sequence\_error}}\,({\it{s\/}})\index{not\_sequence\_error} $=$ {\rm{mk\_error}}\,({\rm{list}}\,({\it{s\/}}, {\tt{'}}{\tt{is}}, {\tt{'}}{\tt{not}}, {\tt{'}}{\tt{a}}, {\tt{'}}{\tt{sequence}}))\index{mk\_error}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{not\_sequence\_type\_error} \\  
\=\+{\rm{not\_sequence\_type\_error}}\,({\it{td\/}})\index{not\_sequence\_type\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,({\it{td\/}}, {\tt{'}}{\tt{is}}, {\tt{'}}{\tt{not}}, {\tt{'}}{\tt{a}}, {\tt{'}}{\tt{sequence}}, {\tt{'}}{\tt{type}}))\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{not\_set\_type\_error} \\  
{\rm{not\_set\_type\_error}}\,({\it{td\/}})\index{not\_set\_type\_error} $=$ {\rm{mk\_error}}\,({\rm{list}}\,({\it{td\/}}, {\tt{'}}{\tt{is}}, {\tt{'}}{\tt{not}}, {\tt{'}}{\tt{a}}, {\tt{'}}{\tt{set}}, {\tt{'}}{\tt{type}}))\index{mk\_error}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{not\_type\_descriptor\_error} \\  
\=\+{\rm{not\_type\_descriptor\_error}}\,({\it{td\/}})\index{not\_type\_descriptor\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,({\it{td\/}}, {\tt{'}}{\tt{is}}, {\tt{'}}{\tt{not}}, {\tt{'}}{\tt{a}}, {\tt{'}}{\tt{type}}, {\tt{'}}{\tt{descriptor}}))\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{not\_type\_error} \\  
\=\+{\rm{not\_type\_error}}\,({\it{tt\/}}, {\it{sn\/}})\index{not\_type\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,({\it{tt\/}}, {\tt{'}}{\tt{of}}, {\tt{'}}{\tt{scope}}, {\it{sn\/}}, {\tt{'}}{\tt{is}}, {\tt{'}}{\tt{not}}, {\tt{'}}{\tt{a}}, {\tt{'}}{\tt{type}}))\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{not\_unary\_op\_error} \\  
\=\+{\rm{not\_unary\_op\_error}}\,({\it{op\/}})\index{not\_unary\_op\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,({\it{op\/}}, {\tt{'}}{\tt{is}}, {\tt{'}}{\tt{not}}, {\tt{'}}{\tt{a}}, {\tt{'}}{\tt{unary}}, {\tt{'}}{\tt{operator}}))\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{null\_undefined\_error} \\  
\=\+{\rm{null\_undefined\_error}}\,({\it{td\/}})\index{null\_undefined\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,({\tt{'}}{\tt{null}}, {\tt{'}}{\tt{is}}, {\tt{'}}{\tt{not}}, {\tt{'}}{\tt{defined}}, {\tt{'}}{\tt{on}}, {\tt{'}}{\tt{type}}, {\it{td\/}}))\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{number\_error} \\  
\=\+{\rm{number\_error}}\,({\it{d\/}}, {\it{b\/}})\index{number\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,({\it{d\/}}, {\tt{'}}{\tt{is}}, {\tt{'}}{\tt{not}}, {\tt{'}}{\tt{a}}, {\tt{'}}{\tt{number}}, {\tt{'}}{\tt{in}}, {\tt{'}}{\tt{base}}, {\it{b\/}}))\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{omit\_args\_error} \\  
\=\+{\rm{omit\_args\_error}}\,({\it{v\/}})\index{omit\_args\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{cannot}}, \\ 
{\tt{'}}{\tt{omit}}, \\ 
{\tt{'}}{\tt{from}}, \\ 
{\it{v\/}}, \\ 
{\tt{'}}{\tt{because}}, \\ 
{\tt{'}}{\tt{it}}, \\ 
{\tt{'}}{\tt{is}}, \\ 
{\tt{'}}{\tt{not}}, \\ 
{\tt{'}}{\tt{a}}, \\ 
{\tt{'}}{\tt{set}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{opt\_default\_value\_error} \\  
\=\+{\rm{opt\_default\_value\_error}}\,({\it{d\/}}, {\it{sn\/}})\index{opt\_default\_value\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\it{d\/}}, \\ 
{\tt{'}}{\tt{in}}, \\ 
{\tt{'}}{\tt{scope}}, \\ 
{\it{sn\/}}, \\ 
{\tt{'}}{\tt{is}}, \\ 
{\tt{'}}{\tt{not}}, \\ 
{\tt{'}}{\tt{an}}, \\ 
{\tt{'}}{\tt{opt\_default\_initial\_value\_expression}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{opt\_size\_limit\_error} \\  
\=\+{\rm{opt\_size\_limit\_error}}\,({\it{r\/}}, {\it{sn\/}})\index{opt\_size\_limit\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\it{r\/}}, \\ 
{\tt{'}}{\tt{of}}, \\ 
{\tt{'}}{\tt{scope}}, \\ 
{\it{sn\/}}, \\ 
{\tt{'}}{\tt{is}}, \\ 
{\tt{'}}{\tt{not}}, \\ 
{\tt{'}}{\tt{an}}, \\ 
{\tt{'}}{\tt{opt\_size\_limit\_restriction}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{ord\_arg\_error} \\  
\=\+{\sc{ord\_arg\_error}}\index{ord\_arg\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\tt{'}}{\tt{(}}{\tt{ord}}{\tt{ }}{\tt{is}}{\tt{ }}{\tt{defined}}{\tt{ }}{\tt{only}}{\tt{ }}{\tt{on}}{\tt{ }}{\tt{scalar}}{\tt{ }}{\tt{types}}{\tt{)}})\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{param\_reserved\_error} \\  
\=\+{\rm{param\_reserved\_error}}\,({\it{n\/}})\index{param\_reserved\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{reserved}}, \\ 
{\tt{'}}{\tt{identifier}}, \\ 
{\it{n\/}}, \\ 
{\tt{'}}{\tt{cannot}}, \\ 
{\tt{'}}{\tt{be}}, \\ 
{\tt{'}}{\tt{used}}, \\ 
{\tt{'}}{\tt{as}}, \\ 
{\tt{'}}{\tt{a}}, \\ 
{\tt{'}}{\tt{formal}}, \\ 
{\tt{'}}{\tt{parameter}}, \\ 
{\tt{'}}{\tt{name}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{pending\_default\_value\_error} \\  
\=\+{\rm{pending\_default\_value\_error}}\,({\it{td\/}}, {\it{sn\/}})\index{pending\_default\_value\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{cannot}}, \\ 
{\tt{'}}{\tt{compute}}, \\ 
{\tt{'}}{\tt{default}}, \\ 
{\tt{'}}{\tt{value}}, \\ 
{\tt{'}}{\tt{for}}, \\ 
{\tt{'}}{\tt{pending}}, \\ 
{\tt{'}}{\tt{type}}, \\ 
{\it{td\/}}, \\ 
{\tt{'}}{\tt{in}}, \\ 
{\tt{'}}{\tt{scope}}, \\ 
{\it{sn\/}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{pending\_in\_type\_error} \\  
\=\+{\rm{pending\_in\_type\_error}}\,({\it{td\/}})\index{pending\_in\_type\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,({\tt{'}}{\tt{in\_type}}, {\tt{'}}{\tt{of}}, {\tt{'}}{\tt{pending}}, {\tt{'}}{\tt{type}}, {\it{td\/}}))\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{pending\_type\_value\_set\_erro!r} \\  
\=\+{\rm{pending\_type\_value\_set\_error}}\,({\it{td\/}})\index{pending\_type\_value\_set\_erro!r} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{cannot}}, \\ 
{\tt{'}}{\tt{compute}}, \\ 
{\tt{'}}{\tt{value}}, \\ 
{\tt{'}}{\tt{set}}, \\ 
{\tt{'}}{\tt{of}}, \\ 
{\tt{'}}{\tt{pending}}, \\ 
{\tt{'}}{\tt{type}}, \\ 
{\it{td\/}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{pred\_arg\_error} \\  
\=\+{\sc{pred\_arg\_error}}\index{pred\_arg\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\tt{'}}{\tt{(}}{\tt{pred}}{\tt{ }}{\tt{is}}{\tt{ }}{\tt{defined}}{\tt{ }}{\tt{only}}{\tt{ }}{\tt{on}}{\tt{ }}{\tt{scalar}}{\tt{ }}{\tt{types}}{\tt{)}})\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{range\_arg\_error} \\  
\=\+{\sc{range\_arg\_error}}\index{range\_arg\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\tt{'}}{\tt{(}}{\tt{range}}{\tt{ }}{\tt{is}}{\tt{ }}{\tt{defined}}{\tt{ }}{\tt{only}}{\tt{ }}{\tt{on}}{\tt{ }}{\tt{mappings}}{\tt{)}})\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{range\_limits\_error} \\  
\=\+{\rm{range\_limits\_error}}\,({\it{lo\/}}, {\it{hi\/}})\index{range\_limits\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\it{lo\/}}, \\ 
{\tt{'}}{\tt{and}}, \\ 
{\it{hi\/}}, \\ 
{\tt{'}}{\tt{are}}, \\ 
{\tt{'}}{\tt{not}}, \\ 
{\tt{'}}{\tt{of}}, \\ 
{\tt{'}}{\tt{the}}, \\ 
{\tt{'}}{\tt{same}}, \\ 
{\tt{'}}{\tt{non\_rational}}, \\ 
{\tt{'}}{\tt{simple}}, \\ 
{\tt{'}}{\tt{type}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{rational\_value\_set\_error} \\  
\=\+{\rm{rational\_value\_set\_error}}\,({\it{td\/}})\index{rational\_value\_set\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{cannot}}, \\ 
{\tt{'}}{\tt{compute}}, \\ 
{\tt{'}}{\tt{the}}, \\ 
{\tt{'}}{\tt{value}}, \\ 
{\tt{'}}{\tt{set}}, \\ 
{\tt{'}}{\tt{of}}, \\ 
{\tt{'}}{\tt{rational}}, \\ 
{\tt{'}}{\tt{type}}, \\ 
{\it{td\/}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{scale\_int\_arg\_error} \\  
\=\+{\rm{scale\_int\_arg\_error}}\,({\it{i\/}}, {\it{tn\/}})\index{scale\_int\_arg\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,({\it{i\/}}, {\tt{'}}{\tt{cannot}}, {\tt{'}}{\tt{be}}, {\tt{'}}{\tt{scaled}}, {\tt{'}}{\tt{in}}, {\tt{'}}{\tt{type}}, {\it{tn\/}}))\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{scale\_type\_arg\_error} \\  
\=\+{\rm{scale\_type\_arg\_error}}\,({\it{tn\/}})\index{scale\_type\_arg\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{scale}}, \\ 
{\tt{'}}{\tt{is}}, \\ 
{\tt{'}}{\tt{not}}, \\ 
{\tt{'}}{\tt{defined}}, \\ 
{\tt{'}}{\tt{on}}, \\ 
{\tt{'}}{\tt{type}}, \\ 
{\it{tn\/}}, \\ 
{\tt{'}}{\tt{because}}, \\ 
{\tt{'}}{\tt{it}}, \\ 
{\tt{'}}{\tt{is}}, \\ 
{\tt{'}}{\tt{not}}, \\ 
{\tt{'}}{\tt{a}}, \\ 
{\tt{'}}{\tt{scalar}}, \\ 
{\tt{'}}{\tt{type}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{scope\_id\_error} \\  
\=\+{\rm{scope\_id\_error}}\,({\it{sn\/}})\index{scope\_id\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error\_decl}}\,({\rm{append}}\,(\=\+{\tt{'}}{\tt{(}}{\tt{scope}}{\tt{ }}{\tt{name}}{\tt{)}}, \\ 
{\rm{cons}}\,(\=\+{\it{sn\/}}, \\ 
{\tt{'}}{\tt{(}}{\tt{cannot}}{\tt{ }}{\tt{be}}{\tt{ }}{\tt{used}}{\tt{ }}{\tt{as}}{\tt{ }}{\tt{a}}{\tt{ }}{\tt{unit}}{\tt{ }}{\tt{name}}{\tt{)}})\-)\-)\index{mk\_error\_decl}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{scope\_reserved\_error} \\  
\=\+{\rm{scope\_reserved\_error}}\,({\it{sn\/}})\index{scope\_reserved\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error\_decl}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{reserved}}, \\ 
{\tt{'}}{\tt{identifier}}, \\ 
{\it{sn\/}}, \\ 
{\tt{'}}{\tt{cannot}}, \\ 
{\tt{'}}{\tt{be}}, \\ 
{\tt{'}}{\tt{used}}, \\ 
{\tt{'}}{\tt{as}}, \\ 
{\tt{'}}{\tt{a}}, \\ 
{\tt{'}}{\tt{scope}}, \\ 
{\tt{'}}{\tt{name}})\-)\index{mk\_error\_decl}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{size\_arg\_error} \\  
\=\+{\sc{size\_arg\_error}}\index{size\_arg\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\tt{'}}{\tt{(}}\=\+{\tt{size}}{\tt{ }}{\tt{is}}{\tt{ }}{\tt{defined}}{\tt{ }}{\tt{only}}{\tt{ }}{\tt{on}}{\tt{ }}{\tt{mappings}}{\tt{ }}{\tt{sequences}} \\ 
{\tt{sets}}{\tt{)}}\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{size\_limit\_error} \\  
\=\+{\rm{size\_limit\_error}}\,({\it{d\/}}, {\it{sn\/}})\index{size\_limit\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{size}}, \\ 
{\tt{'}}{\tt{limit}}, \\ 
{\it{d\/}}, \\ 
{\tt{'}}{\tt{of}}, \\ 
{\tt{'}}{\tt{scope}}, \\ 
{\it{sn\/}}, \\ 
{\tt{'}}{\tt{is}}, \\ 
{\tt{'}}{\tt{not}}, \\ 
{\tt{'}}{\tt{a}}, \\ 
{\tt{'}}{\tt{non-negative}}, \\ 
{\tt{'}}{\tt{integer}}, \\ 
{\tt{'}}{\tt{expression}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{sub\_args\_error} \\  
\=\+{\rm{sub\_args\_error}}\,({\it{v1\/}}, {\it{v2\/}})\index{sub\_args\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{sub}}, \\ 
{\tt{'}}{\tt{is}}, \\ 
{\tt{'}}{\tt{not}}, \\ 
{\tt{'}}{\tt{defined}}, \\ 
{\tt{'}}{\tt{on}}, \\ 
{\it{v1\/}}, \\ 
{\tt{'}}{\tt{and}}, \\ 
{\it{v2\/}}, \\ 
{\tt{'}}{\tt{because}}, \\ 
{\tt{'}}{\tt{they}}, \\ 
{\tt{'}}{\tt{are}}, \\ 
{\tt{'}}{\tt{not}}, \\ 
{\tt{'}}{\tt{mappings}}, \\ 
{\tt{'}}{\tt{or}}, \\ 
{\tt{'}}{\tt{sequences}}, \\ 
{\tt{'}}{\tt{or}}, \\ 
{\tt{'}}{\tt{sets}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{succ\_arg\_error} \\  
\=\+{\sc{succ\_arg\_error}}\index{succ\_arg\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\tt{'}}{\tt{(}}{\tt{succ}}{\tt{ }}{\tt{is}}{\tt{ }}{\tt{defined}}{\tt{ }}{\tt{only}}{\tt{ }}{\tt{on}}{\tt{ }}{\tt{scalar}}{\tt{ }}{\tt{types}}{\tt{)}})\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{type\_defn\_cycle\_error} \\  
\=\+{\rm{type\_defn\_cycle\_error}}\,({\it{tn\/}}, {\it{sn\/}})\index{type\_defn\_cycle\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{cycle}}, \\ 
{\tt{'}}{\tt{in}}, \\ 
{\tt{'}}{\tt{type}}, \\ 
{\tt{'}}{\tt{definition}}, \\ 
{\tt{'}}{\tt{on}}, \\ 
{\it{tn\/}}, \\ 
{\tt{'}}{\tt{in}}, \\ 
{\tt{'}}{\tt{scope}}, \\ 
{\it{sn\/}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{type\_error} \\  
\=\+{\rm{type\_error}}\,({\it{td\/}}, {\it{sn\/}})\index{type\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,({\tt{'}}{\tt{error}}, {\tt{'}}{\tt{in}}, {\tt{'}}{\tt{type}}, {\it{td\/}}, {\tt{'}}{\tt{of}}, {\tt{'}}{\tt{scope}}, {\it{sn\/}}))\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{unbounded\_sequence\_value\_set!\_error} \\  
\=\+{\sc{unbounded\_sequence\_value\_set\_error}}\index{unbounded\_sequence\_value\_set!\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{cannot}}, \\ 
{\tt{'}}{\tt{compute}}, \\ 
{\tt{'}}{\tt{the}}, \\ 
{\tt{'}}{\tt{value}}, \\ 
{\tt{'}}{\tt{set}}, \\ 
{\tt{'}}{\tt{of}}, \\ 
{\tt{'}}{\tt{a}}, \\ 
{\tt{'}}{\tt{sequence}}, \\ 
{\tt{'}}{\tt{without}}, \\ 
{\tt{'}}{\tt{a}}, \\ 
{\tt{'}}{\tt{size}}, \\ 
{\tt{'}}{\tt{limit}}, \\ 
{\tt{'}}{\tt{restriction}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{unbounded\_type\_error} \\  
\=\+{\rm{unbounded\_type\_error}}\,({\it{td\/}})\index{unbounded\_type\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,({\tt{'}}{\tt{type}}, {\it{td\/}}, {\tt{'}}{\tt{is}}, {\tt{'}}{\tt{not}}, {\tt{'}}{\tt{bounded}}))\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{unbounded\_value\_set\_error} \\  
\=\+{\rm{unbounded\_value\_set\_error}}\,({\it{td\/}})\index{unbounded\_value\_set\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{cannot}}, \\ 
{\tt{'}}{\tt{compute}}, \\ 
{\tt{'}}{\tt{the}}, \\ 
{\tt{'}}{\tt{value}}, \\ 
{\tt{'}}{\tt{set}}, \\ 
{\tt{'}}{\tt{of}}, \\ 
{\tt{'}}{\tt{unbounded}}, \\ 
{\tt{'}}{\tt{type}}, \\ 
{\it{td\/}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{union\_arg\_error} \\  
\=\+{\rm{union\_arg\_error}}\,({\it{v1\/}}, {\it{v2\/}})\index{union\_arg\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{union}}, \\ 
{\tt{'}}{\tt{defined}}, \\ 
{\tt{'}}{\tt{only}}, \\ 
{\tt{'}}{\tt{on}}, \\ 
{\tt{'}}{\tt{mappings}}, \\ 
{\tt{'}}{\tt{and}}, \\ 
{\tt{'}}{\tt{sets}}, \\ 
{\it{v1\/}}, \\ 
{\it{v2\/}})\-)\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{unit\_reserved\_error} \\  
\=\+{\rm{unit\_reserved\_error}}\,({\it{u\/}})\index{unit\_reserved\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error\_decl}}\,({\rm{list}}\,(\=\+{\tt{'}}{\tt{reserved}}, \\ 
{\tt{'}}{\tt{identifier}}, \\ 
{\it{u\/}}, \\ 
{\tt{'}}{\tt{cannot}}, \\ 
{\tt{'}}{\tt{be}}, \\ 
{\tt{'}}{\tt{used}}, \\ 
{\tt{'}}{\tt{as}}, \\ 
{\tt{'}}{\tt{a}}, \\ 
{\tt{'}}{\tt{unit}}, \\ 
{\tt{'}}{\tt{name}})\-)\index{mk\_error\_decl}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{unknown\_name\_error} \\  
{\rm{unknown\_name\_error}}\,({\it{n\/}})\index{unknown\_name\_error} $=$ {\rm{mk\_error}}\,({\rm{list}}\,({\tt{'}}{\tt{the}}, {\tt{'}}{\tt{name}}, {\it{n\/}}, {\tt{'}}{\tt{is}}, {\tt{'}}{\tt{unknown}}))\index{mk\_error}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{upper\_succ\_error} \\  
\=\+{\rm{upper\_succ\_error}}\,({\it{td\/}})\index{upper\_succ\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,({\tt{'}}{\tt{succ}}, {\tt{'}}{\tt{of}}, {\tt{'}}{\tt{upper}}, {\tt{'}}{\tt{of}}, {\tt{'}}{\tt{type}}, {\it{td\/}}))\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{upper\_undefined\_error} \\  
\=\+{\rm{upper\_undefined\_error}}\,({\it{td\/}})\index{upper\_undefined\_error} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\rm{list}}\,({\tt{'}}{\tt{upper}}, {\tt{'}}{\tt{is}}, {\tt{'}}{\tt{not}}, {\tt{'}}{\tt{defined}}, {\tt{'}}{\tt{on}}, {\tt{'}}{\tt{type}}, {\it{td\/}}))\index{mk\_error}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{zero\_divide\_error} \\  
{\sc{zero\_divide\_error}}\index{zero\_divide\_error} $=$ {\rm{mk\_error}}\,({\tt{'}}{\tt{(}}{\tt{divide}}{\tt{ }}{\tt{by}}{\tt{ }}{\tt{zero}}{\tt{)}})\index{mk\_error}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{zero\_to\_the\_zero\_power\_err!or} \\  
\=\+{\sc{zero\_to\_the\_zero\_power\_error}}\index{zero\_to\_the\_zero\_power\_err!or} \\ 
$=$$\;\;\;\;${\rm{mk\_error}}\,({\tt{'}}{\tt{(}}{\tt{zero}}{\tt{ }}{\tt{to}}{\tt{ }}{\tt{the}}{\tt{ }}{\tt{zero}}{\tt{ }}{\tt{power}}{\tt{)}})\index{mk\_error}\-
\end{tabbing}



\begin{verbatim}; **************************************
;  Semantic functions - tree extraction
; **************************************

\end{verbatim}
\noindent{\sc Event}:   Disable rule.

\addvspace{18pt}

\noindent{\sc Event}:   Disable subtree.

\addvspace{18pt} 
\noindent{\sc Event}:   Disable subtree\_body.

\addvspace{18pt} 
\noindent{\sc Event}:   Disable subtree\_i.

\addvspace{18pt}


\begin{tabbing}{\sc Definition}:\index{gname} \\  
\=\+{\rm{gname}}\,({\it{u\/}})\index{gname} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{identifierp}}\,({\it{u\/}})\index{identifierp} \\ 
{\bf then }\=\+{\bf let }\=\+{\it{n\/}}{\bf $\;$ be$\;\;$}{\rm{uc\_list}}\,({\rm{lexeme}}\,({\it{u\/}})\index{lexeme})\index{uc\_list}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{pack}}\,({\it{n\/}}) $=$ {\bf{nil}}$\;\;${\bf then }{\tt{'}}{\tt{nil\~}} \\ 
{\bf else }{\rm{pack}}\,({\it{n\/}})$\;${\bf  endif}\-$\;${\bf  endlet}\- \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{entry\_name} \\  
\=\+{\rm{entry\_name}}\,({\it{e\/}})\index{entry\_name} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{entry\_valuep}}\,({\it{e\/}})\index{entry\_valuep} \\ 
{\bf then }\=\+{\bf let }\=\+{\it{n\/}}{\bf $\;$ be$\;\;$}{\rm{uc\_list}}\,({\rm{lexeme}}\,({\it{e\/}})\index{lexeme})\index{uc\_list}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{pack}}\,({\rm{rcdr}}\,({\it{n\/}})\index{rcdr}) $=$ {\bf{nil}} \\ 
{\bf then }{\rm{pack}}\,({\rm{rcons}}\,({\rm{rcons}}\,({\rm{rcdr}}\,({\it{n\/}})\index{rcdr}, {\sc{ascii\_tilde}}\index{ascii\_tilde})\index{rcons}, {\rm{rcar}}\,({\it{n\/}})\index{rcar})\index{rcons}) \\ 
{\bf else }{\rm{pack}}\,({\it{n\/}})$\;${\bf  endif}\-$\;${\bf  endlet}\- \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{access} \\  
\=\+{\rm{access}}\,({\it{a\/}})\index{access} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{a\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{similar\_formal\_data\_parameters}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{opt\_access\_specification}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{is}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{ft}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{access}}\,({\rm{subtree}}\,({\it{a\/}}, {\tt{'}}{\tt{opt\_access\_specification}})\index{subtree})\index{access} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{a\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,(\=\+{\tt{'}}{\tt{internal\_data\_or\_condition\_objects}}, \\ 
{\tt{'}}{\tt{iv}})\-\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{access\_specification}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{is}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{ts}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_internal\_initial\_value}}, {\tt{'}}{\tt{v}})\index{tag}, \\ 
{\tt{'}}{\tt{semi\_colon}})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{access}}\,({\rm{subtree}}\,({\it{a\/}}, {\tt{'}}{\tt{access\_specification}})\index{subtree})\index{access} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{a\/}}, \\ 
{\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{opt\_access\_specification}}, {\tt{'}}{\tt{a}})\index{tag}, {\tt{'}}{\tt{empty}})\index{prodn})\-\index{rule} \\ 
{\bf then }{\tt{'}}{\tt{const}} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{a\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{opt\_access\_specification}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{access\_specification}}, {\tt{'}}{\tt{a2}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{access}}\,({\rm{subtree}}\,({\it{a\/}}, {\tt{'}}{\tt{access\_specification}})\index{subtree})\index{access} \\ 
{\bf elseif }{\rm{rule}}\,({\it{a\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{access\_specification}}, {\tt{'}}{\tt{a}})\index{tag}, {\tt{'}}{\tt{var}})\index{prodn})\index{rule} \\ 
{\bf then }{\tt{'}}{\tt{var}} \\ 
{\bf elseif }{\rm{rule}}\,({\it{a\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{access\_specification}}, {\tt{'}}{\tt{a}})\index{tag}, {\tt{'}}{\tt{const}})\index{prodn})\index{rule} \\ 
{\bf then }{\tt{'}}{\tt{const}} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{arg\_list} \\  
\=\+{\rm{arg\_list}}\,({\it{e\/}})\index{arg\_list} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{modified\_primary\_value}}, {\tt{'}}{\tt{m}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{arg\_list}}\,({\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{modified\_primary\_value}})\index{subtree})\index{arg\_list} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{modified\_primary\_value}}, {\tt{'}}{\tt{m}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{modified\_primary\_value}}, {\tt{'}}{\tt{m2}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{value\_modifiers}}, {\tt{'}}{\tt{vm}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{arg\_list}}\,({\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{value\_modifiers}})\index{subtree})\index{arg\_list} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{modified\_primary\_value}}, {\tt{'}}{\tt{m}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{modified\_primary\_value}}, {\tt{'}}{\tt{m2}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{actual\_condition\_parameters}}, {\tt{'}}{\tt{cp}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{arg\_list}}\,({\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{modified\_primary\_value}})\index{subtree})\index{arg\_list} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{value\_modifiers}}, {\tt{'}}{\tt{m}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{component\_selectors}}, {\tt{'}}{\tt{s}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{arg\_list}}\,({\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{component\_selectors}})\index{subtree})\index{arg\_list} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{component\_selectors}}, {\tt{'}}{\tt{s}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{arg\_list}}, {\tt{'}}{\tt{as}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{arg\_list}})\index{subtree} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{arg\_list}}, {\tt{'}}{\tt{as}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{open\_paren}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{value\_list}}, {\tt{'}}{\tt{vs}})\index{tag}, \\ 
{\tt{'}}{\tt{close\_paren}})\-)\-\index{prodn})\-\index{rule}$\;\;${\bf then }{\it{e\/}} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{arg\_listp} \\  
\=\+{\rm{arg\_listp}}\,({\it{x\/}})\index{arg\_listp} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{x\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{value\_modifiers}}, {\tt{'}}{\tt{m}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{component\_selectors}}, {\tt{'}}{\tt{s}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{arg\_listp}}\,({\rm{subtree}}\,({\it{x\/}}, {\tt{'}}{\tt{component\_selectors}})\index{subtree})\index{arg\_listp} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{x\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{component\_selectors}}, {\tt{'}}{\tt{s}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{arg\_list}}, {\tt{'}}{\tt{as}})\index{tag})\-\index{prodn})\-\index{rule}$\;\;${\bf then }{\bf{t}} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{x\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{arg\_list}}, {\tt{'}}{\tt{as}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{open\_paren}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{value\_list}}, {\tt{'}}{\tt{vs}})\index{tag}, \\ 
{\tt{'}}{\tt{close\_paren}})\-)\-\index{prodn})\-\index{rule}$\;\;${\bf then }{\bf{t}} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{bound\_boolean\_expression} \\  
\=\+{\rm{bound\_boolean\_expression}}\,({\it{e\/}})\index{bound\_boolean\_expression} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{list}}\,({\tt{'}}{\tt{all}}, {\rm{tag}}\,({\tt{'}}{\tt{bound\_expression}}, {\tt{'}}{\tt{b}})\index{tag}))\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{bound\_boolean\_expression}}\,({\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{bound\_expression}})\index{subtree})\index{bound\_boolean\_expression} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{list}}\,({\tt{'}}{\tt{some}}, {\rm{tag}}\,({\tt{'}}{\tt{bound\_expression}}, {\tt{'}}{\tt{b}})\index{tag}))\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{bound\_boolean\_expression}}\,({\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{bound\_expression}})\index{subtree})\index{bound\_boolean\_expression} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{bound\_expression}}, {\tt{'}}{\tt{b}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{q}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{s}})\index{tag}, \\ 
{\tt{'}}{\tt{comma}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{expression}})\index{subtree} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{bound\_id} \\  
\=\+{\rm{bound\_id}}\,({\it{e\/}})\index{bound\_id} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{list}}\,({\tt{'}}{\tt{all}}, {\rm{tag}}\,({\tt{'}}{\tt{bound\_expression}}, {\tt{'}}{\tt{b}})\index{tag}))\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{bound\_id}}\,({\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{bound\_expression}})\index{subtree})\index{bound\_id} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{list}}\,({\tt{'}}{\tt{some}}, {\rm{tag}}\,({\tt{'}}{\tt{bound\_expression}}, {\tt{'}}{\tt{b}})\index{tag}))\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{bound\_id}}\,({\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{bound\_expression}})\index{subtree})\index{bound\_id} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{bound\_expression}}, {\tt{'}}{\tt{b}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{q}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{s}})\index{tag}, \\ 
{\tt{'}}{\tt{comma}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{bound\_id}}\,({\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{identifier\_list}})\index{subtree})\index{bound\_id} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{is}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{is2}})\index{tag}, \\ 
{\tt{'}}{\tt{comma}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{i}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{bound\_id}}\,({\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{identifier\_list}})\index{subtree})\index{bound\_id} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{is}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{i}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{bound\_id}}\,({\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{identifier}})\index{subtree})\index{bound\_id} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{opt\_each\_clause}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{each}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{i}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{ts}})\index{tag}, \\ 
{\tt{'}}{\tt{comma}})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{bound\_id}}\,({\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{identifier}})\index{subtree})\index{bound\_id} \\ 
{\bf elseif }{\rm{identifierp}}\,({\it{e\/}})\index{identifierp}$\;\;${\bf then }{\rm{gname}}\,({\it{e\/}})\index{gname} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{bound\_id\_type} \\  
\=\+{\rm{bound\_id\_type}}\,({\it{e\/}})\index{bound\_id\_type} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{list}}\,({\tt{'}}{\tt{all}}, {\rm{tag}}\,({\tt{'}}{\tt{bound\_expression}}, {\tt{'}}{\tt{b}})\index{tag}))\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{bound\_id\_type}}\,({\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{bound\_expression}})\index{subtree})\index{bound\_id\_type} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{list}}\,({\tt{'}}{\tt{some}}, {\rm{tag}}\,({\tt{'}}{\tt{bound\_expression}}, {\tt{'}}{\tt{b}})\index{tag}))\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{bound\_id\_type}}\,({\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{bound\_expression}})\index{subtree})\index{bound\_id\_type} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{bound\_expression}}, {\tt{'}}{\tt{b}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{q}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{s}})\index{tag}, \\ 
{\tt{'}}{\tt{comma}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{type\_specification}})\index{subtree} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{opt\_each\_clause}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{each}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{i}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{ts}})\index{tag}, \\ 
{\tt{'}}{\tt{comma}})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{type\_specification}})\index{subtree} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{case\_exit\_list2} \\  
\=\+{\rm{case\_exit\_list2}}\,({\it{ls\/}}, {\it{e\/}}, {\it{c\/}})\index{case\_exit\_list2} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{ls\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{case\_exit\_labels}}, {\tt{'}}{\tt{ls}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{case\_exit\_labels}}, {\tt{'}}{\tt{ls2}})\index{tag}, \\ 
{\tt{'}}{\tt{comma}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{exit\_label}}, {\tt{'}}{\tt{l}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{append}}\,(\=\+{\rm{case\_exit\_list2}}\,({\rm{subtree}}\,({\it{ls\/}}, {\tt{'}}{\tt{case\_exit\_labels}})\index{subtree}, {\it{e\/}}, {\it{c\/}})\index{case\_exit\_list2}, \\ 
{\rm{case\_exit\_list2}}\,({\rm{subtree}}\,({\it{ls\/}}, {\tt{'}}{\tt{exit\_label}})\index{subtree}, {\it{e\/}}, {\it{c\/}})\index{case\_exit\_list2})\- \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{ls\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{case\_exit\_labels}}, {\tt{'}}{\tt{ls}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{exit\_label}}, {\tt{'}}{\tt{l}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{case\_exit\_list2}}\,({\rm{subtree}}\,({\it{ls\/}}, {\tt{'}}{\tt{exit\_label}})\index{subtree}, {\it{e\/}}, {\it{c\/}})\index{case\_exit\_list2} \\ 
{\bf elseif }{\rm{rule}}\,({\it{ls\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{exit\_label}}, {\tt{'}}{\tt{l}})\index{tag}, {\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{n}})\index{tag})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{case\_exit\_list2}}\,({\rm{subtree}}\,({\it{ls\/}}, {\tt{'}}{\tt{identifier}})\index{subtree}, {\it{e\/}}, {\it{c\/}})\index{case\_exit\_list2} \\ 
{\bf elseif }{\rm{rule}}\,({\it{ls\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{exit\_label}}, {\tt{'}}{\tt{l}})\index{tag}, {\tt{'}}{\tt{normal}})\index{prodn})\index{rule} \\ 
{\bf then }\=\+{\bf if }{\it{c\/}} $=$ {\tt{'}}{\tt{normal}}$\;\;${\bf then }{\rm{list}}\,({\it{e\/}}) \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\- \\ 
{\bf elseif }{\rm{identifierp}}\,({\it{ls\/}})\index{identifierp} \\ 
{\bf then }\=\+{\bf if }{\rm{gname}}\,({\it{ls\/}})\index{gname} $=$ {\it{c\/}}$\;\;${\bf then }{\rm{list}}\,({\it{e\/}}) \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\- \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{case\_exit\_list} \\  
\=\+{\rm{case\_exit\_list}}\,({\it{u\/}}, {\it{c\/}})\index{case\_exit\_list} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{procedure\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{procedure}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{pn}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{external\_data\_objects}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_external\_conditions}}, {\tt{'}}{\tt{c}})\index{tag}, \\ 
{\tt{'}}{\tt{equal}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{procedure\_body}}, {\tt{'}}{\tt{b}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{case\_exit\_list}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{procedure\_body}})\index{subtree}, {\it{c\/}})\index{case\_exit\_list} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{function\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{function}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{fn}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_external\_data\_objects}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{rt}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_external\_conditions}}, {\tt{'}}{\tt{c}})\index{tag}, \\ 
{\tt{'}}{\tt{equal}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{procedure\_body}}, {\tt{'}}{\tt{b}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{case\_exit\_list}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{procedure\_body}})\index{subtree}, {\it{c\/}})\index{case\_exit\_list} \\ 
{\bf elseif }{\rm{rule}}\,({\it{u\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{procedure\_body}}, {\tt{'}}{\tt{b}})\index{tag}, {\tt{'}}{\tt{pending}})\index{prodn})\index{rule} \\ 
{\bf then }{\bf{nil}} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{procedure\_body}}, {\tt{'}}{\tt{b}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{begin}}, \\ 
{\rm{tag}}\,(\=\+{\tt{'}}{\tt{external\_operational\_specification}}, \\ 
{\tt{'}}{\tt{es}})\-\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_internal\_environment}}, {\tt{'}}{\tt{iv}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_keep\_specification}}, {\tt{'}}{\tt{k}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_internal\_statements}}, {\tt{'}}{\tt{st}})\index{tag}, \\ 
{\tt{'}}{\tt{end}})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{case\_exit\_list}}\,(\=\+{\rm{subtree}}\,(\=\+{\it{u\/}}, \\ 
{\tt{'}}{\tt{external\_operational\_specification}})\-\index{subtree}, \\ 
{\it{c\/}})\-\index{case\_exit\_list} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,(\=\+{\tt{'}}{\tt{external\_operational\_specification}}, \\ 
{\tt{'}}{\tt{s}})\-\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{opt\_entry\_specification}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_exit\_specification}}, {\tt{'}}{\tt{x}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{case\_exit\_list}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{opt\_exit\_specification}})\index{subtree}, {\it{c\/}})\index{case\_exit\_list} \\ 
{\bf elseif }{\rm{rule}}\,({\it{u\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{opt\_exit\_specification}}, {\tt{'}}{\tt{e}})\index{tag}, {\tt{'}}{\tt{empty}})\index{prodn})\index{rule} \\ 
{\bf then }{\bf{nil}} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{opt\_exit\_specification}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{exit}}, \\ 
{\rm{tag}}\,(\=\+{\tt{'}}{\tt{non\_validated\_specification\_expression}}, \\ 
{\tt{'}}{\tt{se}})\-\index{tag}, \\ 
{\tt{'}}{\tt{semi\_colon}})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }\=\+{\bf if }{\it{c\/}} $=$ {\tt{'}}{\tt{normal}} \\ 
{\bf then }{\rm{list}}\,({\rm{subtree}}\,(\=\+{\it{u\/}}, \\ 
{\tt{'}}{\tt{non\_validated\_specification\_expression}})\-\index{subtree}) \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\- \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{opt\_exit\_specification}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{exit}}, \\ 
{\rm{tag}}\,(\=\+{\tt{'}}{\tt{conditional\_exit\_specification}}, \\ 
{\tt{'}}{\tt{c}})\-\index{tag}, \\ 
{\tt{'}}{\tt{semi\_colon}})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{case\_exit\_list}}\,(\=\+{\rm{subtree}}\,(\=\+{\it{u\/}}, \\ 
{\tt{'}}{\tt{conditional\_exit\_specification}})\-\index{subtree}, \\ 
{\it{c\/}})\-\index{case\_exit\_list} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{conditional\_exit\_specification}}, {\tt{'}}{\tt{c}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{case}}, \\ 
{\tt{'}}{\tt{open\_paren}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{case\_exit\_body}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\tt{'}}{\tt{close\_paren}})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{case\_exit\_list}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{case\_exit\_body}})\index{subtree}, {\it{c\/}})\index{case\_exit\_list} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{case\_exit\_body}}, {\tt{'}}{\tt{b}})\index{tag}, {\rm{tag}}\,({\tt{'}}{\tt{case\_exit}}, {\tt{'}}{\tt{c}})\index{tag})\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{case\_exit\_list}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{case\_exit}})\index{subtree}, {\it{c\/}})\index{case\_exit\_list} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{case\_exit\_body}}, {\tt{'}}{\tt{b}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{case\_exit\_body}}, {\tt{'}}{\tt{b2}})\index{tag}, \\ 
{\tt{'}}{\tt{semi\_colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{case\_exit}}, {\tt{'}}{\tt{c}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{append}}\,(\=\+{\rm{case\_exit\_list}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{case\_exit\_body}})\index{subtree}, {\it{c\/}})\index{case\_exit\_list}, \\ 
{\rm{case\_exit\_list}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{case\_exit}})\index{subtree}, {\it{c\/}})\index{case\_exit\_list})\- \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{case\_exit}}, {\tt{'}}{\tt{ce}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{is}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{case\_exit\_labels}}, {\tt{'}}{\tt{l}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,(\=\+{\tt{'}}{\tt{non\_validated\_specification\_expression}}, \\ 
{\tt{'}}{\tt{e}})\-\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{case\_exit\_list2}}\,(\=\+{\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{case\_exit\_labels}})\index{subtree}, \\ 
{\rm{subtree}}\,(\=\+{\it{u\/}}, \\ 
{\tt{'}}{\tt{non\_validated\_specification\_expression}})\-\index{subtree}, \\ 
{\it{c\/}})\-\index{case\_exit\_list2} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{cdr\_quantified\_names} \\  
\=\+{\rm{cdr\_quantified\_names}}\,({\it{e\/}})\index{cdr\_quantified\_names} \\ 
$=$$\;\;\;\;$\=\+{\bf if }\=\+{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{list}}\,({\tt{'}}{\tt{all}}, {\rm{tag}}\,({\tt{'}}{\tt{bound\_expression}}, {\tt{'}}{\tt{b}})\index{tag}))\-\index{prodn})\-\index{rule} \\ 
$\vee$$\;\;\;\;${\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{list}}\,({\tt{'}}{\tt{some}}, {\rm{tag}}\,({\tt{'}}{\tt{bound\_expression}}, {\tt{'}}{\tt{b}})\index{tag}))\-\index{prodn})\-\index{rule}\- \\ 
{\bf then }{\rm{cdr\_quantified\_names}}\,({\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{bound\_expression}})\index{subtree})\index{cdr\_quantified\_names} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{bound\_expression}}, {\tt{'}}{\tt{b}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{q}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{s}})\index{tag}, \\ 
{\tt{'}}{\tt{comma}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{cdr\_quantified\_names}}\,({\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{identifier\_list}})\index{subtree})\index{cdr\_quantified\_names} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{is}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{is2}})\index{tag}, \\ 
{\tt{'}}{\tt{comma}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{i}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{mk\_identifier\_list}}\,(\=\+{\rm{cdr\_quantified\_names}}\,({\rm{subtree}}\,(\=\+{\it{e\/}}, \\ 
{\tt{'}}{\tt{identifier\_list}})\-\index{subtree})\index{cdr\_quantified\_names}, \\ 
{\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{identifier}})\index{subtree})\-\index{mk\_identifier\_list} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{quantifier} \\  
\=\+{\rm{quantifier}}\,({\it{e\/}})\index{quantifier} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{list}}\,({\tt{'}}{\tt{all}}, {\rm{tag}}\,({\tt{'}}{\tt{bound\_expression}}, {\tt{'}}{\tt{b}})\index{tag}))\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\tt{'}}{\tt{all}} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{list}}\,({\tt{'}}{\tt{some}}, {\rm{tag}}\,({\tt{'}}{\tt{bound\_expression}}, {\tt{'}}{\tt{b}})\index{tag}))\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\tt{'}}{\tt{some}} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{cdr\_quantified\_exp} \\  
\=\+{\rm{cdr\_quantified\_exp}}\,({\it{e\/}})\index{cdr\_quantified\_exp} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{qn\/}}{\bf $\;$ be$\;\;$}{\rm{cdr\_quantified\_names}}\,({\it{e\/}})\index{cdr\_quantified\_names}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{qn\/}} $=$ {\bf{nil}}$\;\;${\bf then }{\rm{bound\_boolean\_expression}}\,({\it{e\/}})\index{bound\_boolean\_expression} \\ 
{\bf else }{\rm{mk\_quantified\_expression}}\,(\=\+{\rm{quantifier}}\,({\it{e\/}})\index{quantifier}, \\ 
{\it{qn\/}}, \\ 
{\rm{bound\_id\_type}}\,({\it{e\/}})\index{bound\_id\_type}, \\ 
{\rm{bound\_boolean\_expression}}\,({\it{e\/}})\index{bound\_boolean\_expression})\-\index{mk\_quantified\_expression}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{constant\_value\_exp} \\  
\=\+{\rm{constant\_value\_exp}}\,({\it{u\/}})\index{constant\_value\_exp} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{constant\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{const}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{cn}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{rt}})\index{tag}, \\ 
{\tt{'}}{\tt{colon\_equal}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{constant\_body}}, {\tt{'}}{\tt{b}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{constant\_value\_exp}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{constant\_body}})\index{subtree})\index{constant\_value\_exp} \\ 
{\bf elseif }{\rm{rule}}\,({\it{u\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{constant\_body}}, {\tt{'}}{\tt{b}})\index{tag}, {\tt{'}}{\tt{pending}})\index{prodn})\index{rule} \\ 
{\bf then }{\bf{nil}} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{constant\_body}}, {\tt{'}}{\tt{b}})\index{tag}, {\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{p}})\index{tag})\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{expression}})\index{subtree} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{scalar\_const\_units} \\  
\=\+{\rm{scalar\_const\_units}}\,({\it{n\/}}, {\it{u\/}}, {\it{q\/}})\index{scalar\_const\_units} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{is}})\index{tag}, {\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{i}})\index{tag})\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{rcons}}\,(\=\+{\bf{nil}}, \\ 
{\rm{mk\_scalar\_const\_unit}}\,({\it{n\/}}, {\rm{gname}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{identifier}})\index{subtree})\index{gname}, {\it{q\/}})\index{mk\_scalar\_const\_unit})\-\index{rcons} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{is}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{is2}})\index{tag}, \\ 
{\tt{'}}{\tt{comma}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{i}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{rcons}}\,(\=\+{\rm{scalar\_const\_units}}\,(\=\+{\it{n\/}}, \\ 
{\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{identifier\_list}})\index{subtree}, \\ 
{\it{q\/}} $-\;1$)\-\index{scalar\_const\_units}, \\ 
{\rm{mk\_scalar\_const\_unit}}\,({\it{n\/}}, {\rm{gname}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{identifier}})\index{subtree})\index{gname}, {\it{q\/}})\index{mk\_scalar\_const\_unit})\-\index{rcons} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{scalar\_value\_list} \\  
\=\+{\rm{scalar\_value\_list}}\,({\it{u\/}})\index{scalar\_value\_list} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{type\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{type}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{tn}})\index{tag}, \\ 
{\tt{'}}{\tt{equal}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_definition}}, {\tt{'}}{\tt{d2}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{scalar\_value\_list}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{type\_definition}})\index{subtree})\index{scalar\_value\_list} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{type\_definition}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{scalar\_type}}, {\tt{'}}{\tt{s}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{scalar\_value\_list}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{scalar\_type}})\index{subtree})\index{scalar\_value\_list} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{scalar\_type}}, {\tt{'}}{\tt{s}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{open\_paren}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{is}})\index{tag}, \\ 
{\tt{'}}{\tt{close\_paren}})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{scalar\_value\_list}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{identifier\_list}})\index{subtree})\index{scalar\_value\_list} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{is}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{i}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{rcons}}\,({\bf{nil}}, {\rm{gname}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{identifier}})\index{subtree})\index{gname})\index{rcons} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{is}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{is2}})\index{tag}, \\ 
{\tt{'}}{\tt{comma}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{i}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{rcons}}\,(\=\+{\rm{scalar\_value\_list}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{identifier\_list}})\index{subtree})\index{scalar\_value\_list}, \\ 
{\rm{gname}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{identifier}})\index{subtree})\index{gname})\-\index{rcons} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}

  
\begin{tabbing}{\sc Definition}:\index{derived\_units} \\  
\=\+{\rm{derived\_units}}\,({\it{n\/}}, {\it{u\/}})\index{derived\_units} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{type\_definition}}, {\tt{'}}{\tt{d}})\index{tag}, {\rm{tag}}\,({\tt{'}}{\tt{scalar\_type}}, {\tt{'}}{\tt{s}})\index{tag})\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{derived\_units}}\,({\it{n\/}}, {\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{scalar\_type}})\index{subtree})\index{derived\_units} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{scalar\_type}}, {\tt{'}}{\tt{s}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{open\_paren}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{is}})\index{tag}, \\ 
{\tt{'}}{\tt{close\_paren}})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{scalar\_const\_units}}\,(\=\+{\it{n\/}}, \\ 
{\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{identifier\_list}})\index{subtree}, \\ 
{\rm{length}}\,({\rm{scalar\_value\_list}}\,({\it{u\/}})\index{scalar\_value\_list})\index{length} $-\;1$)\-\index{scalar\_const\_units} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{dparam\_name} \\  
\=\+{\rm{dparam\_name}}\,({\it{d\/}})\index{dparam\_name} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{d\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{similar\_formal\_data\_parameters}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{opt\_access\_specification}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{is}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{ft}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{dparam\_name}}\,({\rm{subtree}}\,({\it{d\/}}, {\tt{'}}{\tt{identifier\_list}})\index{subtree})\index{dparam\_name} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{d\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{is}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{i}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{dparam\_name}}\,({\rm{subtree}}\,({\it{d\/}}, {\tt{'}}{\tt{identifier}})\index{subtree})\index{dparam\_name} \\ 
{\bf elseif }{\rm{identifierp}}\,({\it{d\/}})\index{identifierp}$\;\;${\bf then }{\rm{gname}}\,({\it{d\/}})\index{gname} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{dparam\_name\_list} \\  
\=\+{\rm{dparam\_name\_list}}\,({\it{fs\/}})\index{dparam\_name\_list} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{fs\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf else }{\rm{cons}}\,({\rm{dparam\_name}}\,({\rm{car}}\,({\it{fs\/}}))\index{dparam\_name}, {\rm{dparam\_name\_list}}\,({\rm{cdr}}\,({\it{fs\/}}))\index{dparam\_name\_list})$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{each\_clausep} \\  
\=\+{\rm{each\_clausep}}\,({\it{e\/}})\index{each\_clausep} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{opt\_each\_clause}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{each}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{i}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{ts}})\index{tag}, \\ 
{\tt{'}}{\tt{comma}})\-)\-\index{prodn})\-\index{rule}$\;\;${\bf then }{\bf{t}} \\ 
{\bf elseif }{\rm{rule}}\,({\it{e\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{opt\_each\_clause}}, {\tt{'}}{\tt{e}})\index{tag}, {\tt{'}}{\tt{empty}})\index{prodn})\index{rule}$\;\;${\bf then }{\bf{f}} \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{expression\_from\_spec} \\  
\=\+{\rm{expression\_from\_spec}}\,({\it{e\/}})\index{expression\_from\_spec} \\ 
$=$$\;\;\;\;$\=\+{\bf if }\=\+{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{specification\_expression}}, {\tt{'}}{\tt{se}})\index{tag}, \\ 
{\rm{tag}}\,(\=\+{\tt{'}}{\tt{validated\_specification\_expression}}, \\ 
{\tt{'}}{\tt{se2}})\-\index{tag})\-\index{prodn})\-\index{rule} \\ 
$\vee$$\;\;\;\;${\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{specification\_expression}}, {\tt{'}}{\tt{se}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{open\_paren}}, \\ 
{\rm{tag}}\,(\=\+{\tt{'}}{\tt{validated\_specification\_expression}}, \\ 
{\tt{'}}{\tt{se2}})\-\index{tag}, \\ 
{\tt{'}}{\tt{close\_paren}})\-)\-\index{prodn})\-\index{rule}\- \\ 
{\bf then }{\rm{expression\_from\_spec}}\,({\rm{subtree}}\,(\=\+{\it{e\/}}, \\ 
{\tt{'}}{\tt{validated\_specification\_expression}})\-\index{subtree})\index{expression\_from\_spec} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,(\=\+{\tt{'}}{\tt{validated\_specification\_expression}}, \\ 
{\tt{'}}{\tt{se}})\-\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,(\=\+{\tt{'}}{\tt{non\_validated\_specification\_expression}}, \\ 
{\tt{'}}{\tt{se2}})\-\index{tag}, \\ 
{\tt{'}}{\tt{otherwise}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{i}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{expression\_from\_spec}}\,({\rm{subtree}}\,(\=\+{\it{e\/}}, \\ 
{\tt{'}}{\tt{non\_validated\_specification\_expression}})\-\index{subtree})\index{expression\_from\_spec} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{specification\_expression}}, {\tt{'}}{\tt{se}})\index{tag}, \\ 
{\rm{tag}}\,(\=\+{\tt{'}}{\tt{non\_validated\_specification\_expression}}, \\ 
{\tt{'}}{\tt{se2}})\-\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{expression\_from\_spec}}\,({\rm{subtree}}\,(\=\+{\it{e\/}}, \\ 
{\tt{'}}{\tt{non\_validated\_specification\_expression}})\-\index{subtree})\index{expression\_from\_spec} \\ 
{\bf elseif }\=\+{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,(\=\+{\tt{'}}{\tt{non\_validated\_specification\_expression}}, \\ 
{\tt{'}}{\tt{se}})\-\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{open\_paren}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{proof\_directive}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\tt{'}}{\tt{close\_paren}})\-)\-\index{prodn})\-\index{rule} \\ 
$\vee$$\;\;\;\;${\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,(\=\+{\tt{'}}{\tt{non\_validated\_specification\_expression}}, \\ 
{\tt{'}}{\tt{se}})\-\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{proof\_directive}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
$\vee$$\;\;\;\;${\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,(\=\+{\tt{'}}{\tt{non\_validated\_specification\_expression}}, \\ 
{\tt{'}}{\tt{se}})\-\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e}})\index{tag})\-\index{prodn})\-\index{rule}\- \\ 
{\bf then }{\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{expression}})\index{subtree} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{object\_namep} \\  
\=\+{\rm{object\_namep}}\,({\it{m\/}})\index{object\_namep} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{m\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{modified\_primary\_value}}, {\tt{'}}{\tt{m}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{object\_namep}}\,({\rm{subtree}}\,({\it{m\/}}, {\tt{'}}{\tt{modified\_primary\_value}})\index{subtree})\index{object\_namep} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{m\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{modified\_primary\_value}}, {\tt{'}}{\tt{m}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{primary\_value}}, {\tt{'}}{\tt{p}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{object\_namep}}\,({\rm{subtree}}\,({\it{m\/}}, {\tt{'}}{\tt{primary\_value}})\index{subtree})\index{object\_namep} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{m\/}}, \\ 
{\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{primary\_value}}, {\tt{'}}{\tt{p}})\index{tag}, {\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{i}})\index{tag})\index{prodn})\-\index{rule} \\ 
{\bf then }{\bf{t}} \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{fn\_call\_formp} \\  
\=\+{\rm{fn\_call\_formp}}\,({\it{m\/}})\index{fn\_call\_formp} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{m\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{modified\_primary\_value}}, {\tt{'}}{\tt{m}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{fn\_call\_formp}}\,({\rm{subtree}}\,({\it{m\/}}, {\tt{'}}{\tt{modified\_primary\_value}})\index{subtree})\index{fn\_call\_formp} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{m\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{modified\_primary\_value}}, {\tt{'}}{\tt{m}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{primary\_value}}, {\tt{'}}{\tt{p}})\index{tag})\-\index{prodn})\-\index{rule}$\;\;${\bf then }{\rm{object\_namep}}\,({\it{m\/}})\index{object\_namep} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{m\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{modified\_primary\_value}}, {\tt{'}}{\tt{m}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{modified\_primary\_value}}, {\tt{'}}{\tt{m2}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{value\_modifiers}}, {\tt{'}}{\tt{vm}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }\=\+{\rm{object\_namep}}\,({\rm{subtree}}\,({\it{m\/}}, {\tt{'}}{\tt{modified\_primary\_value}})\index{subtree})\index{object\_namep} \\ 
$\wedge$$\;\;\;\;${\rm{arg\_listp}}\,({\rm{subtree}}\,({\it{m\/}}, {\tt{'}}{\tt{value\_modifiers}})\index{subtree})\index{arg\_listp}\- \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{m\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{modified\_primary\_value}}, {\tt{'}}{\tt{m}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{modified\_primary\_value}}, {\tt{'}}{\tt{m2}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{actual\_condition\_parameters}}, {\tt{'}}{\tt{cp}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{fn\_call\_formp}}\,({\rm{subtree}}\,({\it{m\/}}, {\tt{'}}{\tt{modified\_primary\_value}})\index{subtree})\index{fn\_call\_formp} \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{foreign\_name} \\  
\=\+{\rm{foreign\_name}}\,({\it{u\/}})\index{foreign\_name} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{name\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{name}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{local\_aliases}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\tt{'}}{\tt{from}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{fs}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{foreign\_name}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{local\_aliases}})\index{subtree})\index{foreign\_name} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{local\_aliases}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{local\_renaming}}, {\tt{'}}{\tt{r}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{foreign\_name}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{local\_renaming}})\index{subtree})\index{foreign\_name} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{local\_aliases}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{local\_aliases}}, {\tt{'}}{\tt{a2}})\index{tag}, \\ 
{\tt{'}}{\tt{comma}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{local\_renaming}}, {\tt{'}}{\tt{r}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{foreign\_name}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{local\_renaming}})\index{subtree})\index{foreign\_name} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{local\_renaming}}, {\tt{'}}{\tt{r}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{fn}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{foreign\_name}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{identifier}})\index{subtree})\index{foreign\_name} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{local\_renaming}}, {\tt{'}}{\tt{r}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{ln}})\index{tag}, \\ 
{\tt{'}}{\tt{equal}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{fn}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{foreign\_name}}\,({\rm{subtree\_i}}\,({\it{u\/}}, {\tt{'}}{\tt{identifier}}, {\tt{2}})\index{subtree\_i})\index{foreign\_name} \\ 
{\bf elseif }{\rm{identifierp}}\,({\it{u\/}})\index{identifierp}$\;\;${\bf then }{\rm{gname}}\,({\it{u\/}})\index{gname} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{foreign\_scope\_name} \\  
\=\+{\rm{foreign\_scope\_name}}\,({\it{u\/}})\index{foreign\_scope\_name} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{name\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{name}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{local\_aliases}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\tt{'}}{\tt{from}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{fs}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{foreign\_scope\_name}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{identifier}})\index{subtree})\index{foreign\_scope\_name} \\ 
{\bf elseif }{\rm{identifierp}}\,({\it{u\/}})\index{identifierp}$\;\;${\bf then }{\rm{gname}}\,({\it{u\/}})\index{gname} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{full\_dargs} \\  
\=\+{\rm{full\_dargs}}\,({\it{a\/}}, {\it{p\/}}, {\it{ft\/}})\index{full\_dargs} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{p\/}}, \\ 
{\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{is}})\index{tag}, {\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{i}})\index{tag})\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{rcons}}\,(\=\+{\bf{nil}}, \\ 
{\rm{mk\_single\_formal\_data\_parameter}}\,(\=\+{\it{a\/}}, \\ 
{\rm{subtree}}\,({\it{p\/}}, {\tt{'}}{\tt{identifier}})\index{subtree}, \\ 
{\it{ft\/}})\-\index{mk\_single\_formal\_data\_paramete!r})\-\index{rcons} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{p\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{is}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{is2}})\index{tag}, \\ 
{\tt{'}}{\tt{comma}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{i}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{rcons}}\,(\=\+{\rm{full\_dargs}}\,({\it{a\/}}, {\rm{subtree}}\,({\it{p\/}}, {\tt{'}}{\tt{identifier\_list}})\index{subtree}, {\it{ft\/}})\index{full\_dargs}, \\ 
{\rm{mk\_single\_formal\_data\_parameter}}\,(\=\+{\it{a\/}}, \\ 
{\rm{subtree}}\,({\it{p\/}}, {\tt{'}}{\tt{identifier}})\index{subtree}, \\ 
{\it{ft\/}})\-\index{mk\_single\_formal\_data\_paramete!r})\-\index{rcons} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{formal\_dargs} \\  
\=\+{\rm{formal\_dargs}}\,({\it{d\/}})\index{formal\_dargs} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{d\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{procedure\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{procedure}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{pn}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{external\_data\_objects}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_external\_conditions}}, {\tt{'}}{\tt{c}})\index{tag}, \\ 
{\tt{'}}{\tt{equal}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{procedure\_body}}, {\tt{'}}{\tt{b}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{formal\_dargs}}\,({\rm{subtree}}\,({\it{d\/}}, {\tt{'}}{\tt{external\_data\_objects}})\index{subtree})\index{formal\_dargs} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{d\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{function\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{function}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{fn}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_external\_data\_objects}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{rt}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_external\_conditions}}, {\tt{'}}{\tt{c}})\index{tag}, \\ 
{\tt{'}}{\tt{equal}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{procedure\_body}}, {\tt{'}}{\tt{b}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{formal\_dargs}}\,({\rm{subtree}}\,({\it{d\/}}, {\tt{'}}{\tt{opt\_external\_data\_objects}})\index{subtree})\index{formal\_dargs} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{d\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{opt\_external\_data\_objects}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\tt{'}}{\tt{empty}})\-\index{prodn})\-\index{rule}$\;\;${\bf then }{\bf{nil}} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{d\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{opt\_external\_data\_objects}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{external\_data\_objects}}, {\tt{'}}{\tt{d2}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{formal\_dargs}}\,({\rm{subtree}}\,({\it{d\/}}, {\tt{'}}{\tt{external\_data\_objects}})\index{subtree})\index{formal\_dargs} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{d\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{external\_data\_objects}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{open\_paren}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{external\_data\_objects\_list}}, {\tt{'}}{\tt{d2}})\index{tag}, \\ 
{\tt{'}}{\tt{close\_paren}})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{formal\_dargs}}\,({\rm{subtree}}\,({\it{d\/}}, {\tt{'}}{\tt{external\_data\_objects\_list}})\index{subtree})\index{formal\_dargs} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{d\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{external\_data\_objects\_list}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{similar\_formal\_data\_parameters}}, {\tt{'}}{\tt{d2}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{formal\_dargs}}\,({\rm{subtree}}\,({\it{d\/}}, {\tt{'}}{\tt{similar\_formal\_data\_parameters}})\index{subtree})\index{formal\_dargs} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{d\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{external\_data\_objects\_list}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{external\_data\_objects\_list}}, {\tt{'}}{\tt{d2}})\index{tag}, \\ 
{\tt{'}}{\tt{semi\_colon}}, \\ 
{\rm{tag}}\,(\=\+{\tt{'}}{\tt{similar\_formal\_data\_parameters}}, \\ 
{\tt{'}}{\tt{d3}})\-\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{append}}\,(\=\+{\rm{formal\_dargs}}\,({\rm{subtree}}\,(\=\+{\it{d\/}}, \\ 
{\tt{'}}{\tt{external\_data\_objects\_list}})\-\index{subtree})\index{formal\_dargs}, \\ 
{\rm{formal\_dargs}}\,({\rm{subtree}}\,(\=\+{\it{d\/}}, \\ 
{\tt{'}}{\tt{similar\_formal\_data\_parameters}})\-\index{subtree})\index{formal\_dargs})\- \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{d\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{similar\_formal\_data\_parameters}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{opt\_access\_specification}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{is}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{ft}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{full\_dargs}}\,(\=\+{\rm{access}}\,({\rm{subtree}}\,({\it{d\/}}, {\tt{'}}{\tt{opt\_access\_specification}})\index{subtree})\index{access}, \\ 
{\rm{subtree}}\,({\it{d\/}}, {\tt{'}}{\tt{identifier\_list}})\index{subtree}, \\ 
{\rm{subtree}}\,({\it{d\/}}, {\tt{'}}{\tt{type\_specification}})\index{subtree})\-\index{full\_dargs} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{d\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{constant\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{const}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{cn}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{rt}})\index{tag}, \\ 
{\tt{'}}{\tt{colon\_equal}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{constant\_body}}, {\tt{'}}{\tt{b}})\index{tag})\-)\-\index{prodn})\-\index{rule}$\;\;${\bf then }{\bf{nil}} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{formal\_type} \\  
\=\+{\rm{formal\_type}}\,({\it{d\/}})\index{formal\_type} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{d\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{similar\_formal\_data\_parameters}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{opt\_access\_specification}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{is}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{ft}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{subtree}}\,({\it{d\/}}, {\tt{'}}{\tt{type\_specification}})\index{subtree} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{ibase} \\  
\=\+{\rm{ibase}}\,({\it{b\/}})\index{ibase} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,({\it{b\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{base}}, {\tt{'}}{\tt{b}})\index{tag}, {\tt{'}}{\tt{binary}})\index{prodn})\index{rule}$\;\;${\bf then }{\tt{2}} \\ 
{\bf elseif }{\rm{rule}}\,({\it{b\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{base}}, {\tt{'}}{\tt{b}})\index{tag}, {\tt{'}}{\tt{octal}})\index{prodn})\index{rule}$\;\;${\bf then }{\tt{8}} \\ 
{\bf elseif }{\rm{rule}}\,({\it{b\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{base}}, {\tt{'}}{\tt{b}})\index{tag}, {\tt{'}}{\tt{decimal}})\index{prodn})\index{rule}$\;\;${\bf then }{\tt{10}} \\ 
{\bf elseif }{\rm{rule}}\,({\it{b\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{base}}, {\tt{'}}{\tt{b}})\index{tag}, {\tt{'}}{\tt{hex}})\index{prodn})\index{rule}$\;\;${\bf then }{\tt{16}} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{if\_else\_exp} \\  
\=\+{\rm{if\_else\_exp}}\,({\it{e\/}})\index{if\_else\_exp} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{if\_expression}}, {\tt{'}}{\tt{i}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{if}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{b}})\index{tag}, \\ 
{\tt{'}}{\tt{then}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{p}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{if\_expression\_else\_part}}, {\tt{'}}{\tt{e}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{if\_else\_exp}}\,({\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{if\_expression\_else\_part}})\index{subtree})\index{if\_else\_exp} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{if\_expression\_else\_part}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{list}}\,({\tt{'}}{\tt{else}}, {\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{p}})\index{tag}, {\tt{'}}{\tt{fi}}))\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{expression}})\index{subtree} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{if\_expression\_else\_part}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{elif}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{b}})\index{tag}, \\ 
{\tt{'}}{\tt{then}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{p}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{if\_expression\_else\_part}}, {\tt{'}}{\tt{e2}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{mk\_tree}}\,(\=\+{\tt{'}}{\tt{if\_expression}}, \\ 
{\rm{cons}}\,({\rm{mk\_reserved\_word}}\,({\tt{'}}{\tt{if}})\index{mk\_reserved\_word}, {\rm{cdr}}\,({\rm{subtrees}}\,({\it{e\/}})\index{subtrees})))\-\index{mk\_tree} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{kind} \\  
\=\+{\rm{kind}}\,({\it{u\/}})\index{kind} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{unit\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_declaration}}, {\tt{'}}{\tt{d2}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{kind}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{type\_declaration}})\index{subtree})\index{kind} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{type\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{type}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{tn}})\index{tag}, \\ 
{\tt{'}}{\tt{equal}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_definition}}, {\tt{'}}{\tt{d2}})\index{tag})\-)\-\index{prodn})\-\index{rule}$\;\;${\bf then }{\tt{'}}{\tt{type}} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{unit\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{procedure\_declaration}}, {\tt{'}}{\tt{d2}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{kind}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{procedure\_declaration}})\index{subtree})\index{kind} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{procedure\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{procedure}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{pn}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{external\_data\_objects}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_external\_conditions}}, {\tt{'}}{\tt{c}})\index{tag}, \\ 
{\tt{'}}{\tt{equal}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{procedure\_body}}, {\tt{'}}{\tt{b}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\tt{'}}{\tt{procedure}} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{unit\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{function\_declaration}}, {\tt{'}}{\tt{d2}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{kind}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{function\_declaration}})\index{subtree})\index{kind} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{function\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{function}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{fn}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_external\_data\_objects}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{rt}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_external\_conditions}}, {\tt{'}}{\tt{c}})\index{tag}, \\ 
{\tt{'}}{\tt{equal}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{procedure\_body}}, {\tt{'}}{\tt{b}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\tt{'}}{\tt{function}} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{unit\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{constant\_declaration}}, {\tt{'}}{\tt{d2}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{kind}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{constant\_declaration}})\index{subtree})\index{kind} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{constant\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{const}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{cn}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{rt}})\index{tag}, \\ 
{\tt{'}}{\tt{colon\_equal}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{constant\_body}}, {\tt{'}}{\tt{b}})\index{tag})\-)\-\index{prodn})\-\index{rule}$\;\;${\bf then }{\tt{'}}{\tt{constant}} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{unit\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{lemma\_declaration}}, {\tt{'}}{\tt{d2}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{kind}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{lemma\_declaration}})\index{subtree})\index{kind} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{lemma\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{lemma}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{ln}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_external\_data\_objects}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\tt{'}}{\tt{equal}}, \\ 
{\rm{tag}}\,(\=\+{\tt{'}}{\tt{non\_validated\_specification\_expression}}, \\ 
{\tt{'}}{\tt{b}})\-\index{tag})\-)\-\index{prodn})\-\index{rule}$\;\;${\bf then }{\tt{'}}{\tt{lemma}} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{name\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{name}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{local\_aliases}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\tt{'}}{\tt{from}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{fs}})\index{tag})\-)\-\index{prodn})\-\index{rule}$\;\;${\bf then }{\tt{'}}{\tt{name}} \\ 
{\bf elseif }{\rm{errorp}}\,({\it{u\/}})\index{errorp}$\;\;${\bf then }{\tt{'}}{\tt{error}} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{unit\_name} \\  
\=\+{\rm{unit\_name}}\,({\it{u\/}})\index{unit\_name} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{type\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{type}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{tn}})\index{tag}, \\ 
{\tt{'}}{\tt{equal}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_definition}}, {\tt{'}}{\tt{d2}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{unit\_name}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{identifier}})\index{subtree})\index{unit\_name} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{procedure\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{procedure}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{pn}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{external\_data\_objects}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_external\_conditions}}, {\tt{'}}{\tt{c}})\index{tag}, \\ 
{\tt{'}}{\tt{equal}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{procedure\_body}}, {\tt{'}}{\tt{b}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{unit\_name}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{identifier}})\index{subtree})\index{unit\_name} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{function\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{function}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{fn}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_external\_data\_objects}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{rt}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_external\_conditions}}, {\tt{'}}{\tt{c}})\index{tag}, \\ 
{\tt{'}}{\tt{equal}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{procedure\_body}}, {\tt{'}}{\tt{b}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{unit\_name}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{identifier}})\index{subtree})\index{unit\_name} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{constant\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{const}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{cn}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{rt}})\index{tag}, \\ 
{\tt{'}}{\tt{colon\_equal}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{constant\_body}}, {\tt{'}}{\tt{b}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{unit\_name}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{identifier}})\index{subtree})\index{unit\_name} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{lemma\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{lemma}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{ln}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_external\_data\_objects}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\tt{'}}{\tt{equal}}, \\ 
{\rm{tag}}\,(\=\+{\tt{'}}{\tt{non\_validated\_specification\_expression}}, \\ 
{\tt{'}}{\tt{b}})\-\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{unit\_name}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{identifier}})\index{subtree})\index{unit\_name} \\ 
{\bf elseif }{\rm{identifierp}}\,({\it{u\/}})\index{identifierp}$\;\;${\bf then }{\rm{gname}}\,({\it{u\/}})\index{gname} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{local\_name} \\  
\=\+{\rm{local\_name}}\,({\it{u\/}})\index{local\_name} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{unit\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_declaration}}, {\tt{'}}{\tt{d2}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{unit\_name}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{type\_declaration}})\index{subtree})\index{unit\_name} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{unit\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{procedure\_declaration}}, {\tt{'}}{\tt{d2}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{unit\_name}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{procedure\_declaration}})\index{subtree})\index{unit\_name} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{unit\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{function\_declaration}}, {\tt{'}}{\tt{d2}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{unit\_name}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{function\_declaration}})\index{subtree})\index{unit\_name} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{unit\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{constant\_declaration}}, {\tt{'}}{\tt{d2}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{unit\_name}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{constant\_declaration}})\index{subtree})\index{unit\_name} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{unit\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{lemma\_declaration}}, {\tt{'}}{\tt{d2}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{unit\_name}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{lemma\_declaration}})\index{subtree})\index{unit\_name} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{name\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{name}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{local\_aliases}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\tt{'}}{\tt{from}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{fs}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{local\_name}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{local\_aliases}})\index{subtree})\index{local\_name} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{local\_aliases}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{local\_renaming}}, {\tt{'}}{\tt{r}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{local\_name}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{local\_renaming}})\index{subtree})\index{local\_name} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{local\_aliases}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{local\_aliases}}, {\tt{'}}{\tt{a2}})\index{tag}, \\ 
{\tt{'}}{\tt{comma}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{local\_renaming}}, {\tt{'}}{\tt{r}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{local\_name}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{local\_renaming}})\index{subtree})\index{local\_name} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{local\_renaming}}, {\tt{'}}{\tt{r}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{fn}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{local\_name}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{identifier}})\index{subtree})\index{local\_name} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{local\_renaming}}, {\tt{'}}{\tt{r}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{ln}})\index{tag}, \\ 
{\tt{'}}{\tt{equal}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{fn}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{local\_name}}\,({\rm{subtree\_i}}\,({\it{u\/}}, {\tt{'}}{\tt{identifier}}, {\tt{1}})\index{subtree\_i})\index{local\_name} \\ 
{\bf elseif }{\rm{identifierp}}\,({\it{u\/}})\index{identifierp}$\;\;${\bf then }{\rm{gname}}\,({\it{u\/}})\index{gname} \\ 
{\bf else }{\rm{unit\_name}}\,({\it{u\/}})\index{unit\_name}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{named\_unit}$\;\;$
{\rm{named\_unit}}\,({\it{u\/}}, {\it{s\/}})\index{named\_unit} $=$ {\rm{mk\_named\_unit}}\,({\it{u\/}}, {\it{s\/}})\index{mk\_named\_unit}
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{named\_unit\_list} \\  
\=\+{\rm{named\_unit\_list}}\,({\it{u\/}}, {\it{fs\/}})\index{named\_unit\_list} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{local\_aliases}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{local\_renaming}}, {\tt{'}}{\tt{r}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{rcons}}\,({\bf{nil}}, {\rm{named\_unit}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{local\_renaming}})\index{subtree}, {\it{fs\/}})\index{named\_unit})\index{rcons} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{local\_aliases}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{local\_aliases}}, {\tt{'}}{\tt{a2}})\index{tag}, \\ 
{\tt{'}}{\tt{comma}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{local\_renaming}}, {\tt{'}}{\tt{r}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{rcons}}\,(\=\+{\rm{named\_unit\_list}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{local\_aliases}})\index{subtree}, {\it{fs\/}})\index{named\_unit\_list}, \\ 
{\rm{named\_unit}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{local\_renaming}})\index{subtree}, {\it{fs\/}})\index{named\_unit})\-\index{rcons} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{object\_name} \\  
\=\+{\rm{object\_name}}\,({\it{e\/}})\index{object\_name} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{modified\_primary\_value}}, {\tt{'}}{\tt{m}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{object\_name}}\,({\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{modified\_primary\_value}})\index{subtree})\index{object\_name} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{modified\_primary\_value}}, {\tt{'}}{\tt{m}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{primary\_value}}, {\tt{'}}{\tt{p}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{object\_name}}\,({\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{primary\_value}})\index{subtree})\index{object\_name} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{modified\_primary\_value}}, {\tt{'}}{\tt{m}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{modified\_primary\_value}}, {\tt{'}}{\tt{m2}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{value\_modifiers}}, {\tt{'}}{\tt{vm}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{object\_name}}\,({\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{modified\_primary\_value}})\index{subtree})\index{object\_name} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{modified\_primary\_value}}, {\tt{'}}{\tt{m}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{modified\_primary\_value}}, {\tt{'}}{\tt{m2}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{actual\_condition\_parameters}}, {\tt{'}}{\tt{cp}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{object\_name}}\,({\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{modified\_primary\_value}})\index{subtree})\index{object\_name} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{primary\_value}}, {\tt{'}}{\tt{p}})\index{tag}, {\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{i}})\index{tag})\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{object\_name}}\,({\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{identifier}})\index{subtree})\index{object\_name} \\ 
{\bf elseif }{\rm{identifierp}}\,({\it{e\/}})\index{identifierp}$\;\;${\bf then }{\rm{gname}}\,({\it{e\/}})\index{gname} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{pending\_type\_defnp} \\  
\=\+{\rm{pending\_type\_defnp}}\,({\it{d\/}})\index{pending\_type\_defnp} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{d\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{type\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{type}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{tn}})\index{tag}, \\ 
{\tt{'}}{\tt{equal}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_definition}}, {\tt{'}}{\tt{d2}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{pending\_type\_defnp}}\,({\rm{subtree}}\,({\it{d\/}}, {\tt{'}}{\tt{type\_definition}})\index{subtree})\index{pending\_type\_defnp} \\ 
{\bf elseif }{\rm{rule}}\,({\it{d\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{type\_definition}}, {\tt{'}}{\tt{d}})\index{tag}, {\tt{'}}{\tt{pending}})\index{prodn})\index{rule} \\ 
{\bf then }{\bf{t}} \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{postc} \\  
\=\+{\rm{postc}}\,({\it{u\/}}, {\it{c\/}})\index{postc} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{e\/}}{\bf $\;$ be$\;\;$}{\rm{case\_exit\_list}}\,({\it{u\/}}, {\it{c\/}})\index{case\_exit\_list}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{length}}\,({\it{e\/}})\index{length} $=$ {\tt{0}}$\;\;${\bf then }{\sc{mk\_true\_expression}}\index{mk\_true\_expression} \\ 
{\bf elseif }{\rm{length}}\,({\it{e\/}})\index{length} $=$ {\tt{1}}$\;\;${\bf then }{\rm{expression\_from\_spec}}\,({\rm{car}}\,({\it{e\/}}))\index{expression\_from\_spec} \\ 
{\bf else }{\rm{many\_post\_conditions\_error}}\,({\it{u\/}}, {\it{c\/}})\index{many\_post\_conditions\_error}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{prec} \\  
\=\+{\rm{prec}}\,({\it{u\/}})\index{prec} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{procedure\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{procedure}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{pn}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{external\_data\_objects}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_external\_conditions}}, {\tt{'}}{\tt{c}})\index{tag}, \\ 
{\tt{'}}{\tt{equal}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{procedure\_body}}, {\tt{'}}{\tt{b}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{prec}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{procedure\_body}})\index{subtree})\index{prec} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{function\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{function}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{fn}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_external\_data\_objects}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{rt}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_external\_conditions}}, {\tt{'}}{\tt{c}})\index{tag}, \\ 
{\tt{'}}{\tt{equal}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{procedure\_body}}, {\tt{'}}{\tt{b}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{prec}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{procedure\_body}})\index{subtree})\index{prec} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{constant\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{const}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{cn}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{rt}})\index{tag}, \\ 
{\tt{'}}{\tt{colon\_equal}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{constant\_body}}, {\tt{'}}{\tt{b}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\sc{mk\_true\_expression}}\index{mk\_true\_expression} \\ 
{\bf elseif }{\rm{rule}}\,({\it{u\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{procedure\_body}}, {\tt{'}}{\tt{b}})\index{tag}, {\tt{'}}{\tt{pending}})\index{prodn})\index{rule} \\ 
{\bf then }{\sc{mk\_true\_expression}}\index{mk\_true\_expression} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{procedure\_body}}, {\tt{'}}{\tt{b}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{begin}}, \\ 
{\rm{tag}}\,(\=\+{\tt{'}}{\tt{external\_operational\_specification}}, \\ 
{\tt{'}}{\tt{es}})\-\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_internal\_environment}}, {\tt{'}}{\tt{iv}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_keep\_specification}}, {\tt{'}}{\tt{k}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_internal\_statements}}, {\tt{'}}{\tt{st}})\index{tag}, \\ 
{\tt{'}}{\tt{end}})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{prec}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{external\_operational\_specification}})\index{subtree})\index{prec} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,(\=\+{\tt{'}}{\tt{external\_operational\_specification}}, \\ 
{\tt{'}}{\tt{s}})\-\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{opt\_entry\_specification}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_exit\_specification}}, {\tt{'}}{\tt{x}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{prec}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{opt\_entry\_specification}})\index{subtree})\index{prec} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{opt\_entry\_specification}}, {\tt{'}}{\tt{e}})\index{tag}, {\tt{'}}{\tt{empty}})\index{prodn})\-\index{rule} \\ 
{\bf then }{\sc{mk\_true\_expression}}\index{mk\_true\_expression} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{opt\_entry\_specification}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{entry}}, \\ 
{\rm{tag}}\,(\=\+{\tt{'}}{\tt{non\_validated\_specification\_expression}}, \\ 
{\tt{'}}{\tt{se}})\-\index{tag}, \\ 
{\tt{'}}{\tt{semi\_colon}})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{prec}}\,({\rm{subtree}}\,(\=\+{\it{u\/}}, \\ 
{\tt{'}}{\tt{non\_validated\_specification\_expression}})\-\index{subtree})\index{prec} \\ 
{\bf elseif }\=\+{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,(\=\+{\tt{'}}{\tt{non\_validated\_specification\_expression}}, \\ 
{\tt{'}}{\tt{se}})\-\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{open\_paren}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{proof\_directive}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\tt{'}}{\tt{close\_paren}})\-)\-\index{prodn})\-\index{rule} \\ 
$\vee$$\;\;\;\;${\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,(\=\+{\tt{'}}{\tt{non\_validated\_specification\_expression}}, \\ 
{\tt{'}}{\tt{se}})\-\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{proof\_directive}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
$\vee$$\;\;\;\;${\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,(\=\+{\tt{'}}{\tt{non\_validated\_specification\_expression}}, \\ 
{\tt{'}}{\tt{se}})\-\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e}})\index{tag})\-\index{prodn})\-\index{rule}\- \\ 
{\bf then }{\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{expression}})\index{subtree} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{record\_field\_names} \\  
\=\+{\rm{record\_field\_names}}\,({\it{d\/}})\index{record\_field\_names} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{d\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{record\_type}}, {\tt{'}}{\tt{r}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{record}}, \\ 
{\tt{'}}{\tt{open\_paren}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{fields}}, {\tt{'}}{\tt{f}})\index{tag}, \\ 
{\tt{'}}{\tt{close\_paren}})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{record\_field\_names}}\,({\rm{subtree}}\,({\it{d\/}}, {\tt{'}}{\tt{fields}})\index{subtree})\index{record\_field\_names} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{d\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{fields}}, {\tt{'}}{\tt{f}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{fields}}, {\tt{'}}{\tt{f2}})\index{tag}, \\ 
{\tt{'}}{\tt{semi\_colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{similar\_fields}}, {\tt{'}}{\tt{s}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{append}}\,(\=\+{\rm{record\_field\_names}}\,({\rm{subtree}}\,({\it{d\/}}, {\tt{'}}{\tt{fields}})\index{subtree})\index{record\_field\_names}, \\ 
{\rm{record\_field\_names}}\,({\rm{subtree}}\,({\it{d\/}}, {\tt{'}}{\tt{similar\_fields}})\index{subtree})\index{record\_field\_names})\- \\ 
{\bf elseif }{\rm{rule}}\,({\it{d\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{fields}}, {\tt{'}}{\tt{f}})\index{tag}, {\rm{tag}}\,({\tt{'}}{\tt{similar\_fields}}, {\tt{'}}{\tt{s}})\index{tag})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{record\_field\_names}}\,({\rm{subtree}}\,({\it{d\/}}, {\tt{'}}{\tt{similar\_fields}})\index{subtree})\index{record\_field\_names} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{d\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{similar\_fields}}, {\tt{'}}{\tt{s}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{is}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{ft}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{record\_field\_names}}\,({\rm{subtree}}\,({\it{d\/}}, {\tt{'}}{\tt{identifier\_list}})\index{subtree})\index{record\_field\_names} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{d\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{is}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{is2}})\index{tag}, \\ 
{\tt{'}}{\tt{comma}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{i}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{rcons}}\,(\=\+{\rm{record\_field\_names}}\,({\rm{subtree}}\,({\it{d\/}}, {\tt{'}}{\tt{identifier\_list}})\index{subtree})\index{record\_field\_names}, \\ 
{\rm{record\_field\_names}}\,({\rm{subtree}}\,({\it{d\/}}, {\tt{'}}{\tt{identifier}})\index{subtree})\index{record\_field\_names})\-\index{rcons} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{d\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{is}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{i}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{rcons}}\,({\bf{nil}}, {\rm{record\_field\_names}}\,({\rm{subtree}}\,({\it{d\/}}, {\tt{'}}{\tt{identifier}})\index{subtree})\index{record\_field\_names})\index{rcons} \\ 
{\bf elseif }{\rm{identifierp}}\,({\it{d\/}})\index{identifierp}$\;\;${\bf then }{\rm{gname}}\,({\it{d\/}})\index{gname} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{result\_type} \\  
\=\+{\rm{result\_type}}\,({\it{d\/}})\index{result\_type} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{d\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{function\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{function}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{fn}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_external\_data\_objects}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{rt}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_external\_conditions}}, {\tt{'}}{\tt{c}})\index{tag}, \\ 
{\tt{'}}{\tt{equal}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{procedure\_body}}, {\tt{'}}{\tt{b}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{subtree}}\,({\it{d\/}}, {\tt{'}}{\tt{type\_specification}})\index{subtree} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{d\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{constant\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{const}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{cn}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{rt}})\index{tag}, \\ 
{\tt{'}}{\tt{colon\_equal}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{constant\_body}}, {\tt{'}}{\tt{b}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{subtree}}\,({\it{d\/}}, {\tt{'}}{\tt{type\_specification}})\index{subtree} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{scalar\_type\_defnp} \\  
\=\+{\rm{scalar\_type\_defnp}}\,({\it{d\/}})\index{scalar\_type\_defnp} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{d\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{type\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{type}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{tn}})\index{tag}, \\ 
{\tt{'}}{\tt{equal}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_definition}}, {\tt{'}}{\tt{d2}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{scalar\_type\_defnp}}\,({\rm{subtree}}\,({\it{d\/}}, {\tt{'}}{\tt{type\_definition}})\index{subtree})\index{scalar\_type\_defnp} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{d\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{type\_definition}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{scalar\_type}}, {\tt{'}}{\tt{s}})\index{tag})\-\index{prodn})\-\index{rule}$\;\;${\bf then }{\bf{t}} \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{scope\_list} \\  
\=\+{\rm{scope\_list}}\,({\it{u\/}})\index{scope\_list} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{program\_description}}, {\tt{'}}{\tt{pd}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{scope\_declaration\_list}}, {\tt{'}}{\tt{ss}})\index{tag}, \\ 
{\tt{'}}{\tt{opt\_semi\_colon}})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{scope\_list}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{scope\_declaration\_list}})\index{subtree})\index{scope\_list} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{scope\_declaration\_list}}, {\tt{'}}{\tt{ss}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{scope\_declaration}}, {\tt{'}}{\tt{sd}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{rcons}}\,({\bf{nil}}, {\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{scope\_declaration}})\index{subtree})\index{rcons} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{scope\_declaration\_list}}, {\tt{'}}{\tt{ss}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{scope\_declaration\_list}}, {\tt{'}}{\tt{ss2}})\index{tag}, \\ 
{\tt{'}}{\tt{semi\_colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{scope\_declaration}}, {\tt{'}}{\tt{sd}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{rcons}}\,(\=\+{\rm{scope\_list}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{scope\_declaration\_list}})\index{subtree})\index{scope\_list}, \\ 
{\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{scope\_declaration}})\index{subtree})\-\index{rcons} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{scope\_name} \\  
\=\+{\rm{scope\_name}}\,({\it{u\/}})\index{scope\_name} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{scope\_declaration}}, {\tt{'}}{\tt{sd}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{scope}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{sn}})\index{tag}, \\ 
{\tt{'}}{\tt{equal}}, \\ 
{\tt{'}}{\tt{begin}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{unit\_or\_name\_declaration\_list}}, {\tt{'}}{\tt{ul}})\index{tag}, \\ 
{\tt{'}}{\tt{opt\_semi\_colon}}, \\ 
{\tt{'}}{\tt{end}})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{scope\_name}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{identifier}})\index{subtree})\index{scope\_name} \\ 
{\bf elseif }{\rm{identifierp}}\,({\it{u\/}})\index{identifierp}$\;\;${\bf then }{\rm{gname}}\,({\it{u\/}})\index{gname} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{unit\_list} \\  
\=\+{\rm{unit\_list}}\,({\it{u\/}})\index{unit\_list} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{scope\_declaration}}, {\tt{'}}{\tt{sd}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{scope}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{sn}})\index{tag}, \\ 
{\tt{'}}{\tt{equal}}, \\ 
{\tt{'}}{\tt{begin}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{unit\_or\_name\_declaration\_list}}, {\tt{'}}{\tt{ul}})\index{tag}, \\ 
{\tt{'}}{\tt{opt\_semi\_colon}}, \\ 
{\tt{'}}{\tt{end}})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{unit\_list}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{unit\_or\_name\_declaration\_list}})\index{subtree})\index{unit\_list} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{unit\_or\_name\_declaration\_list}}, {\tt{'}}{\tt{us}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{unit\_or\_name\_declaration}}, {\tt{'}}{\tt{d}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{unit\_list}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{unit\_or\_name\_declaration}})\index{subtree})\index{unit\_list} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{unit\_or\_name\_declaration\_list}}, {\tt{'}}{\tt{us}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,(\=\+{\tt{'}}{\tt{unit\_or\_name\_declaration\_list}}, \\ 
{\tt{'}}{\tt{us2}})\-\index{tag}, \\ 
{\tt{'}}{\tt{semi\_colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{unit\_or\_name\_declaration}}, {\tt{'}}{\tt{d}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{append}}\,(\=\+{\rm{unit\_list}}\,({\rm{subtree}}\,(\=\+{\it{u\/}}, \\ 
{\tt{'}}{\tt{unit\_or\_name\_declaration\_list}})\-\index{subtree})\index{unit\_list}, \\ 
{\rm{unit\_list}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{unit\_or\_name\_declaration}})\index{subtree})\index{unit\_list})\- \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{unit\_or\_name\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{unit\_declaration}}, {\tt{'}}{\tt{d2}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{unit\_list}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{unit\_declaration}})\index{subtree})\index{unit\_list} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{unit\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_declaration}}, {\tt{'}}{\tt{d2}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{unit\_list}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{type\_declaration}})\index{subtree})\index{unit\_list} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{type\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{type}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{tn}})\index{tag}, \\ 
{\tt{'}}{\tt{equal}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_definition}}, {\tt{'}}{\tt{d2}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{cons}}\,(\=\+{\it{u\/}}, \\ 
{\rm{derived\_units}}\,(\=\+{\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{identifier}})\index{subtree}, \\ 
{\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{type\_definition}})\index{subtree})\-\index{derived\_units})\- \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{unit\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{procedure\_declaration}}, {\tt{'}}{\tt{d2}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{unit\_list}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{procedure\_declaration}})\index{subtree})\index{unit\_list} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{procedure\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{procedure}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{pn}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{external\_data\_objects}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_external\_conditions}}, {\tt{'}}{\tt{c}})\index{tag}, \\ 
{\tt{'}}{\tt{equal}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{procedure\_body}}, {\tt{'}}{\tt{b}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{cons}}\,({\it{u\/}}, {\bf{nil}}) \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{unit\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{function\_declaration}}, {\tt{'}}{\tt{d2}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{unit\_list}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{function\_declaration}})\index{subtree})\index{unit\_list} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{function\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{function}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{fn}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_external\_data\_objects}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{rt}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_external\_conditions}}, {\tt{'}}{\tt{c}})\index{tag}, \\ 
{\tt{'}}{\tt{equal}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{procedure\_body}}, {\tt{'}}{\tt{b}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{cons}}\,({\it{u\/}}, {\bf{nil}}) \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{unit\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{constant\_declaration}}, {\tt{'}}{\tt{d2}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{unit\_list}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{constant\_declaration}})\index{subtree})\index{unit\_list} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{constant\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{const}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{cn}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{rt}})\index{tag}, \\ 
{\tt{'}}{\tt{colon\_equal}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{constant\_body}}, {\tt{'}}{\tt{b}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{cons}}\,({\it{u\/}}, {\bf{nil}}) \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{unit\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{lemma\_declaration}}, {\tt{'}}{\tt{d2}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{unit\_list}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{lemma\_declaration}})\index{subtree})\index{unit\_list} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{lemma\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{lemma}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{ln}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{opt\_external\_data\_objects}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\tt{'}}{\tt{equal}}, \\ 
{\rm{tag}}\,(\=\+{\tt{'}}{\tt{non\_validated\_specification\_expression}}, \\ 
{\tt{'}}{\tt{b}})\-\index{tag})\-)\-\index{prodn})\-\index{rule}$\;\;${\bf then }{\rm{cons}}\,({\it{u\/}}, {\bf{nil}}) \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{unit\_or\_name\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{name\_declaration}}, {\tt{'}}{\tt{d2}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{unit\_list}}\,({\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{name\_declaration}})\index{subtree})\index{unit\_list} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{u\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{name\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{name}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{local\_aliases}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\tt{'}}{\tt{from}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{fs}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{named\_unit\_list}}\,(\=\+{\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{local\_aliases}})\index{subtree}, \\ 
{\rm{subtree}}\,({\it{u\/}}, {\tt{'}}{\tt{identifier}})\index{subtree})\-\index{named\_unit\_list} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}



\begin{verbatim}; **********************
;  Reserved Identifiers
; **********************

; (defn reserved_words () ...)
;   defined above under "Parse Tree Leaves"

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{standard\_ids} \\  
\=\+{\sc{standard\_ids}}\index{standard\_ids} \\ 
$=$$\;\;\;\;${\tt{'}}{\tt{(}}\=\+{\tt{activationid}}{\tt{ }}{\tt{boolean}}{\tt{ }}{\tt{character}}{\tt{ }}{\tt{integer}}{\tt{ }}{\tt{rational}}{\tt{ }}{\tt{true}} \\ 
{\tt{false}}{\tt{ }}{\tt{allfrom}}{\tt{ }}{\tt{allto}}{\tt{ }}{\tt{content}}{\tt{ }}{\tt{domain}}{\tt{ }}{\tt{empty}}{\tt{ }}{\tt{first}}{\tt{ }}{\tt{full}} \\ 
{\tt{infrom}}{\tt{ }}{\tt{infrommerge}}{\tt{ }}{\tt{initial}}{\tt{ }}{\tt{last}}{\tt{ }}{\tt{lower}}{\tt{ }}{\tt{max}}{\tt{ }}{\tt{messages}} \\ 
{\tt{min}}{\tt{ }}{\tt{nonfirst}}{\tt{ }}{\tt{nonlast}}{\tt{ }}{\tt{null}}{\tt{ }}{\tt{ord}}{\tt{ }}{\tt{outto}}{\tt{ }}{\tt{outtomerge}}{\tt{ }}{\tt{pred}} \\ 
{\tt{range}}{\tt{ }}{\tt{scale}}{\tt{ }}{\tt{size}}{\tt{ }}{\tt{succ}}{\tt{ }}{\tt{timedallfrom}}{\tt{ }}{\tt{timedallto}} \\ 
{\tt{timedinfrom}}{\tt{ }}{\tt{timedinfrommerge}}{\tt{ }}{\tt{timedmerge}}{\tt{ }}{\tt{timedorder}} \\ 
{\tt{timedoutto}}{\tt{ }}{\tt{timedouttomerge}}{\tt{ }}{\tt{upper}}{\tt{ }}{\tt{routineerror}} \\ 
{\tt{spaceerror}}{\tt{)}}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{reserved\_idp} \\  
\=\+{\rm{reserved\_idp}}\,({\it{n\/}})\index{reserved\_idp} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{i\/}}{\bf $\;$ be$\;\;$}\=\+{\bf if }{\rm{litatom}}\,({\it{n\/}})$\;\;${\bf then }{\rm{pack}}\,({\rm{uc\_list}}\,({\rm{unpack}}\,({\it{n\/}}))\index{uc\_list}) \\ 
{\bf else }{\rm{pack}}\,({\rm{uc\_list}}\,({\it{n\/}})\index{uc\_list})$\;${\bf  endif}\-\- \\ 
{\bf in} \\ 
({\it{i\/}} $\in$ {\sc{reserved\_words}}\index{reserved\_words}) $\vee$ ({\it{i\/}} $\in$ {\sc{standard\_ids}}\index{standard\_ids})$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{some\_reserved\_idp} \\  
\=\+{\rm{some\_reserved\_idp}}\,({\it{s\/}})\index{some\_reserved\_idp} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{s\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{f}} \\ 
{\bf else }{\rm{reserved\_idp}}\,({\rm{car}}\,({\it{s\/}}))\index{reserved\_idp} $\vee$ {\rm{some\_reserved\_idp}}\,({\rm{cdr}}\,({\it{s\/}}))\index{some\_reserved\_idp}$\;${\bf  endif}\-\-
\end{tabbing}



\begin{verbatim};; *****************
;;  Unit references
;; *****************

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{local\_unit\_names} \\  
\=\+{\rm{local\_unit\_names}}\,({\it{ul\/}})\index{local\_unit\_names} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{ul\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf else }{\rm{cons}}\,({\rm{local\_name}}\,({\rm{car}}\,({\it{ul\/}}))\index{local\_name}, {\rm{local\_unit\_names}}\,({\rm{cdr}}\,({\it{ul\/}}))\index{local\_unit\_names})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{local\_names} \\  
{\rm{local\_names}}\,({\it{sd\/}})\index{local\_names} $=$ {\rm{cons}}\,({\rm{scope\_name}}\,({\it{sd\/}})\index{scope\_name}, {\rm{local\_unit\_names}}\,({\rm{unit\_list}}\,({\it{sd\/}})\index{unit\_list})\index{local\_unit\_names})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{all\_scopes} \\  
\=\+{\rm{all\_scopes}}\,({\it{n\/}}, {\it{s\/}})\index{all\_scopes} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{s\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf elseif }{\rm{scope\_name}}\,({\rm{car}}\,({\it{s\/}}))\index{scope\_name} $=$ {\it{n\/}} \\ 
{\bf then }{\rm{cons}}\,({\rm{car}}\,({\it{s\/}}), {\rm{all\_scopes}}\,({\it{n\/}}, {\rm{cdr}}\,({\it{s\/}}))\index{all\_scopes}) \\ 
{\bf else }{\rm{all\_scopes}}\,({\it{n\/}}, {\rm{cdr}}\,({\it{s\/}}))\index{all\_scopes}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{all\_units} \\  
\=\+{\rm{all\_units}}\,({\it{n\/}}, {\it{u\/}})\index{all\_units} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{u\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf elseif }{\rm{local\_name}}\,({\rm{car}}\,({\it{u\/}}))\index{local\_name} $=$ {\it{n\/}}$\;\;${\bf then }{\rm{cons}}\,({\rm{car}}\,({\it{u\/}}), {\rm{all\_units}}\,({\it{n\/}}, {\rm{cdr}}\,({\it{u\/}}))\index{all\_units}) \\ 
{\bf else }{\rm{all\_units}}\,({\it{n\/}}, {\rm{cdr}}\,({\it{u\/}}))\index{all\_units}$\;${\bf  endif}\-\-
\end{tabbing}


\noindent{\sc Event}:   Disable reserved\_idp.

\addvspace{18pt}

\noindent{\sc Event}:   Disable unit\_reserved\_error.

\addvspace{18pt}

\noindent{\sc Event}:   Disable scope\_reserved\_error.

\addvspace{18pt}

\noindent{\sc Event}:   Disable scope\_id\_error.

\addvspace{18pt}

\noindent{\sc Event}:   Disable alias\_id\_error.

\addvspace{18pt}

\noindent{\sc Event}:   Disable no\_scope\_error.

\addvspace{18pt}

\noindent{\sc Event}:   Disable no\_unit\_error.

\addvspace{18pt}

\noindent{\sc Event}:   Disable many\_unit\_error.

\addvspace{18pt}

\noindent{\sc Event}:   Disable many\_scope\_error.

\addvspace{18pt}

\begin{tabbing}{\sc Definition}:\index{mref} \\  
\=\+{\rm{mref}}\,({\it{i\/}}, {\it{sn\/}}, {\it{x\/}}, {\it{m\/}})\index{mref} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{reserved\_idp}}\,({\it{i\/}})\index{reserved\_idp}$\;\;${\bf then }{\rm{cons}}\,({\it{sn\/}}, {\rm{unit\_reserved\_error}}\,({\it{i\/}})\index{unit\_reserved\_error}) \\ 
{\bf elseif }{\rm{reserved\_idp}}\,({\it{sn\/}})\index{reserved\_idp}$\;\;${\bf then }{\rm{cons}}\,({\it{sn\/}}, {\rm{scope\_reserved\_error}}\,({\it{sn\/}})\index{scope\_reserved\_error}) \\ 
{\bf elseif }{\it{i\/}} $=$ {\it{sn\/}}$\;\;${\bf then }{\rm{cons}}\,({\it{sn\/}}, {\rm{scope\_id\_error}}\,({\it{sn\/}})\index{scope\_id\_error}) \\ 
{\bf elseif }{\rm{fix}}\,({\it{m\/}}) $=$ {\tt{0}}$\;\;${\bf then }{\rm{cons}}\,({\it{sn\/}}, {\rm{alias\_id\_error}}\,({\it{i\/}}, {\it{sn\/}})\index{alias\_id\_error}) \\ 
{\bf else }\=\+{\bf let }\=\+{\it{slist\/}}{\bf $\;$ be$\;\;$}{\rm{all\_scopes}}\,({\it{sn\/}}, {\rm{scope\_list}}\,({\it{x\/}})\index{scope\_list})\index{all\_scopes}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{length}}\,({\it{slist\/}})\index{length} $=$ {\tt{0}} \\ 
{\bf then }{\rm{cons}}\,({\it{sn\/}}, {\rm{no\_scope\_error}}\,({\it{sn\/}})\index{no\_scope\_error}) \\ 
{\bf elseif }{\rm{length}}\,({\it{slist\/}})\index{length} $=$ {\tt{1}} \\ 
{\bf then }\=\+{\bf let }\=\+{\it{ulist\/}}{\bf $\;$ be$\;\;$}{\rm{all\_units}}\,(\=\+{\it{i\/}}, \\ 
{\rm{unit\_list}}\,({\rm{car}}\,({\it{slist\/}}))\index{unit\_list})\-\index{all\_units}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{length}}\,({\it{ulist\/}})\index{length} $=$ {\tt{0}} \\ 
{\bf then }{\rm{cons}}\,({\it{sn\/}}, {\rm{no\_unit\_error}}\,({\it{i\/}}, {\it{sn\/}})\index{no\_unit\_error}) \\ 
{\bf elseif }{\rm{length}}\,({\it{ulist\/}})\index{length} $=$ {\tt{1}} \\ 
{\bf then }\=\+{\bf let }\=\+{\it{u\/}}{\bf $\;$ be$\;\;$}{\rm{car}}\,({\it{ulist\/}})\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{kind}}\,({\it{u\/}})\index{kind} $=$ {\tt{'}}{\tt{name}} \\ 
{\bf then }{\rm{mref}}\,(\=\+{\rm{foreign\_name}}\,({\it{u\/}})\index{foreign\_name}, \\ 
{\rm{foreign\_scope\_name}}\,({\it{u\/}})\index{foreign\_scope\_name}, \\ 
{\it{x\/}}, \\ 
{\it{m\/}} $-\;1$)\-\index{mref} \\ 
{\bf else }{\rm{cons}}\,({\it{sn\/}}, {\it{u\/}})$\;${\bf  endif}\-$\;${\bf  endlet}\- \\ 
{\bf else }{\rm{cons}}\,(\=\+{\it{sn\/}}, \\ 
{\rm{many\_unit\_error}}\,({\it{i\/}}, {\it{sn\/}})\index{many\_unit\_error})\-$\;${\bf  endif}\-$\;${\bf  endlet}\- \\ 
{\bf else }{\rm{cons}}\,({\it{sn\/}}, {\rm{many\_scope\_error}}\,({\it{sn\/}})\index{many\_scope\_error})$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endif}\-\-
\end{tabbing}


\noindent{\sc Event}:   Enable reserved\_idp.

\addvspace{18pt}

\noindent{\sc Event}:   Enable unit\_reserved\_error.

\addvspace{18pt}

\noindent{\sc Event}:   Enable scope\_reserved\_error.

\addvspace{18pt}

\noindent{\sc Event}:   Enable scope\_id\_error.

\addvspace{18pt}

\noindent{\sc Event}:   Enable alias\_id\_error.

\addvspace{18pt}

\noindent{\sc Event}:   Enable no\_scope\_error.

\addvspace{18pt}

\noindent{\sc Event}:   Enable no\_unit\_error.

\addvspace{18pt}

\noindent{\sc Event}:   Enable many\_unit\_error.

\addvspace{18pt}

\noindent{\sc Event}:   Enable many\_scope\_error.

\addvspace{18pt}


\begin{tabbing}{\sc Definition}:\index{ref}$\;\;$
{\rm{ref}}\,({\it{i\/}}, {\it{sn\/}}, {\it{x\/}})\index{ref} $=$ {\rm{mref}}\,({\it{i\/}}, {\it{sn\/}}, {\it{x\/}}, {\tt{2}})\index{mref}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{ref\_unit}$\;\;$
{\rm{ref\_unit}}\,({\it{x\/}})\index{ref\_unit} $=$ {\rm{cdr}}\,({\it{x\/}})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{ref\_scope}$\;\;$
{\rm{ref\_scope}}\,({\it{x\/}})\index{ref\_scope} $=$ {\rm{car}}\,({\it{x\/}})
\end{tabbing}



\begin{verbatim}; ****************
;  Marked Objects
; ****************

\end{verbatim}
\noindent{\sc Event}:   Add the shell {\it{marked\/}}\index{marked}, with recognizer function symbol {\it{markedp\/}} and 2 accessors: {\it{mark\/}}, with type restriction (none-of) and default value false; {\it{object\/}}, with type restriction (none-of) and default value zero.

\addvspace{18pt}

\begin{tabbing}{\sc Definition}:\index{unmark} \\  
\=\+{\rm{unmark}}\,({\it{o\/}})\index{unmark} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{markedp}}\,({\it{o\/}})\index{markedp}$\;\;${\bf then }{\rm{object}}\,({\it{o\/}})\index{object} \\ 
{\bf else }{\it{o\/}}$\;${\bf  endif}\-\-
\end{tabbing}



\begin{verbatim}; ****************************
;  Pre-Computable Expressions
; ****************************

\end{verbatim}
\noindent{\sc Event}:   Introduce the function symbol {\it precomputable\_f\index{precomputable\_f}\/} of 3 arguments.

\addvspace{18pt}
\begin{verbatim}; constraint on precomputable_F:
;   (or (indeterminate (precomputable_F e c x))
;       (equal (precomputable_F e c x)
;              (gF e c (empty_map) n x)))
; for some n.



; ****************************
;  Type Descriptor Primitives
; ****************************

; A type descriptor is a tree with different forms for integers/rationals,
; scalar types, arrays, records, mappings, sequences, and sets.  There are
; also special forms for pending types and errors.

; ========================
;  Primitive Constructors
; ========================

; --------------
;  Simple Types
; --------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{mk\_integer\_desc} \\  
\=\+{\rm{mk\_integer\_desc}}\,({\it{tmin\/}}, {\it{tmax\/}}, {\it{udv\/}})\index{mk\_integer\_desc} \\ 
$=$$\;\;\;\;${\rm{mk\_tree}}\,(\=\+{\tt{'}}{\tt{integer}}, \\ 
{\rm{list}}\,(\=\+{\rm{mk\_tree}}\,({\tt{'}}{\tt{tmin}}, {\it{tmin\/}})\index{mk\_tree}, \\ 
{\rm{mk\_tree}}\,({\tt{'}}{\tt{tmax}}, {\it{tmax\/}})\index{mk\_tree}, \\ 
{\rm{mk\_tree}}\,({\tt{'}}{\tt{udv}}, {\it{udv\/}})\index{mk\_tree})\-)\-\index{mk\_tree}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mk\_rational\_desc} \\  
\=\+{\rm{mk\_rational\_desc}}\,({\it{tmin\/}}, {\it{tmax\/}}, {\it{udv\/}})\index{mk\_rational\_desc} \\ 
$=$$\;\;\;\;${\rm{mk\_tree}}\,(\=\+{\tt{'}}{\tt{rational}}, \\ 
{\rm{list}}\,(\=\+{\rm{mk\_tree}}\,({\tt{'}}{\tt{tmin}}, {\it{tmin\/}})\index{mk\_tree}, \\ 
{\rm{mk\_tree}}\,({\tt{'}}{\tt{tmax}}, {\it{tmax\/}})\index{mk\_tree}, \\ 
{\rm{mk\_tree}}\,({\tt{'}}{\tt{udv}}, {\it{udv\/}})\index{mk\_tree})\-)\-\index{mk\_tree}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mk\_scalar\_desc} \\  
\=\+{\rm{mk\_scalar\_desc}}\,({\it{tid\/}}, {\it{sid\/}}, {\it{crd\/}}, {\it{tmin\/}}, {\it{tmax\/}}, {\it{udv\/}})\index{mk\_scalar\_desc} \\ 
$=$$\;\;\;\;${\rm{mk\_tree}}\,(\=\+{\tt{'}}{\tt{scalar}}, \\ 
{\rm{list}}\,(\=\+{\rm{mk\_tree}}\,({\tt{'}}{\tt{tid}}, {\it{tid\/}})\index{mk\_tree}, \\ 
{\rm{mk\_tree}}\,({\tt{'}}{\tt{sid}}, {\it{sid\/}})\index{mk\_tree}, \\ 
{\rm{mk\_tree}}\,({\tt{'}}{\tt{crd}}, {\it{crd\/}})\index{mk\_tree}, \\ 
{\rm{mk\_tree}}\,({\tt{'}}{\tt{tmin}}, {\it{tmin\/}})\index{mk\_tree}, \\ 
{\rm{mk\_tree}}\,({\tt{'}}{\tt{tmax}}, {\it{tmax\/}})\index{mk\_tree}, \\ 
{\rm{mk\_tree}}\,({\tt{'}}{\tt{udv}}, {\it{udv\/}})\index{mk\_tree})\-)\-\index{mk\_tree}\-
\end{tabbing}


\begin{verbatim}; -------------
;  Array Types
; -------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{mk\_array\_desc} \\  
\=\+{\rm{mk\_array\_desc}}\,({\it{id\/}}, {\it{cd\/}}, {\it{udv\/}})\index{mk\_array\_desc} \\ 
$=$$\;\;\;\;${\rm{mk\_tree}}\,(\=\+{\tt{'}}{\tt{array}}, \\ 
{\rm{list}}\,(\=\+{\rm{mk\_tree}}\,({\tt{'}}{\tt{selector\_td}}, {\it{id\/}})\index{mk\_tree}, \\ 
{\rm{mk\_tree}}\,({\tt{'}}{\tt{component\_td}}, {\it{cd\/}})\index{mk\_tree}, \\ 
{\rm{mk\_tree}}\,({\tt{'}}{\tt{udv}}, {\it{udv\/}})\index{mk\_tree})\-)\-\index{mk\_tree}\-
\end{tabbing}


\begin{verbatim}; --------------
;  Record Types
; --------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{mk\_record\_desc} \\  
\=\+{\rm{mk\_record\_desc}}\,({\it{fds\/}}, {\it{udv\/}})\index{mk\_record\_desc} \\ 
$=$$\;\;\;\;${\rm{mk\_tree}}\,(\=\+{\tt{'}}{\tt{record}}, \\ 
{\rm{list}}\,({\rm{mk\_tree}}\,({\tt{'}}{\tt{field\_tds}}, {\it{fds\/}})\index{mk\_tree}, {\rm{mk\_tree}}\,({\tt{'}}{\tt{udv}}, {\it{udv\/}})\index{mk\_tree}))\-\index{mk\_tree}\-
\end{tabbing}


\begin{verbatim}; ---------------
;  Mapping Types
; ---------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{mk\_mapping\_desc} \\  
\=\+{\rm{mk\_mapping\_desc}}\,({\it{sl\/}}, {\it{sd\/}}, {\it{cd\/}}, {\it{udv\/}})\index{mk\_mapping\_desc} \\ 
$=$$\;\;\;\;${\rm{mk\_tree}}\,(\=\+{\tt{'}}{\tt{mapping}}, \\ 
{\rm{list}}\,(\=\+{\rm{mk\_tree}}\,({\tt{'}}{\tt{max\_size}}, {\it{sl\/}})\index{mk\_tree}, \\ 
{\rm{mk\_tree}}\,({\tt{'}}{\tt{selector\_td}}, {\it{sd\/}})\index{mk\_tree}, \\ 
{\rm{mk\_tree}}\,({\tt{'}}{\tt{component\_td}}, {\it{cd\/}})\index{mk\_tree}, \\ 
{\rm{mk\_tree}}\,({\tt{'}}{\tt{udv}}, {\it{udv\/}})\index{mk\_tree})\-)\-\index{mk\_tree}\-
\end{tabbing}


\begin{verbatim}; ----------------
;  Sequence Types
; ----------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{mk\_sequence\_desc} \\  
\=\+{\rm{mk\_sequence\_desc}}\,({\it{sl\/}}, {\it{cd\/}}, {\it{udv\/}})\index{mk\_sequence\_desc} \\ 
$=$$\;\;\;\;${\rm{mk\_tree}}\,(\=\+{\tt{'}}{\tt{sequence}}, \\ 
{\rm{list}}\,(\=\+{\rm{mk\_tree}}\,({\tt{'}}{\tt{max\_size}}, {\it{sl\/}})\index{mk\_tree}, \\ 
{\rm{mk\_tree}}\,({\tt{'}}{\tt{component\_td}}, {\it{cd\/}})\index{mk\_tree}, \\ 
{\rm{mk\_tree}}\,({\tt{'}}{\tt{udv}}, {\it{udv\/}})\index{mk\_tree})\-)\-\index{mk\_tree}\-
\end{tabbing}


\begin{verbatim}; -----------
;  Set Types
; -----------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{mk\_set\_desc} \\  
\=\+{\rm{mk\_set\_desc}}\,({\it{sl\/}}, {\it{cd\/}}, {\it{udv\/}})\index{mk\_set\_desc} \\ 
$=$$\;\;\;\;${\rm{mk\_tree}}\,(\=\+{\tt{'}}{\tt{set}}, \\ 
{\rm{list}}\,(\=\+{\rm{mk\_tree}}\,({\tt{'}}{\tt{max\_size}}, {\it{sl\/}})\index{mk\_tree}, \\ 
{\rm{mk\_tree}}\,({\tt{'}}{\tt{component\_td}}, {\it{cd\/}})\index{mk\_tree}, \\ 
{\rm{mk\_tree}}\,({\tt{'}}{\tt{udv}}, {\it{udv\/}})\index{mk\_tree})\-)\-\index{mk\_tree}\-
\end{tabbing}


\begin{verbatim}; ---------------
;  Pending Types
; ---------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{mk\_pending\_desc} \\  
\=\+{\rm{mk\_pending\_desc}}\,({\it{tid\/}}, {\it{sid\/}}, {\it{udv\/}})\index{mk\_pending\_desc} \\ 
$=$$\;\;\;\;${\rm{mk\_tree}}\,(\=\+{\tt{'}}{\tt{pending}}, \\ 
{\rm{list}}\,(\=\+{\rm{mk\_tree}}\,({\tt{'}}{\tt{tid}}, {\it{tid\/}})\index{mk\_tree}, \\ 
{\rm{mk\_tree}}\,({\tt{'}}{\tt{sid}}, {\it{sid\/}})\index{mk\_tree}, \\ 
{\rm{mk\_tree}}\,({\tt{'}}{\tt{udv}}, {\it{udv\/}})\index{mk\_tree})\-)\-\index{mk\_tree}\-
\end{tabbing}


\begin{verbatim}; -------------
;  Type Errors
; -------------

; The type descriptor constructor for type errors is 
;
;     mk_error (<error message>)
;
; It and functions for specific type errors are defined in the section on
; errors, above.  



; ======================
;  Primitive Extractors
; ======================

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{component\_td} \\  
{\rm{component\_td}}\,({\it{td\/}})\index{component\_td} $=$ {\rm{subtree\_body}}\,({\it{td\/}}, {\tt{'}}{\tt{component\_td}})\index{subtree\_body}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{crd}$\;\;$
{\rm{crd}}\,({\it{td\/}})\index{crd} $=$ {\rm{subtree\_body}}\,({\it{td\/}}, {\tt{'}}{\tt{crd}})\index{subtree\_body}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{field\_tds}$\;\;$
{\rm{field\_tds}}\,({\it{td\/}})\index{field\_tds} $=$ {\rm{subtree\_body}}\,({\it{td\/}}, {\tt{'}}{\tt{field\_tds}})\index{subtree\_body}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{field\_td}$\;\;$
{\rm{field\_td}}\,({\it{fn\/}}, {\it{td\/}})\index{field\_td} $=$ {\rm{mapped\_value}}\,({\rm{field\_tds}}\,({\it{td\/}})\index{field\_tds}, {\it{fn\/}})\index{mapped\_value}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{max\_size}$\;\;$
{\rm{max\_size}}\,({\it{td\/}})\index{max\_size} $=$ {\rm{subtree\_body}}\,({\it{td\/}}, {\tt{'}}{\tt{max\_size}})\index{subtree\_body}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{selector\_td}$\;\;$
{\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td} $=$ {\rm{subtree\_body}}\,({\it{td\/}}, {\tt{'}}{\tt{selector\_td}})\index{subtree\_body}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{sid}$\;\;$
{\rm{sid}}\,({\it{td\/}})\index{sid} $=$ {\rm{subtree\_body}}\,({\it{td\/}}, {\tt{'}}{\tt{sid}})\index{subtree\_body}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{tid} \\  
\=\+{\rm{tid}}\,({\it{td\/}})\index{tid} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{root}}\,({\it{td\/}})\index{root} $\in$ {\tt{'}}{\tt{(}}{\tt{integer}}{\tt{ }}{\tt{rational}}{\tt{)}}$\;\;${\bf then }{\rm{root}}\,({\it{td\/}})\index{root} \\ 
{\bf else }{\rm{subtree\_body}}\,({\it{td\/}}, {\tt{'}}{\tt{tid}})\index{subtree\_body}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{tmax}$\;\;$
{\rm{tmax}}\,({\it{td\/}})\index{tmax} $=$ {\rm{subtree\_body}}\,({\it{td\/}}, {\tt{'}}{\tt{tmax}})\index{subtree\_body}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{tmin}$\;\;$
{\rm{tmin}}\,({\it{td\/}})\index{tmin} $=$ {\rm{subtree\_body}}\,({\it{td\/}}, {\tt{'}}{\tt{tmin}})\index{subtree\_body}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{type\_error\_msg} \\  
\=\+{\rm{type\_error\_msg}}\,({\it{td\/}})\index{type\_error\_msg} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{errorp}}\,({\it{td\/}})\index{errorp}$\;\;${\bf then }{\rm{error\_msg}}\,({\it{td\/}})\index{error\_msg} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{udv} \\  
\=\+{\rm{udv}}\,({\it{td\/}})\index{udv} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{errorp}}\,({\it{td\/}})\index{errorp}$\;\;${\bf then }{\it{td\/}} \\ 
{\bf else }{\rm{subtree\_body}}\,({\it{td\/}}, {\tt{'}}{\tt{udv}})\index{subtree\_body}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{verbatim}; =======================
;  Primitive Recognizers
; =======================

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{integer\_descp} \\  
{\rm{integer\_descp}}\,({\it{td\/}})\index{integer\_descp} $=$ ({\it{td\/}} $=$ {\rm{mk\_integer\_desc}}\,({\rm{tmin}}\,({\it{td\/}})\index{tmin}, {\rm{tmax}}\,({\it{td\/}})\index{tmax}, {\rm{udv}}\,({\it{td\/}})\index{udv})\index{mk\_integer\_desc})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{rational\_descp} \\  
{\rm{rational\_descp}}\,({\it{td\/}})\index{rational\_descp} $=$ ({\it{td\/}} $=$ {\rm{mk\_rational\_desc}}\,({\rm{tmin}}\,({\it{td\/}})\index{tmin}, {\rm{tmax}}\,({\it{td\/}})\index{tmax}, {\rm{udv}}\,({\it{td\/}})\index{udv})\index{mk\_rational\_desc})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{scalar\_descp} \\  
\=\+{\rm{scalar\_descp}}\,({\it{td\/}})\index{scalar\_descp} \\ 
$=$$\;\;\;\;$({\it{td\/}} $=$ {\rm{mk\_scalar\_desc}}\,(\=\+{\rm{tid}}\,({\it{td\/}})\index{tid}, \\ 
{\rm{sid}}\,({\it{td\/}})\index{sid}, \\ 
{\rm{crd}}\,({\it{td\/}})\index{crd}, \\ 
{\rm{tmin}}\,({\it{td\/}})\index{tmin}, \\ 
{\rm{tmax}}\,({\it{td\/}})\index{tmax}, \\ 
{\rm{udv}}\,({\it{td\/}})\index{udv})\-\index{mk\_scalar\_desc})\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{simple\_descp} \\  
\=\+{\rm{simple\_descp}}\,({\it{td\/}})\index{simple\_descp} \\ 
$=$$\;\;\;\;$({\rm{integer\_descp}}\,({\it{td\/}})\index{integer\_descp} $\vee$ {\rm{rational\_descp}}\,({\it{td\/}})\index{rational\_descp} $\vee$ {\rm{scalar\_descp}}\,({\it{td\/}})\index{scalar\_descp})\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{array\_descp} \\  
\=\+{\rm{array\_descp}}\,({\it{td\/}})\index{array\_descp} \\ 
$=$$\;\;\;\;$({\it{td\/}} $=$ {\rm{mk\_array\_desc}}\,({\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td}, {\rm{component\_td}}\,({\it{td\/}})\index{component\_td}, {\rm{udv}}\,({\it{td\/}})\index{udv})\index{mk\_array\_desc})\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{record\_descp} \\  
{\rm{record\_descp}}\,({\it{td\/}})\index{record\_descp} $=$ ({\it{td\/}} $=$ {\rm{mk\_record\_desc}}\,({\rm{field\_tds}}\,({\it{td\/}})\index{field\_tds}, {\rm{udv}}\,({\it{td\/}})\index{udv})\index{mk\_record\_desc})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mapping\_descp} \\  
\=\+{\rm{mapping\_descp}}\,({\it{td\/}})\index{mapping\_descp} \\ 
$=$$\;\;\;\;$({\it{td\/}} $=$ {\rm{mk\_mapping\_desc}}\,(\=\+{\rm{max\_size}}\,({\it{td\/}})\index{max\_size}, \\ 
{\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td}, \\ 
{\rm{component\_td}}\,({\it{td\/}})\index{component\_td}, \\ 
{\rm{udv}}\,({\it{td\/}})\index{udv})\-\index{mk\_mapping\_desc})\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{sequence\_descp} \\  
\=\+{\rm{sequence\_descp}}\,({\it{td\/}})\index{sequence\_descp} \\ 
$=$$\;\;\;\;$({\it{td\/}} $=$ {\rm{mk\_sequence\_desc}}\,({\rm{max\_size}}\,({\it{td\/}})\index{max\_size}, {\rm{component\_td}}\,({\it{td\/}})\index{component\_td}, {\rm{udv}}\,({\it{td\/}})\index{udv})\index{mk\_sequence\_desc})\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{set\_descp} \\  
\=\+{\rm{set\_descp}}\,({\it{td\/}})\index{set\_descp} \\ 
$=$$\;\;\;\;$({\it{td\/}} $=$ {\rm{mk\_set\_desc}}\,({\rm{max\_size}}\,({\it{td\/}})\index{max\_size}, {\rm{component\_td}}\,({\it{td\/}})\index{component\_td}, {\rm{udv}}\,({\it{td\/}})\index{udv})\index{mk\_set\_desc})\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{pending\_descp} \\  
{\rm{pending\_descp}}\,({\it{td\/}})\index{pending\_descp} $=$ ({\it{td\/}} $=$ {\rm{mk\_pending\_desc}}\,({\rm{tid}}\,({\it{td\/}})\index{tid}, {\rm{sid}}\,({\it{td\/}})\index{sid}, {\rm{udv}}\,({\it{td\/}})\index{udv})\index{mk\_pending\_desc})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{error\_descp}$\;\;$
{\rm{error\_descp}}\,({\it{td\/}})\index{error\_descp} $=$ {\rm{errorp}}\,({\it{td\/}})\index{errorp}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{type\_descp} \\  
\=\+{\rm{type\_descp}}\,({\it{td\/}})\index{type\_descp} \\ 
$=$$\;\;\;\;$(\=\+{\rm{simple\_descp}}\,({\it{td\/}})\index{simple\_descp} \\ 
$\vee$$\;\;\;\;${\rm{array\_descp}}\,({\it{td\/}})\index{array\_descp} \\ 
$\vee$$\;\;\;\;${\rm{record\_descp}}\,({\it{td\/}})\index{record\_descp} \\ 
$\vee$$\;\;\;\;${\rm{mapping\_descp}}\,({\it{td\/}})\index{mapping\_descp} \\ 
$\vee$$\;\;\;\;${\rm{sequence\_descp}}\,({\it{td\/}})\index{sequence\_descp} \\ 
$\vee$$\;\;\;\;${\rm{set\_descp}}\,({\it{td\/}})\index{set\_descp} \\ 
$\vee$$\;\;\;\;${\rm{pending\_descp}}\,({\it{td\/}})\index{pending\_descp} \\ 
$\vee$$\;\;\;\;${\rm{error\_descp}}\,({\it{td\/}})\index{error\_descp})\-\-
\end{tabbing}


\begin{verbatim}; ==========================
;  Setting Descriptor Parts
; ==========================

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{set\_tmax} \\  
{\rm{set\_tmax}}\,({\it{td\/}}, {\it{v\/}})\index{set\_tmax} $=$ {\rm{subst\_tree}}\,({\rm{mk\_tree}}\,({\tt{'}}{\tt{tmax}}, {\it{v\/}})\index{mk\_tree}, {\rm{subtree}}\,({\it{td\/}}, {\tt{'}}{\tt{tmax}})\index{subtree}, {\it{td\/}})\index{subst\_tree}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{set\_tmin} \\  
{\rm{set\_tmin}}\,({\it{td\/}}, {\it{v\/}})\index{set\_tmin} $=$ {\rm{subst\_tree}}\,({\rm{mk\_tree}}\,({\tt{'}}{\tt{tmin}}, {\it{v\/}})\index{mk\_tree}, {\rm{subtree}}\,({\it{td\/}}, {\tt{'}}{\tt{tmin}})\index{subtree}, {\it{td\/}})\index{subst\_tree}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{set\_udv} \\  
{\rm{set\_udv}}\,({\it{td\/}}, {\it{v\/}})\index{set\_udv} $=$ {\rm{subst\_tree}}\,({\rm{mk\_tree}}\,({\tt{'}}{\tt{udv}}, {\it{v\/}})\index{mk\_tree}, {\rm{subtree}}\,({\it{td\/}}, {\tt{'}}{\tt{udv}})\index{subtree}, {\it{td\/}})\index{subst\_tree}
\end{tabbing}


\begin{verbatim}; ***************************************
;  Descriptors for Standard Simple Types
; ***************************************

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{boolean\_desc} \\  
{\sc{boolean\_desc}}\index{boolean\_desc} $=$ {\rm{mk\_scalar\_desc}}\,({\tt{'}}{\tt{boolean}}, {\bf{nil}}, {\tt{2}}, {\tt{0}}, {\tt{1}}, {\tt{0}})\index{mk\_scalar\_desc}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{character\_desc} \\  
{\sc{character\_desc}}\index{character\_desc} $=$ {\rm{mk\_scalar\_desc}}\,({\tt{'}}{\tt{character}}, {\bf{nil}}, {\tt{128}}, {\tt{0}}, {\tt{127}}, {\tt{0}})\index{mk\_scalar\_desc}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{integer\_desc}$\;\;$
{\sc{integer\_desc}}\index{integer\_desc} $=$ {\rm{mk\_integer\_desc}}\,({\bf{nil}}, {\bf{nil}}, {\tt{0}})\index{mk\_integer\_desc}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{rational\_desc} \\  
{\sc{rational\_desc}}\index{rational\_desc} $=$ {\rm{mk\_rational\_desc}}\,({\bf{nil}}, {\bf{nil}}, {\rm{rational}}\,({\tt{0}}, {\tt{1}})\index{rational})\index{mk\_rational\_desc}
\end{tabbing}



\begin{verbatim}; ******************
;  Type Recognizers
; ******************

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{integer\_typep}$\;\;$
{\rm{integer\_typep}}\,({\it{td\/}})\index{integer\_typep} $=$ {\rm{integer\_descp}}\,({\it{td\/}})\index{integer\_descp}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{rational\_typep}$\;\;$
{\rm{rational\_typep}}\,({\it{td\/}})\index{rational\_typep} $=$ {\rm{rational\_descp}}\,({\it{td\/}})\index{rational\_descp}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{scalar\_typep}$\;\;$
{\rm{scalar\_typep}}\,({\it{td\/}})\index{scalar\_typep} $=$ {\rm{scalar\_descp}}\,({\it{td\/}})\index{scalar\_descp}
\end{tabbing}
       
\begin{tabbing}{\sc Definition}:\index{boolean\_typep} \\  
{\rm{boolean\_typep}}\,({\it{td\/}})\index{boolean\_typep} $=$ ({\rm{scalar\_typep}}\,({\it{td\/}})\index{scalar\_typep} $\wedge$ ({\rm{tid}}\,({\it{td\/}})\index{tid} $=$ {\tt{'}}{\tt{boolean}}))
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{character\_typep} \\  
{\rm{character\_typep}}\,({\it{td\/}})\index{character\_typep} $=$ ({\rm{scalar\_typep}}\,({\it{td\/}})\index{scalar\_typep} $\wedge$ ({\rm{tid}}\,({\it{td\/}})\index{tid} $=$ {\tt{'}}{\tt{character}}))
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{simple\_typep} \\  
\=\+{\rm{simple\_typep}}\,({\it{td\/}})\index{simple\_typep} \\ 
$=$$\;\;\;\;$({\rm{integer\_typep}}\,({\it{td\/}})\index{integer\_typep} $\vee$ {\rm{rational\_typep}}\,({\it{td\/}})\index{rational\_typep} $\vee$ {\rm{scalar\_typep}}\,({\it{td\/}})\index{scalar\_typep})\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{bounded\_typep} \\  
\=\+{\rm{bounded\_typep}}\,({\it{td\/}})\index{bounded\_typep} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{simple\_typep}}\,({\it{td\/}})\index{simple\_typep}$\;\;${\bf then }({\rm{tmin}}\,({\it{td\/}})\index{tmin} $\not=$ {\bf{nil}}) $\wedge$ ({\rm{tmax}}\,({\it{td\/}})\index{tmax} $\not=$ {\bf{nil}}) \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{equality\_typep}$\;\;$
{\rm{equality\_typep}}\,({\it{td\/}})\index{equality\_typep} $=$ {\rm{type\_descp}}\,({\it{td\/}})\index{type\_descp}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{non\_rational\_simple\_typep} \\  
\=\+{\rm{non\_rational\_simple\_typep}}\,({\it{td\/}})\index{non\_rational\_simple\_typep} \\ 
$=$$\;\;\;\;$({\rm{simple\_typep}}\,({\it{td\/}})\index{simple\_typep} $\wedge$ ($\neg$ {\rm{rational\_typep}}\,({\it{td\/}})\index{rational\_typep}))\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{index\_typep}$\;\;$
{\rm{index\_typep}}\,({\it{td\/}})\index{index\_typep} $=$ {\rm{non\_rational\_simple\_typep}}\,({\it{td\/}})\index{non\_rational\_simple\_typep}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{bounded\_index\_typep} \\  
{\rm{bounded\_index\_typep}}\,({\it{td\/}})\index{bounded\_index\_typep} $=$ ({\rm{index\_typep}}\,({\it{td\/}})\index{index\_typep} $\wedge$ {\rm{bounded\_typep}}\,({\it{td\/}})\index{bounded\_typep})
\end{tabbing}



\begin{verbatim}; ***************************
;  Functions on Gypsy Values
; ***************************

; Gypsy values are represented as integers, rationals, selector-component
; maps, and lists.   A selector-component map is a list of pairs.  The car of
; each pair is a selector (index, field name).  The cdr is the Gypsy value of
; that component.  
;
; Values of boolean, character, integer, and user-defined scalar types are all
; represented as integers.
;
; Values of rational types are represented as rationals.
;
; Values of arrays, records, and mappings are represented as
; selector-component maps from indexes, field names, and selectors,
; respectively, to components.  
;
; Values of sequences and sets are represented as lists of components.


\end{verbatim}\begin{tabbing}{\sc Definition}:\index{null\_map}$\;\;$
{\sc{null\_map}}\index{null\_map} $=$ {\sc{empty\_map}}\index{empty\_map}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{null\_seq}$\;\;$
{\sc{null\_seq}}\index{null\_seq} $=$ {\bf{nil}}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{null\_set}$\;\;$
{\sc{null\_set}}\index{null\_set} $=$ {\bf{nil}}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{field\_names}$\;\;$
{\rm{field\_names}}\,({\it{v\/}})\index{field\_names} $=$ {\rm{keys}}\,({\it{v\/}})\index{keys}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vselectors}$\;\;$
{\rm{vselectors}}\,({\it{v\/}})\index{vselectors} $=$ {\rm{keys}}\,({\it{v\/}})\index{keys}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vcomponents}$\;\;$
{\rm{vcomponents}}\,({\it{v\/}})\index{vcomponents} $=$ {\rm{key\_values}}\,({\it{v\/}})\index{key\_values}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vdomain}$\;\;$
{\rm{vdomain}}\,({\it{v\/}})\index{vdomain} $=$ {\rm{vselectors}}\,({\it{v\/}})\index{vselectors}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vindexes}$\;\;$
{\rm{vindexes}}\,({\it{v\/}})\index{vindexes} $=$ {\rm{vselectors}}\,({\it{v\/}})\index{vselectors}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vrange}$\;\;$
{\rm{vrange}}\,({\it{v\/}})\index{vrange} $=$ {\rm{vcomponents}}\,({\it{v\/}})\index{vcomponents}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{fselect} \\  
\=\+{\rm{fselect}}\,({\it{m\/}}, {\it{k\/}})\index{fselect} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{in\_map}}\,({\it{m\/}}, {\it{k\/}})\index{in\_map}$\;\;${\bf then }{\rm{mapped\_value}}\,({\it{m\/}}, {\it{k\/}})\index{mapped\_value} \\ 
{\bf else }{\rm{no\_such\_component\_error}}\,({\it{m\/}}, {\it{k\/}})\index{no\_such\_component\_error}$\;${\bf  endif}\-\-
\end{tabbing}



\begin{verbatim}; =================================
;  Lemmas for the Vequal Do-Mutual
; =================================

\end{verbatim}\begin{tabbing}{\sc Theorem}:  list\_tree\_size\_not\_zero \\ \index{list\_tree\_size\_not\_zero}
{\rm{listp}}\,({\it{x\/}}) $\rightarrow$ ({\rm{tree\_size}}\,({\it{x\/}})\index{tree\_size} $\not=$ {\tt{0}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp\_list\_subtree\_than\_subtrees \\ \index{lessp\_list\_subtree\_than\_subt!rees}
{\rm{listp}}\,({\it{x\/}}) $\rightarrow$ ({\rm{tree\_size}}\,({\rm{list\_subtree}}\,({\it{x\/}}, {\it{n\/}}, {\it{i\/}})\index{list\_subtree})\index{tree\_size} $<$ {\rm{tree\_size}}\,({\it{x\/}})\index{tree\_size})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp\_subtree\_than\_subtrees \\ \index{lessp\_subtree\_than\_subtrees}
{\rm{listp}}\,({\rm{subtrees}}\,({\it{x\/}})\index{subtrees}) $\rightarrow$ ({\rm{tree\_size}}\,({\rm{subtree}}\,({\it{x\/}}, {\it{n\/}})\index{subtree})\index{tree\_size} $<$ {\rm{tree\_size}}\,({\rm{subtrees}}\,({\it{x\/}})\index{subtrees})\index{tree\_size})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp\_subtree\_body\_than\_subtrees \\ \index{lessp\_subtree\_body\_than\_subt!rees}
\=\+{\rm{listp}}\,({\rm{subtrees}}\,({\it{x\/}})\index{subtrees}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{tree\_size}}\,({\rm{subtree\_body}}\,({\it{x\/}}, {\it{n\/}})\index{subtree\_body})\index{tree\_size} $<$ {\rm{tree\_size}}\,({\rm{subtrees}}\,({\it{x\/}})\index{subtrees})\index{tree\_size})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp\_mapping\_domain\_tree\_size\_0 \\ \index{lessp\_mapping\_domain\_tree\_si!ze\_0}
\=\+{\rm{tree\_size}}\,({\rm{mk\_set\_desc}}\,({\bf{nil}}, {\it{sd\/}}, {\bf{nil}})\index{mk\_set\_desc})\index{tree\_size} \\ 
$<$$\;\;\;\;${\rm{tree\_size}}\,({\rm{subtrees}}\,({\rm{mk\_mapping\_desc}}\,({\it{s\/}}, {\it{sd\/}}, {\it{cd\/}}, {\it{dv\/}})\index{mk\_mapping\_desc})\index{subtrees})\index{tree\_size}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp\_mapping\_domain\_tree\_size \\ \index{lessp\_mapping\_domain\_tree\_si!ze}
\=\+{\rm{mapping\_descp}}\,({\it{x\/}})\index{mapping\_descp} \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{tree\_size}}\,({\rm{mk\_set\_desc}}\,({\bf{nil}}, {\rm{subtree\_body}}\,({\it{x\/}}, {\tt{'}}{\tt{selector\_td}})\index{subtree\_body}, {\bf{nil}})\index{mk\_set\_desc})\index{tree\_size} \\ 
$<$$\;\;\;\;${\rm{tree\_size}}\,({\rm{subtrees}}\,({\it{x\/}})\index{subtrees})\index{tree\_size})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  listp\_array\_desc\_subtrees \\ \index{listp\_array\_desc\_subtrees}
{\rm{array\_descp}}\,({\it{x\/}})\index{array\_descp} $\rightarrow$ {\rm{listp}}\,({\rm{subtrees}}\,({\it{x\/}})\index{subtrees})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  listp\_record\_desc\_subtrees \\ \index{listp\_record\_desc\_subtrees}
{\rm{record\_descp}}\,({\it{x\/}})\index{record\_descp} $\rightarrow$ {\rm{listp}}\,({\rm{subtrees}}\,({\it{x\/}})\index{subtrees})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  listp\_mapping\_desc\_subtrees \\ \index{listp\_mapping\_desc\_subtrees}
{\rm{mapping\_descp}}\,({\it{x\/}})\index{mapping\_descp} $\rightarrow$ {\rm{listp}}\,({\rm{subtrees}}\,({\it{x\/}})\index{subtrees})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  listp\_sequence\_desc\_subtrees \\ \index{listp\_sequence\_desc\_subtrees}
{\rm{sequence\_descp}}\,({\it{x\/}})\index{sequence\_descp} $\rightarrow$ {\rm{listp}}\,({\rm{subtrees}}\,({\it{x\/}})\index{subtrees})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  listp\_set\_desc\_subtrees \\ \index{listp\_set\_desc\_subtrees}
{\rm{set\_descp}}\,({\it{x\/}})\index{set\_descp} $\rightarrow$ {\rm{listp}}\,({\rm{subtrees}}\,({\it{x\/}})\index{subtrees})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  treep\_type\_desc \\ \index{treep\_type\_desc}
{\rm{type\_descp}}\,({\it{x\/}})\index{type\_descp} $\rightarrow$ {\rm{treep}}\,({\it{x\/}})\index{treep}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp\_cdr\_tree\_size \\ \index{lessp\_cdr\_tree\_size}
{\rm{listp}}\,({\it{x\/}}) $\rightarrow$ ({\rm{tree\_size}}\,({\rm{cdr}}\,({\it{x\/}}))\index{tree\_size} $<$ {\rm{tree\_size}}\,({\it{x\/}})\index{tree\_size})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp\_cdar\_tree\_size \\ \index{lessp\_cdar\_tree\_size}
{\rm{listp}}\,({\it{x\/}}) $\rightarrow$ ({\rm{tree\_size}}\,({\rm{cdar}}\,({\it{x\/}}))\index{tree\_size} $<$ {\rm{tree\_size}}\,({\it{x\/}})\index{tree\_size})
\end{tabbing}



\begin{verbatim}; ======================
;  The Vequal Do-Mutual
; ======================

\end{verbatim}
\noindent{\sc Event}:   Disable mk\_set\_desc.

\addvspace{18pt}

\noindent{\sc Event}:   Disable type\_descp.

\addvspace{18pt}

\noindent{\sc Event}:   Disable array\_descp.

\addvspace{18pt}

\noindent{\sc Event}:   Disable record\_descp.

\addvspace{18pt}

\noindent{\sc Event}:   Disable mapping\_descp.

\addvspace{18pt}

\noindent{\sc Event}:   Disable sequence\_descp.

\addvspace{18pt}

\noindent{\sc Event}:   Disable set\_descp.

\addvspace{18pt}


\begin{verbatim}#|
(do-mutual '(

(defn vmapped_value (m k td)
  ; m is a selector-component map
  ; k is a Gypsy value, the selector
  ; td is the type descriptor for k and keys of m
  ; result is m[k]
  (if (nlistp m)
      (no_such_component_error m k)
  (if (vequal (caar m) k td)
      (cdar m)
    (vmapped_value (cdr m) k td)))
  ( (ord-lessp (cons (cons (add1 (tree_size td))
			   (add1 (count m)))
		     (count k))) ))

(defn vmapped_value_list (m ks td)
  ; m is a selector-component-map
  ; ks is a list of Gypsy values, the selectors
  ; td is the type descriptor for elements of ks and keys of m
  ; result is a list of components
  (if (nlistp ks)
      nil
    (cons (vmapped_value m (car ks) td)
	  (vmapped_value_list m (cdr ks) td)))
  ( (ord-lessp (cons (cons (add1 (tree_size td))
			   (add1 (count m)))
		     (count ks))) ))

(defn vequal_list (v1 v2 td)
  (if (nlistp v1)
      (nlistp v2)
  (if (nlistp v2)
      F
    (and (vequal (car v1) (car v2) td)
	 (vequal_list (cdr v1) (cdr v2) td))))
  ( (ord-lessp (cons (cons (add1 (tree_size td))
			   (add1 (count v1)))
		     (count v2))) ))

(defn varray_equal (v1 v2 td)
  ; entry (and (array_descp td)
  ;            (truep (dtype td v1))
  ;            (truep (dtype td v2)))
  ; Note: Because v1 and v2 are both in type td
  ;       (and (equal (vindexes v1) (value_set (selector_td td)))
  ;            (equal (vindexes v2) (value_set (selector_td td))))
  (if (array_descp td)
      (vequal_list (vcomponents v1)
		   (vmapped_value_list v2 (vindexes v1) (selector_td td))
		   (component_td td))
    F)
  ( (ord-lessp (cons (cons (add1 (tree_size (subtrees td)))
			   (add1 (count v1)))
		     (count v2))) ))

(defn vfields_equal (v1 v2 tds)
  ; entry (and (equal (field_names v1) (field_names v2))
  ;            (subset (field_names tds) (field_names v1)))
  (if (nlistp tds)
      T
    (and (vequal (fselect v1 (caar tds))
		 (fselect v2 (caar tds))
		 (cdar tds))
	 (vfields_equal v1 v2 (cdr tds))))
  ( (ord-lessp (cons (cons (add1 (tree_size tds))
			   (add1 (count v1)))
		     (count v2))) ))

(defn vrecord_equal (v1 v2 td)
  ; entry (and (record_descp td)
  ;            (truep (dtype td v1))
  ;            (truep (dtype td v2)))
  ; Note: Because v1 and v2 are both in type td
  ;       (and (equal (field_names v1) (field_names (field_tds td)))
  ;            (equal (field_names v2) (field_names (field_tds td))))
  (if (record_descp td)
      (vfields_equal v1 v2 (field_tds td))
    F)
  ( (ord-lessp (cons (cons (add1 (tree_size (subtrees td)))
			   (add1 (count v1)))
		     (count v2))) ))

(defn vmapping_equal (v1 v2 td)
  ; entry (and (mapping_descp td)
  ;            (truep (dtype td v1))
  ;            (truep (dtype td v2)))
  (if (mapping_descp td)
      (and (vequal (vdomain v1) (vdomain v2)
		   (mk_set_desc nil (selector_td td) (null_set)))
	   (vequal_list (vcomponents v1)
			(vmapped_value_list v2 (vdomain v1) (selector_td td))
			(component_td td)))
    F)
  ( (ord-lessp (cons (cons (add1 (tree_size (subtrees td)))
			   (add1 (count v1)))
		     (count v2))) ))

(defn vsequence_equal (v1 v2 td)
  ; entry (and (sequence_descp td)
  ;            (truep (dtype td v1))
  ;            (truep (dtype td v2)))
  (if (sequence_descp td)
      (vequal_list v1 v2 (component_td td))
    F)
  ( (ord-lessp (cons (cons (add1 (tree_size (subtrees td)))
			   (add1 (count v1)))
		     (count v2))) ))

(defn vset_equal (v1 v2 td)
  ; entry (and (set_descp td)
  ;            (truep (dtype td v1))
  ;            (truep (dtype td v2)))
  (if (set_descp td)
      (and (vsubsetp v1 v2 (component_td td))
	   (vsubsetp v2 v1 (component_td td)))
    F)
  ( (ord-lessp (cons (cons (add1 (tree_size (subtrees td)))
			   (add1 (count v1)))
		     (count v2))) ))

(defn vequal (v1 v2 td)
  ; entry (and (type_descp td)
  ;            (truep (dtype td v1))
  ;            (truep (dtype td v2)))
  (if (type_descp td)
      (case (root td)
	(array (varray_equal v1 v2 td))
	(record (vrecord_equal v1 v2 td))
	(mapping (vmapping_equal v1 v2 td))
	(sequence (vsequence_equal v1 v2 td))
	(set (vset_equal v1 v2 td))
	(rational (requal v1 v2))
	(otherwise ; td is a non-rational simple type
	  (equal v1 v2)))
    F)
  ( (ord-lessp (cons (cons (add1 (tree_size td))
			   (add1 (count v1)))
		     (count v2))) ))

(defn vsubsetp (v1 v2 td)
  ; td is the type descriptor for v1's and v2's components
  (if (nlistp v1)
      T
    (and (vmember (car v1) v2 td)
	 (vsubsetp (cdr v1) v2 td)))
  ( (ord-lessp (cons (cons (add1 (tree_size td))
			   (add1 (count v1)))
		     (count v2))) ))

(defn vmember (e s td)
  ; td is the type descriptor for e and s's components
  (if (nlistp s)
      F
    (or (vequal e (car s) td)
	(vmember e (cdr s) td)))
  ( (ord-lessp (cons (cons (add1 (tree_size td))
			   (add1 (count e)))
		     (count s))) ))

))
|#

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...} \\  
\=\+{\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\it{mutual-flg\/}}, \\ 
{\it{e\/}}, \\ 
{\it{k\/}}, \\ 
{\it{ks\/}}, \\ 
{\it{m\/}}, \\ 
{\it{s\/}}, \\ 
{\it{td\/}}, \\ 
{\it{tds\/}}, \\ 
{\it{v1\/}}, \\ 
{\it{v2\/}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...} \\ 
$=$$\;\;\;\;$\=\+{\bf case on }{\it{mutual-flg\/}}: \\ 
{\bf case = }{\it{vmember\/}} \\ 
{\bf then }\=\+{\bf if }{\it{s\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{f}} \\ 
{\bf else }\=\+{\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vequal}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{td\/}}, \\ 
{\bf{t}}, \\ 
{\it{e\/}}, \\ 
{\rm{car}}\,({\it{s\/}}))\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...} \\ 
$\vee$$\;\;\;\;${\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vmember}}, \\ 
{\it{e\/}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\rm{cdr}}\,({\it{s\/}}), \\ 
{\it{td\/}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...}\-$\;${\bf  endif}\- \\ 
{\bf case = }{\it{vsubsetp\/}} \\ 
{\bf $\;\;$then }\=\+{\bf if }{\it{v1\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{t}} \\ 
{\bf else }\=\+{\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vmember}}, \\ 
{\rm{car}}\,({\it{v1\/}}), \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{v2\/}}, \\ 
{\it{td\/}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...} \\ 
$\wedge$$\;\;\;\;${\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vsubsetp}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{td\/}}, \\ 
{\bf{t}}, \\ 
{\rm{cdr}}\,({\it{v1\/}}), \\ 
{\it{v2\/}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...}\-$\;${\bf  endif}\- \\ 
{\bf case = }{\it{vequal\/}} \\ 
{\bf $\;\;$then }\=\+{\bf if }{\rm{type\_descp}}\,({\it{td\/}})\index{type\_descp} \\ 
{\bf then }\=\+{\bf case on }{\rm{root}}\,({\it{td\/}})\index{root}: \\ 
{\bf case = }{\it{array\/}} \\ 
{\bf then }{\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{varray\_equal}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{td\/}}, \\ 
{\bf{t}}, \\ 
{\it{v1\/}}, \\ 
{\it{v2\/}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...} \\ 
{\bf case = }{\it{record\/}} \\ 
{\bf $\;\;$then }{\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vrecord\_equal}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{td\/}}, \\ 
{\bf{t}}, \\ 
{\it{v1\/}}, \\ 
{\it{v2\/}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...} \\ 
{\bf case = }{\it{mapping\/}} \\ 
{\bf $\;\;$then }{\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vmapping\_equal}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{td\/}}, \\ 
{\bf{t}}, \\ 
{\it{v1\/}}, \\ 
{\it{v2\/}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...} \\ 
{\bf case = }{\it{sequence\/}} \\ 
{\bf $\;\;$then }{\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vsequence\_equal}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{td\/}}, \\ 
{\bf{t}}, \\ 
{\it{v1\/}}, \\ 
{\it{v2\/}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...} \\ 
{\bf case = }{\it{set\/}} \\ 
{\bf $\;\;$then }{\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vset\_equal}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{td\/}}, \\ 
{\bf{t}}, \\ 
{\it{v1\/}}, \\ 
{\it{v2\/}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...} \\ 
{\bf case = }{\it{rational\/}} \\ 
{\bf $\;\;$then }{\rm{requal}}\,({\it{v1\/}}, {\it{v2\/}})\index{requal} \\ 
{\bf otherwise }{\it{v1\/}} $=$ {\it{v2\/}}$\;${\bf  endcase}\- \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\- \\ 
{\bf case = }{\it{vset\_equal\/}} \\ 
{\bf $\;\;$then }\=\+{\bf if }{\rm{set\_descp}}\,({\it{td\/}})\index{set\_descp} \\ 
{\bf then }\=\+{\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vsubsetp}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\rm{component\_td}}\,({\it{td\/}})\index{component\_td}, \\ 
{\bf{t}}, \\ 
{\it{v1\/}}, \\ 
{\it{v2\/}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...} \\ 
$\wedge$$\;\;\;\;${\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vsubsetp}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\rm{component\_td}}\,({\it{td\/}})\index{component\_td}, \\ 
{\bf{t}}, \\ 
{\it{v2\/}}, \\ 
{\it{v1\/}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...}\- \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\- \\ 
{\bf case = }{\it{vsequence\_equal\/}} \\ 
{\bf $\;\;$then }\=\+{\bf if }{\rm{sequence\_descp}}\,({\it{td\/}})\index{sequence\_descp} \\ 
{\bf then }{\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vequal\_list}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\rm{component\_td}}\,({\it{td\/}})\index{component\_td}, \\ 
{\bf{t}}, \\ 
{\it{v1\/}}, \\ 
{\it{v2\/}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...} \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\- \\ 
{\bf case = }{\it{vmapping\_equal\/}} \\ 
{\bf $\;\;$then }\=\+{\bf if }{\rm{mapping\_descp}}\,({\it{td\/}})\index{mapping\_descp} \\ 
{\bf then }\=\+{\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vequal}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\rm{mk\_set\_desc}}\,(\=\+{\bf{nil}}, \\ 
{\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td}, \\ 
{\sc{null\_set}}\index{null\_set})\-\index{mk\_set\_desc}, \\ 
{\bf{t}}, \\ 
{\rm{vdomain}}\,({\it{v1\/}})\index{vdomain}, \\ 
{\rm{vdomain}}\,({\it{v2\/}})\index{vdomain})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...} \\ 
$\wedge$$\;\;\;\;${\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vequal\_list}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\rm{component\_td}}\,({\it{td\/}})\index{component\_td}, \\ 
{\bf{t}}, \\ 
{\rm{vcomponents}}\,({\it{v1\/}})\index{vcomponents}, \\ 
{\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vmapped\_value\_list}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\rm{vdomain}}\,({\it{v1\/}})\index{vdomain}, \\ 
{\it{v2\/}}, \\ 
{\bf{t}}, \\ 
{\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...}\- \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\- \\ 
{\bf case = }{\it{vrecord\_equal\/}} \\ 
{\bf $\;\;$then }\=\+{\bf if }{\rm{record\_descp}}\,({\it{td\/}})\index{record\_descp} \\ 
{\bf then }{\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vfields\_equal}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\rm{field\_tds}}\,({\it{td\/}})\index{field\_tds}, \\ 
{\it{v1\/}}, \\ 
{\it{v2\/}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...} \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\- \\ 
{\bf case = }{\it{vfields\_equal\/}} \\ 
{\bf $\;\;$then }\=\+{\bf if }{\it{tds\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{t}} \\ 
{\bf else }\=\+{\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vequal}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\rm{cdar}}\,({\it{tds\/}}), \\ 
{\bf{t}}, \\ 
{\rm{fselect}}\,(\=\+{\it{v1\/}}, \\ 
{\rm{caar}}\,({\it{tds\/}}))\-\index{fselect}, \\ 
{\rm{fselect}}\,(\=\+{\it{v2\/}}, \\ 
{\rm{caar}}\,({\it{tds\/}}))\-\index{fselect})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...} \\ 
$\wedge$$\;\;\;\;${\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vfields\_equal}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\rm{cdr}}\,({\it{tds\/}}), \\ 
{\it{v1\/}}, \\ 
{\it{v2\/}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...}\-$\;${\bf  endif}\- \\ 
{\bf case = }{\it{varray\_equal\/}} \\ 
{\bf $\;\;$then }\=\+{\bf if }{\rm{array\_descp}}\,({\it{td\/}})\index{array\_descp} \\ 
{\bf then }{\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vequal\_list}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\rm{component\_td}}\,({\it{td\/}})\index{component\_td}, \\ 
{\bf{t}}, \\ 
{\rm{vcomponents}}\,({\it{v1\/}})\index{vcomponents}, \\ 
{\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vmapped\_value\_list}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\rm{vindexes}}\,({\it{v1\/}})\index{vindexes}, \\ 
{\it{v2\/}}, \\ 
{\bf{t}}, \\ 
{\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...} \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\- \\ 
{\bf case = }{\it{vequal\_list\/}} \\ 
{\bf $\;\;$then }\=\+{\bf if }{\it{v1\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\it{v2\/}} $\simeq\;${{\bf{nil}}}${}$ \\ 
{\bf elseif }{\it{v2\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{f}} \\ 
{\bf else }\=\+{\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vequal}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{td\/}}, \\ 
{\bf{t}}, \\ 
{\rm{car}}\,({\it{v1\/}}), \\ 
{\rm{car}}\,({\it{v2\/}}))\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...} \\ 
$\wedge$$\;\;\;\;${\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vequal\_list}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{td\/}}, \\ 
{\bf{t}}, \\ 
{\rm{cdr}}\,({\it{v1\/}}), \\ 
{\rm{cdr}}\,({\it{v2\/}}))\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...}\-$\;${\bf  endif}\- \\ 
{\bf case = }{\it{vmapped\_value\_list\/}} \\ 
{\bf $\;\;$then }\=\+{\bf if }{\it{ks\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf else }{\rm{cons}}\,(\=\+{\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vmapped\_value}}, \\ 
{\bf{t}}, \\ 
{\rm{car}}\,({\it{ks\/}}), \\ 
{\bf{t}}, \\ 
{\it{m\/}}, \\ 
{\bf{t}}, \\ 
{\it{td\/}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...}, \\ 
{\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vmapped\_value\_list}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\rm{cdr}}\,({\it{ks\/}}), \\ 
{\it{m\/}}, \\ 
{\bf{t}}, \\ 
{\it{td\/}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...})\-$\;${\bf  endif}\- \\ 
{\bf otherwise }\=\+{\bf if }{\it{m\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\rm{no\_such\_component\_error}}\,({\it{m\/}}, {\it{k\/}})\index{no\_such\_component\_error} \\ 
{\bf elseif }{\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vequal}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{td\/}}, \\ 
{\bf{t}}, \\ 
{\rm{caar}}\,({\it{m\/}}), \\ 
{\it{k\/}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...} \\ 
{\bf then }{\rm{cdar}}\,({\it{m\/}}) \\ 
{\bf else }{\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vmapped\_value}}, \\ 
{\bf{t}}, \\ 
{\it{k\/}}, \\ 
{\bf{t}}, \\ 
{\rm{cdr}}\,({\it{m\/}}), \\ 
{\bf{t}}, \\ 
{\it{td\/}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...}$\;${\bf  endif}\-$\;${\bf  endcase}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vmember} \\  
\=\+{\rm{vmember}}\,({\it{e\/}}, {\it{s\/}}, {\it{td\/}})\index{vmember} \\ 
$=$$\;\;\;\;${\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vmember}}, \\ 
{\it{e\/}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{s\/}}, \\ 
{\it{td\/}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vsubsetp} \\  
\=\+{\rm{vsubsetp}}\,({\it{v1\/}}, {\it{v2\/}}, {\it{td\/}})\index{vsubsetp} \\ 
$=$$\;\;\;\;${\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vsubsetp}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{td\/}}, \\ 
{\bf{t}}, \\ 
{\it{v1\/}}, \\ 
{\it{v2\/}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vequal} \\  
\=\+{\rm{vequal}}\,({\it{v1\/}}, {\it{v2\/}}, {\it{td\/}})\index{vequal} \\ 
$=$$\;\;\;\;${\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vequal}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{td\/}}, \\ 
{\bf{t}}, \\ 
{\it{v1\/}}, \\ 
{\it{v2\/}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vset\_equal} \\  
\=\+{\rm{vset\_equal}}\,({\it{v1\/}}, {\it{v2\/}}, {\it{td\/}})\index{vset\_equal} \\ 
$=$$\;\;\;\;${\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vset\_equal}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{td\/}}, \\ 
{\bf{t}}, \\ 
{\it{v1\/}}, \\ 
{\it{v2\/}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vsequence\_equal} \\  
\=\+{\rm{vsequence\_equal}}\,({\it{v1\/}}, {\it{v2\/}}, {\it{td\/}})\index{vsequence\_equal} \\ 
$=$$\;\;\;\;${\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vsequence\_equal}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{td\/}}, \\ 
{\bf{t}}, \\ 
{\it{v1\/}}, \\ 
{\it{v2\/}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vmapping\_equal} \\  
\=\+{\rm{vmapping\_equal}}\,({\it{v1\/}}, {\it{v2\/}}, {\it{td\/}})\index{vmapping\_equal} \\ 
$=$$\;\;\;\;${\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vmapping\_equal}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{td\/}}, \\ 
{\bf{t}}, \\ 
{\it{v1\/}}, \\ 
{\it{v2\/}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vrecord\_equal} \\  
\=\+{\rm{vrecord\_equal}}\,({\it{v1\/}}, {\it{v2\/}}, {\it{td\/}})\index{vrecord\_equal} \\ 
$=$$\;\;\;\;${\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vrecord\_equal}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{td\/}}, \\ 
{\bf{t}}, \\ 
{\it{v1\/}}, \\ 
{\it{v2\/}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vfields\_equal} \\  
\=\+{\rm{vfields\_equal}}\,({\it{v1\/}}, {\it{v2\/}}, {\it{tds\/}})\index{vfields\_equal} \\ 
$=$$\;\;\;\;${\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vfields\_equal}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{tds\/}}, \\ 
{\it{v1\/}}, \\ 
{\it{v2\/}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{varray\_equal} \\  
\=\+{\rm{varray\_equal}}\,({\it{v1\/}}, {\it{v2\/}}, {\it{td\/}})\index{varray\_equal} \\ 
$=$$\;\;\;\;${\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{varray\_equal}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{td\/}}, \\ 
{\bf{t}}, \\ 
{\it{v1\/}}, \\ 
{\it{v2\/}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vequal\_list} \\  
\=\+{\rm{vequal\_list}}\,({\it{v1\/}}, {\it{v2\/}}, {\it{td\/}})\index{vequal\_list} \\ 
$=$$\;\;\;\;${\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vequal\_list}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{td\/}}, \\ 
{\bf{t}}, \\ 
{\it{v1\/}}, \\ 
{\it{v2\/}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vmapped\_value\_list} \\  
\=\+{\rm{vmapped\_value\_list}}\,({\it{m\/}}, {\it{ks\/}}, {\it{td\/}})\index{vmapped\_value\_list} \\ 
$=$$\;\;\;\;${\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vmapped\_value\_list}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{ks\/}}, \\ 
{\it{m\/}}, \\ 
{\bf{t}}, \\ 
{\it{td\/}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vmapped\_value} \\  
\=\+{\rm{vmapped\_value}}\,({\it{m\/}}, {\it{k\/}}, {\it{td\/}})\index{vmapped\_value} \\ 
$=$$\;\;\;\;${\rm{mutual-vmember-vsubsetp-vequal-vset\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_equal-varray\_equal-vequal\_list-vmapped\_value\_list-vmapped\_value}}\,(\=\+{\tt{'}}{\tt{vmapped\_value}}, \\ 
{\bf{t}}, \\ 
{\it{k\/}}, \\ 
{\bf{t}}, \\ 
{\it{m\/}}, \\ 
{\bf{t}}, \\ 
{\it{td\/}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}})\-\index{mutual-vmember-vsubsetp-vequal-v!set\_equal-vsequence\_equal-vmapping\_equal-vrecord\_equal-vfields\_e...}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vsize}$\;\;$
{\rm{vsize}}\,({\it{v\/}})\index{vsize} $=$ {\rm{length}}\,({\it{v\/}})\index{length}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vseq\_select} \\  
\=\+{\rm{vseq\_select}}\,({\it{v\/}}, {\it{k\/}})\index{vseq\_select} \\ 
$=$$\;\;\;\;$\=\+{\bf if }({\it{k\/}} $\in\;${\bf{N}}${}$) $\wedge$ ({\tt{1}} $\leq$ {\it{k\/}}) $\wedge$ ({\it{k\/}} $\leq$ {\rm{vsize}}\,({\it{v\/}})\index{vsize})$\;\;${\bf then }{\rm{nth}}\,({\it{k\/}}, {\it{v\/}})\index{nth} \\ 
{\bf else }{\rm{no\_such\_component\_error}}\,({\it{v\/}}, {\it{k\/}})\index{no\_such\_component\_error}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vsubseq\_select} \\  
\=\+{\rm{vsubseq\_select}}\,({\it{v\/}}, {\it{lo\/}}, {\it{hi\/}})\index{vsubseq\_select} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{lo\/}} $>$ {\rm{vsize}}\,({\it{v\/}})\index{vsize}$\;\;${\bf then }{\bf{nil}} \\ 
{\bf elseif }({\tt{1}} $\leq$ {\it{lo\/}}) $\wedge$ ({\it{lo\/}} $\leq$ {\it{hi\/}}) \\ 
{\bf then }{\rm{cons}}\,({\rm{vseq\_select}}\,({\it{v\/}}, {\it{lo\/}})\index{vseq\_select}, {\rm{vsubseq\_select}}\,({\it{v\/}}, $1\;+$ {\it{lo\/}}, {\it{hi\/}})\index{vsubseq\_select}) \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}
    
\begin{tabbing}{\sc Definition}:\index{vselect} \\  
\=\+{\rm{vselect}}\,({\it{v\/}}, {\it{k\/}}, {\it{td\/}})\index{vselect} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{type\_descp}}\,({\it{td\/}})\index{type\_descp} \\ 
{\bf then }\=\+{\bf case on }{\rm{root}}\,({\it{td\/}})\index{root}: \\ 
{\bf case = }{\it{array\/}} \\ 
{\bf then }{\rm{vmapped\_value}}\,({\it{v\/}}, {\it{k\/}}, {\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td})\index{vmapped\_value} \\ 
{\bf case = }{\it{record\/}} \\ 
{\bf $\;\;$then }{\rm{fselect}}\,({\it{v\/}}, {\it{k\/}})\index{fselect} \\ 
{\bf case = }{\it{mapping\/}} \\ 
{\bf $\;\;$then }{\rm{vmapped\_value}}\,({\it{v\/}}, {\it{k\/}}, {\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td})\index{vmapped\_value} \\ 
{\bf case = }{\it{sequence\/}} \\ 
{\bf $\;\;$then }{\rm{vseq\_select}}\,({\it{v\/}}, {\it{k\/}})\index{vseq\_select} \\ 
{\bf otherwise }{\rm{not\_selectable\_error}}\,({\it{td\/}})\index{not\_selectable\_error}$\;${\bf  endcase}\- \\ 
{\bf else }{\rm{not\_type\_descriptor\_error}}\,({\it{td\/}})\index{not\_type\_descriptor\_error}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vmap\_put} \\  
\=\+{\rm{vmap\_put}}\,({\it{m\/}}, {\it{k\/}}, {\it{v\/}}, {\it{td\/}})\index{vmap\_put} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{m\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\rm{cons}}\,({\rm{map\_entry}}\,({\it{k\/}}, {\it{v\/}})\index{map\_entry}, {\it{m\/}}) \\ 
{\bf elseif }{\rm{vequal}}\,({\rm{caar}}\,({\it{m\/}}), {\it{k\/}}, {\it{td\/}})\index{vequal}$\;\;${\bf then }{\rm{cons}}\,({\rm{map\_entry}}\,({\it{k\/}}, {\it{v\/}})\index{map\_entry}, {\rm{cdr}}\,({\it{m\/}})) \\ 
{\bf else }{\rm{cons}}\,({\rm{car}}\,({\it{m\/}}), {\rm{vmap\_put}}\,({\rm{cdr}}\,({\it{m\/}}), {\it{k\/}}, {\it{v\/}}, {\it{td\/}})\index{vmap\_put})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{varray\_put} \\  
{\rm{varray\_put}}\,({\it{a\/}}, {\it{i\/}}, {\it{v\/}}, {\it{td\/}})\index{varray\_put} $=$ {\rm{vmap\_put}}\,({\it{a\/}}, {\it{i\/}}, {\it{v\/}}, {\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td})\index{vmap\_put}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vrecord\_put}$\;\;$
{\rm{vrecord\_put}}\,({\it{r\/}}, {\it{fn\/}}, {\it{v\/}})\index{vrecord\_put} $=$ {\rm{add\_to\_map}}\,({\it{r\/}}, {\it{fn\/}}, {\it{v\/}})\index{add\_to\_map}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vmapping\_put} \\  
{\rm{vmapping\_put}}\,({\it{m\/}}, {\it{i\/}}, {\it{v\/}}, {\it{td\/}})\index{vmapping\_put} $=$ {\rm{vmap\_put}}\,({\it{m\/}}, {\it{i\/}}, {\it{v\/}}, {\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td})\index{vmap\_put}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vsequence\_put} \\  
\=\+{\rm{vsequence\_put}}\,({\it{s\/}}, {\it{i\/}}, {\it{v\/}})\index{vsequence\_put} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{s\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\it{s\/}} \\ 
{\bf elseif }{\it{i\/}} $=$ {\tt{1}}$\;\;${\bf then }{\rm{cons}}\,({\it{v\/}}, {\rm{cdr}}\,({\it{s\/}})) \\ 
{\bf else }{\rm{cons}}\,({\rm{car}}\,({\it{s\/}}), {\rm{vsequence\_put}}\,({\rm{cdr}}\,({\it{s\/}}), {\it{i\/}} $-\;1$, {\it{v\/}})\index{vsequence\_put})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vsetp} \\  
\=\+{\rm{vsetp}}\,({\it{s\/}}, {\it{td\/}})\index{vsetp} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{s\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{t}} \\ 
{\bf else }($\neg$ {\rm{vmember}}\,({\rm{car}}\,({\it{s\/}}), {\rm{cdr}}\,({\it{s\/}}), {\it{td\/}})\index{vmember}) $\wedge$ {\rm{vsetp}}\,({\rm{cdr}}\,({\it{s\/}}), {\it{td\/}})\index{vsetp}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vset} \\  
\=\+{\rm{vset}}\,({\it{vs\/}}, {\it{td\/}})\index{vset} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{vs\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf elseif }{\rm{vmember}}\,({\rm{car}}\,({\it{vs\/}}), {\rm{cdr}}\,({\it{vs\/}}), {\it{td\/}})\index{vmember}$\;\;${\bf then }{\rm{vset}}\,({\rm{cdr}}\,({\it{vs\/}}), {\it{td\/}})\index{vset} \\ 
{\bf else }{\rm{cons}}\,({\rm{car}}\,({\it{vs\/}}), {\rm{vset}}\,({\rm{cdr}}\,({\it{vs\/}}), {\it{td\/}})\index{vset})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vsubmapp} \\  
\=\+{\rm{vsubmapp}}\,({\it{v1\/}}, {\it{v2\/}}, {\it{td\/}})\index{vsubmapp} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{v1\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{t}} \\ 
{\bf else }\=\+{\bf let }\=\+{\it{c\/}}{\bf $\;$ be$\;\;$}{\rm{vselect}}\,({\it{v2\/}}, {\rm{caar}}\,({\it{v1\/}}), {\it{td\/}})\index{vselect}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{errorp}}\,({\it{c\/}})\index{errorp}$\;\;${\bf then }{\bf{f}} \\ 
{\bf else }\=\+{\rm{vequal}}\,({\rm{cdar}}\,({\it{v1\/}}), {\it{c\/}}, {\rm{component\_td}}\,({\it{td\/}})\index{component\_td})\index{vequal} \\ 
$\wedge$$\;\;\;\;${\rm{vsubmapp}}\,({\rm{cdr}}\,({\it{v1\/}}), {\it{v2\/}}, {\it{td\/}})\index{vsubmapp}\-$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vsubseqp} \\  
\=\+{\rm{vsubseqp}}\,({\it{v1\/}}, {\it{v2\/}}, {\it{td\/}})\index{vsubseqp} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{v1\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{t}} \\ 
{\bf elseif }{\it{v2\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{f}} \\ 
{\bf elseif }{\rm{vequal}}\,({\rm{car}}\,({\it{v1\/}}), {\rm{car}}\,({\it{v2\/}}), {\it{td\/}})\index{vequal}$\;\;${\bf then }{\rm{vsubseqp}}\,({\rm{cdr}}\,({\it{v1\/}}), {\rm{cdr}}\,({\it{v2\/}}), {\it{td\/}})\index{vsubseqp} \\ 
{\bf else }{\rm{vsubseqp}}\,({\it{v1\/}}, {\rm{cdr}}\,({\it{v2\/}}), {\it{td\/}})\index{vsubseqp}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vsubp} \\  
\=\+{\rm{vsubp}}\,({\it{v1\/}}, {\it{v2\/}}, {\it{td\/}})\index{vsubp} \\ 
$=$$\;\;\;\;$\=\+{\bf case on }{\rm{root}}\,({\it{td\/}})\index{root}: \\ 
{\bf case = }{\it{mapping\/}} \\ 
{\bf then }{\rm{vsubmapp}}\,({\it{v1\/}}, {\it{v2\/}}, {\it{td\/}})\index{vsubmapp} \\ 
{\bf case = }{\it{sequence\/}} \\ 
{\bf $\;\;$then }{\rm{vsubseqp}}\,({\it{v1\/}}, {\it{v2\/}}, {\rm{component\_td}}\,({\it{td\/}})\index{component\_td})\index{vsubseqp} \\ 
{\bf case = }{\it{set\/}} \\ 
{\bf $\;\;$then }{\rm{vsubsetp}}\,({\it{v1\/}}, {\it{v2\/}}, {\rm{component\_td}}\,({\it{td\/}})\index{component\_td})\index{vsubsetp} \\ 
{\bf otherwise }{\bf{f}}$\;${\bf  endcase}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vmap\_remove} \\  
\=\+{\rm{vmap\_remove}}\,({\it{m\/}}, {\it{k\/}}, {\it{td\/}})\index{vmap\_remove} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{m\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\it{m\/}} \\ 
{\bf elseif }{\rm{vequal}}\,({\rm{caar}}\,({\it{m\/}}), {\it{k\/}}, {\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td})\index{vequal}$\;\;${\bf then }{\rm{cdr}}\,({\it{m\/}}) \\ 
{\bf else }{\rm{cons}}\,({\rm{car}}\,({\it{m\/}}), {\rm{vmap\_remove}}\,({\rm{cdr}}\,({\it{m\/}}), {\it{k\/}}, {\it{td\/}})\index{vmap\_remove})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vremove} \\  
\=\+{\rm{vremove}}\,({\it{v1\/}}, {\it{v2\/}}, {\it{td\/}})\index{vremove} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{v2\/}}) \\ 
{\bf then }\=\+{\bf if }{\rm{vequal}}\,({\it{v1\/}}, {\rm{car}}\,({\it{v2\/}}), {\it{td\/}})\index{vequal}$\;\;${\bf then }{\rm{vremove}}\,({\it{v1\/}}, {\rm{cdr}}\,({\it{v2\/}}), {\it{td\/}})\index{vremove} \\ 
{\bf else }{\rm{cons}}\,({\rm{car}}\,({\it{v2\/}}), {\rm{vremove}}\,({\it{v1\/}}, {\rm{cdr}}\,({\it{v2\/}}), {\it{td\/}})\index{vremove})$\;${\bf  endif}\- \\ 
{\bf else }{\it{v2\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vdifference} \\  
\=\+{\rm{vdifference}}\,({\it{v1\/}}, {\it{v2\/}}, {\it{td\/}})\index{vdifference} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{v1\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\it{v1\/}} \\ 
{\bf elseif }{\rm{vmember}}\,({\rm{car}}\,({\it{v1\/}}), {\it{v2\/}}, {\rm{component\_td}}\,({\it{td\/}})\index{component\_td})\index{vmember} \\ 
{\bf then }{\rm{vdifference}}\,({\rm{cdr}}\,({\it{v1\/}}), {\it{v2\/}}, {\it{td\/}})\index{vdifference} \\ 
{\bf else }{\rm{cons}}\,({\rm{car}}\,({\it{v1\/}}), {\rm{vdifference}}\,({\rm{cdr}}\,({\it{v1\/}}), {\it{v2\/}}, {\it{td\/}})\index{vdifference})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vdifference\_maps} \\  
\=\+{\rm{vdifference\_maps}}\,({\it{v1\/}}, {\it{v2\/}}, {\it{td\/}})\index{vdifference\_maps} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{v1\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\it{v1\/}} \\ 
{\bf else }\=\+{\bf let }\=\+{\it{c\/}}{\bf $\;$ be$\;\;$}{\rm{vselect}}\,({\it{v2\/}}, {\rm{caar}}\,({\it{v1\/}}), {\it{td\/}})\index{vselect}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{errorp}}\,({\it{c\/}})\index{errorp} \\ 
{\bf then }{\rm{cons}}\,({\rm{car}}\,({\it{v1\/}}), {\rm{vdifference\_maps}}\,({\rm{cdr}}\,({\it{v1\/}}), {\it{v2\/}}, {\it{td\/}})\index{vdifference\_maps}) \\ 
{\bf elseif }{\rm{vequal}}\,({\rm{cdar}}\,({\it{v1\/}}), {\it{c\/}}, {\rm{component\_td}}\,({\it{td\/}})\index{component\_td})\index{vequal} \\ 
{\bf then }{\rm{vdifference\_maps}}\,({\rm{cdr}}\,({\it{v1\/}}), {\it{v2\/}}, {\it{td\/}})\index{vdifference\_maps} \\ 
{\bf else }{\rm{mapping\_merge\_error}}\,({\it{v1\/}}, {\it{v2\/}})\index{mapping\_merge\_error}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vintersect} \\  
\=\+{\rm{vintersect}}\,({\it{v1\/}}, {\it{v2\/}}, {\it{td\/}})\index{vintersect} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{v1\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\it{v1\/}} \\ 
{\bf elseif }{\rm{vmember}}\,({\rm{car}}\,({\it{v1\/}}), {\it{v2\/}}, {\rm{component\_td}}\,({\it{td\/}})\index{component\_td})\index{vmember} \\ 
{\bf then }{\rm{cons}}\,({\rm{car}}\,({\it{v1\/}}), {\rm{vintersect}}\,({\rm{cdr}}\,({\it{v1\/}}), {\it{v2\/}}, {\it{td\/}})\index{vintersect}) \\ 
{\bf else }{\rm{vintersect}}\,({\rm{cdr}}\,({\it{v1\/}}), {\it{v2\/}}, {\it{td\/}})\index{vintersect}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vintersect\_maps} \\  
\=\+{\rm{vintersect\_maps}}\,({\it{v1\/}}, {\it{v2\/}}, {\it{td\/}})\index{vintersect\_maps} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{v1\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\it{v1\/}} \\ 
{\bf else }\=\+{\bf let }\=\+{\it{c\/}}{\bf $\;$ be$\;\;$}{\rm{vselect}}\,({\it{v2\/}}, {\rm{caar}}\,({\it{v1\/}}), {\it{td\/}})\index{vselect}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{errorp}}\,({\it{c\/}})\index{errorp}$\;\;${\bf then }{\rm{vintersect\_maps}}\,({\rm{cdr}}\,({\it{v1\/}}), {\it{v2\/}}, {\it{td\/}})\index{vintersect\_maps} \\ 
{\bf elseif }{\rm{vequal}}\,({\rm{cdar}}\,({\it{v1\/}}), {\it{c\/}}, {\rm{component\_td}}\,({\it{td\/}})\index{component\_td})\index{vequal} \\ 
{\bf then }{\rm{cons}}\,({\rm{car}}\,({\it{v1\/}}), {\rm{vintersect\_maps}}\,({\rm{cdr}}\,({\it{v1\/}}), {\it{v2\/}}, {\it{td\/}})\index{vintersect\_maps}) \\ 
{\bf else }{\rm{mapping\_merge\_error}}\,({\it{v1\/}}, {\it{v2\/}})\index{mapping\_merge\_error}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vunion} \\  
\=\+{\rm{vunion}}\,({\it{v1\/}}, {\it{v2\/}}, {\it{td\/}})\index{vunion} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{v1\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\it{v2\/}} \\ 
{\bf elseif }{\rm{vmember}}\,({\rm{car}}\,({\it{v1\/}}), {\it{v2\/}}, {\rm{component\_td}}\,({\it{td\/}})\index{component\_td})\index{vmember} \\ 
{\bf then }{\rm{vunion}}\,({\rm{cdr}}\,({\it{v1\/}}), {\it{v2\/}}, {\it{td\/}})\index{vunion} \\ 
{\bf else }{\rm{cons}}\,({\rm{car}}\,({\it{v1\/}}), {\rm{vunion}}\,({\rm{cdr}}\,({\it{v1\/}}), {\it{v2\/}}, {\it{td\/}})\index{vunion})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{vunion\_maps} \\  
\=\+{\rm{vunion\_maps}}\,({\it{v1\/}}, {\it{v2\/}}, {\it{td\/}})\index{vunion\_maps} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{v1\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\it{v2\/}} \\ 
{\bf else }\=\+{\bf let }\=\+{\it{c\/}}{\bf $\;$ be$\;\;$}{\rm{vselect}}\,({\it{v2\/}}, {\rm{caar}}\,({\it{v1\/}}), {\it{td\/}})\index{vselect}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{errorp}}\,({\it{c\/}})\index{errorp} \\ 
{\bf then }{\rm{cons}}\,({\rm{car}}\,({\it{v1\/}}), {\rm{vunion\_maps}}\,({\rm{cdr}}\,({\it{v1\/}}), {\it{v2\/}}, {\it{td\/}})\index{vunion\_maps}) \\ 
{\bf elseif }{\rm{vequal}}\,({\rm{cdar}}\,({\it{v1\/}}), {\it{c\/}}, {\rm{component\_td}}\,({\it{td\/}})\index{component\_td})\index{vequal} \\ 
{\bf then }{\rm{vunion\_maps}}\,({\rm{cdr}}\,({\it{v1\/}}), {\it{v2\/}}, {\it{td\/}})\index{vunion\_maps} \\ 
{\bf else }{\rm{mapping\_merge\_error}}\,({\it{v1\/}}, {\it{v2\/}})\index{mapping\_merge\_error}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endif}\-\-
\end{tabbing}



\begin{verbatim}; *********************
;  Value Sets of Types
; *********************

; =====================
;  Value Set Utilities
; =====================

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{remove\_larger} \\  
\=\+{\rm{remove\_larger}}\,({\it{s\/}}, {\it{n\/}})\index{remove\_larger} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{s\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\it{s\/}} \\ 
{\bf elseif }{\rm{length}}\,({\rm{car}}\,({\it{s\/}}))\index{length} $>$ {\it{n\/}}$\;\;${\bf then }{\rm{remove\_larger}}\,({\rm{cdr}}\,({\it{s\/}}), {\it{n\/}})\index{remove\_larger} \\ 
{\bf else }{\rm{cons}}\,({\rm{car}}\,({\it{s\/}}), {\rm{remove\_larger}}\,({\rm{cdr}}\,({\it{s\/}}), {\it{n\/}})\index{remove\_larger})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{list\_cons} \\  
\=\+{\rm{list\_cons}}\,({\it{x\/}}, {\it{y\/}})\index{list\_cons} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{y\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf else }{\rm{cons}}\,({\rm{cons}}\,({\it{x\/}}, {\rm{car}}\,({\it{y\/}})), {\rm{list\_cons}}\,({\it{x\/}}, {\rm{cdr}}\,({\it{y\/}}))\index{list\_cons})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{all\_subsets} \\  
\=\+{\rm{all\_subsets}}\,({\it{vs\/}})\index{all\_subsets} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{vs\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\rm{list}}\,({\bf{nil}}) \\ 
{\bf else }{\rm{append}}\,(\=\+{\rm{list\_cons}}\,({\rm{car}}\,({\it{vs\/}}), {\rm{all\_subsets}}\,({\rm{cdr}}\,({\it{vs\/}}))\index{all\_subsets})\index{list\_cons}, \\ 
{\rm{all\_subsets}}\,({\rm{cdr}}\,({\it{vs\/}}))\index{all\_subsets})\-$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{all\_seqs\_n} \\  
\=\+{\rm{all\_seqs\_n}}\,({\it{rvs\/}}, {\it{avs\/}}, {\it{n\/}})\index{all\_seqs\_n} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\rm{list}}\,({\bf{nil}}) \\ 
{\bf elseif }{\it{rvs\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf else }{\rm{append}}\,(\=\+{\rm{list\_cons}}\,({\rm{car}}\,({\it{rvs\/}}), {\rm{all\_seqs\_n}}\,({\it{avs\/}}, {\it{avs\/}}, {\it{n\/}} $-\;1$)\index{all\_seqs\_n})\index{list\_cons}, \\ 
{\rm{all\_seqs\_n}}\,({\rm{cdr}}\,({\it{rvs\/}}), {\it{avs\/}}, {\it{n\/}})\index{all\_seqs\_n})\-$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{all\_seqs\_le\_n} \\  
\=\+{\rm{all\_seqs\_le\_n}}\,({\it{vs\/}}, {\it{n\/}})\index{all\_seqs\_le\_n} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\rm{list}}\,({\bf{nil}}) \\ 
{\bf else }{\rm{append}}\,({\rm{all\_seqs\_n}}\,({\it{vs\/}}, {\it{vs\/}}, {\it{n\/}})\index{all\_seqs\_n}, {\rm{all\_seqs\_le\_n}}\,({\it{vs\/}}, {\it{n\/}} $-\;1$)\index{all\_seqs\_le\_n})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{indexed\_value\_set} \\  
\=\+{\rm{indexed\_value\_set}}\,({\it{is\/}}, {\it{rcs\/}}, {\it{acs\/}})\index{indexed\_value\_set} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{is\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\rm{list}}\,({\bf{nil}}) \\ 
{\bf elseif }{\it{rcs\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf else }{\rm{append}}\,(\=\+{\rm{list\_cons}}\,(\=\+{\rm{cons}}\,({\rm{car}}\,({\it{is\/}}), {\rm{car}}\,({\it{rcs\/}})), \\ 
{\rm{indexed\_value\_set}}\,({\rm{cdr}}\,({\it{is\/}}), {\it{acs\/}}, {\it{acs\/}})\index{indexed\_value\_set})\-\index{list\_cons}, \\ 
{\rm{indexed\_value\_set}}\,({\it{is\/}}, {\rm{cdr}}\,({\it{rcs\/}}), {\it{acs\/}})\index{indexed\_value\_set})\-$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{index\_set\_value\_set} \\  
\=\+{\rm{index\_set\_value\_set}}\,({\it{iss\/}}, {\it{cs\/}})\index{index\_set\_value\_set} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{iss\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf else }{\rm{append}}\,(\=\+{\rm{indexed\_value\_set}}\,({\rm{car}}\,({\it{iss\/}}), {\it{cs\/}}, {\it{cs\/}})\index{indexed\_value\_set}, \\ 
{\rm{index\_set\_value\_set}}\,({\rm{cdr}}\,({\it{iss\/}}), {\it{cs\/}})\index{index\_set\_value\_set})\-$\;${\bf  endif}\-\-
\end{tabbing}


\begin{verbatim}; =======================
;  Value Set Computation
; =======================

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{simple\_value\_set} \\  
\=\+{\rm{simple\_value\_set}}\,({\it{td\/}})\index{simple\_value\_set} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{bounded\_typep}}\,({\it{td\/}})\index{bounded\_typep} \\ 
{\bf then }\=\+{\bf if }{\rm{non\_rational\_simple\_typep}}\,({\it{td\/}})\index{non\_rational\_simple\_typep} \\ 
{\bf then }\=\+{\bf if }{\rm{errorp}}\,({\rm{tmin}}\,({\it{td\/}})\index{tmin})\index{errorp}$\;\;${\bf then }{\rm{tmin}}\,({\it{td\/}})\index{tmin} \\ 
{\bf elseif }{\rm{errorp}}\,({\rm{tmax}}\,({\it{td\/}})\index{tmax})\index{errorp}$\;\;${\bf then }{\rm{tmax}}\,({\it{td\/}})\index{tmax} \\ 
{\bf else }{\rm{number\_list}}\,({\rm{tmin}}\,({\it{td\/}})\index{tmin}, {\rm{tmax}}\,({\it{td\/}})\index{tmax})\index{number\_list}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{rational\_value\_set\_error}}\,({\it{td\/}})\index{rational\_value\_set\_error}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{unbounded\_value\_set\_error}}\,({\it{td\/}})\index{unbounded\_value\_set\_error}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{array\_value\_set} \\  
\=\+{\rm{array\_value\_set}}\,({\it{is\/}}, {\it{cs\/}})\index{array\_value\_set} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{errorp}}\,({\it{is\/}})\index{errorp}$\;\;${\bf then }{\it{is\/}} \\ 
{\bf elseif }{\rm{errorp}}\,({\it{cs\/}})\index{errorp}$\;\;${\bf then }{\it{cs\/}} \\ 
{\bf else }{\rm{indexed\_value\_set}}\,({\it{is\/}}, {\it{cs\/}}, {\it{cs\/}})\index{indexed\_value\_set}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  count\_cons \\ \index{count\_cons}
{\rm{listp}}\,({\it{x\/}}) $\rightarrow$ ({\rm{count}}\,({\it{x\/}}) $=$ ($1\;+$ ({\rm{count}}\,({\rm{car}}\,({\it{x\/}})) $+$ {\rm{count}}\,({\rm{cdr}}\,({\it{x\/}})))))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  zero\_count\_imp\_not\_list \\ \index{zero\_count\_imp\_not\_list}
({\rm{count}}\,({\it{x\/}}) $=$ {\tt{0}}) $\rightarrow$ ($\neg$ {\rm{listp}}\,({\it{x\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  listp\_imp\_count\_not\_zero \\ \index{listp\_imp\_count\_not\_zero}
{\rm{listp}}\,({\it{x\/}}) $\rightarrow$ ({\rm{count}}\,({\it{x\/}}) $\not=$ {\tt{0}})
\end{tabbing}


\noindent{\sc Event}:   Disable count\_cons.

\addvspace{18pt}

\noindent{\sc Event}:   Disable zero\_count\_imp\_not\_list.

\addvspace{18pt}

\begin{tabbing}{\sc Theorem}:  listp\_cdar\_imp\_sub1\_count\_not\_zero \\ \index{listp\_cdar\_imp\_sub1\_count\_!not\_zero}
{\rm{listp}}\,({\rm{cdar}}\,({\it{x\/}})) $\rightarrow$ (({\rm{count}}\,({\it{x\/}}) $-\;1$) $\not=$ {\tt{0}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp\_plus\_cdr\_caar\_cddar \\ \index{lessp\_plus\_cdr\_caar\_cddar}
\=\+({\rm{listp}}\,({\it{fs\/}}) $\wedge$ {\rm{listp}}\,({\rm{cdar}}\,({\it{fs\/}}))) \\ 
$\rightarrow$$\;\;\;\;$(\=\+({\rm{count}}\,({\rm{cdr}}\,({\it{fs\/}})) $+$ {\rm{count}}\,({\rm{caar}}\,({\it{fs\/}})) $+$ {\rm{count}}\,({\rm{cddar}}\,({\it{fs\/}}))) \\ 
$<$$\;\;\;\;$(({\rm{count}}\,({\it{fs\/}}) $-\;1$) $-\;1$))\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{field\_list\_sets} \\  
\=\+{\rm{field\_list\_sets}}\,({\it{fs\/}})\index{field\_list\_sets} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{fs\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\rm{list}}\,({\bf{nil}}) \\ 
{\bf else }\=\+{\bf let }\=\+{\it{fn\/}}{\bf $\;$ be$\;\;$}{\rm{caar}}\,({\it{fs\/}}), \\ 
{\it{fvs\/}}{\bf $\;$ be$\;\;$}{\rm{cdar}}\,({\it{fs\/}})\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{fvs\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf else }{\rm{append}}\,(\=\+{\rm{list\_cons}}\,(\=\+{\rm{cons}}\,({\it{fn\/}}, {\rm{car}}\,({\it{fvs\/}})), \\ 
{\rm{field\_list\_sets}}\,({\rm{cdr}}\,({\it{fs\/}}))\index{field\_list\_sets})\-\index{list\_cons}, \\ 
{\rm{field\_list\_sets}}\,({\rm{cons}}\,(\=\+{\rm{cons}}\,(\=\+{\it{fn\/}}, \\ 
{\rm{cdr}}\,({\it{fvs\/}}))\-, \\ 
{\rm{cdr}}\,({\it{fs\/}}))\-)\index{field\_list\_sets})\-$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{record\_value\_set} \\  
\=\+{\rm{record\_value\_set}}\,({\it{fs\/}})\index{record\_value\_set} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{errorp}}\,({\it{fs\/}})\index{errorp}$\;\;${\bf then }{\it{fs\/}} \\ 
{\bf else }{\rm{field\_list\_sets}}\,({\it{fs\/}})\index{field\_list\_sets}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mapping\_value\_set} \\  
\=\+{\rm{mapping\_value\_set}}\,({\it{sl\/}}, {\it{ss\/}}, {\it{cs\/}})\index{mapping\_value\_set} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{errorp}}\,({\it{sl\/}})\index{errorp}$\;\;${\bf then }{\it{sl\/}} \\ 
{\bf elseif }{\rm{errorp}}\,({\it{ss\/}})\index{errorp}$\;\;${\bf then }{\it{ss\/}} \\ 
{\bf elseif }{\rm{errorp}}\,({\it{cs\/}})\index{errorp}$\;\;${\bf then }{\it{cs\/}} \\ 
{\bf else }\=\+{\bf let }\=\+{\it{r\/}}{\bf $\;$ be$\;\;$}{\rm{index\_set\_value\_set}}\,({\rm{all\_subsets}}\,({\it{ss\/}})\index{all\_subsets}, {\it{cs\/}})\index{index\_set\_value\_set}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{sl\/}} $=$ {\bf{nil}}$\;\;${\bf then }{\it{r\/}} \\ 
{\bf else }{\rm{remove\_larger}}\,({\it{r\/}}, {\it{sl\/}})\index{remove\_larger}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{sequence\_value\_set} \\  
\=\+{\rm{sequence\_value\_set}}\,({\it{sl\/}}, {\it{cs\/}})\index{sequence\_value\_set} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{errorp}}\,({\it{sl\/}})\index{errorp}$\;\;${\bf then }{\it{sl\/}} \\ 
{\bf elseif }{\rm{errorp}}\,({\it{cs\/}})\index{errorp}$\;\;${\bf then }{\it{cs\/}} \\ 
{\bf elseif }{\it{sl\/}} $\in\;${\bf{N}}${}$$\;\;${\bf then }{\rm{all\_seqs\_le\_n}}\,({\it{cs\/}}, {\it{sl\/}})\index{all\_seqs\_le\_n} \\ 
{\bf else }{\sc{unbounded\_sequence\_value\_set\_error}}\index{unbounded\_sequence\_value\_set!\_error}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{set\_value\_set} \\  
\=\+{\rm{set\_value\_set}}\,({\it{sl\/}}, {\it{cs\/}})\index{set\_value\_set} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{errorp}}\,({\it{sl\/}})\index{errorp}$\;\;${\bf then }{\it{sl\/}} \\ 
{\bf elseif }{\rm{errorp}}\,({\it{cs\/}})\index{errorp}$\;\;${\bf then }{\it{cs\/}} \\ 
{\bf elseif }{\it{sl\/}} $\in\;${\bf{N}}${}$$\;\;${\bf then }{\rm{remove\_larger}}\,({\rm{all\_subsets}}\,({\it{cs\/}})\index{all\_subsets}, {\it{sl\/}})\index{remove\_larger} \\ 
{\bf else }{\rm{all\_subsets}}\,({\it{cs\/}})\index{all\_subsets}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{verbatim}#|
(do-mutual '( ; the value_set do-mutual

(defn field_value_sets (fds)
  (if (nlistp fds)
      fds
    (let ((fv1 (value_set (cdar fds)))
	  (fvs (field_value_sets (cdr fds))))
      (if (errorp fv1)
	  fv1
      (if (errorp fvs)
	  fvs
	(cons (map_entry (caar fds) fv1) fvs)))))
  ( (lessp (tree_size fds)) ))

(defn value_set (td)
  ; entry td is a correct type descriptor
  ; returns an errorp or a list of values
  (if (type_descp td)
      (case (root td)
	(array (array_value_set (value_set (selector_td td))
				(value_set (component_td td))))
	(record (record_value_set (field_value_sets (field_tds td))))
	(mapping (mapping_value_set (max_size td)
				    (value_set (selector_td td))
				    (value_set (component_td td))))
	(sequence (sequence_value_set (max_size td)
				      (value_set (component_td td))))
	(set (set_value_set (max_size td)
			    (value_set (component_td td))))
	(pending (pending_type_value_set_error td))
	(error* td)
	(otherwise ; (simple_descp td)
	  (simple_value_set td)))
    (not_type_descriptor_error td))
  ( (lessp (tree_size td)) ))

))
|#

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{mutual-value\_set-field\_value\_!sets} \\  
\=\+{\rm{mutual-value\_set-field\_value\_sets}}\,({\it{mutual-flg\/}}, {\it{fds\/}}, {\it{td\/}})\index{mutual-value\_set-field\_value\_!sets} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{mutual-flg\/}} $=$ {\tt{'}}{\tt{value\_set}} \\ 
{\bf then }\=\+{\bf if }{\rm{type\_descp}}\,({\it{td\/}})\index{type\_descp} \\ 
{\bf then }\=\+{\bf case on }{\rm{root}}\,({\it{td\/}})\index{root}: \\ 
{\bf case = }{\it{array\/}} \\ 
{\bf then }{\rm{array\_value\_set}}\,(\=\+{\rm{mutual-value\_set-field\_value\_sets}}\,(\=\+{\tt{'}}{\tt{value\_set}}, \\ 
{\bf{t}}, \\ 
{\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td})\-\index{mutual-value\_set-field\_value\_!sets}, \\ 
{\rm{mutual-value\_set-field\_value\_sets}}\,(\=\+{\tt{'}}{\tt{value\_set}}, \\ 
{\bf{t}}, \\ 
{\rm{component\_td}}\,({\it{td\/}})\index{component\_td})\-\index{mutual-value\_set-field\_value\_!sets})\-\index{array\_value\_set} \\ 
{\bf case = }{\it{record\/}} \\ 
{\bf $\;\;$then }{\rm{record\_value\_set}}\,({\rm{mutual-value\_set-field\_value\_sets}}\,(\=\+{\tt{'}}{\tt{field\_value\_sets}}, \\ 
{\rm{field\_tds}}\,({\it{td\/}})\index{field\_tds}, \\ 
{\bf{t}})\-\index{mutual-value\_set-field\_value\_!sets})\index{record\_value\_set} \\ 
{\bf case = }{\it{mapping\/}} \\ 
{\bf $\;\;$then }{\rm{mapping\_value\_set}}\,(\=\+{\rm{max\_size}}\,({\it{td\/}})\index{max\_size}, \\ 
{\rm{mutual-value\_set-field\_value\_sets}}\,(\=\+{\tt{'}}{\tt{value\_set}}, \\ 
{\bf{t}}, \\ 
{\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td})\-\index{mutual-value\_set-field\_value\_!sets}, \\ 
{\rm{mutual-value\_set-field\_value\_sets}}\,(\=\+{\tt{'}}{\tt{value\_set}}, \\ 
{\bf{t}}, \\ 
{\rm{component\_td}}\,({\it{td\/}})\index{component\_td})\-\index{mutual-value\_set-field\_value\_!sets})\-\index{mapping\_value\_set} \\ 
{\bf case = }{\it{sequence\/}} \\ 
{\bf $\;\;$then }{\rm{sequence\_value\_set}}\,(\=\+{\rm{max\_size}}\,({\it{td\/}})\index{max\_size}, \\ 
{\rm{mutual-value\_set-field\_value\_sets}}\,(\=\+{\tt{'}}{\tt{value\_set}}, \\ 
{\bf{t}}, \\ 
{\rm{component\_td}}\,({\it{td\/}})\index{component\_td})\-\index{mutual-value\_set-field\_value\_!sets})\-\index{sequence\_value\_set} \\ 
{\bf case = }{\it{set\/}} \\ 
{\bf $\;\;$then }{\rm{set\_value\_set}}\,(\=\+{\rm{max\_size}}\,({\it{td\/}})\index{max\_size}, \\ 
{\rm{mutual-value\_set-field\_value\_sets}}\,(\=\+{\tt{'}}{\tt{value\_set}}, \\ 
{\bf{t}}, \\ 
{\rm{component\_td}}\,({\it{td\/}})\index{component\_td})\-\index{mutual-value\_set-field\_value\_!sets})\-\index{set\_value\_set} \\ 
{\bf case = }{\it{pending\/}} \\ 
{\bf $\;\;$then }{\rm{pending\_type\_value\_set\_error}}\,({\it{td\/}})\index{pending\_type\_value\_set\_erro!r} \\ 
{\bf case = }{\it{error*\/}} \\ 
{\bf $\;\;$then }{\it{td\/}} \\ 
{\bf otherwise }{\rm{simple\_value\_set}}\,({\it{td\/}})\index{simple\_value\_set}$\;${\bf  endcase}\- \\ 
{\bf else }{\rm{not\_type\_descriptor\_error}}\,({\it{td\/}})\index{not\_type\_descriptor\_error}$\;${\bf  endif}\- \\ 
{\bf elseif }{\it{fds\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\it{fds\/}} \\ 
{\bf elseif }{\rm{errorp}}\,({\rm{mutual-value\_set-field\_value\_sets}}\,(\=\+{\tt{'}}{\tt{value\_set}}, \\ 
{\bf{t}}, \\ 
{\rm{cdar}}\,({\it{fds\/}}))\-\index{mutual-value\_set-field\_value\_!sets})\index{errorp} \\ 
{\bf then }{\rm{mutual-value\_set-field\_value\_sets}}\,({\tt{'}}{\tt{value\_set}}, {\bf{t}}, {\rm{cdar}}\,({\it{fds\/}}))\index{mutual-value\_set-field\_value\_!sets} \\ 
{\bf elseif }{\rm{errorp}}\,({\rm{mutual-value\_set-field\_value\_sets}}\,(\=\+{\tt{'}}{\tt{field\_value\_sets}}, \\ 
{\rm{cdr}}\,({\it{fds\/}}), \\ 
{\bf{t}})\-\index{mutual-value\_set-field\_value\_!sets})\index{errorp} \\ 
{\bf then }{\rm{mutual-value\_set-field\_value\_sets}}\,(\=\+{\tt{'}}{\tt{field\_value\_sets}}, \\ 
{\rm{cdr}}\,({\it{fds\/}}), \\ 
{\bf{t}})\-\index{mutual-value\_set-field\_value\_!sets} \\ 
{\bf else }{\rm{cons}}\,(\=\+{\rm{map\_entry}}\,(\=\+{\rm{caar}}\,({\it{fds\/}}), \\ 
{\rm{mutual-value\_set-field\_value\_sets}}\,(\=\+{\tt{'}}{\tt{value\_set}}, \\ 
{\bf{t}}, \\ 
{\rm{cdar}}\,({\it{fds\/}}))\-\index{mutual-value\_set-field\_value\_!sets})\-\index{map\_entry}, \\ 
{\rm{mutual-value\_set-field\_value\_sets}}\,(\=\+{\tt{'}}{\tt{field\_value\_sets}}, \\ 
{\rm{cdr}}\,({\it{fds\/}}), \\ 
{\bf{t}})\-\index{mutual-value\_set-field\_value\_!sets})\-$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{value\_set} \\  
{\rm{value\_set}}\,({\it{td\/}})\index{value\_set} $=$ {\rm{mutual-value\_set-field\_value\_sets}}\,({\tt{'}}{\tt{value\_set}}, {\bf{t}}, {\it{td\/}})\index{mutual-value\_set-field\_value\_!sets}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{field\_value\_sets} \\  
\=\+{\rm{field\_value\_sets}}\,({\it{fds\/}})\index{field\_value\_sets} \\ 
$=$$\;\;\;\;${\rm{mutual-value\_set-field\_value\_sets}}\,({\tt{'}}{\tt{field\_value\_sets}}, {\it{fds\/}}, {\bf{t}})\index{mutual-value\_set-field\_value\_!sets}\-
\end{tabbing}

\begin{verbatim}; See below for marked and typed value sets.

	      

; **************
;  Typed Values
; **************

; --------------------------------------------------------------------------
; A typed value is constructed by calling function
;
;     typed (td,u)
;
; where td is a type descriptor and u is a member of td's value set.
; The value of dtype(td,u) = T iff u is a member of td's value set.
; --------------------------------------------------------------------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{dtype\_size} \\  
\=\+{\rm{dtype\_size}}\,({\it{n\/}}, {\it{v\/}})\index{dtype\_size} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{errorp}}\,({\it{n\/}})\index{errorp}$\;\;${\bf then }{\it{n\/}} \\ 
{\bf elseif }{\it{n\/}} $\in\;${\bf{N}}${}$$\;\;${\bf then }{\rm{length}}\,({\it{v\/}})\index{length} $\leq$ {\it{n\/}} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Theorem}:  count\_keys \\ \index{count\_keys}
\=\+({\rm{key\_value\_mapp}}\,({\it{v\/}})\index{key\_value\_mapp} $\wedge$ ({\rm{count}}\,({\rm{keys}}\,({\it{v\/}})\index{keys}) $\not<$ {\rm{count}}\,({\it{v\/}}))) \\ 
$\rightarrow$$\;\;\;\;$({\rm{count}}\,({\rm{keys}}\,({\it{v\/}})\index{keys}) $=$ {\rm{count}}\,({\it{v\/}}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  count\_key\_values \\ \index{count\_key\_values}
\=\+({\rm{key\_value\_mapp}}\,({\it{v\/}})\index{key\_value\_mapp} $\wedge$ ({\rm{count}}\,({\rm{key\_values}}\,({\it{v\/}})\index{key\_values}) $\not<$ {\rm{count}}\,({\it{v\/}}))) \\ 
$\rightarrow$$\;\;\;\;$({\rm{count}}\,({\rm{key\_values}}\,({\it{v\/}})\index{key\_values}) $=$ {\rm{count}}\,({\it{v\/}}))\-
\end{tabbing}


\begin{verbatim}#|
(do-mutual '(

(defn dtype_list (td vs)
  (if (nlistp vs)
      (equal vs nil)
    (let ((r (dtype td (car vs))))
      (if (truep r)
	  (dtype_list td (cdr vs))
	r)))
  ( (ord-lessp (cons (add1 (count vs))
		     (tree_size td))) ))

(defn dtype_fields (fds fvs)
  (if (nlistp fvs)
      (equal fvs nil)
    (let ((r (dtype (mapped_value fds (caar fvs)) (cdar fvs))))
      (if (truep r)
	  (dtype_fields fds (cdr fvs))
	r)))
  ( (ord-lessp (cons (add1 (count fvs))
		     (tree_size fds))) ))

(defn dtype (td v)
  ; entry td is a correct type descriptor
  ; v is a Gypsy value
  ; returns T, F, or an errorp
  (if (type_descp td)
      (case (root td)
	(array (if (key_value_mapp v)
		   (let ((ivs (value_set (selector_td td)))
			 (r (dtype_list (selector_td td) (vindexes v))))
		     (if (truep r)
			 (if (errorp ivs)
			     ivs
			   (if (and (vsetp (vindexes v) (selector_td td))
				    (vset_equal ivs (vindexes v)
						(mk_set_desc nil
							     (selector_td td)
							     (null_set))))
			       (dtype_list (component_td td) (vcomponents v))
			     F))
		       r))
		 F))
	(record (if (and (key_value_mapp v)
			 (setp (field_names v))
			 (set_equal (field_names (field_tds td))
				    (field_names v)))
		    (dtype_fields (field_tds td) v)
		  F))
	(mapping (if (key_value_mapp v)
		     (let ((r (dtype_list (selector_td td) (vdomain v))))
		       (if (truep r)
			   (if (vsetp (vdomain v) (selector_td td))
			       (let ((r (dtype_list (component_td td)
						    (vrange v))))
				 (if (truep r)
				     (dtype_size (max_size td) v)
				   r))
			     F)
			 r))
		   F))
	(sequence (let ((r (dtype_list (component_td td) v)))
		    (if (truep r)
			(dtype_size (max_size td) v)
		      r)))
	(set (if (vsetp v (component_td td))
		 (let ((r (dtype_list (component_td td) v)))
		   (if (truep r)
		       (dtype_size (max_size td) v)
		     r))
	       F))
	(pending (pending_in_type_error td))
	(error* td)
	(otherwise ; (simple_descp td)
	  (if (errorp (tmin td))
	      (tmin td)
	  (if (errorp (tmax td))
	      (tmax td)
	  (if (equal (tid td) 'rational)
	      (and (rationalp v)
		   (if (bounded_typep td)
		       (and (rleq (tmin td) v)
			    (rleq v (tmax td)))
		     T))
	    (and (integerp v)
		 (if (bounded_typep td)
		     (and (ileq (tmin td) v)
			  (ileq v (tmax td)))
		   T)))))))
    (not_type_descriptor_error td))
  ( (ord-lessp (cons (add1 (count v))
		     (tree_size td))) ))

))
|#

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{mutual-dtype-dtype\_fields-dtype!\_list} \\  
\=\+{\rm{mutual-dtype-dtype\_fields-dtype\_list}}\,({\it{mutual-flg\/}}, {\it{fds\/}}, {\it{fvs\/}}, {\it{td\/}}, {\it{v\/}}, {\it{vs\/}})\index{mutual-dtype-dtype\_fields-dtype!\_list} \\ 
$=$$\;\;\;\;$\=\+{\bf case on }{\it{mutual-flg\/}}: \\ 
{\bf case = }{\it{dtype\/}} \\ 
{\bf then }\=\+{\bf if }{\rm{type\_descp}}\,({\it{td\/}})\index{type\_descp} \\ 
{\bf then }\=\+{\bf case on }{\rm{root}}\,({\it{td\/}})\index{root}: \\ 
{\bf case = }{\it{array\/}} \\ 
{\bf then }\=\+{\bf if }{\rm{key\_value\_mapp}}\,({\it{v\/}})\index{key\_value\_mapp} \\ 
{\bf then }\=\+{\bf if }{\rm{truep}}\,({\rm{mutual-dtype-dtype\_fields-dtype\_list}}\,(\=\+{\tt{'}}{\tt{dtype\_list}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td}, \\ 
{\bf{t}}, \\ 
{\rm{vindexes}}\,({\it{v\/}})\index{vindexes})\-\index{mutual-dtype-dtype\_fields-dtype!\_list}) \\ 
{\bf then }\=\+{\bf if }{\rm{errorp}}\,({\rm{value\_set}}\,({\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td})\index{value\_set})\index{errorp} \\ 
{\bf then }{\rm{value\_set}}\,({\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td})\index{value\_set} \\ 
{\bf elseif }\=\+{\rm{vsetp}}\,({\rm{vindexes}}\,({\it{v\/}})\index{vindexes}, {\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td})\index{vsetp} \\ 
$\wedge$$\;\;\;\;${\rm{vset\_equal}}\,(\=\+{\rm{value\_set}}\,({\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td})\index{value\_set}, \\ 
{\rm{vindexes}}\,({\it{v\/}})\index{vindexes}, \\ 
{\rm{mk\_set\_desc}}\,(\=\+{\bf{nil}}, \\ 
{\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td}, \\ 
{\sc{null\_set}}\index{null\_set})\-\index{mk\_set\_desc})\-\index{vset\_equal}\- \\ 
{\bf then }{\rm{mutual-dtype-dtype\_fields-dtype\_list}}\,(\=\+{\tt{'}}{\tt{dtype\_list}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\rm{component\_td}}\,({\it{td\/}})\index{component\_td}, \\ 
{\bf{t}}, \\ 
{\rm{vcomponents}}\,({\it{v\/}})\index{vcomponents})\-\index{mutual-dtype-dtype\_fields-dtype!\_list} \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{mutual-dtype-dtype\_fields-dtype\_list}}\,(\=\+{\tt{'}}{\tt{dtype\_list}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td}, \\ 
{\bf{t}}, \\ 
{\rm{vindexes}}\,({\it{v\/}})\index{vindexes})\-\index{mutual-dtype-dtype\_fields-dtype!\_list}$\;${\bf  endif}\- \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\- \\ 
{\bf case = }{\it{record\/}} \\ 
{\bf $\;\;$then }\=\+{\bf if }\=\+{\rm{key\_value\_mapp}}\,({\it{v\/}})\index{key\_value\_mapp} \\ 
$\wedge$$\;\;\;\;${\rm{setp}}\,({\rm{field\_names}}\,({\it{v\/}})\index{field\_names})\index{setp} \\ 
$\wedge$$\;\;\;\;${\rm{set\_equal}}\,(\=\+{\rm{field\_names}}\,({\rm{field\_tds}}\,({\it{td\/}})\index{field\_tds})\index{field\_names}, \\ 
{\rm{field\_names}}\,({\it{v\/}})\index{field\_names})\-\index{set\_equal}\- \\ 
{\bf then }{\rm{mutual-dtype-dtype\_fields-dtype\_list}}\,(\=\+{\tt{'}}{\tt{dtype\_fields}}, \\ 
{\rm{field\_tds}}\,({\it{td\/}})\index{field\_tds}, \\ 
{\it{v\/}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}})\-\index{mutual-dtype-dtype\_fields-dtype!\_list} \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\- \\ 
{\bf case = }{\it{mapping\/}} \\ 
{\bf $\;\;$then }\=\+{\bf if }{\rm{key\_value\_mapp}}\,({\it{v\/}})\index{key\_value\_mapp} \\ 
{\bf then }\=\+{\bf if }{\rm{truep}}\,({\rm{mutual-dtype-dtype\_fields-dtype\_list}}\,(\=\+{\tt{'}}{\tt{dtype\_list}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td}, \\ 
{\bf{t}}, \\ 
{\rm{vdomain}}\,({\it{v\/}})\index{vdomain})\-\index{mutual-dtype-dtype\_fields-dtype!\_list}) \\ 
{\bf then }\=\+{\bf if }{\rm{vsetp}}\,({\rm{vdomain}}\,({\it{v\/}})\index{vdomain}, {\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td})\index{vsetp} \\ 
{\bf then }\=\+{\bf if }{\rm{truep}}\,({\rm{mutual-dtype-dtype\_fields-dtype\_list}}\,(\=\+{\tt{'}}{\tt{dtype\_list}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\rm{component\_td}}\,({\it{td\/}})\index{component\_td}, \\ 
{\bf{t}}, \\ 
{\rm{vrange}}\,({\it{v\/}})\index{vrange})\-\index{mutual-dtype-dtype\_fields-dtype!\_list}) \\ 
{\bf then }{\rm{dtype\_size}}\,({\rm{max\_size}}\,({\it{td\/}})\index{max\_size}, {\it{v\/}})\index{dtype\_size} \\ 
{\bf else }{\rm{mutual-dtype-dtype\_fields-dtype\_list}}\,(\=\+{\tt{'}}{\tt{dtype\_list}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\rm{component\_td}}\,({\it{td\/}})\index{component\_td}, \\ 
{\bf{t}}, \\ 
{\rm{vrange}}\,({\it{v\/}})\index{vrange})\-\index{mutual-dtype-dtype\_fields-dtype!\_list}$\;${\bf  endif}\- \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{mutual-dtype-dtype\_fields-dtype\_list}}\,(\=\+{\tt{'}}{\tt{dtype\_list}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td}, \\ 
{\bf{t}}, \\ 
{\rm{vdomain}}\,({\it{v\/}})\index{vdomain})\-\index{mutual-dtype-dtype\_fields-dtype!\_list}$\;${\bf  endif}\- \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\- \\ 
{\bf case = }{\it{sequence\/}} \\ 
{\bf $\;\;$then }\=\+{\bf if }{\rm{truep}}\,({\rm{mutual-dtype-dtype\_fields-dtype\_list}}\,(\=\+{\tt{'}}{\tt{dtype\_list}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\rm{component\_td}}\,({\it{td\/}})\index{component\_td}, \\ 
{\bf{t}}, \\ 
{\it{v\/}})\-\index{mutual-dtype-dtype\_fields-dtype!\_list}) \\ 
{\bf then }{\rm{dtype\_size}}\,({\rm{max\_size}}\,({\it{td\/}})\index{max\_size}, {\it{v\/}})\index{dtype\_size} \\ 
{\bf else }{\rm{mutual-dtype-dtype\_fields-dtype\_list}}\,(\=\+{\tt{'}}{\tt{dtype\_list}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\rm{component\_td}}\,({\it{td\/}})\index{component\_td}, \\ 
{\bf{t}}, \\ 
{\it{v\/}})\-\index{mutual-dtype-dtype\_fields-dtype!\_list}$\;${\bf  endif}\- \\ 
{\bf case = }{\it{set\/}} \\ 
{\bf $\;\;$then }\=\+{\bf if }{\rm{vsetp}}\,({\it{v\/}}, {\rm{component\_td}}\,({\it{td\/}})\index{component\_td})\index{vsetp} \\ 
{\bf then }\=\+{\bf if }{\rm{truep}}\,({\rm{mutual-dtype-dtype\_fields-dtype\_list}}\,(\=\+{\tt{'}}{\tt{dtype\_list}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\rm{component\_td}}\,({\it{td\/}})\index{component\_td}, \\ 
{\bf{t}}, \\ 
{\it{v\/}})\-\index{mutual-dtype-dtype\_fields-dtype!\_list}) \\ 
{\bf then }{\rm{dtype\_size}}\,({\rm{max\_size}}\,({\it{td\/}})\index{max\_size}, {\it{v\/}})\index{dtype\_size} \\ 
{\bf else }{\rm{mutual-dtype-dtype\_fields-dtype\_list}}\,(\=\+{\tt{'}}{\tt{dtype\_list}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\rm{component\_td}}\,({\it{td\/}})\index{component\_td}, \\ 
{\bf{t}}, \\ 
{\it{v\/}})\-\index{mutual-dtype-dtype\_fields-dtype!\_list}$\;${\bf  endif}\- \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\- \\ 
{\bf case = }{\it{pending\/}} \\ 
{\bf $\;\;$then }{\rm{pending\_in\_type\_error}}\,({\it{td\/}})\index{pending\_in\_type\_error} \\ 
{\bf case = }{\it{error*\/}} \\ 
{\bf $\;\;$then }{\it{td\/}} \\ 
{\bf otherwise }\=\+{\bf if }{\rm{errorp}}\,({\rm{tmin}}\,({\it{td\/}})\index{tmin})\index{errorp}$\;\;${\bf then }{\rm{tmin}}\,({\it{td\/}})\index{tmin} \\ 
{\bf elseif }{\rm{errorp}}\,({\rm{tmax}}\,({\it{td\/}})\index{tmax})\index{errorp}$\;\;${\bf then }{\rm{tmax}}\,({\it{td\/}})\index{tmax} \\ 
{\bf elseif }{\rm{tid}}\,({\it{td\/}})\index{tid} $=$ {\tt{'}}{\tt{rational}} \\ 
{\bf then }\=\+{\rm{rationalp}}\,({\it{v\/}})\index{rationalp} \\ 
$\wedge$$\;\;\;\;$\=\+{\bf if }{\rm{bounded\_typep}}\,({\it{td\/}})\index{bounded\_typep} \\ 
{\bf then }\=\+{\rm{rleq}}\,({\rm{tmin}}\,({\it{td\/}})\index{tmin}, {\it{v\/}})\index{rleq} \\ 
$\wedge$$\;\;\;\;${\rm{rleq}}\,({\it{v\/}}, {\rm{tmax}}\,({\it{td\/}})\index{tmax})\index{rleq}\- \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-\- \\ 
{\bf else }\=\+{\rm{integerp}}\,({\it{v\/}})\index{integerp} \\ 
$\wedge$$\;\;\;\;$\=\+{\bf if }{\rm{bounded\_typep}}\,({\it{td\/}})\index{bounded\_typep} \\ 
{\bf then }\=\+{\rm{ileq}}\,({\rm{tmin}}\,({\it{td\/}})\index{tmin}, {\it{v\/}})\index{ileq} \\ 
$\wedge$$\;\;\;\;${\rm{ileq}}\,({\it{v\/}}, {\rm{tmax}}\,({\it{td\/}})\index{tmax})\index{ileq}\- \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-\-$\;${\bf  endif}\-$\;${\bf  endcase}\- \\ 
{\bf else }{\rm{not\_type\_descriptor\_error}}\,({\it{td\/}})\index{not\_type\_descriptor\_error}$\;${\bf  endif}\- \\ 
{\bf case = }{\it{dtype\_fields\/}} \\ 
{\bf $\;\;$then }\=\+{\bf if }{\it{fvs\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\it{fvs\/}} $=$ {\bf{nil}} \\ 
{\bf elseif }{\rm{truep}}\,({\rm{mutual-dtype-dtype\_fields-dtype\_list}}\,(\=\+{\tt{'}}{\tt{dtype}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\rm{mapped\_value}}\,(\=\+{\it{fds\/}}, \\ 
{\rm{caar}}\,({\it{fvs\/}}))\-\index{mapped\_value}, \\ 
{\rm{cdar}}\,({\it{fvs\/}}), \\ 
{\bf{t}})\-\index{mutual-dtype-dtype\_fields-dtype!\_list}) \\ 
{\bf then }{\rm{mutual-dtype-dtype\_fields-dtype\_list}}\,(\=\+{\tt{'}}{\tt{dtype\_fields}}, \\ 
{\it{fds\/}}, \\ 
{\rm{cdr}}\,({\it{fvs\/}}), \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}})\-\index{mutual-dtype-dtype\_fields-dtype!\_list} \\ 
{\bf else }{\rm{mutual-dtype-dtype\_fields-dtype\_list}}\,(\=\+{\tt{'}}{\tt{dtype}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\rm{mapped\_value}}\,(\=\+{\it{fds\/}}, \\ 
{\rm{caar}}\,({\it{fvs\/}}))\-\index{mapped\_value}, \\ 
{\rm{cdar}}\,({\it{fvs\/}}), \\ 
{\bf{t}})\-\index{mutual-dtype-dtype\_fields-dtype!\_list}$\;${\bf  endif}\- \\ 
{\bf otherwise }\=\+{\bf if }{\it{vs\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\it{vs\/}} $=$ {\bf{nil}} \\ 
{\bf elseif }{\rm{truep}}\,({\rm{mutual-dtype-dtype\_fields-dtype\_list}}\,(\=\+{\tt{'}}{\tt{dtype}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{td\/}}, \\ 
{\rm{car}}\,({\it{vs\/}}), \\ 
{\bf{t}})\-\index{mutual-dtype-dtype\_fields-dtype!\_list}) \\ 
{\bf then }{\rm{mutual-dtype-dtype\_fields-dtype\_list}}\,(\=\+{\tt{'}}{\tt{dtype\_list}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{td\/}}, \\ 
{\bf{t}}, \\ 
{\rm{cdr}}\,({\it{vs\/}}))\-\index{mutual-dtype-dtype\_fields-dtype!\_list} \\ 
{\bf else }{\rm{mutual-dtype-dtype\_fields-dtype\_list}}\,(\=\+{\tt{'}}{\tt{dtype}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{td\/}}, \\ 
{\rm{car}}\,({\it{vs\/}}), \\ 
{\bf{t}})\-\index{mutual-dtype-dtype\_fields-dtype!\_list}$\;${\bf  endif}\-$\;${\bf  endcase}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{dtype} \\  
{\rm{dtype}}\,({\it{td\/}}, {\it{v\/}})\index{dtype} $=$ {\rm{mutual-dtype-dtype\_fields-dtype\_list}}\,({\tt{'}}{\tt{dtype}}, {\bf{t}}, {\bf{t}}, {\it{td\/}}, {\it{v\/}}, {\bf{t}})\index{mutual-dtype-dtype\_fields-dtype!\_list}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{dtype\_fields} \\  
\=\+{\rm{dtype\_fields}}\,({\it{fds\/}}, {\it{fvs\/}})\index{dtype\_fields} \\ 
$=$$\;\;\;\;${\rm{mutual-dtype-dtype\_fields-dtype\_list}}\,({\tt{'}}{\tt{dtype\_fields}}, {\it{fds\/}}, {\it{fvs\/}}, {\bf{t}}, {\bf{t}}, {\bf{t}})\index{mutual-dtype-dtype\_fields-dtype!\_list}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{dtype\_list} \\  
\=\+{\rm{dtype\_list}}\,({\it{td\/}}, {\it{vs\/}})\index{dtype\_list} \\ 
$=$$\;\;\;\;${\rm{mutual-dtype-dtype\_fields-dtype\_list}}\,({\tt{'}}{\tt{dtype\_list}}, {\bf{t}}, {\bf{t}}, {\it{td\/}}, {\bf{t}}, {\it{vs\/}})\index{mutual-dtype-dtype\_fields-dtype!\_list}\-
\end{tabbing}


\noindent{\sc Event}:   Add the shell {\it{mk\_typed\/}}\index{mk\_typed}, with recognizer function symbol {\it{typedp\/}} and 2 accessors: {\it{type\_part\/}}, with type restriction (none-of) and default value false; {\it{value\_part\/}}, with type restriction (none-of) and default value zero.

\addvspace{18pt} \begin{verbatim}; member of value set of type_part

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{typed} \\  
\=\+{\rm{typed}}\,({\it{td\/}}, {\it{u\/}})\index{typed} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{truep}}\,({\rm{dtype}}\,({\it{td\/}}, {\it{u\/}})\index{dtype})$\;\;${\bf then }{\rm{mk\_typed}}\,({\it{td\/}}, {\it{u\/}})\index{mk\_typed} \\ 
{\bf else }{\rm{mk\_typed}}\,({\sc{integer\_desc}}\index{integer\_desc}, {\tt{0}})\index{mk\_typed}$\;${\bf  endif}\-\-
\end{tabbing}



\begin{verbatim}; *********************
;  Marked Typed Values
; *********************

; --------------------------------------------------------------------------
; Whether a typed value is determinate or indeterminate is indicated by
; marking it with nil for determinate typed values and non-nil for
; indeterminate typed values.
; --------------------------------------------------------------------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{determinate} \\  
\=\+{\rm{determinate}}\,({\it{x\/}})\index{determinate} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{markedp}}\,({\it{x\/}})\index{markedp}$\;\;${\bf then }{\rm{mark}}\,({\it{x\/}})\index{mark} $=$ {\bf{nil}} \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{indeterminate}$\;\;$
{\rm{indeterminate}}\,({\it{x\/}})\index{indeterminate} $=$ ($\neg$ {\rm{determinate}}\,({\it{x\/}})\index{determinate})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{marked\_typed} \\  
\=\+{\rm{marked\_typed}}\,({\it{td\/}}, {\it{u\/}})\index{marked\_typed} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{truep}}\,({\rm{dtype}}\,({\it{td\/}}, {\it{u\/}})\index{dtype})$\;\;${\bf then }{\rm{marked}}\,({\bf{nil}}, {\rm{typed}}\,({\it{td\/}}, {\it{u\/}})\index{typed})\index{marked} \\ 
{\bf else }{\rm{marked}}\,({\rm{not\_in\_type\_error}}\,({\it{u\/}}, {\it{td\/}})\index{not\_in\_type\_error}, {\rm{typed}}\,({\it{td\/}}, {\it{u\/}})\index{typed})\index{marked}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{marked\_typed\_list} \\  
\=\+{\rm{marked\_typed\_list}}\,({\it{td\/}}, {\it{us\/}})\index{marked\_typed\_list} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{us\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\it{us\/}} \\ 
{\bf else }{\rm{cons}}\,(\=\+{\rm{marked\_typed}}\,({\it{td\/}}, {\rm{car}}\,({\it{us\/}}))\index{marked\_typed}, \\ 
{\rm{marked\_typed\_list}}\,({\it{td\/}}, {\rm{cdr}}\,({\it{us\/}}))\index{marked\_typed\_list})\-$\;${\bf  endif}\-\-
\end{tabbing}



\begin{verbatim}; ************************************
;  Extraction of Type and Value Parts
; ************************************

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{type} \\  
\=\+{\rm{type}}\,({\it{x\/}})\index{type} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{markedp}}\,({\it{x\/}})\index{markedp}$\;\;${\bf then }{\rm{type}}\,({\rm{unmark}}\,({\it{x\/}})\index{unmark})\index{type} \\ 
{\bf elseif }{\rm{typedp}}\,({\it{x\/}})\index{typedp}$\;\;${\bf then }{\rm{type\_part}}\,({\it{x\/}})\index{type\_part} \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{value} \\  
\=\+{\rm{value}}\,({\it{x\/}})\index{value} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{markedp}}\,({\it{x\/}})\index{markedp}$\;\;${\bf then }{\rm{value}}\,({\rm{unmark}}\,({\it{x\/}})\index{unmark})\index{value} \\ 
{\bf elseif }{\rm{typedp}}\,({\it{x\/}})\index{typedp}$\;\;${\bf then }{\rm{value\_part}}\,({\it{x\/}})\index{value\_part} \\ 
{\bf else }{\it{x\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{values} \\  
\=\+{\rm{values}}\,({\it{s\/}})\index{values} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{s\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf else }{\rm{cons}}\,({\rm{value}}\,({\rm{car}}\,({\it{s\/}}))\index{value}, {\rm{values}}\,({\rm{cdr}}\,({\it{s\/}}))\index{values})$\;${\bf  endif}\-\-
\end{tabbing}



\begin{verbatim}; *************************
;  Marked Typed Value Sets
; *************************

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{marked\_typed\_value\_set} \\  
\=\+{\rm{marked\_typed\_value\_set}}\,({\it{td\/}})\index{marked\_typed\_value\_set} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{vs\/}}{\bf $\;$ be$\;\;$}{\rm{value\_set}}\,({\it{td\/}})\index{value\_set}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{errorp}}\,({\it{vs\/}})\index{errorp}$\;\;${\bf then }{\it{vs\/}} \\ 
{\bf else }{\rm{marked\_typed\_list}}\,({\it{td\/}}, {\it{vs\/}})\index{marked\_typed\_list}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}



\begin{verbatim}; *************************
;  Default Values of Types
; *************************

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{mk\_array\_default} \\  
\=\+{\rm{mk\_array\_default}}\,({\it{id\/}}, {\it{cd\/}})\index{mk\_array\_default} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{is\/}}{\bf $\;$ be$\;\;$}{\rm{value\_set}}\,({\it{id\/}})\index{value\_set}, \\ 
{\it{cv\/}}{\bf $\;$ be$\;\;$}{\rm{udv}}\,({\it{cd\/}})\index{udv}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{errorp}}\,({\it{is\/}})\index{errorp}$\;\;${\bf then }{\it{is\/}} \\ 
{\bf elseif }{\rm{errorp}}\,({\it{cv\/}})\index{errorp}$\;\;${\bf then }{\it{cv\/}} \\ 
{\bf else }{\rm{pair\_list\_map}}\,({\it{is\/}}, {\rm{ncopies}}\,({\rm{length}}\,({\it{is\/}})\index{length}, {\it{cv\/}})\index{ncopies})\index{pair\_list\_map}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mk\_record\_default} \\  
\=\+{\rm{mk\_record\_default}}\,({\it{fds\/}})\index{mk\_record\_default} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{fds\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf else }\=\+{\bf let }\=\+{\it{fv1\/}}{\bf $\;$ be$\;\;$}{\rm{udv}}\,({\rm{cdar}}\,({\it{fds\/}}))\index{udv}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{errorp}}\,({\it{fv1\/}})\index{errorp}$\;\;${\bf then }{\it{fv1\/}} \\ 
{\bf else }\=\+{\bf let }\=\+{\it{fvs\/}}{\bf $\;$ be$\;\;$}{\rm{mk\_record\_default}}\,({\rm{cdr}}\,({\it{fds\/}}))\index{mk\_record\_default}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{errorp}}\,({\it{fvs\/}})\index{errorp}$\;\;${\bf then }{\it{fvs\/}} \\ 
{\bf else }{\rm{cons}}\,(\=\+{\rm{map\_entry}}\,(\=\+{\rm{caar}}\,({\it{fds\/}}), \\ 
{\it{fv1\/}})\-\index{map\_entry}, \\ 
{\it{fvs\/}})\-$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{default\_value} \\  
\=\+{\rm{default\_value}}\,({\it{td\/}})\index{default\_value} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{type\_descp}}\,({\it{td\/}})\index{type\_descp} $\wedge$ ($\neg$ {\rm{errorp}}\,({\rm{udv}}\,({\it{td\/}})\index{udv})\index{errorp})$\;\;${\bf then }{\rm{typed}}\,({\it{td\/}}, {\rm{udv}}\,({\it{td\/}})\index{udv})\index{typed} \\ 
{\bf else }{\rm{typed}}\,({\sc{integer\_desc}}\index{integer\_desc}, {\tt{0}})\index{typed}$\;${\bf  endif}\-\-
\end{tabbing}



\begin{verbatim}; ***********
;  Base Type
; ***********

#|
(do-mutual '(

(defn field_base_types (fds)
  (if (nlistp fds)
      fds
    (cons (map_entry (caar fds) (base_type (cdar fds)))
	  (field_base_types (cdr fds))))
  ( (lessp (tree_size fds)) ))

(defn base_type (td)
  ; entry td is a correct type descriptor
  (if (type_descp td)
      (case (root td)
	(integer (integer_desc))
	(rational (rational_desc))
	(scalar (mk_scalar_desc (tid td) (sid td) (crd td)
				0 (sub1 (crd td)) 0))
        (array (let ((id (selector_td td))
		     (cd (base_type (component_td td))))
		 (mk_array_desc id cd (mk_array_default id cd))))
	(record (let ((fds (field_base_types (field_tds td))))
		  (mk_record_desc fds (mk_record_default fds))))
	(mapping (mk_mapping_desc nil (base_type (selector_td td))
				  (base_type (component_td td))
				  (null_map)))
	(sequence (mk_sequence_desc nil (base_type (component_td td))
				    (null_seq)))
	(set (mk_set_desc nil (base_type (component_td td)) (null_set)))
	(pending td)
	(error* td)
	(otherwise (not_type_descriptor_error td)))
    (not_type_descriptor_error td))
  ( (lessp (tree_size td)) ))

))
|#

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{mutual-base\_type-field\_base\_t!ypes} \\  
\=\+{\rm{mutual-base\_type-field\_base\_types}}\,({\it{mutual-flg\/}}, {\it{fds\/}}, {\it{td\/}})\index{mutual-base\_type-field\_base\_t!ypes} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{mutual-flg\/}} $=$ {\tt{'}}{\tt{base\_type}} \\ 
{\bf then }\=\+{\bf if }{\rm{type\_descp}}\,({\it{td\/}})\index{type\_descp} \\ 
{\bf then }\=\+{\bf case on }{\rm{root}}\,({\it{td\/}})\index{root}: \\ 
{\bf case = }{\it{integer\/}} \\ 
{\bf then }{\sc{integer\_desc}}\index{integer\_desc} \\ 
{\bf case = }{\it{rational\/}} \\ 
{\bf $\;\;$then }{\sc{rational\_desc}}\index{rational\_desc} \\ 
{\bf case = }{\it{scalar\/}} \\ 
{\bf $\;\;$then }{\rm{mk\_scalar\_desc}}\,(\=\+{\rm{tid}}\,({\it{td\/}})\index{tid}, \\ 
{\rm{sid}}\,({\it{td\/}})\index{sid}, \\ 
{\rm{crd}}\,({\it{td\/}})\index{crd}, \\ 
{\tt{0}}, \\ 
{\rm{crd}}\,({\it{td\/}})\index{crd} $-\;1$, \\ 
{\tt{0}})\-\index{mk\_scalar\_desc} \\ 
{\bf case = }{\it{array\/}} \\ 
{\bf $\;\;$then }{\rm{mk\_array\_desc}}\,(\=\+{\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td}, \\ 
{\rm{mutual-base\_type-field\_base\_types}}\,(\=\+{\tt{'}}{\tt{base\_type}}, \\ 
{\bf{t}}, \\ 
{\rm{component\_td}}\,({\it{td\/}})\index{component\_td})\-\index{mutual-base\_type-field\_base\_t!ypes}, \\ 
{\rm{mk\_array\_default}}\,(\=\+{\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td}, \\ 
{\rm{mutual-base\_type-field\_base\_types}}\,(\=\+{\tt{'}}{\tt{base\_type}}, \\ 
{\bf{t}}, \\ 
{\rm{component\_td}}\,({\it{td\/}})\index{component\_td})\-\index{mutual-base\_type-field\_base\_t!ypes})\-\index{mk\_array\_default})\-\index{mk\_array\_desc} \\ 
{\bf case = }{\it{record\/}} \\ 
{\bf $\;\;$then }{\rm{mk\_record\_desc}}\,(\=\+{\rm{mutual-base\_type-field\_base\_types}}\,(\=\+{\tt{'}}{\tt{field\_base\_types}}, \\ 
{\rm{field\_tds}}\,({\it{td\/}})\index{field\_tds}, \\ 
{\bf{t}})\-\index{mutual-base\_type-field\_base\_t!ypes}, \\ 
{\rm{mk\_record\_default}}\,({\rm{mutual-base\_type-field\_base\_types}}\,(\=\+{\tt{'}}{\tt{field\_base\_types}}, \\ 
{\rm{field\_tds}}\,({\it{td\/}})\index{field\_tds}, \\ 
{\bf{t}})\-\index{mutual-base\_type-field\_base\_t!ypes})\index{mk\_record\_default})\-\index{mk\_record\_desc} \\ 
{\bf case = }{\it{mapping\/}} \\ 
{\bf $\;\;$then }{\rm{mk\_mapping\_desc}}\,(\=\+{\bf{nil}}, \\ 
{\rm{mutual-base\_type-field\_base\_types}}\,(\=\+{\tt{'}}{\tt{base\_type}}, \\ 
{\bf{t}}, \\ 
{\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td})\-\index{mutual-base\_type-field\_base\_t!ypes}, \\ 
{\rm{mutual-base\_type-field\_base\_types}}\,(\=\+{\tt{'}}{\tt{base\_type}}, \\ 
{\bf{t}}, \\ 
{\rm{component\_td}}\,({\it{td\/}})\index{component\_td})\-\index{mutual-base\_type-field\_base\_t!ypes}, \\ 
{\sc{null\_map}}\index{null\_map})\-\index{mk\_mapping\_desc} \\ 
{\bf case = }{\it{sequence\/}} \\ 
{\bf $\;\;$then }{\rm{mk\_sequence\_desc}}\,(\=\+{\bf{nil}}, \\ 
{\rm{mutual-base\_type-field\_base\_types}}\,(\=\+{\tt{'}}{\tt{base\_type}}, \\ 
{\bf{t}}, \\ 
{\rm{component\_td}}\,({\it{td\/}})\index{component\_td})\-\index{mutual-base\_type-field\_base\_t!ypes}, \\ 
{\sc{null\_seq}}\index{null\_seq})\-\index{mk\_sequence\_desc} \\ 
{\bf case = }{\it{set\/}} \\ 
{\bf $\;\;$then }{\rm{mk\_set\_desc}}\,(\=\+{\bf{nil}}, \\ 
{\rm{mutual-base\_type-field\_base\_types}}\,(\=\+{\tt{'}}{\tt{base\_type}}, \\ 
{\bf{t}}, \\ 
{\rm{component\_td}}\,({\it{td\/}})\index{component\_td})\-\index{mutual-base\_type-field\_base\_t!ypes}, \\ 
{\sc{null\_set}}\index{null\_set})\-\index{mk\_set\_desc} \\ 
{\bf case = }{\it{pending\/}} \\ 
{\bf $\;\;$then }{\it{td\/}} \\ 
{\bf case = }{\it{error*\/}} \\ 
{\bf $\;\;$then }{\it{td\/}} \\ 
{\bf otherwise }{\rm{not\_type\_descriptor\_error}}\,({\it{td\/}})\index{not\_type\_descriptor\_error}$\;${\bf  endcase}\- \\ 
{\bf else }{\rm{not\_type\_descriptor\_error}}\,({\it{td\/}})\index{not\_type\_descriptor\_error}$\;${\bf  endif}\- \\ 
{\bf elseif }{\it{fds\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\it{fds\/}} \\ 
{\bf else }{\rm{cons}}\,(\=\+{\rm{map\_entry}}\,(\=\+{\rm{caar}}\,({\it{fds\/}}), \\ 
{\rm{mutual-base\_type-field\_base\_types}}\,(\=\+{\tt{'}}{\tt{base\_type}}, \\ 
{\bf{t}}, \\ 
{\rm{cdar}}\,({\it{fds\/}}))\-\index{mutual-base\_type-field\_base\_t!ypes})\-\index{map\_entry}, \\ 
{\rm{mutual-base\_type-field\_base\_types}}\,(\=\+{\tt{'}}{\tt{field\_base\_types}}, \\ 
{\rm{cdr}}\,({\it{fds\/}}), \\ 
{\bf{t}})\-\index{mutual-base\_type-field\_base\_t!ypes})\-$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{base\_type} \\  
{\rm{base\_type}}\,({\it{td\/}})\index{base\_type} $=$ {\rm{mutual-base\_type-field\_base\_types}}\,({\tt{'}}{\tt{base\_type}}, {\bf{t}}, {\it{td\/}})\index{mutual-base\_type-field\_base\_t!ypes}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{field\_base\_types} \\  
\=\+{\rm{field\_base\_types}}\,({\it{fds\/}})\index{field\_base\_types} \\ 
$=$$\;\;\;\;${\rm{mutual-base\_type-field\_base\_types}}\,({\tt{'}}{\tt{field\_base\_types}}, {\it{fds\/}}, {\bf{t}})\index{mutual-base\_type-field\_base\_t!ypes}\-
\end{tabbing}


\begin{verbatim}; ***************
;  Type Equality
; ***************

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{type\_vequal} \\  
\=\+{\rm{type\_vequal}}\,({\it{v1\/}}, {\it{v2\/}}, {\it{td\/}})\index{type\_vequal} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{errorp}}\,({\it{v1\/}})\index{errorp} $\vee$ {\rm{errorp}}\,({\it{v2\/}})\index{errorp}$\;\;${\bf then }{\bf{f}} \\ 
{\bf elseif }{\it{v1\/}} $=$ {\bf{nil}}$\;\;${\bf then }{\it{v2\/}} $=$ {\bf{nil}} \\ 
{\bf else }{\rm{vequal}}\,({\it{v1\/}}, {\it{v2\/}}, {\it{td\/}})\index{vequal}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{verbatim}#|
(do-mutual '(

(defn field_tds_equal (t1 t2)
  (if (nlistp t1)
      T
    (and (type_equal (cdar t1) (mapped_value t2 (caar t1)))
	 (field_tds_equal (cdr t1) t2)))
  ( (lessp (tree_size t1)) ))

(defn type_equal (t1 t2)
  (if (and (type_descp t1) (type_descp t2)
	   (equal (root t1) (root t2)))
      (case (root t1)
	(integer (and (type_vequal (tmin t1) (tmin t2) t1)
		      (type_vequal (tmax t1) (tmax t2) t1)))
	(rational (and (type_vequal (tmin t1) (tmin t2) t1)
		       (type_vequal (tmax t1) (tmax t2) t1)))
	(scalar (and (equal (tid t1) (tid t2))
		     (equal (sid t1) (sid t2))
		     (type_vequal (crd t1) (crd t2) (integer_desc))
		     (type_vequal (tmin t1) (tmin t2) t1)
		     (type_vequal (tmax t1) (tmax t2) t1)))
	(array (and (type_equal (selector_td t1) (selector_td t2))
		    (type_equal (component_td t1) (component_td t2))))
	(record (and (set_equal (field_names t1) (field_names t2))
		     (field_tds_equal (field_tds t1) (field_tds t2))))
	(mapping (and (type_vequal (max_size t1) (max_size t2) (integer_desc))
		      (type_equal (selector_td t1) (selector_td t2))
		      (type_equal (component_td t1) (component_td t2))))
	(sequence (and (type_vequal (max_size t1) (max_size t2) (integer_desc))
		       (type_equal (component_td t1) (component_td t2))))
	(set (and (type_vequal (max_size t1) (max_size t2) (integer_desc))
		  (type_equal (component_td t1) (component_td t2))))
	(pending (and (equal (tid t1) (tid t2))
		      (equal (sid t1) (sid t2))))
	(otherwise F))
    F)
  ( (lessp (tree_size t1)) ))

))
|#

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{mutual-type\_equal-field\_tds\_eq!ual} \\  
\=\+{\rm{mutual-type\_equal-field\_tds\_equal}}\,({\it{mutual-flg\/}}, {\it{t1\/}}, {\it{t2\/}})\index{mutual-type\_equal-field\_tds\_eq!ual} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{mutual-flg\/}} $=$ {\tt{'}}{\tt{type\_equal}} \\ 
{\bf then }\=\+{\bf if }\=\+{\rm{type\_descp}}\,({\it{t1\/}})\index{type\_descp} \\ 
$\wedge$$\;\;\;\;${\rm{type\_descp}}\,({\it{t2\/}})\index{type\_descp} \\ 
$\wedge$$\;\;\;\;$({\rm{root}}\,({\it{t1\/}})\index{root} $=$ {\rm{root}}\,({\it{t2\/}})\index{root})\- \\ 
{\bf then }\=\+{\bf case on }{\rm{root}}\,({\it{t1\/}})\index{root}: \\ 
{\bf case = }{\it{integer\/}} \\ 
{\bf then }\=\+{\rm{type\_vequal}}\,({\rm{tmin}}\,({\it{t1\/}})\index{tmin}, {\rm{tmin}}\,({\it{t2\/}})\index{tmin}, {\it{t1\/}})\index{type\_vequal} \\ 
$\wedge$$\;\;\;\;${\rm{type\_vequal}}\,({\rm{tmax}}\,({\it{t1\/}})\index{tmax}, {\rm{tmax}}\,({\it{t2\/}})\index{tmax}, {\it{t1\/}})\index{type\_vequal}\- \\ 
{\bf case = }{\it{rational\/}} \\ 
{\bf $\;\;$then }\=\+{\rm{type\_vequal}}\,({\rm{tmin}}\,({\it{t1\/}})\index{tmin}, {\rm{tmin}}\,({\it{t2\/}})\index{tmin}, {\it{t1\/}})\index{type\_vequal} \\ 
$\wedge$$\;\;\;\;${\rm{type\_vequal}}\,({\rm{tmax}}\,({\it{t1\/}})\index{tmax}, {\rm{tmax}}\,({\it{t2\/}})\index{tmax}, {\it{t1\/}})\index{type\_vequal}\- \\ 
{\bf case = }{\it{scalar\/}} \\ 
{\bf $\;\;$then }\=\+({\rm{tid}}\,({\it{t1\/}})\index{tid} $=$ {\rm{tid}}\,({\it{t2\/}})\index{tid}) \\ 
$\wedge$$\;\;\;\;$({\rm{sid}}\,({\it{t1\/}})\index{sid} $=$ {\rm{sid}}\,({\it{t2\/}})\index{sid}) \\ 
$\wedge$$\;\;\;\;${\rm{type\_vequal}}\,({\rm{crd}}\,({\it{t1\/}})\index{crd}, {\rm{crd}}\,({\it{t2\/}})\index{crd}, {\sc{integer\_desc}}\index{integer\_desc})\index{type\_vequal} \\ 
$\wedge$$\;\;\;\;${\rm{type\_vequal}}\,({\rm{tmin}}\,({\it{t1\/}})\index{tmin}, {\rm{tmin}}\,({\it{t2\/}})\index{tmin}, {\it{t1\/}})\index{type\_vequal} \\ 
$\wedge$$\;\;\;\;${\rm{type\_vequal}}\,({\rm{tmax}}\,({\it{t1\/}})\index{tmax}, {\rm{tmax}}\,({\it{t2\/}})\index{tmax}, {\it{t1\/}})\index{type\_vequal}\- \\ 
{\bf case = }{\it{array\/}} \\ 
{\bf $\;\;$then }\=\+{\rm{mutual-type\_equal-field\_tds\_equal}}\,(\=\+{\tt{'}}{\tt{type\_equal}}, \\ 
{\rm{selector\_td}}\,({\it{t1\/}})\index{selector\_td}, \\ 
{\rm{selector\_td}}\,({\it{t2\/}})\index{selector\_td})\-\index{mutual-type\_equal-field\_tds\_eq!ual} \\ 
$\wedge$$\;\;\;\;${\rm{mutual-type\_equal-field\_tds\_equal}}\,(\=\+{\tt{'}}{\tt{type\_equal}}, \\ 
{\rm{component\_td}}\,({\it{t1\/}})\index{component\_td}, \\ 
{\rm{component\_td}}\,({\it{t2\/}})\index{component\_td})\-\index{mutual-type\_equal-field\_tds\_eq!ual}\- \\ 
{\bf case = }{\it{record\/}} \\ 
{\bf $\;\;$then }\=\+{\rm{set\_equal}}\,({\rm{field\_names}}\,({\it{t1\/}})\index{field\_names}, {\rm{field\_names}}\,({\it{t2\/}})\index{field\_names})\index{set\_equal} \\ 
$\wedge$$\;\;\;\;${\rm{mutual-type\_equal-field\_tds\_equal}}\,(\=\+{\tt{'}}{\tt{field\_tds\_equal}}, \\ 
{\rm{field\_tds}}\,({\it{t1\/}})\index{field\_tds}, \\ 
{\rm{field\_tds}}\,({\it{t2\/}})\index{field\_tds})\-\index{mutual-type\_equal-field\_tds\_eq!ual}\- \\ 
{\bf case = }{\it{mapping\/}} \\ 
{\bf $\;\;$then }\=\+{\rm{type\_vequal}}\,({\rm{max\_size}}\,({\it{t1\/}})\index{max\_size}, {\rm{max\_size}}\,({\it{t2\/}})\index{max\_size}, {\sc{integer\_desc}}\index{integer\_desc})\index{type\_vequal} \\ 
$\wedge$$\;\;\;\;${\rm{mutual-type\_equal-field\_tds\_equal}}\,(\=\+{\tt{'}}{\tt{type\_equal}}, \\ 
{\rm{selector\_td}}\,({\it{t1\/}})\index{selector\_td}, \\ 
{\rm{selector\_td}}\,({\it{t2\/}})\index{selector\_td})\-\index{mutual-type\_equal-field\_tds\_eq!ual} \\ 
$\wedge$$\;\;\;\;${\rm{mutual-type\_equal-field\_tds\_equal}}\,(\=\+{\tt{'}}{\tt{type\_equal}}, \\ 
{\rm{component\_td}}\,({\it{t1\/}})\index{component\_td}, \\ 
{\rm{component\_td}}\,({\it{t2\/}})\index{component\_td})\-\index{mutual-type\_equal-field\_tds\_eq!ual}\- \\ 
{\bf case = }{\it{sequence\/}} \\ 
{\bf $\;\;$then }\=\+{\rm{type\_vequal}}\,({\rm{max\_size}}\,({\it{t1\/}})\index{max\_size}, {\rm{max\_size}}\,({\it{t2\/}})\index{max\_size}, {\sc{integer\_desc}}\index{integer\_desc})\index{type\_vequal} \\ 
$\wedge$$\;\;\;\;${\rm{mutual-type\_equal-field\_tds\_equal}}\,(\=\+{\tt{'}}{\tt{type\_equal}}, \\ 
{\rm{component\_td}}\,({\it{t1\/}})\index{component\_td}, \\ 
{\rm{component\_td}}\,({\it{t2\/}})\index{component\_td})\-\index{mutual-type\_equal-field\_tds\_eq!ual}\- \\ 
{\bf case = }{\it{set\/}} \\ 
{\bf $\;\;$then }\=\+{\rm{type\_vequal}}\,({\rm{max\_size}}\,({\it{t1\/}})\index{max\_size}, {\rm{max\_size}}\,({\it{t2\/}})\index{max\_size}, {\sc{integer\_desc}}\index{integer\_desc})\index{type\_vequal} \\ 
$\wedge$$\;\;\;\;${\rm{mutual-type\_equal-field\_tds\_equal}}\,(\=\+{\tt{'}}{\tt{type\_equal}}, \\ 
{\rm{component\_td}}\,({\it{t1\/}})\index{component\_td}, \\ 
{\rm{component\_td}}\,({\it{t2\/}})\index{component\_td})\-\index{mutual-type\_equal-field\_tds\_eq!ual}\- \\ 
{\bf case = }{\it{pending\/}} \\ 
{\bf $\;\;$then }({\rm{tid}}\,({\it{t1\/}})\index{tid} $=$ {\rm{tid}}\,({\it{t2\/}})\index{tid}) $\wedge$ ({\rm{sid}}\,({\it{t1\/}})\index{sid} $=$ {\rm{sid}}\,({\it{t2\/}})\index{sid}) \\ 
{\bf otherwise }{\bf{f}}$\;${\bf  endcase}\- \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\- \\ 
{\bf elseif }{\it{t1\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{t}} \\ 
{\bf else }\=\+{\rm{mutual-type\_equal-field\_tds\_equal}}\,(\=\+{\tt{'}}{\tt{type\_equal}}, \\ 
{\rm{cdar}}\,({\it{t1\/}}), \\ 
{\rm{mapped\_value}}\,({\it{t2\/}}, {\rm{caar}}\,({\it{t1\/}}))\index{mapped\_value})\-\index{mutual-type\_equal-field\_tds\_eq!ual} \\ 
$\wedge$$\;\;\;\;${\rm{mutual-type\_equal-field\_tds\_equal}}\,(\=\+{\tt{'}}{\tt{field\_tds\_equal}}, \\ 
{\rm{cdr}}\,({\it{t1\/}}), \\ 
{\it{t2\/}})\-\index{mutual-type\_equal-field\_tds\_eq!ual}\-$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{type\_equal} \\  
\=\+{\rm{type\_equal}}\,({\it{t1\/}}, {\it{t2\/}})\index{type\_equal} \\ 
$=$$\;\;\;\;${\rm{mutual-type\_equal-field\_tds\_equal}}\,({\tt{'}}{\tt{type\_equal}}, {\it{t1\/}}, {\it{t2\/}})\index{mutual-type\_equal-field\_tds\_eq!ual}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{field\_tds\_equal} \\  
\=\+{\rm{field\_tds\_equal}}\,({\it{t1\/}}, {\it{t2\/}})\index{field\_tds\_equal} \\ 
$=$$\;\;\;\;${\rm{mutual-type\_equal-field\_tds\_equal}}\,({\tt{'}}{\tt{field\_tds\_equal}}, {\it{t1\/}}, {\it{t2\/}})\index{mutual-type\_equal-field\_tds\_eq!ual}\-
\end{tabbing}

\begin{verbatim}; *********
;  In Type
; *********

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{in\_type} \\  
\=\+{\rm{in\_type}}\,({\it{td\/}}, {\it{u\/}})\index{in\_type} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{error\_descp}}\,({\it{td\/}})\index{error\_descp}$\;\;${\bf then }{\it{td\/}} \\ 
{\bf elseif }{\rm{error\_descp}}\,({\rm{type}}\,({\it{u\/}})\index{type})\index{error\_descp}$\;\;${\bf then }{\rm{type}}\,({\it{u\/}})\index{type} \\ 
{\bf elseif }{\rm{type\_equal}}\,({\it{td\/}}, {\rm{type}}\,({\it{u\/}})\index{type})\index{type\_equal}$\;\;${\bf then }{\bf{t}} \\ 
{\bf elseif }{\rm{base\_type}}\,({\it{td\/}})\index{base\_type} $=$ {\rm{base\_type}}\,({\rm{type}}\,({\it{u\/}})\index{type})\index{base\_type}$\;\;${\bf then }{\rm{dtype}}\,({\it{td\/}}, {\rm{value}}\,({\it{u\/}})\index{value})\index{dtype} \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\-\-
\end{tabbing}



\begin{verbatim}; *****************************************
;  Lemmas for Proving Type_Desc Terminates
; *****************************************

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{all\_type\_units} \\  
\=\+{\rm{all\_type\_units}}\,({\it{ul\/}}, {\it{sn\/}})\index{all\_type\_units} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{ul\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf elseif }{\rm{kind}}\,({\rm{car}}\,({\it{ul\/}}))\index{kind} $=$ {\tt{'}}{\tt{type}} \\ 
{\bf then }{\rm{cons}}\,({\rm{cons}}\,({\it{sn\/}}, {\rm{car}}\,({\it{ul\/}})), {\rm{all\_type\_units}}\,({\rm{cdr}}\,({\it{ul\/}}), {\it{sn\/}})\index{all\_type\_units}) \\ 
{\bf else }{\rm{all\_type\_units}}\,({\rm{cdr}}\,({\it{ul\/}}), {\it{sn\/}})\index{all\_type\_units}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{all\_scope\_types} \\  
\=\+{\rm{all\_scope\_types}}\,({\it{sl\/}})\index{all\_scope\_types} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{sl\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf else }{\rm{append}}\,(\=\+{\rm{all\_type\_units}}\,(\=\+{\rm{unit\_list}}\,({\rm{car}}\,({\it{sl\/}}))\index{unit\_list}, \\ 
{\rm{scope\_name}}\,({\rm{car}}\,({\it{sl\/}}))\index{scope\_name})\-\index{all\_type\_units}, \\ 
{\rm{all\_scope\_types}}\,({\rm{cdr}}\,({\it{sl\/}}))\index{all\_scope\_types})\-$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{all\_gypsy\_types}$\;\;$
{\rm{all\_gypsy\_types}}\,({\it{x\/}})\index{all\_gypsy\_types} $=$ {\rm{all\_scope\_types}}\,({\rm{scope\_list}}\,({\it{x\/}})\index{scope\_list})\index{all\_scope\_types}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  all\_type\_units\_members \\ \index{all\_type\_units\_members}
\=\+(({\it{u\/}} $\in$ {\it{ul\/}}) $\wedge$ ({\rm{kind}}\,({\it{u\/}})\index{kind} $=$ {\tt{'}}{\tt{type}})) \\ 
$\rightarrow$$\;\;\;\;$({\rm{cons}}\,({\it{sn\/}}, {\it{u\/}}) $\in$ {\rm{all\_type\_units}}\,({\it{ul\/}}, {\it{sn\/}})\index{all\_type\_units})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member\_append \\ \index{member\_append}
(({\it{e\/}} $\in$ {\it{x\/}}) $\vee$ ({\it{e\/}} $\in$ {\it{y\/}})) $\rightarrow$ ({\it{e\/}} $\in$ {\rm{append}}\,({\it{x\/}}, {\it{y\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  all\_scope\_types\_members \\ \index{all\_scope\_types\_members}
\=\+(({\it{s\/}} $\in$ {\it{sl\/}}) $\wedge$ ({\it{u\/}} $\in$ {\rm{unit\_list}}\,({\it{s\/}})\index{unit\_list}) $\wedge$ ({\rm{kind}}\,({\it{u\/}})\index{kind} $=$ {\tt{'}}{\tt{type}})) \\ 
$\rightarrow$$\;\;\;\;$({\rm{cons}}\,({\rm{scope\_name}}\,({\it{s\/}})\index{scope\_name}, {\it{u\/}}) $\in$ {\rm{all\_scope\_types}}\,({\it{sl\/}})\index{all\_scope\_types})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  all\_gypsy\_type\_members \\ \index{all\_gypsy\_type\_members}
\=\+(({\it{s\/}} $\in$ {\rm{scope\_list}}\,({\it{x\/}})\index{scope\_list}) $\wedge$ ({\it{u\/}} $\in$ {\rm{unit\_list}}\,({\it{s\/}})\index{unit\_list}) $\wedge$ ({\rm{kind}}\,({\it{u\/}})\index{kind} $=$ {\tt{'}}{\tt{type}})) \\ 
$\rightarrow$$\;\;\;\;$({\rm{cons}}\,({\rm{scope\_name}}\,({\it{s\/}})\index{scope\_name}, {\it{u\/}}) $\in$ {\rm{all\_gypsy\_types}}\,({\it{x\/}})\index{all\_gypsy\_types})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  rule\_imp\_root\_equal\_lhs \\ \index{rule\_imp\_root\_equal\_lhs}
{\rm{rule}}\,({\it{tr\/}}, {\rm{prodn}}\,({\it{lhs\/}}, {\it{rhs\/}})\index{prodn})\index{rule} $\rightarrow$ ({\rm{root}}\,({\it{tr\/}})\index{root} $=$ {\rm{untag}}\,({\it{lhs\/}})\index{untag})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  not\_root\_equal\_lhs\_imp\_not\_rule \\ \index{not\_root\_equal\_lhs\_imp\_not!\_rule}
\=\+(({\it{r\/}} $\not=$ {\it{nt\/}}) $\wedge$ {\rm{litatom}}\,({\it{nt\/}})) \\ 
$\rightarrow$$\;\;\;\;$({\rm{rule}}\,({\rm{mk\_tree}}\,({\it{r\/}}, {\it{s\/}})\index{mk\_tree}, {\rm{prodn}}\,({\rm{tag}}\,({\it{nt\/}}, {\it{l\/}})\index{tag}, {\it{rhs\/}})\index{prodn})\index{rule} $=$ {\bf{f}})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  mk\_error\_kind \\ \index{mk\_error\_kind}
{\rm{kind}}\,({\rm{mk\_error}}\,({\it{x\/}})\index{mk\_error})\index{kind} $=$ {\tt{'}}{\tt{error}}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  all\_scopes\_car \\ \index{all\_scopes\_car}
\=\+({\rm{length}}\,({\rm{all\_scopes}}\,({\it{sn\/}}, {\it{sl\/}})\index{all\_scopes})\index{length} $=$ {\tt{1}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+({\rm{scope\_name}}\,({\rm{car}}\,({\rm{all\_scopes}}\,({\it{sn\/}}, {\it{sl\/}})\index{all\_scopes}))\index{scope\_name} $=$ {\it{sn\/}}) \\ 
$\wedge$$\;\;\;\;$({\rm{car}}\,({\rm{all\_scopes}}\,({\it{sn\/}}, {\it{sl\/}})\index{all\_scopes}) $\in$ {\it{sl\/}}))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  all\_units\_car \\ \index{all\_units\_car}
\=\+({\rm{length}}\,({\rm{all\_units}}\,({\it{un\/}}, {\it{ul\/}})\index{all\_units})\index{length} $=$ {\tt{1}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+({\rm{local\_name}}\,({\rm{car}}\,({\rm{all\_units}}\,({\it{un\/}}, {\it{ul\/}})\index{all\_units}))\index{local\_name} $=$ {\it{un\/}}) \\ 
$\wedge$$\;\;\;\;$({\rm{car}}\,({\rm{all\_units}}\,({\it{un\/}}, {\it{ul\/}})\index{all\_units}) $\in$ {\it{ul\/}}))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  mref\_result \\ \index{mref\_result}
\=\+({\rm{kind}}\,({\rm{ref\_unit}}\,({\rm{mref}}\,({\it{un\/}}, {\it{sn\/}}, {\it{x\/}}, {\it{n\/}})\index{mref})\index{ref\_unit})\index{kind} $\not=$ {\tt{'}}{\tt{error}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+(\=\+{\rm{car}}\,({\rm{all\_scopes}}\,({\rm{ref\_scope}}\,({\rm{mref}}\,({\it{un\/}}, {\it{sn\/}}, {\it{x\/}}, {\it{n\/}})\index{mref})\index{ref\_scope}, {\rm{scope\_list}}\,({\it{x\/}})\index{scope\_list})\index{all\_scopes}) \\ 
$\in$$\;\;\;\;${\rm{scope\_list}}\,({\it{x\/}})\index{scope\_list})\- \\ 
$\wedge$$\;\;\;\;$(\=\+{\rm{scope\_name}}\,({\rm{car}}\,({\rm{all\_scopes}}\,(\=\+{\rm{ref\_scope}}\,({\rm{mref}}\,({\it{un\/}}, {\it{sn\/}}, {\it{x\/}}, {\it{n\/}})\index{mref})\index{ref\_scope}, \\ 
{\rm{scope\_list}}\,({\it{x\/}})\index{scope\_list})\-\index{all\_scopes}))\index{scope\_name} \\ 
$=$$\;\;\;\;${\rm{ref\_scope}}\,({\rm{mref}}\,({\it{un\/}}, {\it{sn\/}}, {\it{x\/}}, {\it{n\/}})\index{mref})\index{ref\_scope})\- \\ 
$\wedge$$\;\;\;\;$(\=\+{\rm{ref\_unit}}\,({\rm{mref}}\,({\it{un\/}}, {\it{sn\/}}, {\it{x\/}}, {\it{n\/}})\index{mref})\index{ref\_unit} \\ 
$\in$$\;\;\;\;${\rm{unit\_list}}\,({\rm{car}}\,({\rm{all\_scopes}}\,(\=\+{\rm{ref\_scope}}\,({\rm{mref}}\,({\it{un\/}}, {\it{sn\/}}, {\it{x\/}}, {\it{n\/}})\index{mref})\index{ref\_scope}, \\ 
{\rm{scope\_list}}\,({\it{x\/}})\index{scope\_list})\-\index{all\_scopes}))\index{unit\_list})\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  refed\_type \\ \index{refed\_type}
\=\+({\rm{kind}}\,({\rm{ref\_unit}}\,({\rm{ref}}\,({\it{un\/}}, {\it{sn\/}}, {\it{x\/}})\index{ref})\index{ref\_unit})\index{kind} $=$ {\tt{'}}{\tt{type}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+(\=\+{\rm{car}}\,({\rm{all\_scopes}}\,({\rm{ref\_scope}}\,({\rm{ref}}\,({\it{un\/}}, {\it{sn\/}}, {\it{x\/}})\index{ref})\index{ref\_scope}, {\rm{scope\_list}}\,({\it{x\/}})\index{scope\_list})\index{all\_scopes}) \\ 
$\in$$\;\;\;\;${\rm{scope\_list}}\,({\it{x\/}})\index{scope\_list})\- \\ 
$\wedge$$\;\;\;\;$(\=\+{\rm{ref\_unit}}\,({\rm{ref}}\,({\it{un\/}}, {\it{sn\/}}, {\it{x\/}})\index{ref})\index{ref\_unit} \\ 
$\in$$\;\;\;\;${\rm{unit\_list}}\,({\rm{car}}\,({\rm{all\_scopes}}\,(\=\+{\rm{ref\_scope}}\,({\rm{ref}}\,({\it{un\/}}, {\it{sn\/}}, {\it{x\/}})\index{ref})\index{ref\_scope}, \\ 
{\rm{scope\_list}}\,({\it{x\/}})\index{scope\_list})\-\index{all\_scopes}))\index{unit\_list})\- \\ 
$\wedge$$\;\;\;\;$(\=\+{\rm{scope\_name}}\,({\rm{car}}\,({\rm{all\_scopes}}\,(\=\+{\rm{ref\_scope}}\,({\rm{ref}}\,({\it{un\/}}, {\it{sn\/}}, {\it{x\/}})\index{ref})\index{ref\_scope}, \\ 
{\rm{scope\_list}}\,({\it{x\/}})\index{scope\_list})\-\index{all\_scopes}))\index{scope\_name} \\ 
$=$$\;\;\;\;${\rm{ref\_scope}}\,({\rm{ref}}\,({\it{un\/}}, {\it{sn\/}}, {\it{x\/}})\index{ref})\index{ref\_scope})\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  type\_in\_all\_types \\ \index{type\_in\_all\_types}
\=\+({\rm{kind}}\,({\rm{ref\_unit}}\,({\rm{ref}}\,({\it{un\/}}, {\it{sn\/}}, {\it{x\/}})\index{ref})\index{ref\_unit})\index{kind} $=$ {\tt{'}}{\tt{type}}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{ref}}\,({\it{un\/}}, {\it{sn\/}}, {\it{x\/}})\index{ref} $\in$ {\rm{all\_gypsy\_types}}\,({\it{x\/}})\index{all\_gypsy\_types})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  set\_difference\_remove \\ \index{set\_difference\_remove}
\=\+{\rm{listp}}\,({\it{y\/}}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{set\_difference}}\,({\it{x\/}}, {\it{y\/}})\index{set\_difference} $=$ {\rm{remove}}\,({\rm{car}}\,({\it{y\/}}), {\rm{set\_difference}}\,({\it{x\/}}, {\rm{cdr}}\,({\it{y\/}}))\index{set\_difference})\index{remove})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  set\_difference\_member \\ \index{set\_difference\_member}
(({\it{e\/}} $\in$ {\it{x\/}}) $\wedge$ ({\it{e\/}} $\not\in$ {\it{y\/}})) $\rightarrow$ ({\it{e\/}} $\in$ {\rm{set\_difference}}\,({\it{x\/}}, {\it{y\/}})\index{set\_difference})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{available\_types} \\  
{\rm{available\_types}}\,({\it{ut\/}}, {\it{x\/}})\index{available\_types} $=$ {\rm{set\_difference}}\,({\rm{all\_gypsy\_types}}\,({\it{x\/}})\index{all\_gypsy\_types}, {\it{ut\/}})\index{set\_difference}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp\_available\_types \\ \index{lessp\_available\_types}
\=\+(({\rm{kind}}\,({\rm{ref\_unit}}\,({\rm{ref}}\,({\it{un\/}}, {\it{sn\/}}, {\it{x\/}})\index{ref})\index{ref\_unit})\index{kind} $=$ {\tt{'}}{\tt{type}}) $\wedge$ ({\rm{ref}}\,({\it{un\/}}, {\it{sn\/}}, {\it{x\/}})\index{ref} $\not\in$ {\it{ut\/}})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{length}}\,({\rm{available\_types}}\,({\rm{cons}}\,({\rm{ref}}\,({\it{un\/}}, {\it{sn\/}}, {\it{x\/}})\index{ref}, {\it{ut\/}}), {\it{x\/}})\index{available\_types})\index{length} \\ 
$<$$\;\;\;\;${\rm{length}}\,({\rm{available\_types}}\,({\it{ut\/}}, {\it{x\/}})\index{available\_types})\index{length})\-\-
\end{tabbing}



\begin{verbatim}; ******************************
;  Creation of Type Descriptors
; ******************************

; ===========================
;  Descriptors for the Types
; ===========================

; --------------
;  Simple Types
; --------------

; Descriptors for standard types are defined above:
;
;     type name       function
;     ---------     --------------
;     boolean       boolean_desc
;     character     character_desc
;     integer       integer_desc
;     rational      rational_desc


\end{verbatim}\begin{tabbing}{\sc Definition}:\index{subrange\_desc} \\  
\=\+{\rm{subrange\_desc}}\,({\it{td\/}}, {\it{lo\/}}, {\it{hi\/}})\index{subrange\_desc} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{rd\/}}{\bf $\;$ be$\;\;$}{\rm{set\_tmin}}\,({\rm{set\_tmax}}\,({\it{td\/}}, {\it{hi\/}})\index{set\_tmax}, {\it{lo\/}})\index{set\_tmin}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{truep}}\,({\rm{dtype}}\,({\it{rd\/}}, {\rm{udv}}\,({\it{td\/}})\index{udv})\index{dtype})$\;\;${\bf then }{\it{rd\/}} \\ 
{\bf else }{\rm{set\_udv}}\,({\it{rd\/}}, {\it{lo\/}})\index{set\_udv}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{scalar\_desc} \\  
{\rm{scalar\_desc}}\,({\it{tn\/}}, {\it{sn\/}}, {\it{sc\/}})\index{scalar\_desc} $=$ {\rm{mk\_scalar\_desc}}\,({\it{tn\/}}, {\it{sn\/}}, {\it{sc\/}}, {\tt{0}}, {\it{sc\/}} $-\;1$, {\tt{0}})\index{mk\_scalar\_desc}
\end{tabbing}


\begin{verbatim}; ------------------
;  Structured Types
; ------------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{array\_desc} \\  
\=\+{\rm{array\_desc}}\,({\it{id\/}}, {\it{cd\/}})\index{array\_desc} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{error\_descp}}\,({\it{id\/}})\index{error\_descp}$\;\;${\bf then }{\it{id\/}} \\ 
{\bf elseif }{\rm{error\_descp}}\,({\it{cd\/}})\index{error\_descp}$\;\;${\bf then }{\it{cd\/}} \\ 
{\bf elseif }{\rm{index\_typep}}\,({\it{id\/}})\index{index\_typep} \\ 
{\bf then }{\rm{mk\_array\_desc}}\,({\it{id\/}}, {\it{cd\/}}, {\rm{mk\_array\_default}}\,({\it{id\/}}, {\it{cd\/}})\index{mk\_array\_default})\index{mk\_array\_desc} \\ 
{\bf else }{\rm{array\_index\_error}}\,({\it{id\/}})\index{array\_index\_error}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{record\_desc} \\  
\=\+{\rm{record\_desc}}\,({\it{fds\/}})\index{record\_desc} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{error\_descp}}\,({\it{fds\/}})\index{error\_descp}$\;\;${\bf then }{\it{fds\/}} \\ 
{\bf elseif }{\rm{setp}}\,({\rm{field\_names}}\,({\it{fds\/}})\index{field\_names})\index{setp} \\ 
{\bf then }\=\+{\bf if }{\rm{some\_reserved\_idp}}\,({\rm{field\_names}}\,({\it{fds\/}})\index{field\_names})\index{some\_reserved\_idp} \\ 
{\bf then }{\rm{field\_name\_reserved\_error}}\,({\it{fds\/}})\index{field\_name\_reserved\_error} \\ 
{\bf else }{\rm{mk\_record\_desc}}\,({\it{fds\/}}, {\rm{mk\_record\_default}}\,({\it{fds\/}})\index{mk\_record\_default})\index{mk\_record\_desc}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{duplicate\_field\_names\_error}}\,({\it{fds\/}})\index{duplicate\_field\_names\_error}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mapping\_desc} \\  
\=\+{\rm{mapping\_desc}}\,({\it{sl\/}}, {\it{sd\/}}, {\it{cd\/}})\index{mapping\_desc} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{error\_descp}}\,({\it{sd\/}})\index{error\_descp}$\;\;${\bf then }{\it{sd\/}} \\ 
{\bf elseif }{\rm{error\_descp}}\,({\it{cd\/}})\index{error\_descp}$\;\;${\bf then }{\it{cd\/}} \\ 
{\bf elseif }{\rm{equality\_typep}}\,({\it{sd\/}})\index{equality\_typep}$\;\;${\bf then }{\rm{mk\_mapping\_desc}}\,({\it{sl\/}}, {\it{sd\/}}, {\it{cd\/}}, {\sc{null\_map}}\index{null\_map})\index{mk\_mapping\_desc} \\ 
{\bf else }{\rm{mapping\_selector\_type\_error}}\,({\it{sd\/}})\index{mapping\_selector\_type\_error}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{sequence\_desc} \\  
\=\+{\rm{sequence\_desc}}\,({\it{sl\/}}, {\it{cd\/}})\index{sequence\_desc} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{error\_descp}}\,({\it{cd\/}})\index{error\_descp}$\;\;${\bf then }{\it{cd\/}} \\ 
{\bf else }{\rm{mk\_sequence\_desc}}\,({\it{sl\/}}, {\it{cd\/}}, {\sc{null\_seq}}\index{null\_seq})\index{mk\_sequence\_desc}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{set\_desc} \\  
\=\+{\rm{set\_desc}}\,({\it{sl\/}}, {\it{cd\/}})\index{set\_desc} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{error\_descp}}\,({\it{cd\/}})\index{error\_descp}$\;\;${\bf then }{\it{cd\/}} \\ 
{\bf else }{\rm{mk\_set\_desc}}\,({\it{sl\/}}, {\it{cd\/}}, {\sc{null\_set}}\index{null\_set})\index{mk\_set\_desc}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{pending\_desc} \\  
\=\+{\rm{pending\_desc}}\,({\it{tid\/}}, {\it{sid\/}})\index{pending\_desc} \\ 
$=$$\;\;\;\;${\rm{mk\_pending\_desc}}\,({\it{tid\/}}, {\it{sid\/}}, {\rm{pending\_default\_value\_error}}\,({\it{tid\/}}, {\it{sid\/}})\index{pending\_default\_value\_error})\index{mk\_pending\_desc}\-
\end{tabbing}



\begin{verbatim}; ==================================================
;  Evaluation of Expressions from Type Declarations
; ==================================================

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{default\_initial\_value} \\  
\=\+{\rm{default\_initial\_value}}\,({\it{d\/}}, {\it{sn\/}}, {\it{x\/}})\index{default\_initial\_value} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{d\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,(\=\+{\tt{'}}{\tt{opt\_default\_initial\_value\_expression}}, \\ 
{\tt{'}}{\tt{v}})\-\index{tag}, \\ 
{\rm{list}}\,({\tt{'}}{\tt{colon\_equal}}, {\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e}})\index{tag}))\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{precomputable\_f}}\,({\rm{subtree}}\,({\it{d\/}}, {\tt{'}}{\tt{expression}})\index{subtree}, {\it{sn\/}}, {\it{x\/}})\index{precomputable\_f} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{d\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,(\=\+{\tt{'}}{\tt{opt\_default\_initial\_value\_expression}}, \\ 
{\tt{'}}{\tt{v}})\-\index{tag}, \\ 
{\tt{'}}{\tt{empty}})\-\index{prodn})\-\index{rule}$\;\;${\bf then }{\bf{nil}} \\ 
{\bf else }{\rm{opt\_default\_value\_error}}\,({\it{d\/}}, {\it{sn\/}})\index{opt\_default\_value\_error}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{size\_limit} \\  
\=\+{\rm{size\_limit}}\,({\it{r\/}}, {\it{sn\/}}, {\it{x\/}})\index{size\_limit} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{r\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{opt\_size\_limit\_restriction}}, {\tt{'}}{\tt{r}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{open\_paren}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\tt{'}}{\tt{close\_paren}})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }\=\+{\bf let }\=\+{\it{sl\/}}{\bf $\;$ be$\;\;$}{\rm{precomputable\_f}}\,({\rm{subtree}}\,({\it{r\/}}, {\tt{'}}{\tt{expression}})\index{subtree}, {\it{sn\/}}, {\it{x\/}})\index{precomputable\_f}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{determinate}}\,({\it{sl\/}})\index{determinate} \\ 
{\bf then }\=\+{\bf let }\=\+{\it{ok\/}}{\bf $\;$ be$\;\;$}{\rm{in\_type}}\,({\sc{integer\_desc}}\index{integer\_desc}, {\it{sl\/}})\index{in\_type}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{errorp}}\,({\it{ok\/}})\index{errorp}$\;\;${\bf then }{\it{ok\/}} \\ 
{\bf elseif }{\rm{truep}}\,({\it{ok\/}}) $\wedge$ {\rm{ileq}}\,({\tt{0}}, {\rm{value}}\,({\it{sl\/}})\index{value})\index{ileq} \\ 
{\bf then }{\rm{value}}\,({\it{sl\/}})\index{value} \\ 
{\bf else }{\rm{size\_limit\_error}}\,({\it{r\/}}, {\it{sn\/}})\index{size\_limit\_error}$\;${\bf  endif}\-$\;${\bf  endlet}\- \\ 
{\bf elseif }{\rm{errorp}}\,({\rm{mark}}\,({\it{sl\/}})\index{mark})\index{errorp}$\;\;${\bf then }{\rm{mark}}\,({\it{sl\/}})\index{mark} \\ 
{\bf else }{\rm{mk\_error}}\,({\rm{mark}}\,({\it{sl\/}})\index{mark})\index{mk\_error}$\;${\bf  endif}\-$\;${\bf  endlet}\- \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{r\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{opt\_size\_limit\_restriction}}, {\tt{'}}{\tt{r}})\index{tag}, \\ 
{\tt{'}}{\tt{empty}})\-\index{prodn})\-\index{rule}$\;\;${\bf then }{\bf{nil}} \\ 
{\bf else }{\rm{opt\_size\_limit\_error}}\,({\it{r\/}}, {\it{sn\/}})\index{opt\_size\_limit\_error}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{range\_min} \\  
\=\+{\rm{range\_min}}\,({\it{r\/}}, {\it{sn\/}}, {\it{x\/}})\index{range\_min} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{r\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{range}}, {\tt{'}}{\tt{r}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{open\_paren}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{range\_limits}}, {\tt{'}}{\tt{r2}})\index{tag}, \\ 
{\tt{'}}{\tt{close\_paren}})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{range\_min}}\,({\rm{subtree}}\,({\it{r\/}}, {\tt{'}}{\tt{range\_limits}})\index{subtree}, {\it{sn\/}}, {\it{x\/}})\index{range\_min} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{r\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{range\_limits}}, {\tt{'}}{\tt{r}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{lo}})\index{tag}, \\ 
{\tt{'}}{\tt{dot\_dot}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{hi}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{precomputable\_f}}\,({\rm{subtree\_i}}\,({\it{r\/}}, {\tt{'}}{\tt{expression}}, {\tt{1}})\index{subtree\_i}, {\it{sn\/}}, {\it{x\/}})\index{precomputable\_f} \\ 
{\bf else }{\rm{not\_range\_error}}\,({\it{r\/}}, {\it{sn\/}})\index{not\_range\_error}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{range\_max} \\  
\=\+{\rm{range\_max}}\,({\it{r\/}}, {\it{sn\/}}, {\it{x\/}})\index{range\_max} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{r\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{range}}, {\tt{'}}{\tt{r}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{open\_paren}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{range\_limits}}, {\tt{'}}{\tt{r2}})\index{tag}, \\ 
{\tt{'}}{\tt{close\_paren}})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{range\_max}}\,({\rm{subtree}}\,({\it{r\/}}, {\tt{'}}{\tt{range\_limits}})\index{subtree}, {\it{sn\/}}, {\it{x\/}})\index{range\_max} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{r\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{range\_limits}}, {\tt{'}}{\tt{r}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{lo}})\index{tag}, \\ 
{\tt{'}}{\tt{dot\_dot}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{hi}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{precomputable\_f}}\,({\rm{subtree\_i}}\,({\it{r\/}}, {\tt{'}}{\tt{expression}}, {\tt{2}})\index{subtree\_i}, {\it{sn\/}}, {\it{x\/}})\index{precomputable\_f} \\ 
{\bf else }{\rm{not\_range\_error}}\,({\it{r\/}}, {\it{sn\/}})\index{not\_range\_error}$\;${\bf  endif}\-\-
\end{tabbing}



\begin{verbatim}; ===========================
;  Range and Default Setting
; ===========================

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{value\_setting} \\  
\=\+{\rm{value\_setting}}\,({\it{td\/}}, {\it{v\/}}, {\it{vkind\/}})\index{value\_setting} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{errorp}}\,({\it{v\/}})\index{errorp}$\;\;${\bf then }{\it{v\/}} \\ 
{\bf elseif }{\rm{indeterminate}}\,({\it{v\/}})\index{indeterminate}$\;\;${\bf then }{\rm{mk\_error}}\,({\it{v\/}})\index{mk\_error} \\ 
{\bf else }\=\+{\bf let }\=\+{\it{r\/}}{\bf $\;$ be$\;\;$}{\rm{in\_type}}\,({\it{td\/}}, {\rm{unmark}}\,({\it{v\/}})\index{unmark})\index{in\_type}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{truep}}\,({\it{r\/}})$\;\;${\bf then }{\rm{value}}\,({\it{v\/}})\index{value} \\ 
{\bf elseif }{\rm{errorp}}\,({\it{r\/}})\index{errorp}$\;\;${\bf then }{\it{r\/}} \\ 
{\bf else }{\rm{mk\_error}}\,({\rm{list}}\,(\=\+{\it{vkind\/}}, \\ 
{\rm{unmark}}\,({\it{v\/}})\index{unmark}, \\ 
{\tt{'}}{\tt{not}}, \\ 
{\tt{'}}{\tt{in}}, \\ 
{\tt{'}}{\tt{type}}, \\ 
{\it{td\/}})\-)\index{mk\_error}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{range\_max\_setting} \\  
\=\+{\rm{range\_max\_setting}}\,({\it{td\/}}, {\it{min\/}}, {\it{max\/}})\index{range\_max\_setting} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{lo\/}}{\bf $\;$ be$\;\;$}{\rm{value\_setting}}\,({\it{td\/}}, {\it{min\/}}, {\tt{'}}{\tt{range\_minimum}})\index{value\_setting}, \\ 
{\it{hi\/}}{\bf $\;$ be$\;\;$}{\rm{value\_setting}}\,({\it{td\/}}, {\it{max\/}}, {\tt{'}}{\tt{range\_maximum}})\index{value\_setting}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{errorp}}\,({\it{hi\/}})\index{errorp}$\;\;${\bf then }{\it{hi\/}} \\ 
{\bf elseif }{\rm{errorp}}\,({\it{lo\/}})\index{errorp}$\;\;${\bf then }{\rm{mk\_error}}\,({\rm{marked}}\,({\it{lo\/}}, {\rm{unmark}}\,({\it{max\/}})\index{unmark})\index{marked})\index{mk\_error} \\ 
{\bf else }{\it{hi\/}}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{range\_min\_setting} \\  
\=\+{\rm{range\_min\_setting}}\,({\it{td\/}}, {\it{min\/}}, {\it{max\/}})\index{range\_min\_setting} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{lo\/}}{\bf $\;$ be$\;\;$}{\rm{value\_setting}}\,({\it{td\/}}, {\it{min\/}}, {\tt{'}}{\tt{range\_minimum}})\index{value\_setting}, \\ 
{\it{hi\/}}{\bf $\;$ be$\;\;$}{\rm{value\_setting}}\,({\it{td\/}}, {\it{max\/}}, {\tt{'}}{\tt{range\_maximum}})\index{value\_setting}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{errorp}}\,({\it{lo\/}})\index{errorp}$\;\;${\bf then }{\it{lo\/}} \\ 
{\bf elseif }{\rm{errorp}}\,({\it{hi\/}})\index{errorp}$\;\;${\bf then }{\rm{mk\_error}}\,({\rm{marked}}\,({\it{hi\/}}, {\rm{unmark}}\,({\it{min\/}})\index{unmark})\index{marked})\index{mk\_error} \\ 
{\bf else }{\it{lo\/}}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{set\_range} \\  
\=\+{\rm{set\_range}}\,({\it{td\/}}, {\it{min\/}}, {\it{max\/}})\index{set\_range} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{simple\_typep}}\,({\it{td\/}})\index{simple\_typep} \\ 
{\bf then }\=\+{\bf let }\=\+{\it{lo\/}}{\bf $\;$ be$\;\;$}{\rm{range\_min\_setting}}\,({\it{td\/}}, {\it{min\/}}, {\it{max\/}})\index{range\_min\_setting}, \\ 
{\it{hi\/}}{\bf $\;$ be$\;\;$}{\rm{range\_max\_setting}}\,({\it{td\/}}, {\it{min\/}}, {\it{max\/}})\index{range\_max\_setting}\- \\ 
{\bf in} \\ 
\=\+{\bf if }\=\+({\rm{integerp}}\,({\it{lo\/}})\index{integerp} $\wedge$ ($\neg$ {\rm{ileq}}\,({\it{lo\/}}, {\it{hi\/}})\index{ileq})) \\ 
$\vee$$\;\;\;\;$({\rm{rationalp}}\,({\it{lo\/}})\index{rationalp} $\wedge$ ($\neg$ {\rm{rleq}}\,({\it{lo\/}}, {\it{hi\/}})\index{rleq}))\- \\ 
{\bf then }{\rm{empty\_type\_error}}\,({\rm{set\_tmin}}\,({\rm{set\_tmax}}\,({\it{td\/}}, {\it{hi\/}})\index{set\_tmax}, {\it{lo\/}})\index{set\_tmin})\index{empty\_type\_error} \\ 
{\bf else }{\rm{subrange\_desc}}\,({\it{td\/}}, {\it{lo\/}}, {\it{hi\/}})\index{subrange\_desc}$\;${\bf  endif}\-$\;${\bf  endlet}\- \\ 
{\bf elseif }{\rm{error\_descp}}\,({\it{td\/}})\index{error\_descp}$\;\;${\bf then }{\it{td\/}} \\ 
{\bf else }{\rm{non\_simple\_subrange\_type\_error}}\,({\it{td\/}})\index{non\_simple\_subrange\_type\_er!ror}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{set\_default\_value} \\  
\=\+{\rm{set\_default\_value}}\,({\it{td\/}}, {\it{dv\/}})\index{set\_default\_value} \\ 
$=$$\;\;\;\;$\=\+{\bf if }({\it{dv\/}} $=$ {\bf{nil}}) $\vee$ {\rm{error\_descp}}\,({\it{td\/}})\index{error\_descp}$\;\;${\bf then }{\it{td\/}} \\ 
{\bf else }\=\+{\bf let }\=\+{\it{v\/}}{\bf $\;$ be$\;\;$}{\rm{value\_setting}}\,(\=\+{\it{td\/}}, \\ 
{\it{dv\/}}, \\ 
{\tt{'}}{\tt{default\_initial\_value}})\-\index{value\_setting}\- \\ 
{\bf in} \\ 
{\rm{set\_udv}}\,({\it{td\/}}, {\it{v\/}})\index{set\_udv}$\;${\bf  endlet}\-$\;${\bf  endif}\-\-
\end{tabbing}


\begin{verbatim}; =======================
;  Checking Scalar Types
; =======================

\end{verbatim}
\noindent{\sc Event}:   Disable ref.

\addvspace{18pt}

\noindent{\sc Event}:   Disable ref\_unit.

\addvspace{18pt}

\noindent{\sc Event}:   Disable errorp.

\addvspace{18pt}

\begin{tabbing}{\sc Definition}:\index{scalar\_check} \\  
\=\+{\rm{scalar\_check}}\,({\it{svs\/}}, {\it{sn\/}}, {\it{x\/}})\index{scalar\_check} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{svs\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{t}} \\ 
{\bf else }\=\+{\bf let }\=\+{\it{r\/}}{\bf $\;$ be$\;\;$}{\rm{ref}}\,({\rm{car}}\,({\it{svs\/}}), {\it{sn\/}}, {\it{x\/}})\index{ref}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{errorp}}\,({\rm{ref\_unit}}\,({\it{r\/}})\index{ref\_unit})\index{errorp}$\;\;${\bf then }{\rm{ref\_unit}}\,({\it{r\/}})\index{ref\_unit} \\ 
{\bf else }{\rm{scalar\_check}}\,({\rm{cdr}}\,({\it{svs\/}}), {\it{sn\/}}, {\it{x\/}})\index{scalar\_check}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{construct\_scalar\_desc} \\  
\=\+{\rm{construct\_scalar\_desc}}\,({\it{tn\/}}, {\it{sn\/}}, {\it{svs\/}}, {\it{x\/}})\index{construct\_scalar\_desc} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{err\/}}{\bf $\;$ be$\;\;$}{\rm{scalar\_check}}\,({\it{svs\/}}, {\it{sn\/}}, {\it{x\/}})\index{scalar\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{errorp}}\,({\it{err\/}})\index{errorp}$\;\;${\bf then }{\it{err\/}} \\ 
{\bf else }{\rm{scalar\_desc}}\,({\it{tn\/}}, {\it{sn\/}}, {\rm{length}}\,({\it{svs\/}})\index{length})\index{scalar\_desc}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}



\begin{verbatim}; ====================
;  Function Type_Desc
; ====================

\end{verbatim}
\noindent{\sc Event}:   Disable *1*boolean\_desc.

\addvspace{18pt}

\noindent{\sc Event}:   Disable *1*character\_desc.

\addvspace{18pt}

\noindent{\sc Event}:   Disable *1*integer\_desc.

\addvspace{18pt}

\noindent{\sc Event}:   Disable *1*rational\_desc.

\addvspace{18pt}

\noindent{\sc Event}:   Disable array\_desc.

\addvspace{18pt}

\noindent{\sc Event}:   Disable available\_types.

\addvspace{18pt}

\noindent{\sc Event}:   Disable boolean\_desc.

\addvspace{18pt}

\noindent{\sc Event}:   Disable character\_desc.

\addvspace{18pt}

\noindent{\sc Event}:   Disable construct\_scalar\_desc.

\addvspace{18pt}

\noindent{\sc Event}:   Disable default\_initial\_value.

\addvspace{18pt}

\noindent{\sc Event}:   Disable error\_descp.

\addvspace{18pt}

\noindent{\sc Event}:   Disable errorp.

\addvspace{18pt}

\noindent{\sc Event}:   Disable gname.

\addvspace{18pt}

\noindent{\sc Event}:   Disable identifierp.

\addvspace{18pt}

\noindent{\sc Event}:   Disable integer\_desc.

\addvspace{18pt}

\noindent{\sc Event}:   Disable kind.

\addvspace{18pt}

\noindent{\sc Event}:   Disable length.

\addvspace{18pt}

\noindent{\sc Event}:   Disable mapping\_desc.

\addvspace{18pt}

\noindent{\sc Event}:   Disable ncopies.

\addvspace{18pt}

\noindent{\sc Event}:   Disable not\_record\_fields\_error.

\addvspace{18pt}

\noindent{\sc Event}:   Disable not\_type\_error.

\addvspace{18pt}

\noindent{\sc Event}:   Disable pair\_list\_map.

\addvspace{18pt}

\noindent{\sc Event}:   Disable pending\_desc.

\addvspace{18pt}

\noindent{\sc Event}:   Disable pending\_type\_defnp.

\addvspace{18pt}

\noindent{\sc Event}:   Disable range\_max.

\addvspace{18pt}

\noindent{\sc Event}:   Disable range\_min.

\addvspace{18pt}

\noindent{\sc Event}:   Disable rational\_desc.

\addvspace{18pt}

\noindent{\sc Event}:   Disable record\_desc.

\addvspace{18pt}

\noindent{\sc Event}:   Disable record\_field\_names.

\addvspace{18pt}

\noindent{\sc Event}:   Disable ref.

\addvspace{18pt}

\noindent{\sc Event}:   Disable ref\_scope.

\addvspace{18pt}

\noindent{\sc Event}:   Disable ref\_unit.

\addvspace{18pt}

\noindent{\sc Event}:   Disable scalar\_type\_defnp.

\addvspace{18pt}

\noindent{\sc Event}:   Disable scalar\_value\_list.

\addvspace{18pt}

\noindent{\sc Event}:   Disable sequence\_desc.

\addvspace{18pt}

\noindent{\sc Event}:   Disable set\_default\_value.

\addvspace{18pt}

\noindent{\sc Event}:   Disable set\_desc.

\addvspace{18pt}

\noindent{\sc Event}:   Disable set\_range.

\addvspace{18pt}

\noindent{\sc Event}:   Disable size\_limit.

\addvspace{18pt}

\noindent{\sc Event}:   Disable type\_defn\_cycle\_error.

\addvspace{18pt}

\noindent{\sc Event}:   Disable unit\_name.

\addvspace{18pt}


\begin{verbatim}#|
(do-mutual '(


(defn field_descs (s sn ut x)

  (if (rule s (prodn (tag 'fields 'f)
		     (list (tag 'fields 'f2) 'SEMI_COLON
			   (tag 'similar_fields 's))))
      (let ((f1 (field_descs (subtree s 'fields) sn ut x))
	    (f2 (field_descs (subtree s 'similar_fields) sn ut x)))
	(if (error_descp f1)
	    f1
	(if (error_descp f2)
	    f2
	  (append f1 f2))))

  (if (rule s (prodn (tag 'fields 'f)
		     (tag 'similar_fields 's)))
      (field_descs (subtree s 'similar_fields) sn ut x)

  (if (rule s (prodn (tag 'similar_fields 's)
		     (list (tag 'identifier_list 'is) 'COLON
			   (tag 'type_specification 'ft))))
      (let ((ftd (type_desc (subtree s 'type_specification) sn ut x))
	    (fns (record_field_names (subtree s 'identifier_list))))
	(if (error_descp ftd)
	    ftd
	  (pair_list_map fns (ncopies (length fns) ftd))))

    (not_record_fields_error s sn))))

  ( (ord-lessp (cons (add1 (length (available_types ut x)))
		     (tree_size s))) ))


(defn type_desc (s sn ut x)
  ; sn is the name of the scope where s is to be interpreted
  ; s is a type specification parse tree or a parse tree that arises in its
  ;   interpretation
  ; ut (used types) is a list of types that have already been looked up in x
  ; x is the Gypsy parse tree

  (if (rule s (prodn (tag 'array_type 'a)
		     (list 'ARRAY 'OPEN_PAREN (tag 'type_specification 'it)
			   'CLOSE_PAREN 'OF (tag 'type_specification 'ct))))
      (array_desc (type_desc (subtree_i s 'type_specification 1) sn ut x)
		  (type_desc (subtree_i s 'type_specification 2) sn ut x))

  (if (rule s (prodn (tag 'mapping_type 'm)
		     (list 'MAPPING (tag 'opt_size_limit_restriction 'r)
			   'FROM (tag 'type_specification 'st)
			   'TO (tag 'type_specification 'ct))))
      (mapping_desc (size_limit (subtree s 'opt_size_limit_restriction) sn x)
		    (type_desc (subtree_i s 'type_specification 1) sn ut x)
		    (type_desc (subtree_i s 'type_specification 2) sn ut x))

  (if (rule s (prodn (tag 'record_type 'r)
		     (list 'RECORD 'OPEN_PAREN (tag 'fields 'f)
			   'CLOSE_PAREN)))
      (record_desc (field_descs (subtree s 'fields) sn ut x))

  (if (rule s (prodn (tag 'sequence_type 's)
		     (list 'SEQUENCE (tag 'opt_size_limit_restriction 'r)
			   'OF (tag 'type_specification 'ct))))
      (sequence_desc (size_limit (subtree s 'opt_size_limit_restriction)
				 sn x)
		     (type_desc (subtree s 'type_specification) sn ut x))

  (if (rule s (prodn (tag 'set_type 's)
		     (list 'SET (tag 'opt_size_limit_restriction 'r)
			   'OF (tag 'type_specification 'ct))))
      (set_desc (size_limit (subtree s 'opt_size_limit_restriction) sn x)
		(type_desc (subtree s 'type_specification) sn ut x))

  (if (rule s (prodn (tag 'type_declaration 'd)
		     (list 'TYPE (tag 'IDENTIFIER 'tn) 'EQUAL
			   (tag 'type_definition 'd2))))
      (if (pending_type_defnp s)
	  (pending_desc (unit_name s) sn)
      (if (scalar_type_defnp s)
	  (construct_scalar_desc (unit_name s) sn (scalar_value_list s) x)
	(type_desc (subtree s 'type_definition) sn ut x)))

  (if (rule s (prodn (tag 'type_definition 'd)
		     (tag 'array_type 'a)))
      (type_desc (subtree s 'array_type) sn ut x)

  (if (rule s (prodn (tag 'type_definition 'd)
		     (tag 'record_type 'r)))
      (type_desc (subtree s 'record_type) sn ut x)

  (if (rule s (prodn (tag 'type_definition 'd)
		     (tag 'mapping_type 'm)))
      (type_desc (subtree s 'mapping_type) sn ut x)

  (if (rule s (prodn (tag 'type_definition 'd)
		     (tag 'sequence_type 's)))
      (type_desc (subtree s 'sequence_type) sn ut x)

  (if (rule s (prodn (tag 'type_definition 'd)
		     (tag 'set_type 's)))
      (type_desc (subtree s 'set_type) sn ut x)

  (if (rule s (prodn (tag 'type_definition 's)
		     (list (tag 'type_specification 's)
			   (tag 'opt_default_initial_value_expression 'v))))
      (set_default_value (type_desc (subtree s 'type_specification) sn ut x)
			 ; set_default_value does not change the default 
			 ; value if (default_initial_value ...) is nil
			 (default_initial_value
			   (subtree s 'opt_default_initial_value_expression)
			   sn x))

  (if (rule s (prodn (tag 'type_specification 's)
		     (tag 'IDENTIFIER 'tn)))
      (type_desc (subtree s 'IDENTIFIER) sn ut x)

  (if (rule s (prodn (tag 'type_specification 's)
		     (list (tag 'IDENTIFIER 'tn) (tag 'range 'r))))
      (set_range (type_desc (subtree s 'IDENTIFIER) sn ut x)
		 (range_min (subtree s 'range) sn x)
		 (range_max (subtree s 'range) sn x))

  (if (identifierp s)
      (let ((tn (gname s)))
	(if (equal tn 'boolean)
	    (boolean_desc)
	(if (equal tn 'character)
	    (character_desc)
	(if (equal tn 'integer)
	    (integer_desc)
	(if (equal tn 'rational)
	    (rational_desc)
	  (let ((r (ref tn sn x)))
	  (let ((h (ref_scope r))
		(u (ref_unit r)))
	    (if (member r ut)
		(type_defn_cycle_error tn sn)
	    (if (equal (kind u) 'type)
		(type_desc u h (cons r ut) x)
	    (if (errorp u)
		u
	      (not_type_error tn sn)))))))))))

    (not_type_error s sn))))))))))))))))

  ( (ord-lessp (cons (add1 (length (available_types ut x)))
		     (tree_size s))) ))

))
|#

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{mutual-type\_desc-field\_descs} \\  
\=\+{\rm{mutual-type\_desc-field\_descs}}\,({\it{mutual-flg\/}}, {\it{s\/}}, {\it{sn\/}}, {\it{ut\/}}, {\it{x\/}})\index{mutual-type\_desc-field\_descs} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{mutual-flg\/}} $=$ {\tt{'}}{\tt{type\_desc}} \\ 
{\bf then }\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{s\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{array\_type}}, {\tt{'}}{\tt{a}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{array}}, \\ 
{\tt{'}}{\tt{open\_paren}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{it}})\index{tag}, \\ 
{\tt{'}}{\tt{close\_paren}}, \\ 
{\tt{'}}{\tt{of}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{ct}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{array\_desc}}\,(\=\+{\rm{mutual-type\_desc-field\_descs}}\,(\=\+{\tt{'}}{\tt{type\_desc}}, \\ 
{\rm{subtree\_i}}\,(\=\+{\it{s\/}}, \\ 
{\tt{'}}{\tt{type\_specification}}, \\ 
{\tt{1}})\-\index{subtree\_i}, \\ 
{\it{sn\/}}, \\ 
{\it{ut\/}}, \\ 
{\it{x\/}})\-\index{mutual-type\_desc-field\_descs}, \\ 
{\rm{mutual-type\_desc-field\_descs}}\,(\=\+{\tt{'}}{\tt{type\_desc}}, \\ 
{\rm{subtree\_i}}\,(\=\+{\it{s\/}}, \\ 
{\tt{'}}{\tt{type\_specification}}, \\ 
{\tt{2}})\-\index{subtree\_i}, \\ 
{\it{sn\/}}, \\ 
{\it{ut\/}}, \\ 
{\it{x\/}})\-\index{mutual-type\_desc-field\_descs})\-\index{array\_desc} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{s\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{mapping\_type}}, {\tt{'}}{\tt{m}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{mapping}}, \\ 
{\rm{tag}}\,(\=\+{\tt{'}}{\tt{opt\_size\_limit\_restriction}}, \\ 
{\tt{'}}{\tt{r}})\-\index{tag}, \\ 
{\tt{'}}{\tt{from}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{st}})\index{tag}, \\ 
{\tt{'}}{\tt{to}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{ct}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{mapping\_desc}}\,(\=\+{\rm{size\_limit}}\,(\=\+{\rm{subtree}}\,(\=\+{\it{s\/}}, \\ 
{\tt{'}}{\tt{opt\_size\_limit\_restriction}})\-\index{subtree}, \\ 
{\it{sn\/}}, \\ 
{\it{x\/}})\-\index{size\_limit}, \\ 
{\rm{mutual-type\_desc-field\_descs}}\,(\=\+{\tt{'}}{\tt{type\_desc}}, \\ 
{\rm{subtree\_i}}\,(\=\+{\it{s\/}}, \\ 
{\tt{'}}{\tt{type\_specification}}, \\ 
{\tt{1}})\-\index{subtree\_i}, \\ 
{\it{sn\/}}, \\ 
{\it{ut\/}}, \\ 
{\it{x\/}})\-\index{mutual-type\_desc-field\_descs}, \\ 
{\rm{mutual-type\_desc-field\_descs}}\,(\=\+{\tt{'}}{\tt{type\_desc}}, \\ 
{\rm{subtree\_i}}\,(\=\+{\it{s\/}}, \\ 
{\tt{'}}{\tt{type\_specification}}, \\ 
{\tt{2}})\-\index{subtree\_i}, \\ 
{\it{sn\/}}, \\ 
{\it{ut\/}}, \\ 
{\it{x\/}})\-\index{mutual-type\_desc-field\_descs})\-\index{mapping\_desc} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{s\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{record\_type}}, {\tt{'}}{\tt{r}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{record}}, \\ 
{\tt{'}}{\tt{open\_paren}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{fields}}, {\tt{'}}{\tt{f}})\index{tag}, \\ 
{\tt{'}}{\tt{close\_paren}})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{record\_desc}}\,({\rm{mutual-type\_desc-field\_descs}}\,(\=\+{\tt{'}}{\tt{field\_descs}}, \\ 
{\rm{subtree}}\,(\=\+{\it{s\/}}, \\ 
{\tt{'}}{\tt{fields}})\-\index{subtree}, \\ 
{\it{sn\/}}, \\ 
{\it{ut\/}}, \\ 
{\it{x\/}})\-\index{mutual-type\_desc-field\_descs})\index{record\_desc} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{s\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{sequence\_type}}, {\tt{'}}{\tt{s}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{sequence}}, \\ 
{\rm{tag}}\,(\=\+{\tt{'}}{\tt{opt\_size\_limit\_restriction}}, \\ 
{\tt{'}}{\tt{r}})\-\index{tag}, \\ 
{\tt{'}}{\tt{of}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{ct}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{sequence\_desc}}\,(\=\+{\rm{size\_limit}}\,(\=\+{\rm{subtree}}\,(\=\+{\it{s\/}}, \\ 
{\tt{'}}{\tt{opt\_size\_limit\_restriction}})\-\index{subtree}, \\ 
{\it{sn\/}}, \\ 
{\it{x\/}})\-\index{size\_limit}, \\ 
{\rm{mutual-type\_desc-field\_descs}}\,(\=\+{\tt{'}}{\tt{type\_desc}}, \\ 
{\rm{subtree}}\,(\=\+{\it{s\/}}, \\ 
{\tt{'}}{\tt{type\_specification}})\-\index{subtree}, \\ 
{\it{sn\/}}, \\ 
{\it{ut\/}}, \\ 
{\it{x\/}})\-\index{mutual-type\_desc-field\_descs})\-\index{sequence\_desc} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{s\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{set\_type}}, {\tt{'}}{\tt{s}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{set}}, \\ 
{\rm{tag}}\,(\=\+{\tt{'}}{\tt{opt\_size\_limit\_restriction}}, \\ 
{\tt{'}}{\tt{r}})\-\index{tag}, \\ 
{\tt{'}}{\tt{of}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{ct}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{set\_desc}}\,(\=\+{\rm{size\_limit}}\,(\=\+{\rm{subtree}}\,(\=\+{\it{s\/}}, \\ 
{\tt{'}}{\tt{opt\_size\_limit\_restriction}})\-\index{subtree}, \\ 
{\it{sn\/}}, \\ 
{\it{x\/}})\-\index{size\_limit}, \\ 
{\rm{mutual-type\_desc-field\_descs}}\,(\=\+{\tt{'}}{\tt{type\_desc}}, \\ 
{\rm{subtree}}\,(\=\+{\it{s\/}}, \\ 
{\tt{'}}{\tt{type\_specification}})\-\index{subtree}, \\ 
{\it{sn\/}}, \\ 
{\it{ut\/}}, \\ 
{\it{x\/}})\-\index{mutual-type\_desc-field\_descs})\-\index{set\_desc} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{s\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{type\_declaration}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{type}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{tn}})\index{tag}, \\ 
{\tt{'}}{\tt{equal}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_definition}}, {\tt{'}}{\tt{d2}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }\=\+{\bf if }{\rm{pending\_type\_defnp}}\,({\it{s\/}})\index{pending\_type\_defnp}$\;\;${\bf then }{\rm{pending\_desc}}\,({\rm{unit\_name}}\,({\it{s\/}})\index{unit\_name}, {\it{sn\/}})\index{pending\_desc} \\ 
{\bf elseif }{\rm{scalar\_type\_defnp}}\,({\it{s\/}})\index{scalar\_type\_defnp} \\ 
{\bf then }{\rm{construct\_scalar\_desc}}\,(\=\+{\rm{unit\_name}}\,({\it{s\/}})\index{unit\_name}, \\ 
{\it{sn\/}}, \\ 
{\rm{scalar\_value\_list}}\,({\it{s\/}})\index{scalar\_value\_list}, \\ 
{\it{x\/}})\-\index{construct\_scalar\_desc} \\ 
{\bf else }{\rm{mutual-type\_desc-field\_descs}}\,(\=\+{\tt{'}}{\tt{type\_desc}}, \\ 
{\rm{subtree}}\,(\=\+{\it{s\/}}, \\ 
{\tt{'}}{\tt{type\_definition}})\-\index{subtree}, \\ 
{\it{sn\/}}, \\ 
{\it{ut\/}}, \\ 
{\it{x\/}})\-\index{mutual-type\_desc-field\_descs}$\;${\bf  endif}\- \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{s\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{type\_definition}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{array\_type}}, {\tt{'}}{\tt{a}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{mutual-type\_desc-field\_descs}}\,(\=\+{\tt{'}}{\tt{type\_desc}}, \\ 
{\rm{subtree}}\,({\it{s\/}}, {\tt{'}}{\tt{array\_type}})\index{subtree}, \\ 
{\it{sn\/}}, \\ 
{\it{ut\/}}, \\ 
{\it{x\/}})\-\index{mutual-type\_desc-field\_descs} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{s\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{type\_definition}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{record\_type}}, {\tt{'}}{\tt{r}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{mutual-type\_desc-field\_descs}}\,(\=\+{\tt{'}}{\tt{type\_desc}}, \\ 
{\rm{subtree}}\,({\it{s\/}}, {\tt{'}}{\tt{record\_type}})\index{subtree}, \\ 
{\it{sn\/}}, \\ 
{\it{ut\/}}, \\ 
{\it{x\/}})\-\index{mutual-type\_desc-field\_descs} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{s\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{type\_definition}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{mapping\_type}}, {\tt{'}}{\tt{m}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{mutual-type\_desc-field\_descs}}\,(\=\+{\tt{'}}{\tt{type\_desc}}, \\ 
{\rm{subtree}}\,({\it{s\/}}, {\tt{'}}{\tt{mapping\_type}})\index{subtree}, \\ 
{\it{sn\/}}, \\ 
{\it{ut\/}}, \\ 
{\it{x\/}})\-\index{mutual-type\_desc-field\_descs} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{s\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{type\_definition}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{sequence\_type}}, {\tt{'}}{\tt{s}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{mutual-type\_desc-field\_descs}}\,(\=\+{\tt{'}}{\tt{type\_desc}}, \\ 
{\rm{subtree}}\,({\it{s\/}}, {\tt{'}}{\tt{sequence\_type}})\index{subtree}, \\ 
{\it{sn\/}}, \\ 
{\it{ut\/}}, \\ 
{\it{x\/}})\-\index{mutual-type\_desc-field\_descs} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{s\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{type\_definition}}, {\tt{'}}{\tt{d}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{set\_type}}, {\tt{'}}{\tt{s}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{mutual-type\_desc-field\_descs}}\,(\=\+{\tt{'}}{\tt{type\_desc}}, \\ 
{\rm{subtree}}\,({\it{s\/}}, {\tt{'}}{\tt{set\_type}})\index{subtree}, \\ 
{\it{sn\/}}, \\ 
{\it{ut\/}}, \\ 
{\it{x\/}})\-\index{mutual-type\_desc-field\_descs} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{s\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{type\_definition}}, {\tt{'}}{\tt{s}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{s}})\index{tag}, \\ 
{\rm{tag}}\,(\=\+{\tt{'}}{\tt{opt\_default\_initial\_value\_expression}}, \\ 
{\tt{'}}{\tt{v}})\-\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{set\_default\_value}}\,(\=\+{\rm{mutual-type\_desc-field\_descs}}\,(\=\+{\tt{'}}{\tt{type\_desc}}, \\ 
{\rm{subtree}}\,(\=\+{\it{s\/}}, \\ 
{\tt{'}}{\tt{type\_specification}})\-\index{subtree}, \\ 
{\it{sn\/}}, \\ 
{\it{ut\/}}, \\ 
{\it{x\/}})\-\index{mutual-type\_desc-field\_descs}, \\ 
{\rm{default\_initial\_value}}\,(\=\+{\rm{subtree}}\,(\=\+{\it{s\/}}, \\ 
{\tt{'}}{\tt{opt\_default\_initial\_value\_expression}})\-\index{subtree}, \\ 
{\it{sn\/}}, \\ 
{\it{x\/}})\-\index{default\_initial\_value})\-\index{set\_default\_value} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{s\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{s}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{tn}})\index{tag})\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{mutual-type\_desc-field\_descs}}\,(\=\+{\tt{'}}{\tt{type\_desc}}, \\ 
{\rm{subtree}}\,({\it{s\/}}, {\tt{'}}{\tt{identifier}})\index{subtree}, \\ 
{\it{sn\/}}, \\ 
{\it{ut\/}}, \\ 
{\it{x\/}})\-\index{mutual-type\_desc-field\_descs} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{s\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{s}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{tn}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{range}}, {\tt{'}}{\tt{r}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{set\_range}}\,(\=\+{\rm{mutual-type\_desc-field\_descs}}\,(\=\+{\tt{'}}{\tt{type\_desc}}, \\ 
{\rm{subtree}}\,(\=\+{\it{s\/}}, \\ 
{\tt{'}}{\tt{identifier}})\-\index{subtree}, \\ 
{\it{sn\/}}, \\ 
{\it{ut\/}}, \\ 
{\it{x\/}})\-\index{mutual-type\_desc-field\_descs}, \\ 
{\rm{range\_min}}\,({\rm{subtree}}\,({\it{s\/}}, {\tt{'}}{\tt{range}})\index{subtree}, {\it{sn\/}}, {\it{x\/}})\index{range\_min}, \\ 
{\rm{range\_max}}\,({\rm{subtree}}\,({\it{s\/}}, {\tt{'}}{\tt{range}})\index{subtree}, {\it{sn\/}}, {\it{x\/}})\index{range\_max})\-\index{set\_range} \\ 
{\bf elseif }{\rm{identifierp}}\,({\it{s\/}})\index{identifierp} \\ 
{\bf then }\=\+{\bf case on }{\rm{gname}}\,({\it{s\/}})\index{gname}: \\ 
{\bf case = }{\it{boolean\/}} \\ 
{\bf then }{\sc{boolean\_desc}}\index{boolean\_desc} \\ 
{\bf case = }{\it{character\/}} \\ 
{\bf $\;\;$then }{\sc{character\_desc}}\index{character\_desc} \\ 
{\bf case = }{\it{integer\/}} \\ 
{\bf $\;\;$then }{\sc{integer\_desc}}\index{integer\_desc} \\ 
{\bf case = }{\it{rational\/}} \\ 
{\bf $\;\;$then }{\sc{rational\_desc}}\index{rational\_desc} \\ 
{\bf otherwise }\=\+{\bf if }{\rm{ref}}\,({\rm{gname}}\,({\it{s\/}})\index{gname}, {\it{sn\/}}, {\it{x\/}})\index{ref} $\in$ {\it{ut\/}} \\ 
{\bf then }{\rm{type\_defn\_cycle\_error}}\,({\rm{gname}}\,({\it{s\/}})\index{gname}, {\it{sn\/}})\index{type\_defn\_cycle\_error} \\ 
{\bf elseif }\=\+{\rm{kind}}\,({\rm{ref\_unit}}\,({\rm{ref}}\,({\rm{gname}}\,({\it{s\/}})\index{gname}, {\it{sn\/}}, {\it{x\/}})\index{ref})\index{ref\_unit})\index{kind} \\ 
$=$$\;\;\;\;${\tt{'}}{\tt{type}}\- \\ 
{\bf then }{\rm{mutual-type\_desc-field\_descs}}\,(\=\+{\tt{'}}{\tt{type\_desc}}, \\ 
{\rm{ref\_unit}}\,({\rm{ref}}\,(\=\+{\rm{gname}}\,({\it{s\/}})\index{gname}, \\ 
{\it{sn\/}}, \\ 
{\it{x\/}})\-\index{ref})\index{ref\_unit}, \\ 
{\rm{ref\_scope}}\,({\rm{ref}}\,(\=\+{\rm{gname}}\,({\it{s\/}})\index{gname}, \\ 
{\it{sn\/}}, \\ 
{\it{x\/}})\-\index{ref})\index{ref\_scope}, \\ 
{\rm{cons}}\,(\=\+{\rm{ref}}\,(\=\+{\rm{gname}}\,({\it{s\/}})\index{gname}, \\ 
{\it{sn\/}}, \\ 
{\it{x\/}})\-\index{ref}, \\ 
{\it{ut\/}})\-, \\ 
{\it{x\/}})\-\index{mutual-type\_desc-field\_descs} \\ 
{\bf elseif }{\rm{errorp}}\,({\rm{ref\_unit}}\,({\rm{ref}}\,({\rm{gname}}\,({\it{s\/}})\index{gname}, {\it{sn\/}}, {\it{x\/}})\index{ref})\index{ref\_unit})\index{errorp} \\ 
{\bf then }{\rm{ref\_unit}}\,({\rm{ref}}\,({\rm{gname}}\,({\it{s\/}})\index{gname}, {\it{sn\/}}, {\it{x\/}})\index{ref})\index{ref\_unit} \\ 
{\bf else }{\rm{not\_type\_error}}\,({\rm{gname}}\,({\it{s\/}})\index{gname}, {\it{sn\/}})\index{not\_type\_error}$\;${\bf  endif}\-$\;${\bf  endcase}\- \\ 
{\bf else }{\rm{not\_type\_error}}\,({\it{s\/}}, {\it{sn\/}})\index{not\_type\_error}$\;${\bf  endif}\- \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{s\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{fields}}, {\tt{'}}{\tt{f}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{fields}}, {\tt{'}}{\tt{f2}})\index{tag}, \\ 
{\tt{'}}{\tt{semi\_colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{similar\_fields}}, {\tt{'}}{\tt{s}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }\=\+{\bf if }{\rm{error\_descp}}\,({\rm{mutual-type\_desc-field\_descs}}\,(\=\+{\tt{'}}{\tt{field\_descs}}, \\ 
{\rm{subtree}}\,({\it{s\/}}, {\tt{'}}{\tt{fields}})\index{subtree}, \\ 
{\it{sn\/}}, \\ 
{\it{ut\/}}, \\ 
{\it{x\/}})\-\index{mutual-type\_desc-field\_descs})\index{error\_descp} \\ 
{\bf then }{\rm{mutual-type\_desc-field\_descs}}\,(\=\+{\tt{'}}{\tt{field\_descs}}, \\ 
{\rm{subtree}}\,({\it{s\/}}, {\tt{'}}{\tt{fields}})\index{subtree}, \\ 
{\it{sn\/}}, \\ 
{\it{ut\/}}, \\ 
{\it{x\/}})\-\index{mutual-type\_desc-field\_descs} \\ 
{\bf elseif }{\rm{error\_descp}}\,({\rm{mutual-type\_desc-field\_descs}}\,(\=\+{\tt{'}}{\tt{field\_descs}}, \\ 
{\rm{subtree}}\,(\=\+{\it{s\/}}, \\ 
{\tt{'}}{\tt{similar\_fields}})\-\index{subtree}, \\ 
{\it{sn\/}}, \\ 
{\it{ut\/}}, \\ 
{\it{x\/}})\-\index{mutual-type\_desc-field\_descs})\index{error\_descp} \\ 
{\bf then }{\rm{mutual-type\_desc-field\_descs}}\,(\=\+{\tt{'}}{\tt{field\_descs}}, \\ 
{\rm{subtree}}\,({\it{s\/}}, {\tt{'}}{\tt{similar\_fields}})\index{subtree}, \\ 
{\it{sn\/}}, \\ 
{\it{ut\/}}, \\ 
{\it{x\/}})\-\index{mutual-type\_desc-field\_descs} \\ 
{\bf else }{\rm{append}}\,(\=\+{\rm{mutual-type\_desc-field\_descs}}\,(\=\+{\tt{'}}{\tt{field\_descs}}, \\ 
{\rm{subtree}}\,(\=\+{\it{s\/}}, \\ 
{\tt{'}}{\tt{fields}})\-\index{subtree}, \\ 
{\it{sn\/}}, \\ 
{\it{ut\/}}, \\ 
{\it{x\/}})\-\index{mutual-type\_desc-field\_descs}, \\ 
{\rm{mutual-type\_desc-field\_descs}}\,(\=\+{\tt{'}}{\tt{field\_descs}}, \\ 
{\rm{subtree}}\,(\=\+{\it{s\/}}, \\ 
{\tt{'}}{\tt{similar\_fields}})\-\index{subtree}, \\ 
{\it{sn\/}}, \\ 
{\it{ut\/}}, \\ 
{\it{x\/}})\-\index{mutual-type\_desc-field\_descs})\-$\;${\bf  endif}\- \\ 
{\bf elseif }{\rm{rule}}\,({\it{s\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{fields}}, {\tt{'}}{\tt{f}})\index{tag}, {\rm{tag}}\,({\tt{'}}{\tt{similar\_fields}}, {\tt{'}}{\tt{s}})\index{tag})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{mutual-type\_desc-field\_descs}}\,(\=\+{\tt{'}}{\tt{field\_descs}}, \\ 
{\rm{subtree}}\,({\it{s\/}}, {\tt{'}}{\tt{similar\_fields}})\index{subtree}, \\ 
{\it{sn\/}}, \\ 
{\it{ut\/}}, \\ 
{\it{x\/}})\-\index{mutual-type\_desc-field\_descs} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{s\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{similar\_fields}}, {\tt{'}}{\tt{s}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{is}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{ft}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }\=\+{\bf if }{\rm{error\_descp}}\,({\rm{mutual-type\_desc-field\_descs}}\,(\=\+{\tt{'}}{\tt{type\_desc}}, \\ 
{\rm{subtree}}\,(\=\+{\it{s\/}}, \\ 
{\tt{'}}{\tt{type\_specification}})\-\index{subtree}, \\ 
{\it{sn\/}}, \\ 
{\it{ut\/}}, \\ 
{\it{x\/}})\-\index{mutual-type\_desc-field\_descs})\index{error\_descp} \\ 
{\bf then }{\rm{mutual-type\_desc-field\_descs}}\,(\=\+{\tt{'}}{\tt{type\_desc}}, \\ 
{\rm{subtree}}\,(\=\+{\it{s\/}}, \\ 
{\tt{'}}{\tt{type\_specification}})\-\index{subtree}, \\ 
{\it{sn\/}}, \\ 
{\it{ut\/}}, \\ 
{\it{x\/}})\-\index{mutual-type\_desc-field\_descs} \\ 
{\bf else }{\rm{pair\_list\_map}}\,(\=\+{\rm{record\_field\_names}}\,({\rm{subtree}}\,(\=\+{\it{s\/}}, \\ 
{\tt{'}}{\tt{identifier\_list}})\-\index{subtree})\index{record\_field\_names}, \\ 
{\rm{ncopies}}\,(\=\+{\rm{length}}\,({\rm{record\_field\_names}}\,({\rm{subtree}}\,(\=\+{\it{s\/}}, \\ 
{\tt{'}}{\tt{identifier\_list}})\-\index{subtree})\index{record\_field\_names})\index{length}, \\ 
{\rm{mutual-type\_desc-field\_descs}}\,(\=\+{\tt{'}}{\tt{type\_desc}}, \\ 
{\rm{subtree}}\,(\=\+{\it{s\/}}, \\ 
{\tt{'}}{\tt{type\_specification}})\-\index{subtree}, \\ 
{\it{sn\/}}, \\ 
{\it{ut\/}}, \\ 
{\it{x\/}})\-\index{mutual-type\_desc-field\_descs})\-\index{ncopies})\-\index{pair\_list\_map}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{not\_record\_fields\_error}}\,({\it{s\/}}, {\it{sn\/}})\index{not\_record\_fields\_error}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{type\_desc} \\  
\=\+{\rm{type\_desc}}\,({\it{s\/}}, {\it{sn\/}}, {\it{ut\/}}, {\it{x\/}})\index{type\_desc} \\ 
$=$$\;\;\;\;${\rm{mutual-type\_desc-field\_descs}}\,({\tt{'}}{\tt{type\_desc}}, {\it{s\/}}, {\it{sn\/}}, {\it{ut\/}}, {\it{x\/}})\index{mutual-type\_desc-field\_descs}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{field\_descs} \\  
\=\+{\rm{field\_descs}}\,({\it{s\/}}, {\it{sn\/}}, {\it{ut\/}}, {\it{x\/}})\index{field\_descs} \\ 
$=$$\;\;\;\;${\rm{mutual-type\_desc-field\_descs}}\,({\tt{'}}{\tt{field\_descs}}, {\it{s\/}}, {\it{sn\/}}, {\it{ut\/}}, {\it{x\/}})\index{mutual-type\_desc-field\_descs}\-
\end{tabbing}

\begin{verbatim}; ****************
;  Literal Values
; ****************

; ----------------
;  Boolean Values
; ----------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{gfalse}$\;\;$
{\sc{gfalse}}\index{gfalse} $=$ {\rm{marked}}\,({\bf{nil}}, {\rm{typed}}\,({\sc{boolean\_desc}}\index{boolean\_desc}, {\tt{0}})\index{typed})\index{marked}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gtrue}$\;\;$
{\sc{gtrue}}\index{gtrue} $=$ {\rm{marked}}\,({\bf{nil}}, {\rm{typed}}\,({\sc{boolean\_desc}}\index{boolean\_desc}, {\tt{1}})\index{typed})\index{marked}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gtruep} \\  
\=\+{\rm{gtruep}}\,({\it{v\/}})\index{gtruep} \\ 
$=$$\;\;\;\;$(\=\+{\rm{determinate}}\,({\it{v\/}})\index{determinate} \\ 
$\wedge$$\;\;\;\;${\rm{truep}}\,({\rm{in\_type}}\,({\sc{boolean\_desc}}\index{boolean\_desc}, {\it{v\/}})\index{in\_type}) \\ 
$\wedge$$\;\;\;\;$({\rm{value}}\,({\it{v\/}})\index{value} $=$ {\rm{value}}\,({\sc{gtrue}}\index{gtrue})\index{value}))\-\-
\end{tabbing}


\begin{verbatim}; ------------------
;  Character Values
; ------------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{gchar} \\  
\=\+{\rm{gchar}}\,({\it{c\/}})\index{gchar} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{character\_valuep}}\,({\it{c\/}})\index{character\_valuep} \\ 
{\bf then }{\rm{marked}}\,({\bf{nil}}, {\rm{typed}}\,({\sc{character\_desc}}\index{character\_desc}, {\rm{cadr}}\,({\rm{lexeme}}\,({\it{c\/}})\index{lexeme}))\index{typed})\index{marked} \\ 
{\bf else }{\rm{marked}}\,({\rm{character\_error}}\,({\it{c\/}})\index{character\_error}, {\rm{default\_value}}\,({\sc{character\_desc}}\index{character\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{verbatim}; --------------------------------
;  Numbers - Integer and Rational
; --------------------------------
 
\end{verbatim}\begin{tabbing}{\sc Definition}:\index{gizero}$\;\;$
{\sc{gizero}}\index{gizero} $=$ {\rm{marked}}\,({\bf{nil}}, {\rm{typed}}\,({\sc{integer\_desc}}\index{integer\_desc}, {\tt{0}})\index{typed})\index{marked}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{grzero} \\  
{\sc{grzero}}\index{grzero} $=$ {\rm{marked}}\,({\bf{nil}}, {\rm{typed}}\,({\sc{rational\_desc}}\index{rational\_desc}, {\rm{rational}}\,({\tt{0}}, {\tt{1}})\index{rational})\index{typed})\index{marked}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gione}$\;\;$
{\sc{gione}}\index{gione} $=$ {\rm{marked}}\,({\bf{nil}}, {\rm{typed}}\,({\sc{integer\_desc}}\index{integer\_desc}, {\tt{1}})\index{typed})\index{marked}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gitwo}$\;\;$
{\sc{gitwo}}\index{gitwo} $=$ {\rm{marked}}\,({\bf{nil}}, {\rm{typed}}\,({\sc{integer\_desc}}\index{integer\_desc}, {\tt{2}})\index{typed})\index{marked}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{char\_digit} \\  
\=\+{\rm{char\_digit}}\,({\it{c\/}})\index{char\_digit} \\ 
$=$$\;\;\;\;$\=\+{\bf if }({\sc{ascii\_0}}\index{ascii\_0} $\leq$ {\it{c\/}}) $\wedge$ ({\it{c\/}} $\leq$ {\sc{ascii\_9}}\index{ascii\_9})$\;\;${\bf then }{\it{c\/}} $-$ {\sc{ascii\_0}}\index{ascii\_0} \\ 
{\bf elseif }({\sc{ascii\_a}}\index{ascii\_a} $\leq$ {\it{c\/}}) $\wedge$ ({\it{c\/}} $\leq$ {\sc{ascii\_f}}\index{ascii\_f}) \\ 
{\bf then }({\it{c\/}} $-$ {\sc{ascii\_a}}\index{ascii\_a}) $+$ {\tt{10}} \\ 
{\bf elseif }({\sc{ascii\_lc\_a}}\index{ascii\_lc\_a} $\leq$ {\it{c\/}}) $\wedge$ ({\it{c\/}} $\leq$ {\sc{ascii\_lc\_f}}\index{ascii\_lc\_f}) \\ 
{\bf then }({\it{c\/}} $-$ {\sc{ascii\_lc\_a}}\index{ascii\_lc\_a}) $+$ {\tt{10}} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{digit\_valid} \\  
\=\+{\rm{digit\_valid}}\,({\it{d\/}}, {\it{b\/}})\index{digit\_valid} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{n\/}}{\bf $\;$ be$\;\;$}{\rm{char\_digit}}\,({\it{d\/}})\index{char\_digit}\- \\ 
{\bf in} \\ 
({\it{n\/}} $\in\;${\bf{N}}${}$) $\wedge$ ({\tt{0}} $\leq$ {\it{n\/}}) $\wedge$ ({\it{n\/}} $<$ {\it{b\/}})$\;${\bf  endlet}\-\-
\end{tabbing}


\noindent{\sc Event}:   Disable digit\_valid.

\addvspace{18pt}

\noindent{\sc Event}:   Disable char\_digit.

\addvspace{18pt}

\begin{tabbing}{\sc Definition}:\index{digit\_value} \\  
\=\+{\rm{digit\_value}}\,({\it{s\/}}, {\it{b\/}})\index{digit\_value} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{s\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\tt{0}} \\ 
{\bf elseif }{\rm{digit\_value}}\,({\rm{rcdr}}\,({\it{s\/}})\index{rcdr}, {\it{b\/}})\index{digit\_value} $=$ {\tt{'}}{\tt{ind}}$\;\;${\bf then }{\tt{'}}{\tt{ind}} \\ 
{\bf elseif }{\rm{digit\_valid}}\,({\rm{rcar}}\,({\it{s\/}})\index{rcar}, {\it{b\/}})\index{digit\_valid} \\ 
{\bf then }({\rm{digit\_value}}\,({\rm{rcdr}}\,({\it{s\/}})\index{rcdr}, {\it{b\/}})\index{digit\_value} $*$ {\it{b\/}}) $+$ {\rm{char\_digit}}\,({\rm{rcar}}\,({\it{s\/}})\index{rcar})\index{char\_digit} \\ 
{\bf else }{\tt{'}}{\tt{ind}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{tdigit\_value} \\  
\=\+{\rm{tdigit\_value}}\,({\it{s\/}}, {\it{b\/}})\index{tdigit\_value} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{digit\_listp}}\,({\it{s\/}})\index{digit\_listp}$\;\;${\bf then }{\rm{digit\_value}}\,({\rm{lexeme}}\,({\it{s\/}})\index{lexeme}, {\it{b\/}})\index{digit\_value} \\ 
{\bf else }{\tt{'}}{\tt{ind}}$\;${\bf  endif}\-\-
\end{tabbing}



\begin{tabbing}{\sc Definition}:\index{mdigit\_value} \\  
\=\+{\rm{mdigit\_value}}\,({\it{s\/}}, {\it{b\/}})\index{mdigit\_value} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{tdigit\_value}}\,({\it{s\/}}, {\it{b\/}})\index{tdigit\_value} $=$ {\tt{'}}{\tt{ind}} \\ 
{\bf then }{\rm{marked}}\,({\rm{number\_error}}\,({\it{s\/}}, {\it{b\/}})\index{number\_error}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked} \\ 
{\bf else }{\rm{marked}}\,({\bf{nil}}, {\rm{typed}}\,({\sc{integer\_desc}}\index{integer\_desc}, {\rm{tdigit\_value}}\,({\it{s\/}}, {\it{b\/}})\index{tdigit\_value})\index{typed})\index{marked}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{minteger} \\  
\=\+{\rm{minteger}}\,({\it{i\/}})\index{minteger} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,({\it{i\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{number}}, {\tt{'}}{\tt{n}})\index{tag}, {\rm{tag}}\,({\tt{'}}{\tt{digit\_list}}, {\tt{'}}{\tt{s}})\index{tag})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{mdigit\_value}}\,({\rm{subtree}}\,({\it{i\/}}, {\tt{'}}{\tt{digit\_list}})\index{subtree}, {\tt{10}})\index{mdigit\_value} \\ 
{\bf elseif }{\rm{digit\_listp}}\,({\it{i\/}})\index{digit\_listp}$\;\;${\bf then }{\rm{mdigit\_value}}\,({\it{i\/}}, {\tt{10}})\index{mdigit\_value} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{i\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{number}}, {\tt{'}}{\tt{n}})\index{tag}, \\ 
{\rm{list}}\,({\rm{tag}}\,({\tt{'}}{\tt{base}}, {\tt{'}}{\tt{b}})\index{tag}, {\rm{tag}}\,({\tt{'}}{\tt{digit\_list}}, {\tt{'}}{\tt{s}})\index{tag}))\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{mdigit\_value}}\,({\rm{subtree}}\,({\it{i\/}}, {\tt{'}}{\tt{digit\_list}})\index{subtree}, {\rm{ibase}}\,({\rm{subtree}}\,({\it{i\/}}, {\tt{'}}{\tt{base}})\index{subtree})\index{ibase})\index{mdigit\_value} \\ 
{\bf else }{\rm{marked}}\,({\rm{number\_error}}\,({\it{i\/}}, {\tt{10}})\index{number\_error}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{verbatim}; ---------------
;  String Values
; ---------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{string\_char\_seq} \\  
\=\+{\rm{string\_char\_seq}}\,({\it{s\/}})\index{string\_char\_seq} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{s\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf elseif }{\rm{car}}\,({\it{s\/}}) $=$ {\sc{ascii\_double\_quote}}\index{ascii\_double\_quote} \\ 
{\bf then }{\rm{cons}}\,({\rm{car}}\,({\it{s\/}}), {\rm{string\_char\_seq}}\,({\rm{cddr}}\,({\it{s\/}}))\index{string\_char\_seq}) \\ 
{\bf else }{\rm{cons}}\,({\rm{car}}\,({\it{s\/}}), {\rm{string\_char\_seq}}\,({\rm{cdr}}\,({\it{s\/}}))\index{string\_char\_seq})$\;${\bf  endif}\-\-
\end{tabbing}
	  
\begin{tabbing}{\sc Definition}:\index{gstring\_seq} \\  
\=\+{\rm{gstring\_seq}}\,({\it{s\/}})\index{gstring\_seq} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{string\_valuep}}\,({\it{s\/}})\index{string\_valuep} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\rm{sequence\_desc}}\,({\bf{nil}}, {\sc{character\_desc}}\index{character\_desc})\index{sequence\_desc}, \\ 
{\rm{string\_char\_seq}}\,({\rm{rcdr}}\,({\rm{cdr}}\,({\rm{lexeme}}\,({\it{s\/}})\index{lexeme}))\index{rcdr})\index{string\_char\_seq})\-\index{typed})\-\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{bad\_string\_error}}\,({\it{s\/}})\index{bad\_string\_error}, \\ 
{\rm{default\_value}}\,({\rm{sequence\_desc}}\,({\bf{nil}}, {\sc{character\_desc}}\index{character\_desc})\index{sequence\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\-\-
\end{tabbing}



\begin{verbatim}; ***************************************
;  Arguments to Functions and Operations
; ***************************************

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{in\_arg\_type} \\  
\=\+{\rm{in\_arg\_type}}\,({\it{td\/}}, {\it{a\/}})\index{in\_arg\_type} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{td\/}} $=$ {\tt{'}}{\tt{field\_name}} \\ 
{\bf then }({\rm{mark}}\,({\it{a\/}})\index{mark} $=$ {\it{td\/}}) $\wedge$ {\rm{litatom}}\,({\rm{unmark}}\,({\it{a\/}})\index{unmark}) \\ 
{\bf elseif }{\it{td\/}} $=$ {\tt{'}}{\tt{type\_descriptor}} \\ 
{\bf then }({\rm{mark}}\,({\it{a\/}})\index{mark} $=$ {\it{td\/}}) $\wedge$ {\rm{type\_descp}}\,({\rm{unmark}}\,({\it{a\/}})\index{unmark})\index{type\_descp} \\ 
{\bf else }{\rm{in\_type}}\,({\it{td\/}}, {\it{a\/}})\index{in\_type}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{arg\_check} \\  
\=\+{\rm{arg\_check}}\,({\it{as\/}}, {\it{ts\/}})\index{arg\_check} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{as\/}} $\simeq\;${{\bf{nil}}}${}$ \\ 
{\bf then }\=\+{\bf if }{\it{ts\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf else }{\rm{mk\_error}}\,({\tt{'}}{\tt{(}}\=\+{\tt{number}}{\tt{ }}{\tt{of}}{\tt{ }}{\tt{formal}}{\tt{ }}{\tt{and}}{\tt{ }}{\tt{actual}} \\ 
{\tt{parameters}}{\tt{ }}{\tt{not}}{\tt{ }}{\tt{equal}}{\tt{)}}\-)\index{mk\_error}$\;${\bf  endif}\- \\ 
{\bf elseif }{\it{ts\/}} $\simeq\;${{\bf{nil}}}${}$ \\ 
{\bf then }{\rm{mk\_error}}\,({\tt{'}}{\tt{(}}\=\+{\tt{number}}{\tt{ }}{\tt{of}}{\tt{ }}{\tt{formal}}{\tt{ }}{\tt{and}}{\tt{ }}{\tt{actual}}{\tt{ }}{\tt{parameters}} \\ 
{\tt{not}}{\tt{ }}{\tt{equal}}{\tt{)}}\-)\index{mk\_error} \\ 
{\bf elseif }{\rm{indeterminate}}\,({\rm{car}}\,({\it{as\/}}))\index{indeterminate}$\;\;${\bf then }{\rm{mark}}\,({\rm{car}}\,({\it{as\/}}))\index{mark} \\ 
{\bf else }\=\+{\bf let }\=\+{\it{r\/}}{\bf $\;$ be$\;\;$}{\rm{in\_arg\_type}}\,({\rm{car}}\,({\it{ts\/}}), {\rm{car}}\,({\it{as\/}}))\index{in\_arg\_type}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{truep}}\,({\it{r\/}})$\;\;${\bf then }{\rm{arg\_check}}\,({\rm{cdr}}\,({\it{as\/}}), {\rm{cdr}}\,({\it{ts\/}}))\index{arg\_check} \\ 
{\bf elseif }{\rm{errorp}}\,({\it{r\/}})\index{errorp}$\;\;${\bf then }{\it{r\/}} \\ 
{\bf else }{\rm{actual\_formal\_type\_error}}\,({\rm{car}}\,({\it{as\/}}), {\rm{car}}\,({\it{ts\/}}))\index{actual\_formal\_type\_error}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endif}\-\-
\end{tabbing}



\begin{verbatim}; ******************
;  Gypsy Operations
; ******************

; ---------------------
;  Component Selection
; ---------------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{array\_get} \\  
\=\+{\rm{array\_get}}\,({\it{a\/}}, {\it{i\/}}, {\it{td\/}})\index{array\_get} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\rm{list}}\,({\it{a\/}}, {\it{i\/}}), {\rm{list}}\,({\it{td\/}}, {\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td}))\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{array\_descp}}\,({\it{td\/}})\index{array\_descp} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\rm{component\_td}}\,({\it{td\/}})\index{component\_td}, \\ 
{\rm{vselect}}\,({\rm{value}}\,({\it{a\/}})\index{value}, {\rm{value}}\,({\it{i\/}})\index{value}, {\it{td\/}})\index{vselect})\-\index{typed})\-\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{not\_array\_error}}\,({\it{a\/}})\index{not\_array\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mapping\_get} \\  
\=\+{\rm{mapping\_get}}\,({\it{m\/}}, {\it{d\/}}, {\it{td\/}})\index{mapping\_get} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\rm{list}}\,({\it{m\/}}, {\it{d\/}}), {\rm{list}}\,({\it{td\/}}, {\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td}))\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{mapping\_descp}}\,({\it{td\/}})\index{mapping\_descp} \\ 
{\bf then }\=\+{\bf let }\=\+{\it{v\/}}{\bf $\;$ be$\;\;$}{\rm{vselect}}\,({\rm{value}}\,({\it{m\/}})\index{value}, {\rm{value}}\,({\it{d\/}})\index{value}, {\it{td\/}})\index{vselect}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{errorp}}\,({\it{v\/}})\index{errorp} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\rm{no\_such\_component\_error}}\,({\it{m\/}}, {\it{d\/}})\index{no\_such\_component\_error}, \\ 
{\rm{default\_value}}\,({\rm{component\_td}}\,({\it{td\/}})\index{component\_td})\index{default\_value})\-\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,({\rm{component\_td}}\,({\it{td\/}})\index{component\_td}, {\it{v\/}})\index{typed})\-\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\- \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{not\_mapping\_error}}\,({\it{m\/}})\index{not\_mapping\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{record\_get} \\  
\=\+{\rm{record\_get}}\,({\it{r\/}}, {\it{fn\/}}, {\it{td\/}})\index{record\_get} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\rm{list}}\,({\it{r\/}}, {\it{fn\/}}), {\rm{list}}\,({\it{td\/}}, {\tt{'}}{\tt{field\_name}}))\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{record\_descp}}\,({\it{td\/}})\index{record\_descp} \\ 
{\bf then }\=\+{\bf let }\=\+{\it{fd\/}}{\bf $\;$ be$\;\;$}{\rm{field\_td}}\,({\rm{unmark}}\,({\it{fn\/}})\index{unmark}, {\it{td\/}})\index{field\_td}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{fd\/}} $=$ {\bf{nil}} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\rm{no\_such\_field\_error}}\,({\it{r\/}}, {\rm{unmark}}\,({\it{fn\/}})\index{unmark})\index{no\_such\_field\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\it{fd\/}}, \\ 
{\rm{fselect}}\,(\=\+{\rm{value}}\,({\it{r\/}})\index{value}, \\ 
{\rm{unmark}}\,({\it{fn\/}})\index{unmark})\-\index{fselect})\-\index{typed})\-\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\- \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{not\_record\_error}}\,({\it{r\/}})\index{not\_record\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{sequence\_get} \\  
\=\+{\rm{sequence\_get}}\,({\it{s\/}}, {\it{i\/}}, {\it{td\/}})\index{sequence\_get} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\rm{list}}\,({\it{s\/}}, {\it{i\/}}), {\rm{list}}\,({\it{td\/}}, {\sc{integer\_desc}}\index{integer\_desc}))\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{sequence\_descp}}\,({\it{td\/}})\index{sequence\_descp} \\ 
{\bf then }\=\+{\bf let }\=\+{\it{v\/}}{\bf $\;$ be$\;\;$}{\rm{vselect}}\,({\rm{value}}\,({\it{s\/}})\index{value}, {\rm{value}}\,({\it{i\/}})\index{value}, {\it{td\/}})\index{vselect}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{errorp}}\,({\it{v\/}})\index{errorp} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\rm{no\_such\_component\_error}}\,({\it{s\/}}, {\it{i\/}})\index{no\_such\_component\_error}, \\ 
{\rm{default\_value}}\,({\rm{component\_td}}\,({\it{td\/}})\index{component\_td})\index{default\_value})\-\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,({\rm{component\_td}}\,({\it{td\/}})\index{component\_td}, {\it{v\/}})\index{typed})\-\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\- \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{not\_sequence\_error}}\,({\it{s\/}})\index{not\_sequence\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}


\noindent{\sc Event}:   Disable type.

\addvspace{18pt}

\noindent{\sc Event}:   Disable array\_get.

\addvspace{18pt}

\noindent{\sc Event}:   Disable record\_get.

\addvspace{18pt}

\noindent{\sc Event}:   Disable mapping\_get.

\addvspace{18pt}

\noindent{\sc Event}:   Disable sequence\_get.

\addvspace{18pt}

\noindent{\sc Event}:   Disable not\_selectable\_error.

\addvspace{18pt}

\noindent{\sc Event}:   Disable default\_value.

\addvspace{18pt}

\begin{tabbing}{\sc Definition}:\index{select\_op} \\  
\=\+{\rm{select\_op}}\,({\it{v\/}}, {\it{s\/}})\index{select\_op} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{s\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\it{v\/}} \\ 
{\bf else }\=\+{\bf case on }{\rm{root}}\,({\rm{type}}\,({\it{v\/}})\index{type})\index{root}: \\ 
{\bf case = }{\it{array\/}} \\ 
{\bf then }{\rm{select\_op}}\,({\rm{array\_get}}\,({\it{v\/}}, {\rm{car}}\,({\it{s\/}}), {\rm{type}}\,({\it{v\/}})\index{type})\index{array\_get}, {\rm{cdr}}\,({\it{s\/}}))\index{select\_op} \\ 
{\bf case = }{\it{record\/}} \\ 
{\bf $\;\;$then }{\rm{select\_op}}\,({\rm{record\_get}}\,({\it{v\/}}, {\rm{car}}\,({\it{s\/}}), {\rm{type}}\,({\it{v\/}})\index{type})\index{record\_get}, {\rm{cdr}}\,({\it{s\/}}))\index{select\_op} \\ 
{\bf case = }{\it{mapping\/}} \\ 
{\bf $\;\;$then }{\rm{select\_op}}\,({\rm{mapping\_get}}\,({\it{v\/}}, {\rm{car}}\,({\it{s\/}}), {\rm{type}}\,({\it{v\/}})\index{type})\index{mapping\_get}, {\rm{cdr}}\,({\it{s\/}}))\index{select\_op} \\ 
{\bf case = }{\it{sequence\/}} \\ 
{\bf $\;\;$then }{\rm{select\_op}}\,({\rm{sequence\_get}}\,({\it{v\/}}, {\rm{car}}\,({\it{s\/}}), {\rm{type}}\,({\it{v\/}})\index{type})\index{sequence\_get}, {\rm{cdr}}\,({\it{s\/}}))\index{select\_op} \\ 
{\bf otherwise }{\rm{marked}}\,(\=\+{\rm{not\_selectable\_error}}\,({\it{v\/}})\index{not\_selectable\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endcase}\-$\;${\bf  endif}\-\-
\end{tabbing}



\begin{verbatim}; ---------------------------
;  Sequence/Set Constructors
; ---------------------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{gseq} \\  
\=\+{\rm{gseq}}\,({\it{es\/}}, {\it{td\/}})\index{gseq} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\it{es\/}}, {\rm{ncopies}}\,({\rm{length}}\,({\it{es\/}})\index{length}, {\it{td\/}})\index{ncopies})\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }{\rm{marked}}\,({\bf{nil}}, {\rm{typed}}\,({\rm{sequence\_desc}}\,({\bf{nil}}, {\it{td\/}})\index{sequence\_desc}, {\rm{values}}\,({\it{es\/}})\index{values})\index{typed})\index{marked} \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gset} \\  
\=\+{\rm{gset}}\,({\it{es\/}}, {\it{td\/}})\index{gset} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\it{es\/}}, {\rm{ncopies}}\,({\rm{length}}\,({\it{es\/}})\index{length}, {\it{td\/}})\index{ncopies})\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }{\rm{marked}}\,({\bf{nil}}, {\rm{typed}}\,({\rm{set\_desc}}\,({\bf{nil}}, {\it{td\/}})\index{set\_desc}, {\rm{vset}}\,({\rm{values}}\,({\it{es\/}})\index{values}, {\it{td\/}})\index{vset})\index{typed})\index{marked} \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{grange\_elements} \\  
\=\+{\rm{grange\_elements}}\,({\it{lo\/}}, {\it{hi\/}})\index{grange\_elements} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,(\=\+{\rm{list}}\,({\it{lo\/}}, {\it{hi\/}}), \\ 
{\rm{list}}\,(\=\+{\rm{base\_type}}\,({\rm{type}}\,({\it{lo\/}})\index{type})\index{base\_type}, \\ 
{\rm{base\_type}}\,({\rm{type}}\,({\it{lo\/}})\index{type})\index{base\_type})\-)\-\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{non\_rational\_simple\_typep}}\,({\rm{type}}\,({\it{lo\/}})\index{type})\index{non\_rational\_simple\_typep} \\ 
{\bf then }{\rm{marked\_typed\_list}}\,(\=\+{\rm{base\_type}}\,({\rm{type}}\,({\it{lo\/}})\index{type})\index{base\_type}, \\ 
{\rm{number\_list}}\,({\rm{value}}\,({\it{lo\/}})\index{value}, {\rm{value}}\,({\it{hi\/}})\index{value})\index{number\_list})\-\index{marked\_typed\_list} \\ 
{\bf else }{\rm{list}}\,({\rm{marked}}\,(\=\+{\rm{range\_limits\_error}}\,({\it{lo\/}}, {\it{hi\/}})\index{range\_limits\_error}, \\ 
{\rm{default\_value}}\,({\rm{base\_type}}\,({\rm{type}}\,({\it{lo\/}})\index{type})\index{base\_type})\index{default\_value})\-\index{marked})$\;${\bf  endif}\- \\ 
{\bf else }{\rm{list}}\,({\rm{marked}}\,(\=\+{\it{arg\_err\/}}, \\ 
{\rm{default\_value}}\,({\rm{base\_type}}\,({\rm{type}}\,({\it{lo\/}})\index{type})\index{base\_type})\index{default\_value})\-\index{marked})$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gset\_or\_seq} \\  
\=\+{\rm{gset\_or\_seq}}\,({\it{m\/}}, {\it{a\/}}, {\it{td\/}})\index{gset\_or\_seq} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,({\it{m\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{set\_or\_seq\_mark}}, {\tt{'}}{\tt{m}})\index{tag}, {\rm{list}}\,({\tt{'}}{\tt{set}}, {\tt{'}}{\tt{colon}}))\index{prodn})\index{rule} \\ 
{\bf then }{\rm{gset}}\,({\it{a\/}}, {\it{td\/}})\index{gset} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{m\/}}, \\ 
{\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{set\_or\_seq\_mark}}, {\tt{'}}{\tt{m}})\index{tag}, {\rm{list}}\,({\tt{'}}{\tt{seq}}, {\tt{'}}{\tt{colon}}))\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{gseq}}\,({\it{a\/}}, {\it{td\/}})\index{gseq} \\ 
{\bf else }{\rm{gseq}}\,({\it{a\/}}, {\it{td\/}})\index{gseq}$\;${\bf  endif}\-\-
\end{tabbing}



\begin{verbatim}; ------------------------------------
;  Interface to Boyer-Moore Functions
; ------------------------------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{t\_or\_f} \\  
\=\+{\rm{t\_or\_f}}\,({\it{x\/}})\index{t\_or\_f} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\bf{f}} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{band}$\;\;$
{\rm{band}}\,({\it{x\/}}, {\it{y\/}})\index{band} $=$ ({\rm{t\_or\_f}}\,({\it{x\/}})\index{t\_or\_f} $\wedge$ {\rm{t\_or\_f}}\,({\it{y\/}})\index{t\_or\_f})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{bimp}$\;\;$
{\rm{bimp}}\,({\it{x\/}}, {\it{y\/}})\index{bimp} $=$ ({\rm{t\_or\_f}}\,({\it{x\/}})\index{t\_or\_f} $\rightarrow$ {\rm{t\_or\_f}}\,({\it{y\/}})\index{t\_or\_f})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{bnot}$\;\;$
{\rm{bnot}}\,({\it{x\/}})\index{bnot} $=$ ($\neg$ {\rm{t\_or\_f}}\,({\it{x\/}})\index{t\_or\_f})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{bor}$\;\;$
{\rm{bor}}\,({\it{x\/}}, {\it{y\/}})\index{bor} $=$ ({\rm{t\_or\_f}}\,({\it{x\/}})\index{t\_or\_f} $\vee$ {\rm{t\_or\_f}}\,({\it{y\/}})\index{t\_or\_f})
\end{tabbing}


\begin{verbatim}; -----------------
;  Unary Operators
; -----------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{gminus} \\  
\=\+{\rm{gminus}}\,({\it{u\/}})\index{gminus} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{iarg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\rm{list}}\,({\it{u\/}}), {\rm{list}}\,({\sc{integer\_desc}}\index{integer\_desc}))\index{arg\_check}, \\ 
{\it{rarg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\rm{list}}\,({\it{u\/}}), {\rm{list}}\,({\sc{rational\_desc}}\index{rational\_desc}))\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{iarg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }{\rm{marked}}\,({\bf{nil}}, {\rm{typed}}\,({\sc{integer\_desc}}\index{integer\_desc}, {\rm{ineg}}\,({\rm{value}}\,({\it{u\/}})\index{value})\index{ineg})\index{typed})\index{marked} \\ 
{\bf elseif }{\it{rarg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }{\rm{marked}}\,({\bf{nil}}, {\rm{typed}}\,({\sc{rational\_desc}}\index{rational\_desc}, {\rm{rneg}}\,({\rm{value}}\,({\it{u\/}})\index{value})\index{rneg})\index{typed})\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{mk\_error}}\,({\rm{list}}\,({\it{iarg\_err\/}}, {\it{rarg\_err\/}}))\index{mk\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gnot} \\  
\=\+{\rm{gnot}}\,({\it{u\/}})\index{gnot} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\rm{list}}\,({\it{u\/}}), {\rm{list}}\,({\sc{boolean\_desc}}\index{boolean\_desc}))\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{bnot}}\,({\rm{value}}\,({\it{u\/}})\index{value})\index{bnot}$\;\;${\bf then }{\sc{gtrue}}\index{gtrue} \\ 
{\bf else }{\sc{gfalse}}\index{gfalse}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{boolean\_desc}}\index{boolean\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{apply\_unary\_op} \\  
\=\+{\rm{apply\_unary\_op}}\,({\it{op\/}}, {\it{v\/}})\index{apply\_unary\_op} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{unary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{minus}})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{gminus}}\,({\it{v\/}})\index{gminus} \\ 
{\bf elseif }{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{unary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{not}})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{gnot}}\,({\it{v\/}})\index{gnot} \\ 
{\bf else }{\rm{marked}}\,({\rm{not\_unary\_op\_error}}\,({\it{op\/}})\index{not\_unary\_op\_error}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{verbatim}; ------------------
;  Binary Operators
; ------------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{gequal} \\  
\=\+{\rm{gequal}}\,({\it{v1\/}}, {\it{v2\/}})\index{gequal} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{equality\_typep}}\,({\rm{type}}\,({\it{v1\/}})\index{type})\index{equality\_typep} \\ 
{\bf then }\=\+{\bf let }\=\+{\it{td\/}}{\bf $\;$ be$\;\;$}{\rm{base\_type}}\,({\rm{type}}\,({\it{v1\/}})\index{type})\index{base\_type}\- \\ 
{\bf in} \\ 
\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\rm{list}}\,({\it{v1\/}}, {\it{v2\/}}), {\rm{list}}\,({\it{td\/}}, {\it{td\/}}))\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{vequal}}\,({\rm{value}}\,({\it{v1\/}})\index{value}, {\rm{value}}\,({\it{v2\/}})\index{value}, {\it{td\/}})\index{vequal}$\;\;${\bf then }{\sc{gtrue}}\index{gtrue} \\ 
{\bf else }{\sc{gfalse}}\index{gfalse}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,(\=\+{\it{arg\_err\/}}, \\ 
{\rm{default\_value}}\,({\sc{boolean\_desc}}\index{boolean\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endlet}\- \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{not\_equality\_type\_error}}\,({\rm{type}}\,({\it{v1\/}})\index{type})\index{not\_equality\_type\_error}, \\ 
{\rm{default\_value}}\,({\sc{boolean\_desc}}\index{boolean\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gne}$\;\;$
{\rm{gne}}\,({\it{v1\/}}, {\it{v2\/}})\index{gne} $=$ {\rm{gnot}}\,({\rm{gequal}}\,({\it{v1\/}}, {\it{v2\/}})\index{gequal})\index{gnot}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{glt} \\  
\=\+{\rm{glt}}\,({\it{v1\/}}, {\it{v2\/}})\index{glt} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{td\/}}{\bf $\;$ be$\;\;$}{\rm{base\_type}}\,({\rm{type}}\,({\it{v1\/}})\index{type})\index{base\_type}\- \\ 
{\bf in} \\ 
\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\rm{list}}\,({\it{v1\/}}, {\it{v2\/}}), {\rm{list}}\,({\it{td\/}}, {\it{td\/}}))\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{simple\_typep}}\,({\it{td\/}})\index{simple\_typep} \\ 
{\bf then }\=\+{\bf let }\=\+{\it{r\/}}{\bf $\;$ be$\;\;$}\=\+{\bf if }{\rm{root}}\,({\it{td\/}})\index{root} $=$ {\tt{'}}{\tt{rational}} \\ 
{\bf then }{\rm{rlessp}}\,({\rm{value}}\,({\it{v1\/}})\index{value}, {\rm{value}}\,({\it{v2\/}})\index{value})\index{rlessp} \\ 
{\bf else }{\rm{ilessp}}\,(\=\+{\rm{value}}\,({\it{v1\/}})\index{value}, \\ 
{\rm{value}}\,({\it{v2\/}})\index{value})\-\index{ilessp}$\;${\bf  endif}\-\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{truep}}\,({\it{r\/}})$\;\;${\bf then }{\sc{gtrue}}\index{gtrue} \\ 
{\bf else }{\sc{gfalse}}\index{gfalse}$\;${\bf  endif}\-$\;${\bf  endlet}\- \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{not\_defined\_on\_type\_error}}\,(\=\+{\tt{'}}{\tt{lt}}, \\ 
{\rm{type}}\,({\it{v1\/}})\index{type})\-\index{not\_defined\_on\_type\_error}, \\ 
{\rm{default\_value}}\,({\sc{boolean\_desc}}\index{boolean\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{boolean\_desc}}\index{boolean\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gor} \\  
\=\+{\rm{gor}}\,({\it{v1\/}}, {\it{v2\/}})\index{gor} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,(\=\+{\rm{list}}\,({\it{v1\/}}, {\it{v2\/}}), \\ 
{\rm{list}}\,({\sc{boolean\_desc}}\index{boolean\_desc}, {\sc{boolean\_desc}}\index{boolean\_desc}))\-\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{bor}}\,({\rm{value}}\,({\it{v1\/}})\index{value}, {\rm{value}}\,({\it{v2\/}})\index{value})\index{bor}$\;\;${\bf then }{\sc{gtrue}}\index{gtrue} \\ 
{\bf else }{\sc{gfalse}}\index{gfalse}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{boolean\_desc}}\index{boolean\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gle}$\;\;$
{\rm{gle}}\,({\it{v1\/}}, {\it{v2\/}})\index{gle} $=$ {\rm{gor}}\,({\rm{glt}}\,({\it{v1\/}}, {\it{v2\/}})\index{glt}, {\rm{gequal}}\,({\it{v1\/}}, {\it{v2\/}})\index{gequal})\index{gor}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{ggt}$\;\;$
{\rm{ggt}}\,({\it{v1\/}}, {\it{v2\/}})\index{ggt} $=$ {\rm{glt}}\,({\it{v2\/}}, {\it{v1\/}})\index{glt}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gge}$\;\;$
{\rm{gge}}\,({\it{v1\/}}, {\it{v2\/}})\index{gge} $=$ {\rm{gor}}\,({\rm{ggt}}\,({\it{v1\/}}, {\it{v2\/}})\index{ggt}, {\rm{gequal}}\,({\it{v1\/}}, {\it{v2\/}})\index{gequal})\index{gor}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gand} \\  
\=\+{\rm{gand}}\,({\it{v1\/}}, {\it{v2\/}})\index{gand} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,(\=\+{\rm{list}}\,({\it{v1\/}}, {\it{v2\/}}), \\ 
{\rm{list}}\,({\sc{boolean\_desc}}\index{boolean\_desc}, {\sc{boolean\_desc}}\index{boolean\_desc}))\-\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{band}}\,({\rm{value}}\,({\it{v1\/}})\index{value}, {\rm{value}}\,({\it{v2\/}})\index{value})\index{band}$\;\;${\bf then }{\sc{gtrue}}\index{gtrue} \\ 
{\bf else }{\sc{gfalse}}\index{gfalse}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{boolean\_desc}}\index{boolean\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}
  
\begin{tabbing}{\sc Definition}:\index{gimp} \\  
\=\+{\rm{gimp}}\,({\it{v1\/}}, {\it{v2\/}})\index{gimp} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,(\=\+{\rm{list}}\,({\it{v1\/}}, {\it{v2\/}}), \\ 
{\rm{list}}\,({\sc{boolean\_desc}}\index{boolean\_desc}, {\sc{boolean\_desc}}\index{boolean\_desc}))\-\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{bimp}}\,({\rm{value}}\,({\it{v1\/}})\index{value}, {\rm{value}}\,({\it{v2\/}})\index{value})\index{bimp}$\;\;${\bf then }{\sc{gtrue}}\index{gtrue} \\ 
{\bf else }{\sc{gfalse}}\index{gfalse}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{boolean\_desc}}\index{boolean\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{giff} \\  
\=\+{\rm{giff}}\,({\it{v1\/}}, {\it{v2\/}})\index{giff} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,(\=\+{\rm{list}}\,({\it{v1\/}}, {\it{v2\/}}), \\ 
{\rm{list}}\,({\sc{boolean\_desc}}\index{boolean\_desc}, {\sc{boolean\_desc}}\index{boolean\_desc}))\-\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}}$\;\;${\bf then }{\rm{gequal}}\,({\it{v1\/}}, {\it{v2\/}})\index{gequal} \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{boolean\_desc}}\index{boolean\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gpower} \\  
\=\+{\rm{gpower}}\,({\it{v1\/}}, {\it{v2\/}})\index{gpower} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{iarg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,(\=\+{\rm{list}}\,({\it{v1\/}}, {\it{v2\/}}), \\ 
{\rm{list}}\,({\sc{integer\_desc}}\index{integer\_desc}, {\sc{integer\_desc}}\index{integer\_desc}))\-\index{arg\_check}, \\ 
{\it{rarg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,(\=\+{\rm{list}}\,({\it{v1\/}}, {\it{v2\/}}), \\ 
{\rm{list}}\,({\sc{rational\_desc}}\index{rational\_desc}, {\sc{integer\_desc}}\index{integer\_desc}))\-\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{iarg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{gtruep}}\,({\rm{glt}}\,({\it{v2\/}}, {\sc{gizero}}\index{gizero})\index{glt})\index{gtruep} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\sc{negative\_exponent\_error}}\index{negative\_exponent\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked} \\ 
{\bf elseif }{\rm{gtruep}}\,({\rm{gand}}\,({\rm{gequal}}\,({\it{v1\/}}, {\sc{gizero}}\index{gizero})\index{gequal}, {\rm{gequal}}\,({\it{v2\/}}, {\sc{gizero}}\index{gizero})\index{gequal})\index{gand})\index{gtruep} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\sc{zero\_to\_the\_zero\_power\_error}}\index{zero\_to\_the\_zero\_power\_err!or}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\sc{integer\_desc}}\index{integer\_desc}, \\ 
{\rm{ipower}}\,({\rm{value}}\,({\it{v1\/}})\index{value}, {\rm{value}}\,({\it{v2\/}})\index{value})\index{ipower})\-\index{typed})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf elseif }{\it{rarg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{gtruep}}\,({\rm{glt}}\,({\it{v2\/}}, {\sc{gizero}}\index{gizero})\index{glt})\index{gtruep} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\sc{negative\_exponent\_error}}\index{negative\_exponent\_error}, \\ 
{\rm{default\_value}}\,({\sc{rational\_desc}}\index{rational\_desc})\index{default\_value})\-\index{marked} \\ 
{\bf elseif }{\rm{gtruep}}\,({\rm{gand}}\,({\rm{gequal}}\,({\it{v1\/}}, {\sc{grzero}}\index{grzero})\index{gequal}, {\rm{gequal}}\,({\it{v2\/}}, {\sc{gizero}}\index{gizero})\index{gequal})\index{gand})\index{gtruep} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\sc{zero\_to\_the\_zero\_power\_error}}\index{zero\_to\_the\_zero\_power\_err!or}, \\ 
{\rm{default\_value}}\,({\sc{rational\_desc}}\index{rational\_desc})\index{default\_value})\-\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\sc{rational\_desc}}\index{rational\_desc}, \\ 
{\rm{rpower}}\,({\rm{value}}\,({\it{v1\/}})\index{value}, {\rm{value}}\,({\it{v2\/}})\index{value})\index{rpower})\-\index{typed})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{mk\_error}}\,({\rm{list}}\,({\it{iarg\_err\/}}, {\it{rarg\_err\/}}))\index{mk\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gtimes} \\  
\=\+{\rm{gtimes}}\,({\it{v1\/}}, {\it{v2\/}})\index{gtimes} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{iarg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,(\=\+{\rm{list}}\,({\it{v1\/}}, {\it{v2\/}}), \\ 
{\rm{list}}\,({\sc{integer\_desc}}\index{integer\_desc}, {\sc{integer\_desc}}\index{integer\_desc}))\-\index{arg\_check}, \\ 
{\it{rarg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,(\=\+{\rm{list}}\,({\it{v1\/}}, {\it{v2\/}}), \\ 
{\rm{list}}\,({\sc{rational\_desc}}\index{rational\_desc}, {\sc{rational\_desc}}\index{rational\_desc}))\-\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{iarg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,({\sc{integer\_desc}}\index{integer\_desc}, {\rm{itimes}}\,({\rm{value}}\,({\it{v1\/}})\index{value}, {\rm{value}}\,({\it{v2\/}})\index{value})\index{itimes})\index{typed})\-\index{marked} \\ 
{\bf elseif }{\it{rarg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,({\sc{rational\_desc}}\index{rational\_desc}, {\rm{rtimes}}\,({\rm{value}}\,({\it{v1\/}})\index{value}, {\rm{value}}\,({\it{v2\/}})\index{value})\index{rtimes})\index{typed})\-\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{mk\_error}}\,({\rm{list}}\,({\it{iarg\_err\/}}, {\it{rarg\_err\/}}))\index{mk\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gquotient} \\  
\=\+{\rm{gquotient}}\,({\it{v1\/}}, {\it{v2\/}})\index{gquotient} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{iarg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,(\=\+{\rm{list}}\,({\it{v1\/}}, {\it{v2\/}}), \\ 
{\rm{list}}\,({\sc{integer\_desc}}\index{integer\_desc}, {\sc{integer\_desc}}\index{integer\_desc}))\-\index{arg\_check}, \\ 
{\it{rarg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,(\=\+{\rm{list}}\,({\it{v1\/}}, {\it{v2\/}}), \\ 
{\rm{list}}\,({\sc{rational\_desc}}\index{rational\_desc}, {\sc{rational\_desc}}\index{rational\_desc}))\-\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{iarg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{izerop}}\,({\rm{value}}\,({\it{v2\/}})\index{value})\index{izerop} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\sc{zero\_divide\_error}}\index{zero\_divide\_error}, \\ 
{\rm{default\_value}}\,({\sc{rational\_desc}}\index{rational\_desc})\index{default\_value})\-\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\sc{rational\_desc}}\index{rational\_desc}, \\ 
{\rm{reduce}}\,({\rm{rational}}\,(\=\+{\rm{value}}\,({\it{v1\/}})\index{value}, \\ 
{\rm{value}}\,({\it{v2\/}})\index{value})\-\index{rational})\index{reduce})\-\index{typed})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf elseif }{\it{rarg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{rzerop}}\,({\rm{value}}\,({\it{v2\/}})\index{value})\index{rzerop} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\sc{zero\_divide\_error}}\index{zero\_divide\_error}, \\ 
{\rm{default\_value}}\,({\sc{rational\_desc}}\index{rational\_desc})\index{default\_value})\-\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\sc{rational\_desc}}\index{rational\_desc}, \\ 
{\rm{rquotient}}\,({\rm{value}}\,({\it{v1\/}})\index{value}, {\rm{value}}\,({\it{v2\/}})\index{value})\index{rquotient})\-\index{typed})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{mk\_error}}\,({\rm{list}}\,({\it{iarg\_err\/}}, {\it{rarg\_err\/}}))\index{mk\_error}, \\ 
{\rm{default\_value}}\,({\sc{rational\_desc}}\index{rational\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gdiv} \\  
\=\+{\rm{gdiv}}\,({\it{v1\/}}, {\it{v2\/}})\index{gdiv} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,(\=\+{\rm{list}}\,({\it{v1\/}}, {\it{v2\/}}), \\ 
{\rm{list}}\,({\sc{integer\_desc}}\index{integer\_desc}, {\sc{integer\_desc}}\index{integer\_desc}))\-\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{izerop}}\,({\rm{value}}\,({\it{v2\/}})\index{value})\index{izerop} \\ 
{\bf then }{\rm{marked}}\,({\sc{zero\_divide\_error}}\index{zero\_divide\_error}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\sc{integer\_desc}}\index{integer\_desc}, \\ 
{\rm{iquotient}}\,({\rm{value}}\,({\it{v1\/}})\index{value}, {\rm{value}}\,({\it{v2\/}})\index{value})\index{iquotient})\-\index{typed})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gmod} \\  
\=\+{\rm{gmod}}\,({\it{v1\/}}, {\it{v2\/}})\index{gmod} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,(\=\+{\rm{list}}\,({\it{v1\/}}, {\it{v2\/}}), \\ 
{\rm{list}}\,({\sc{integer\_desc}}\index{integer\_desc}, {\sc{integer\_desc}}\index{integer\_desc}))\-\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{izerop}}\,({\rm{value}}\,({\it{v2\/}})\index{value})\index{izerop} \\ 
{\bf then }{\rm{marked}}\,({\sc{zero\_divide\_error}}\index{zero\_divide\_error}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\sc{integer\_desc}}\index{integer\_desc}, \\ 
{\rm{iremainder}}\,({\rm{value}}\,({\it{v1\/}})\index{value}, {\rm{value}}\,({\it{v2\/}})\index{value})\index{iremainder})\-\index{typed})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gplus} \\  
\=\+{\rm{gplus}}\,({\it{v1\/}}, {\it{v2\/}})\index{gplus} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{iarg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,(\=\+{\rm{list}}\,({\it{v1\/}}, {\it{v2\/}}), \\ 
{\rm{list}}\,({\sc{integer\_desc}}\index{integer\_desc}, {\sc{integer\_desc}}\index{integer\_desc}))\-\index{arg\_check}, \\ 
{\it{rarg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,(\=\+{\rm{list}}\,({\it{v1\/}}, {\it{v2\/}}), \\ 
{\rm{list}}\,({\sc{rational\_desc}}\index{rational\_desc}, {\sc{rational\_desc}}\index{rational\_desc}))\-\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{iarg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }{\rm{marked}}\,({\bf{nil}}, {\rm{typed}}\,({\sc{integer\_desc}}\index{integer\_desc}, {\rm{iplus}}\,({\rm{value}}\,({\it{v1\/}})\index{value}, {\rm{value}}\,({\it{v2\/}})\index{value})\index{iplus})\index{typed})\index{marked} \\ 
{\bf elseif }{\it{rarg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,({\sc{rational\_desc}}\index{rational\_desc}, {\rm{rplus}}\,({\rm{value}}\,({\it{v1\/}})\index{value}, {\rm{value}}\,({\it{v2\/}})\index{value})\index{rplus})\index{typed})\-\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{mk\_error}}\,({\rm{list}}\,({\it{iarg\_err\/}}, {\it{rarg\_err\/}}))\index{mk\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gsubtract} \\  
\=\+{\rm{gsubtract}}\,({\it{v1\/}}, {\it{v2\/}})\index{gsubtract} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{iarg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,(\=\+{\rm{list}}\,({\it{v1\/}}, {\it{v2\/}}), \\ 
{\rm{list}}\,({\sc{integer\_desc}}\index{integer\_desc}, {\sc{integer\_desc}}\index{integer\_desc}))\-\index{arg\_check}, \\ 
{\it{rarg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,(\=\+{\rm{list}}\,({\it{v1\/}}, {\it{v2\/}}), \\ 
{\rm{list}}\,({\sc{rational\_desc}}\index{rational\_desc}, {\sc{rational\_desc}}\index{rational\_desc}))\-\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{iarg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\sc{integer\_desc}}\index{integer\_desc}, \\ 
{\rm{idifference}}\,({\rm{value}}\,({\it{v1\/}})\index{value}, {\rm{value}}\,({\it{v2\/}})\index{value})\index{idifference})\-\index{typed})\-\index{marked} \\ 
{\bf elseif }{\it{rarg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\sc{rational\_desc}}\index{rational\_desc}, \\ 
{\rm{rdifference}}\,({\rm{value}}\,({\it{v1\/}})\index{value}, {\rm{value}}\,({\it{v2\/}})\index{value})\index{rdifference})\-\index{typed})\-\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{mk\_error}}\,({\rm{list}}\,({\it{iarg\_err\/}}, {\it{rarg\_err\/}}))\index{mk\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gin} \\  
\=\+{\rm{gin}}\,({\it{v1\/}}, {\it{v2\/}})\index{gin} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{td\/}}{\bf $\;$ be$\;\;$}{\rm{base\_type}}\,({\rm{type}}\,({\it{v2\/}})\index{type})\index{base\_type}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{sequence\_descp}}\,({\it{td\/}})\index{sequence\_descp} $\vee$ {\rm{set\_descp}}\,({\it{td\/}})\index{set\_descp} \\ 
{\bf then }\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,(\=\+{\rm{list}}\,({\it{v1\/}}, {\it{v2\/}}), \\ 
{\rm{list}}\,({\rm{component\_td}}\,({\it{td\/}})\index{component\_td}, {\it{td\/}}))\-\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{vmember}}\,(\=\+{\rm{value}}\,({\it{v1\/}})\index{value}, \\ 
{\rm{value}}\,({\it{v2\/}})\index{value}, \\ 
{\rm{component\_td}}\,({\it{td\/}})\index{component\_td})\-\index{vmember}$\;\;${\bf then }{\sc{gtrue}}\index{gtrue} \\ 
{\bf else }{\sc{gfalse}}\index{gfalse}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,(\=\+{\it{arg\_err\/}}, \\ 
{\rm{default\_value}}\,({\sc{boolean\_desc}}\index{boolean\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\- \\ 
{\bf else }{\rm{marked}}\,({\rm{in\_arg\_error}}\,({\it{v2\/}})\index{in\_arg\_error}, {\rm{default\_value}}\,({\sc{boolean\_desc}}\index{boolean\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mapping\_merge\_arg\_check2} \\  
\=\+{\rm{mapping\_merge\_arg\_check2}}\,({\it{ks\/}}, {\it{v1\/}}, {\it{v2\/}})\index{mapping\_merge\_arg\_check2} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{ks\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{t}} \\ 
{\bf else }\=\+{\bf let }\=\+{\it{c1\/}}{\bf $\;$ be$\;\;$}{\rm{mapping\_get}}\,({\it{v1\/}}, {\rm{car}}\,({\it{ks\/}}), {\rm{base\_type}}\,({\rm{type}}\,({\it{v1\/}})\index{type})\index{base\_type})\index{mapping\_get}, \\ 
{\it{c2\/}}{\bf $\;$ be$\;\;$}{\rm{mapping\_get}}\,({\it{v2\/}}, {\rm{car}}\,({\it{ks\/}}), {\rm{base\_type}}\,({\rm{type}}\,({\it{v2\/}})\index{type})\index{base\_type})\index{mapping\_get}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{determinate}}\,({\it{c1\/}})\index{determinate} $\wedge$ {\rm{determinate}}\,({\it{c2\/}})\index{determinate} \\ 
{\bf then }\=\+{\rm{gtruep}}\,({\rm{gequal}}\,({\it{c1\/}}, {\it{c2\/}})\index{gequal})\index{gtruep} \\ 
$\wedge$$\;\;\;\;${\rm{mapping\_merge\_arg\_check2}}\,({\rm{cdr}}\,({\it{ks\/}}), {\it{v1\/}}, {\it{v2\/}})\index{mapping\_merge\_arg\_check2}\- \\ 
{\bf else }{\rm{mapping\_merge\_arg\_check2}}\,({\rm{cdr}}\,({\it{ks\/}}), {\it{v1\/}}, {\it{v2\/}})\index{mapping\_merge\_arg\_check2}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mapping\_merge\_arg\_check} \\  
\=\+{\rm{mapping\_merge\_arg\_check}}\,({\it{v1\/}}, {\it{v2\/}})\index{mapping\_merge\_arg\_check} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{mapping\_descp}}\,({\rm{type}}\,({\it{v1\/}})\index{type})\index{mapping\_descp} $\wedge$ {\rm{mapping\_descp}}\,({\rm{type}}\,({\it{v2\/}})\index{type})\index{mapping\_descp} \\ 
{\bf then }\=\+{\bf let }\=\+{\it{ks\/}}{\bf $\;$ be$\;\;$}{\rm{marked\_typed\_list}}\,(\=\+{\rm{selector\_td}}\,({\rm{base\_type}}\,({\rm{type}}\,({\it{v1\/}})\index{type})\index{base\_type})\index{selector\_td}, \\ 
{\rm{vdomain}}\,({\rm{value}}\,({\it{v1\/}})\index{value})\index{vdomain})\-\index{marked\_typed\_list}\- \\ 
{\bf in} \\ 
{\rm{mapping\_merge\_arg\_check2}}\,({\it{ks\/}}, {\it{v1\/}}, {\it{v2\/}})\index{mapping\_merge\_arg\_check2}$\;${\bf  endlet}\- \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gunion} \\  
\=\+{\rm{gunion}}\,({\it{v1\/}}, {\it{v2\/}})\index{gunion} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{td\/}}{\bf $\;$ be$\;\;$}{\rm{base\_type}}\,({\rm{type}}\,({\it{v1\/}})\index{type})\index{base\_type}\- \\ 
{\bf in} \\ 
\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\rm{list}}\,({\it{v1\/}}, {\it{v2\/}}), {\rm{list}}\,({\it{td\/}}, {\it{td\/}}))\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{set\_descp}}\,({\it{td\/}})\index{set\_descp} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\it{td\/}}, \\ 
{\rm{vunion}}\,({\rm{value}}\,({\it{v1\/}})\index{value}, {\rm{value}}\,({\it{v2\/}})\index{value}, {\it{td\/}})\index{vunion})\-\index{typed})\-\index{marked} \\ 
{\bf elseif }{\rm{mapping\_descp}}\,({\it{td\/}})\index{mapping\_descp} \\ 
{\bf then }\=\+{\bf if }{\rm{mapping\_merge\_arg\_check}}\,({\it{v1\/}}, {\it{v2\/}})\index{mapping\_merge\_arg\_check} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\it{td\/}}, \\ 
{\rm{vunion\_maps}}\,(\=\+{\rm{value}}\,({\it{v1\/}})\index{value}, \\ 
{\rm{value}}\,({\it{v2\/}})\index{value}, \\ 
{\it{td\/}})\-\index{vunion\_maps})\-\index{typed})\-\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{mapping\_merge\_error}}\,({\it{v1\/}}, {\it{v2\/}})\index{mapping\_merge\_error}, \\ 
{\rm{default\_value}}\,({\it{td\/}})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{union\_arg\_error}}\,({\it{v1\/}}, {\it{v2\/}})\index{union\_arg\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gadjoin} \\  
\=\+{\rm{gadjoin}}\,({\it{v1\/}}, {\it{v2\/}})\index{gadjoin} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{set\_descp}}\,({\rm{type}}\,({\it{v1\/}})\index{type})\index{set\_descp} \\ 
{\bf then }{\rm{gunion}}\,({\it{v1\/}}, {\rm{gset}}\,({\rm{list}}\,({\it{v2\/}}), {\rm{base\_type}}\,({\rm{type}}\,({\it{v2\/}})\index{type})\index{base\_type})\index{gset})\index{gunion} \\ 
{\bf else }{\rm{marked}}\,({\rm{adjoin\_args\_error}}\,({\it{v1\/}})\index{adjoin\_args\_error}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gomit} \\  
\=\+{\rm{gomit}}\,({\it{v1\/}}, {\it{v2\/}})\index{gomit} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{td\/}}{\bf $\;$ be$\;\;$}{\rm{base\_type}}\,({\rm{type}}\,({\it{v1\/}})\index{type})\index{base\_type}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{set\_descp}}\,({\it{td\/}})\index{set\_descp} \\ 
{\bf then }\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,(\=\+{\rm{list}}\,({\it{v1\/}}, {\it{v2\/}}), \\ 
{\rm{list}}\,({\it{td\/}}, {\rm{component\_td}}\,({\it{td\/}})\index{component\_td}))\-\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{gtruep}}\,({\rm{gin}}\,({\it{v2\/}}, {\it{v1\/}})\index{gin})\index{gtruep} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\it{td\/}}, \\ 
{\rm{vremove}}\,(\=\+{\rm{value}}\,({\it{v2\/}})\index{value}, \\ 
{\rm{value}}\,({\it{v1\/}})\index{value}, \\ 
{\rm{component\_td}}\,({\it{td\/}})\index{component\_td})\-\index{vremove})\-\index{typed})\-\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{not\_in\_set\_error}}\,({\it{v2\/}}, {\it{v1\/}})\index{not\_in\_set\_error}, \\ 
{\rm{default\_value}}\,({\it{td\/}})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,(\=\+{\it{arg\_err\/}}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\- \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{omit\_args\_error}}\,({\it{v1\/}})\index{omit\_args\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gsub} \\  
\=\+{\rm{gsub}}\,({\it{v1\/}}, {\it{v2\/}})\index{gsub} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{td\/}}{\bf $\;$ be$\;\;$}{\rm{base\_type}}\,({\rm{type}}\,({\it{v1\/}})\index{type})\index{base\_type}\- \\ 
{\bf in} \\ 
\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\rm{list}}\,({\it{v1\/}}, {\it{v2\/}}), {\rm{list}}\,({\it{td\/}}, {\it{td\/}}))\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }\=\+{\rm{mapping\_descp}}\,({\it{td\/}})\index{mapping\_descp} \\ 
$\vee$$\;\;\;\;${\rm{sequence\_descp}}\,({\it{td\/}})\index{sequence\_descp} \\ 
$\vee$$\;\;\;\;${\rm{set\_descp}}\,({\it{td\/}})\index{set\_descp}\- \\ 
{\bf then }\=\+{\bf if }{\rm{vsubp}}\,({\rm{value}}\,({\it{v1\/}})\index{value}, {\rm{value}}\,({\it{v2\/}})\index{value}, {\it{td\/}})\index{vsubp}$\;\;${\bf then }{\sc{gtrue}}\index{gtrue} \\ 
{\bf else }{\sc{gfalse}}\index{gfalse}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{sub\_args\_error}}\,({\it{v1\/}}, {\it{v2\/}})\index{sub\_args\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gintersect} \\  
\=\+{\rm{gintersect}}\,({\it{v1\/}}, {\it{v2\/}})\index{gintersect} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{td\/}}{\bf $\;$ be$\;\;$}{\rm{base\_type}}\,({\rm{type}}\,({\it{v1\/}})\index{type})\index{base\_type}\- \\ 
{\bf in} \\ 
\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\rm{list}}\,({\it{v1\/}}, {\it{v2\/}}), {\rm{list}}\,({\it{td\/}}, {\it{td\/}}))\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{set\_descp}}\,({\it{td\/}})\index{set\_descp} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\it{td\/}}, \\ 
{\rm{vintersect}}\,(\=\+{\rm{value}}\,({\it{v1\/}})\index{value}, \\ 
{\rm{value}}\,({\it{v2\/}})\index{value}, \\ 
{\it{td\/}})\-\index{vintersect})\-\index{typed})\-\index{marked} \\ 
{\bf elseif }{\rm{mapping\_descp}}\,({\it{td\/}})\index{mapping\_descp} \\ 
{\bf then }\=\+{\bf if }{\rm{mapping\_merge\_arg\_check}}\,({\it{v1\/}}, {\it{v2\/}})\index{mapping\_merge\_arg\_check} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\it{td\/}}, \\ 
{\rm{vintersect\_maps}}\,(\=\+{\rm{value}}\,({\it{v1\/}})\index{value}, \\ 
{\rm{value}}\,({\it{v2\/}})\index{value}, \\ 
{\it{td\/}})\-\index{vintersect\_maps})\-\index{typed})\-\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{mapping\_merge\_error}}\,({\it{v1\/}}, {\it{v2\/}})\index{mapping\_merge\_error}, \\ 
{\rm{default\_value}}\,({\it{td\/}})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{intersect\_args\_error}}\,({\it{v1\/}}, {\it{v2\/}})\index{intersect\_args\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gdifference} \\  
\=\+{\rm{gdifference}}\,({\it{v1\/}}, {\it{v2\/}})\index{gdifference} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{td\/}}{\bf $\;$ be$\;\;$}{\rm{base\_type}}\,({\rm{type}}\,({\it{v1\/}})\index{type})\index{base\_type}\- \\ 
{\bf in} \\ 
\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\rm{list}}\,({\it{v1\/}}, {\it{v2\/}}), {\rm{list}}\,({\it{td\/}}, {\it{td\/}}))\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{set\_descp}}\,({\it{td\/}})\index{set\_descp} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\it{td\/}}, \\ 
{\rm{vdifference}}\,(\=\+{\rm{value}}\,({\it{v1\/}})\index{value}, \\ 
{\rm{value}}\,({\it{v2\/}})\index{value}, \\ 
{\it{td\/}})\-\index{vdifference})\-\index{typed})\-\index{marked} \\ 
{\bf elseif }{\rm{mapping\_descp}}\,({\it{td\/}})\index{mapping\_descp} \\ 
{\bf then }\=\+{\bf if }{\rm{mapping\_merge\_arg\_check}}\,({\it{v1\/}}, {\it{v2\/}})\index{mapping\_merge\_arg\_check} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\it{td\/}}, \\ 
{\rm{vdifference\_maps}}\,(\=\+{\rm{value}}\,({\it{v1\/}})\index{value}, \\ 
{\rm{value}}\,({\it{v2\/}})\index{value}, \\ 
{\it{td\/}})\-\index{vdifference\_maps})\-\index{typed})\-\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{mapping\_merge\_error}}\,({\it{v1\/}}, {\it{v2\/}})\index{mapping\_merge\_error}, \\ 
{\rm{default\_value}}\,({\it{td\/}})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{difference\_args\_error}}\,({\it{v1\/}}, {\it{v2\/}})\index{difference\_args\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gappend} \\  
\=\+{\rm{gappend}}\,({\it{v1\/}}, {\it{v2\/}})\index{gappend} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{td\/}}{\bf $\;$ be$\;\;$}{\rm{base\_type}}\,({\rm{type}}\,({\it{v1\/}})\index{type})\index{base\_type}\- \\ 
{\bf in} \\ 
\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\rm{list}}\,({\it{v1\/}}, {\it{v2\/}}), {\rm{list}}\,({\it{td\/}}, {\it{td\/}}))\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{sequence\_descp}}\,({\it{td\/}})\index{sequence\_descp} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,({\it{td\/}}, {\rm{append}}\,({\rm{value}}\,({\it{v1\/}})\index{value}, {\rm{value}}\,({\it{v2\/}})\index{value}))\index{typed})\-\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{append\_args\_error}}\,({\it{v1\/}}, {\it{v2\/}})\index{append\_args\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gcons} \\  
{\rm{gcons}}\,({\it{v1\/}}, {\it{v2\/}})\index{gcons} $=$ {\rm{gappend}}\,({\rm{gseq}}\,({\rm{list}}\,({\it{v1\/}}), {\rm{base\_type}}\,({\rm{type}}\,({\it{v1\/}})\index{type})\index{base\_type})\index{gseq}, {\it{v2\/}})\index{gappend}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{grcons} \\  
{\rm{grcons}}\,({\it{v1\/}}, {\it{v2\/}})\index{grcons} $=$ {\rm{gappend}}\,({\it{v1\/}}, {\rm{gseq}}\,({\rm{list}}\,({\it{v2\/}}), {\rm{base\_type}}\,({\rm{type}}\,({\it{v2\/}})\index{type})\index{base\_type})\index{gseq})\index{gappend}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{apply\_binary\_op} \\  
\=\+{\rm{apply\_binary\_op}}\,({\it{op\/}}, {\it{v1\/}}, {\it{v2\/}})\index{apply\_binary\_op} \\ 
$=$$\;\;\;\;$\=\+{\bf if }\=\+{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{eq}})\index{prodn})\index{rule} \\ 
$\vee$$\;\;\;\;${\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{equal}})\index{prodn})\index{rule}\- \\ 
{\bf then }{\rm{gequal}}\,({\it{v1\/}}, {\it{v2\/}})\index{gequal} \\ 
{\bf elseif }{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{ne}})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{gne}}\,({\it{v1\/}}, {\it{v2\/}})\index{gne} \\ 
{\bf elseif }{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{lt}})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{glt}}\,({\it{v1\/}}, {\it{v2\/}})\index{glt} \\ 
{\bf elseif }{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{le}})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{gle}}\,({\it{v1\/}}, {\it{v2\/}})\index{gle} \\ 
{\bf elseif }{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{gt}})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{ggt}}\,({\it{v1\/}}, {\it{v2\/}})\index{ggt} \\ 
{\bf elseif }{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{ge}})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{gge}}\,({\it{v1\/}}, {\it{v2\/}})\index{gge} \\ 
{\bf elseif }{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{and}})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{gand}}\,({\it{v1\/}}, {\it{v2\/}})\index{gand} \\ 
{\bf elseif }{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{or}})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{gor}}\,({\it{v1\/}}, {\it{v2\/}})\index{gor} \\ 
{\bf elseif }{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{imp}})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{gimp}}\,({\it{v1\/}}, {\it{v2\/}})\index{gimp} \\ 
{\bf elseif }{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{iff}})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{giff}}\,({\it{v1\/}}, {\it{v2\/}})\index{giff} \\ 
{\bf elseif }{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{star\_star}})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{gpower}}\,({\it{v1\/}}, {\it{v2\/}})\index{gpower} \\ 
{\bf elseif }{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{star}})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{gtimes}}\,({\it{v1\/}}, {\it{v2\/}})\index{gtimes} \\ 
{\bf elseif }{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{slash}})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{gquotient}}\,({\it{v1\/}}, {\it{v2\/}})\index{gquotient} \\ 
{\bf elseif }{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{div}})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{gdiv}}\,({\it{v1\/}}, {\it{v2\/}})\index{gdiv} \\ 
{\bf elseif }{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{mod}})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{gmod}}\,({\it{v1\/}}, {\it{v2\/}})\index{gmod} \\ 
{\bf elseif }{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{plus}})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{gplus}}\,({\it{v1\/}}, {\it{v2\/}})\index{gplus} \\ 
{\bf elseif }{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{minus}})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{gsubtract}}\,({\it{v1\/}}, {\it{v2\/}})\index{gsubtract} \\ 
{\bf elseif }{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{in}})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{gin}}\,({\it{v1\/}}, {\it{v2\/}})\index{gin} \\ 
{\bf elseif }{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{adjoin}})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{gadjoin}}\,({\it{v1\/}}, {\it{v2\/}})\index{gadjoin} \\ 
{\bf elseif }{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{omit}})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{gomit}}\,({\it{v1\/}}, {\it{v2\/}})\index{gomit} \\ 
{\bf elseif }{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{sub}})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{gsub}}\,({\it{v1\/}}, {\it{v2\/}})\index{gsub} \\ 
{\bf elseif }{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{union}})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{gunion}}\,({\it{v1\/}}, {\it{v2\/}})\index{gunion} \\ 
{\bf elseif }{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{intersect}})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{gintersect}}\,({\it{v1\/}}, {\it{v2\/}})\index{gintersect} \\ 
{\bf elseif }{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{difference}})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{gdifference}}\,({\it{v1\/}}, {\it{v2\/}})\index{gdifference} \\ 
{\bf elseif }{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{colon\_gt}})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{gcons}}\,({\it{v1\/}}, {\it{v2\/}})\index{gcons} \\ 
{\bf elseif }{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{lt\_colon}})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{grcons}}\,({\it{v1\/}}, {\it{v2\/}})\index{grcons} \\ 
{\bf elseif }{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{append}})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{gappend}}\,({\it{v1\/}}, {\it{v2\/}})\index{gappend} \\ 
{\bf else }{\rm{marked}}\,({\rm{not\_binary\_op\_error}}\,({\it{op\/}})\index{not\_binary\_op\_error}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-\-
\end{tabbing}



\begin{verbatim}; -----------------------
;  Subsequence Selection
; -----------------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{subsequence\_get} \\  
\=\+{\rm{subsequence\_get}}\,({\it{s\/}}, {\it{lo\/}}, {\it{hi\/}})\index{subsequence\_get} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,(\=\+{\rm{list}}\,({\it{s\/}}, {\it{lo\/}}, {\it{hi\/}}), \\ 
{\rm{list}}\,({\rm{type}}\,({\it{s\/}})\index{type}, {\sc{integer\_desc}}\index{integer\_desc}, {\sc{integer\_desc}}\index{integer\_desc}))\-\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{sequence\_descp}}\,({\rm{type}}\,({\it{s\/}})\index{type})\index{sequence\_descp} \\ 
{\bf then }\=\+{\bf if }{\rm{gtruep}}\,({\rm{gle}}\,({\it{lo\/}}, {\it{hi\/}})\index{gle})\index{gtruep} \\ 
{\bf then }\=\+{\bf if }{\rm{indeterminate}}\,({\rm{sequence\_get}}\,({\it{s\/}}, {\it{lo\/}}, {\rm{type}}\,({\it{s\/}})\index{type})\index{sequence\_get})\index{indeterminate} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\rm{no\_such\_component\_error}}\,({\it{s\/}}, {\it{lo\/}})\index{no\_such\_component\_error}, \\ 
{\rm{default\_value}}\,({\rm{type}}\,({\it{s\/}})\index{type})\index{default\_value})\-\index{marked} \\ 
{\bf elseif }{\rm{indeterminate}}\,({\rm{sequence\_get}}\,({\it{s\/}}, {\it{hi\/}}, {\rm{type}}\,({\it{s\/}})\index{type})\index{sequence\_get})\index{indeterminate} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\rm{no\_such\_component\_error}}\,({\it{s\/}}, {\it{hi\/}})\index{no\_such\_component\_error}, \\ 
{\rm{default\_value}}\,({\rm{type}}\,({\it{s\/}})\index{type})\index{default\_value})\-\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\rm{type}}\,({\it{s\/}})\index{type}, \\ 
{\rm{vsubseq\_select}}\,(\=\+{\rm{value}}\,({\it{s\/}})\index{value}, \\ 
{\rm{value}}\,({\it{lo\/}})\index{value}, \\ 
{\rm{value}}\,({\it{hi\/}})\index{value})\-\index{vsubseq\_select})\-\index{typed})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\bf{nil}}, {\rm{typed}}\,({\rm{type}}\,({\it{s\/}})\index{type}, {\sc{null\_seq}}\index{null\_seq})\index{typed})\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{not\_sequence\_error}}\,({\it{s\/}})\index{not\_sequence\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}



\begin{verbatim}; ------------------
;  Value Alteration
; ------------------

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{array\_put} \\  
\=\+{\rm{array\_put}}\,({\it{a\/}}, {\it{i\/}}, {\it{v\/}})\index{array\_put} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{td\/}}{\bf $\;$ be$\;\;$}{\rm{base\_type}}\,({\rm{type}}\,({\it{a\/}})\index{type})\index{base\_type}\- \\ 
{\bf in} \\ 
\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,(\=\+{\rm{list}}\,({\it{a\/}}, {\it{i\/}}, {\it{v\/}}), \\ 
{\rm{list}}\,(\=\+{\it{td\/}}, \\ 
{\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td}, \\ 
{\rm{component\_td}}\,({\it{td\/}})\index{component\_td})\-)\-\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{array\_descp}}\,({\it{td\/}})\index{array\_descp} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\it{td\/}}, \\ 
{\rm{varray\_put}}\,(\=\+{\rm{value}}\,({\it{a\/}})\index{value}, \\ 
{\rm{value}}\,({\it{i\/}})\index{value}, \\ 
{\rm{value}}\,({\it{v\/}})\index{value}, \\ 
{\it{td\/}})\-\index{varray\_put})\-\index{typed})\-\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{not\_array\_error}}\,({\it{a\/}})\index{not\_array\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{record\_put} \\  
\=\+{\rm{record\_put}}\,({\it{r\/}}, {\it{fn\/}}, {\it{v\/}})\index{record\_put} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{td\/}}{\bf $\;$ be$\;\;$}{\rm{base\_type}}\,({\rm{type}}\,({\it{r\/}})\index{type})\index{base\_type}\- \\ 
{\bf in} \\ 
\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,(\=\+{\rm{list}}\,({\it{r\/}}, {\it{fn\/}}, {\it{v\/}}), \\ 
{\rm{list}}\,(\=\+{\it{td\/}}, \\ 
{\tt{'}}{\tt{field\_name}}, \\ 
{\rm{field\_td}}\,({\rm{unmark}}\,({\it{fn\/}})\index{unmark}, {\it{td\/}})\index{field\_td})\-)\-\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{record\_descp}}\,({\it{td\/}})\index{record\_descp} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\it{td\/}}, \\ 
{\rm{vrecord\_put}}\,(\=\+{\rm{value}}\,({\it{r\/}})\index{value}, \\ 
{\rm{unmark}}\,({\it{fn\/}})\index{unmark}, \\ 
{\rm{value}}\,({\it{v\/}})\index{value})\-\index{vrecord\_put})\-\index{typed})\-\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{not\_record\_error}}\,({\it{r\/}})\index{not\_record\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mapping\_put} \\  
\=\+{\rm{mapping\_put}}\,({\it{m\/}}, {\it{d\/}}, {\it{v\/}})\index{mapping\_put} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{td\/}}{\bf $\;$ be$\;\;$}{\rm{base\_type}}\,({\rm{type}}\,({\it{m\/}})\index{type})\index{base\_type}\- \\ 
{\bf in} \\ 
\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,(\=\+{\rm{list}}\,({\it{m\/}}, {\it{d\/}}, {\it{v\/}}), \\ 
{\rm{list}}\,(\=\+{\it{td\/}}, \\ 
{\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td}, \\ 
{\rm{component\_td}}\,({\it{td\/}})\index{component\_td})\-)\-\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{mapping\_descp}}\,({\it{td\/}})\index{mapping\_descp} \\ 
{\bf then }\=\+{\bf if }{\rm{determinate}}\,({\rm{mapping\_get}}\,({\it{m\/}}, {\it{d\/}}, {\rm{type}}\,({\it{m\/}})\index{type})\index{mapping\_get})\index{determinate} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\it{td\/}}, \\ 
{\rm{vmapping\_put}}\,(\=\+{\rm{value}}\,({\it{m\/}})\index{value}, \\ 
{\rm{value}}\,({\it{d\/}})\index{value}, \\ 
{\rm{value}}\,({\it{v\/}})\index{value}, \\ 
{\it{td\/}})\-\index{vmapping\_put})\-\index{typed})\-\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{no\_such\_component\_error}}\,({\it{m\/}}, {\it{d\/}})\index{no\_such\_component\_error}, \\ 
{\rm{default\_value}}\,({\it{td\/}})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{not\_mapping\_error}}\,({\it{m\/}})\index{not\_mapping\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{sequence\_put} \\  
\=\+{\rm{sequence\_put}}\,({\it{s\/}}, {\it{i\/}}, {\it{v\/}})\index{sequence\_put} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{td\/}}{\bf $\;$ be$\;\;$}{\rm{base\_type}}\,({\rm{type}}\,({\it{s\/}})\index{type})\index{base\_type}\- \\ 
{\bf in} \\ 
\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,(\=\+{\rm{list}}\,({\it{s\/}}, {\it{i\/}}, {\it{v\/}}), \\ 
{\rm{list}}\,(\=\+{\it{td\/}}, \\ 
{\sc{integer\_desc}}\index{integer\_desc}, \\ 
{\rm{component\_td}}\,({\it{td\/}})\index{component\_td})\-)\-\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{sequence\_descp}}\,({\it{td\/}})\index{sequence\_descp} \\ 
{\bf then }\=\+{\bf if }{\rm{determinate}}\,({\rm{sequence\_get}}\,({\it{s\/}}, {\it{i\/}}, {\rm{type}}\,({\it{s\/}})\index{type})\index{sequence\_get})\index{determinate} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\it{td\/}}, \\ 
{\rm{vsequence\_put}}\,(\=\+{\rm{value}}\,({\it{s\/}})\index{value}, \\ 
{\rm{value}}\,({\it{i\/}})\index{value}, \\ 
{\rm{value}}\,({\it{v\/}})\index{value})\-\index{vsequence\_put})\-\index{typed})\-\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{no\_such\_component\_error}}\,({\it{s\/}}, {\it{i\/}})\index{no\_such\_component\_error}, \\ 
{\rm{default\_value}}\,({\it{td\/}})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{not\_sequence\_error}}\,({\it{s\/}})\index{not\_sequence\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{put\_op} \\  
\=\+{\rm{put\_op}}\,({\it{bv\/}}, {\it{s\/}}, {\it{v\/}})\index{put\_op} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{s\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\it{v\/}} \\ 
{\bf else }\=\+{\bf case on }{\rm{root}}\,({\rm{type}}\,({\it{bv\/}})\index{type})\index{root}: \\ 
{\bf case = }{\it{array\/}} \\ 
{\bf then }{\rm{array\_put}}\,(\=\+{\it{bv\/}}, \\ 
{\rm{car}}\,({\it{s\/}}), \\ 
{\rm{put\_op}}\,(\=\+{\rm{array\_get}}\,({\it{bv\/}}, {\rm{car}}\,({\it{s\/}}), {\rm{type}}\,({\it{bv\/}})\index{type})\index{array\_get}, \\ 
{\rm{cdr}}\,({\it{s\/}}), \\ 
{\it{v\/}})\-\index{put\_op})\-\index{array\_put} \\ 
{\bf case = }{\it{record\/}} \\ 
{\bf $\;\;$then }{\rm{record\_put}}\,(\=\+{\it{bv\/}}, \\ 
{\rm{car}}\,({\it{s\/}}), \\ 
{\rm{put\_op}}\,(\=\+{\rm{record\_get}}\,({\it{bv\/}}, {\rm{car}}\,({\it{s\/}}), {\rm{type}}\,({\it{bv\/}})\index{type})\index{record\_get}, \\ 
{\rm{cdr}}\,({\it{s\/}}), \\ 
{\it{v\/}})\-\index{put\_op})\-\index{record\_put} \\ 
{\bf case = }{\it{mapping\/}} \\ 
{\bf $\;\;$then }{\rm{mapping\_put}}\,(\=\+{\it{bv\/}}, \\ 
{\rm{car}}\,({\it{s\/}}), \\ 
{\rm{put\_op}}\,(\=\+{\rm{mapping\_get}}\,({\it{bv\/}}, {\rm{car}}\,({\it{s\/}}), {\rm{type}}\,({\it{bv\/}})\index{type})\index{mapping\_get}, \\ 
{\rm{cdr}}\,({\it{s\/}}), \\ 
{\it{v\/}})\-\index{put\_op})\-\index{mapping\_put} \\ 
{\bf case = }{\it{sequence\/}} \\ 
{\bf $\;\;$then }{\rm{sequence\_put}}\,(\=\+{\it{bv\/}}, \\ 
{\rm{car}}\,({\it{s\/}}), \\ 
{\rm{put\_op}}\,(\=\+{\rm{sequence\_get}}\,({\it{bv\/}}, {\rm{car}}\,({\it{s\/}}), {\rm{type}}\,({\it{bv\/}})\index{type})\index{sequence\_get}, \\ 
{\rm{cdr}}\,({\it{s\/}}), \\ 
{\it{v\/}})\-\index{put\_op})\-\index{sequence\_put} \\ 
{\bf otherwise }{\rm{marked}}\,(\=\+{\rm{component\_assign\_error}}\,({\it{bv\/}})\index{component\_assign\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endcase}\-$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gmapomit} \\  
\=\+{\rm{gmapomit}}\,({\it{m\/}}, {\it{i\/}})\index{gmapomit} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{determinate}}\,({\rm{mapping\_get}}\,({\it{m\/}}, {\it{i\/}}, {\rm{type}}\,({\it{m\/}})\index{type})\index{mapping\_get})\index{determinate} \\ 
{\bf then }{\rm{marked}}\,({\bf{nil}}, {\rm{typed}}\,({\rm{type}}\,({\it{m\/}})\index{type}, {\rm{vmap\_remove}}\,({\rm{value}}\,({\it{m\/}})\index{value}, {\rm{value}}\,({\it{i\/}})\index{value}, {\rm{type}}\,({\it{m\/}})\index{type})\index{vmap\_remove})\index{typed})\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{mark}}\,({\rm{mapping\_get}}\,({\it{m\/}}, {\it{i\/}}, {\rm{type}}\,({\it{m\/}})\index{type})\index{mapping\_get})\index{mark}, \\ 
{\rm{default\_value}}\,({\rm{type}}\,({\it{m\/}})\index{type})\index{default\_value})\-\index{marked}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gseqomit} \\  
\=\+{\rm{gseqomit}}\,({\it{s\/}}, {\it{i\/}})\index{gseqomit} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{determinate}}\,({\rm{sequence\_get}}\,({\it{s\/}}, {\it{i\/}}, {\rm{type}}\,({\it{s\/}})\index{type})\index{sequence\_get})\index{determinate} \\ 
{\bf then }\=\+{\bf let }\=\+{\it{s2\/}}{\bf $\;$ be$\;\;$}{\rm{gappend}}\,(\=\+{\rm{subsequence\_get}}\,({\it{s\/}}, {\sc{gione}}\index{gione}, {\rm{gsubtract}}\,({\it{i\/}}, {\sc{gione}}\index{gione})\index{gsubtract})\index{subsequence\_get}, \\ 
{\rm{subsequence\_get}}\,(\=\+{\it{s\/}}, \\ 
{\rm{gplus}}\,({\it{i\/}}, {\sc{gione}}\index{gione})\index{gplus}, \\ 
{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\sc{integer\_desc}}\index{integer\_desc}, \\ 
{\rm{vsize}}\,({\rm{value}}\,({\it{s\/}})\index{value})\index{vsize})\-\index{typed})\-\index{marked})\-\index{subsequence\_get})\-\index{gappend}\- \\ 
{\bf in} \\ 
{\rm{marked}}\,({\rm{mark}}\,({\it{s2\/}})\index{mark}, {\rm{typed}}\,({\rm{type}}\,({\it{s\/}})\index{type}, {\rm{value}}\,({\it{s2\/}})\index{value})\index{typed})\index{marked}$\;${\bf  endlet}\- \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{mark}}\,({\rm{sequence\_get}}\,({\it{s\/}}, {\it{i\/}}, {\rm{type}}\,({\it{s\/}})\index{type})\index{sequence\_get})\index{mark}, \\ 
{\rm{default\_value}}\,({\rm{type}}\,({\it{s\/}})\index{type})\index{default\_value})\-\index{marked}$\;${\bf  endif}\-\-
\end{tabbing}
 
\begin{tabbing}{\sc Definition}:\index{gmap\_insert} \\  
\=\+{\rm{gmap\_insert}}\,({\it{m\/}}, {\it{d\/}}, {\it{v\/}})\index{gmap\_insert} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{td\/}}{\bf $\;$ be$\;\;$}{\rm{base\_type}}\,({\rm{type}}\,({\it{m\/}})\index{type})\index{base\_type}\- \\ 
{\bf in} \\ 
\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,(\=\+{\rm{list}}\,({\it{m\/}}, {\it{d\/}}, {\it{v\/}}), \\ 
{\rm{list}}\,(\=\+{\it{td\/}}, \\ 
{\rm{selector\_td}}\,({\it{td\/}})\index{selector\_td}, \\ 
{\rm{component\_td}}\,({\it{td\/}})\index{component\_td})\-)\-\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{mapping\_descp}}\,({\it{td\/}})\index{mapping\_descp} \\ 
{\bf then }\=\+{\bf if }{\rm{determinate}}\,({\rm{mapping\_get}}\,({\it{m\/}}, {\it{d\/}}, {\rm{type}}\,({\it{m\/}})\index{type})\index{mapping\_get})\index{determinate} \\ 
{\bf then }{\rm{mapping\_put}}\,({\it{m\/}}, {\it{d\/}}, {\it{v\/}})\index{mapping\_put} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\it{td\/}}, \\ 
{\rm{vmapping\_put}}\,(\=\+{\rm{value}}\,({\it{m\/}})\index{value}, \\ 
{\rm{value}}\,({\it{d\/}})\index{value}, \\ 
{\rm{value}}\,({\it{v\/}})\index{value}, \\ 
{\it{td\/}})\-\index{vmapping\_put})\-\index{typed})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{not\_mapping\_error}}\,({\it{m\/}})\index{not\_mapping\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gseq\_insert\_before} \\  
\=\+{\rm{gseq\_insert\_before}}\,({\it{s\/}}, {\it{i\/}}, {\it{v\/}})\index{gseq\_insert\_before} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{determinate}}\,({\rm{sequence\_get}}\,({\it{s\/}}, {\it{i\/}}, {\rm{type}}\,({\it{s\/}})\index{type})\index{sequence\_get})\index{determinate} \\ 
{\bf then }{\rm{gappend}}\,(\=\+{\rm{subsequence\_get}}\,({\it{s\/}}, {\sc{gione}}\index{gione}, {\rm{gsubtract}}\,({\it{i\/}}, {\sc{gione}}\index{gione})\index{gsubtract})\index{subsequence\_get}, \\ 
{\rm{gappend}}\,(\=\+{\rm{gseq}}\,({\rm{list}}\,({\it{v\/}}), {\rm{base\_type}}\,({\rm{type}}\,({\it{v\/}})\index{type})\index{base\_type})\index{gseq}, \\ 
{\rm{subsequence\_get}}\,(\=\+{\it{s\/}}, \\ 
{\it{i\/}}, \\ 
{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\sc{integer\_desc}}\index{integer\_desc}, \\ 
{\rm{vsize}}\,({\rm{value}}\,({\it{s\/}})\index{value})\index{vsize})\-\index{typed})\-\index{marked})\-\index{subsequence\_get})\-\index{gappend})\-\index{gappend} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{mark}}\,({\rm{sequence\_get}}\,({\it{s\/}}, {\it{i\/}}, {\rm{type}}\,({\it{s\/}})\index{type})\index{sequence\_get})\index{mark}, \\ 
{\rm{default\_value}}\,({\rm{base\_type}}\,({\rm{type}}\,({\it{s\/}})\index{type})\index{base\_type})\index{default\_value})\-\index{marked}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gseq\_insert\_behind} \\  
\=\+{\rm{gseq\_insert\_behind}}\,({\it{s\/}}, {\it{i\/}}, {\it{v\/}})\index{gseq\_insert\_behind} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{determinate}}\,({\rm{sequence\_get}}\,({\it{s\/}}, {\it{i\/}}, {\rm{type}}\,({\it{s\/}})\index{type})\index{sequence\_get})\index{determinate} \\ 
{\bf then }{\rm{gappend}}\,(\=\+{\rm{subsequence\_get}}\,({\it{s\/}}, {\sc{gione}}\index{gione}, {\it{i\/}})\index{subsequence\_get}, \\ 
{\rm{gappend}}\,(\=\+{\rm{gseq}}\,({\rm{list}}\,({\it{v\/}}), {\rm{base\_type}}\,({\rm{type}}\,({\it{v\/}})\index{type})\index{base\_type})\index{gseq}, \\ 
{\rm{subsequence\_get}}\,(\=\+{\it{s\/}}, \\ 
{\rm{gplus}}\,({\it{i\/}}, {\sc{gione}}\index{gione})\index{gplus}, \\ 
{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\sc{integer\_desc}}\index{integer\_desc}, \\ 
{\rm{vsize}}\,({\rm{value}}\,({\it{s\/}})\index{value})\index{vsize})\-\index{typed})\-\index{marked})\-\index{subsequence\_get})\-\index{gappend})\-\index{gappend} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{mark}}\,({\rm{sequence\_get}}\,({\it{s\/}}, {\it{i\/}}, {\rm{type}}\,({\it{s\/}})\index{type})\index{sequence\_get})\index{mark}, \\ 
{\rm{default\_value}}\,({\rm{base\_type}}\,({\rm{type}}\,({\it{s\/}})\index{type})\index{base\_type})\index{default\_value})\-\index{marked}$\;${\bf  endif}\-\-
\end{tabbing}



\begin{verbatim}; ********************
;  Standard Functions
; ********************

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{std\_domain} \\  
\=\+{\rm{std\_domain}}\,({\it{d\/}})\index{std\_domain} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\it{d\/}}, {\rm{list}}\,({\rm{type}}\,({\rm{car}}\,({\it{d\/}}))\index{type}))\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{mapping\_descp}}\,({\rm{type}}\,({\rm{car}}\,({\it{d\/}}))\index{type})\index{mapping\_descp} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\rm{set\_desc}}\,({\bf{nil}}, {\rm{selector\_td}}\,({\rm{type}}\,({\rm{car}}\,({\it{d\/}}))\index{type})\index{selector\_td})\index{set\_desc}, \\ 
{\rm{vdomain}}\,({\rm{value}}\,({\rm{car}}\,({\it{d\/}}))\index{value})\index{vdomain})\-\index{typed})\-\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\sc{domain\_arg\_error}}\index{domain\_arg\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{std\_first} \\  
\=\+{\rm{std\_first}}\,({\it{d\/}})\index{std\_first} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\it{d\/}}, {\rm{list}}\,({\rm{type}}\,({\rm{car}}\,({\it{d\/}}))\index{type}))\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{sequence\_descp}}\,({\rm{type}}\,({\rm{car}}\,({\it{d\/}}))\index{type})\index{sequence\_descp} \\ 
{\bf then }{\rm{sequence\_get}}\,({\rm{car}}\,({\it{d\/}}), {\sc{gione}}\index{gione}, {\rm{type}}\,({\rm{car}}\,({\it{d\/}}))\index{type})\index{sequence\_get} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\sc{first\_arg\_error}}\index{first\_arg\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{std\_initial} \\  
\=\+{\rm{std\_initial}}\,({\it{d\/}})\index{std\_initial} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\it{d\/}}, {\rm{list}}\,({\tt{'}}{\tt{type\_descriptor}}))\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf let }\=\+{\it{td\/}}{\bf $\;$ be$\;\;$}{\rm{unmark}}\,({\rm{car}}\,({\it{d\/}}))\index{unmark}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{errorp}}\,({\rm{udv}}\,({\it{td\/}})\index{udv})\index{errorp} \\ 
{\bf then }{\rm{marked}}\,({\rm{udv}}\,({\it{td\/}})\index{udv}, {\rm{default\_value}}\,({\it{td\/}})\index{default\_value})\index{marked} \\ 
{\bf else }{\rm{marked}}\,({\bf{nil}}, {\rm{typed}}\,({\it{td\/}}, {\rm{udv}}\,({\it{td\/}})\index{udv})\index{typed})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{std\_last} \\  
\=\+{\rm{std\_last}}\,({\it{d\/}})\index{std\_last} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\it{d\/}}, {\rm{list}}\,({\rm{type}}\,({\rm{car}}\,({\it{d\/}}))\index{type}))\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{sequence\_descp}}\,({\rm{type}}\,({\rm{car}}\,({\it{d\/}}))\index{type})\index{sequence\_descp} \\ 
{\bf then }{\rm{sequence\_get}}\,(\=\+{\rm{car}}\,({\it{d\/}}), \\ 
{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,({\sc{integer\_desc}}\index{integer\_desc}, {\rm{vsize}}\,({\rm{car}}\,({\it{d\/}}))\index{vsize})\index{typed})\-\index{marked}, \\ 
{\rm{type}}\,({\rm{car}}\,({\it{d\/}}))\index{type})\-\index{sequence\_get} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\sc{last\_arg\_error}}\index{last\_arg\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{std\_lower} \\  
\=\+{\rm{std\_lower}}\,({\it{d\/}})\index{std\_lower} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\it{d\/}}, {\rm{list}}\,({\tt{'}}{\tt{type\_descriptor}}))\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf let }\=\+{\it{td\/}}{\bf $\;$ be$\;\;$}{\rm{unmark}}\,({\rm{car}}\,({\it{d\/}}))\index{unmark}\- \\ 
{\bf in} \\ 
\=\+{\bf let }\=\+{\it{r\/}}{\bf $\;$ be$\;\;$}{\rm{tmin}}\,({\it{td\/}})\index{tmin}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{r\/}} $=$ {\bf{nil}} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\rm{unbounded\_type\_error}}\,({\it{td\/}})\index{unbounded\_type\_error}, \\ 
{\rm{default\_value}}\,({\it{td\/}})\index{default\_value})\-\index{marked} \\ 
{\bf elseif }{\rm{errorp}}\,({\it{r\/}})\index{errorp} \\ 
{\bf then }{\rm{marked}}\,({\it{r\/}}, {\rm{default\_value}}\,({\it{td\/}})\index{default\_value})\index{marked} \\ 
{\bf else }{\rm{marked}}\,({\bf{nil}}, {\rm{typed}}\,({\it{td\/}}, {\it{r\/}})\index{typed})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endlet}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{std\_max} \\  
\=\+{\rm{std\_max}}\,({\it{d\/}})\index{std\_max} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{td\/}}{\bf $\;$ be$\;\;$}{\rm{base\_type}}\,({\rm{type}}\,({\rm{car}}\,({\it{d\/}}))\index{type})\index{base\_type}\- \\ 
{\bf in} \\ 
\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\it{d\/}}, {\rm{list}}\,({\it{td\/}}, {\it{td\/}}))\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{simple\_typep}}\,({\it{td\/}})\index{simple\_typep} \\ 
{\bf then }\=\+{\bf if }{\rm{gtruep}}\,({\rm{ggt}}\,({\rm{car}}\,({\it{d\/}}), {\rm{cadr}}\,({\it{d\/}}))\index{ggt})\index{gtruep} \\ 
{\bf then }{\rm{marked}}\,({\bf{nil}}, {\rm{typed}}\,({\it{td\/}}, {\rm{value}}\,({\rm{car}}\,({\it{d\/}}))\index{value})\index{typed})\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,({\it{td\/}}, {\rm{value}}\,({\rm{cadr}}\,({\it{d\/}}))\index{value})\index{typed})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,(\=\+{\sc{max\_arg\_error}}\index{max\_arg\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{std\_min} \\  
\=\+{\rm{std\_min}}\,({\it{d\/}})\index{std\_min} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{td\/}}{\bf $\;$ be$\;\;$}{\rm{base\_type}}\,({\rm{type}}\,({\rm{car}}\,({\it{d\/}}))\index{type})\index{base\_type}\- \\ 
{\bf in} \\ 
\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\it{d\/}}, {\rm{list}}\,({\it{td\/}}, {\it{td\/}}))\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{simple\_typep}}\,({\it{td\/}})\index{simple\_typep} \\ 
{\bf then }\=\+{\bf if }{\rm{gtruep}}\,({\rm{glt}}\,({\rm{car}}\,({\it{d\/}}), {\rm{cadr}}\,({\it{d\/}}))\index{glt})\index{gtruep} \\ 
{\bf then }{\rm{marked}}\,({\bf{nil}}, {\rm{typed}}\,({\it{td\/}}, {\rm{value}}\,({\rm{car}}\,({\it{d\/}}))\index{value})\index{typed})\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,({\it{td\/}}, {\rm{value}}\,({\rm{cadr}}\,({\it{d\/}}))\index{value})\index{typed})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,(\=\+{\sc{min\_arg\_error}}\index{min\_arg\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{std\_nonfirst} \\  
\=\+{\rm{std\_nonfirst}}\,({\it{d\/}})\index{std\_nonfirst} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\it{d\/}}, {\rm{list}}\,({\rm{type}}\,({\rm{car}}\,({\it{d\/}}))\index{type}))\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{sequence\_descp}}\,({\rm{type}}\,({\rm{car}}\,({\it{d\/}}))\index{type})\index{sequence\_descp} \\ 
{\bf then }\=\+{\bf if }{\tt{0}} $=$ {\rm{vsize}}\,({\rm{value}}\,({\rm{car}}\,({\it{d\/}}))\index{value})\index{vsize} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\rm{empty\_seq\_error}}\,({\tt{'}}{\tt{nonfirst}}, {\rm{car}}\,({\it{d\/}}))\index{empty\_seq\_error}, \\ 
{\rm{default\_value}}\,({\rm{type}}\,({\rm{car}}\,({\it{d\/}}))\index{type})\index{default\_value})\-\index{marked} \\ 
{\bf else }{\rm{subsequence\_get}}\,(\=\+{\rm{car}}\,({\it{d\/}}), \\ 
{\sc{gitwo}}\index{gitwo}, \\ 
{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\sc{integer\_desc}}\index{integer\_desc}, \\ 
{\rm{vsize}}\,({\rm{value}}\,({\rm{car}}\,({\it{d\/}}))\index{value})\index{vsize})\-\index{typed})\-\index{marked})\-\index{subsequence\_get}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,(\=\+{\sc{nonfirst\_arg\_error}}\index{nonfirst\_arg\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{std\_nonlast} \\  
\=\+{\rm{std\_nonlast}}\,({\it{d\/}})\index{std\_nonlast} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\it{d\/}}, {\rm{list}}\,({\rm{type}}\,({\rm{car}}\,({\it{d\/}}))\index{type}))\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{sequence\_descp}}\,({\rm{type}}\,({\rm{car}}\,({\it{d\/}}))\index{type})\index{sequence\_descp} \\ 
{\bf then }\=\+{\bf if }{\tt{0}} $=$ {\rm{vsize}}\,({\rm{value}}\,({\rm{car}}\,({\it{d\/}}))\index{value})\index{vsize} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\rm{empty\_seq\_error}}\,({\tt{'}}{\tt{nonlast}}, {\rm{car}}\,({\it{d\/}}))\index{empty\_seq\_error}, \\ 
{\rm{default\_value}}\,({\rm{type}}\,({\rm{car}}\,({\it{d\/}}))\index{type})\index{default\_value})\-\index{marked} \\ 
{\bf else }{\rm{subsequence\_get}}\,(\=\+{\rm{car}}\,({\it{d\/}}), \\ 
{\sc{gione}}\index{gione}, \\ 
{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\sc{integer\_desc}}\index{integer\_desc}, \\ 
{\rm{vsize}}\,({\rm{value}}\,({\rm{car}}\,({\it{d\/}}))\index{value})\index{vsize} $-\;1$)\-\index{typed})\-\index{marked})\-\index{subsequence\_get}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,(\=\+{\sc{nonlast\_arg\_error}}\index{nonlast\_arg\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gnull\_map} \\  
\=\+{\rm{gnull\_map}}\,({\it{td\/}})\index{gnull\_map} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{mapping\_descp}}\,({\it{td\/}})\index{mapping\_descp} \\ 
{\bf then }\=\+{\bf let }\=\+{\it{r\/}}{\bf $\;$ be$\;\;$}{\rm{dtype}}\,({\it{td\/}}, {\sc{null\_map}}\index{null\_map})\index{dtype}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{truep}}\,({\it{r\/}})$\;\;${\bf then }{\rm{marked}}\,({\bf{nil}}, {\rm{typed}}\,({\it{td\/}}, {\sc{null\_map}}\index{null\_map})\index{typed})\index{marked} \\ 
{\bf elseif }{\rm{errorp}}\,({\it{r\/}})\index{errorp}$\;\;${\bf then }{\rm{marked}}\,({\it{r\/}}, {\rm{default\_value}}\,({\it{td\/}})\index{default\_value})\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{not\_in\_type\_error}}\,({\sc{null\_map}}\index{null\_map}, {\it{td\/}})\index{not\_in\_type\_error}, \\ 
{\rm{default\_value}}\,({\it{td\/}})\index{default\_value})\-\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\- \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{not\_mapping\_type\_error}}\,({\it{td\/}})\index{not\_mapping\_type\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gnull\_seq} \\  
\=\+{\rm{gnull\_seq}}\,({\it{td\/}})\index{gnull\_seq} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{sequence\_descp}}\,({\it{td\/}})\index{sequence\_descp} \\ 
{\bf then }\=\+{\bf let }\=\+{\it{r\/}}{\bf $\;$ be$\;\;$}{\rm{dtype}}\,({\it{td\/}}, {\sc{null\_seq}}\index{null\_seq})\index{dtype}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{truep}}\,({\it{r\/}})$\;\;${\bf then }{\rm{marked}}\,({\bf{nil}}, {\rm{typed}}\,({\it{td\/}}, {\sc{null\_seq}}\index{null\_seq})\index{typed})\index{marked} \\ 
{\bf elseif }{\rm{errorp}}\,({\it{r\/}})\index{errorp}$\;\;${\bf then }{\rm{marked}}\,({\it{r\/}}, {\rm{default\_value}}\,({\it{td\/}})\index{default\_value})\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{not\_in\_type\_error}}\,({\sc{null\_seq}}\index{null\_seq}, {\it{td\/}})\index{not\_in\_type\_error}, \\ 
{\rm{default\_value}}\,({\it{td\/}})\index{default\_value})\-\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\- \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{not\_sequence\_type\_error}}\,({\it{td\/}})\index{not\_sequence\_type\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gnull\_set} \\  
\=\+{\rm{gnull\_set}}\,({\it{td\/}})\index{gnull\_set} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{set\_descp}}\,({\it{td\/}})\index{set\_descp} \\ 
{\bf then }\=\+{\bf let }\=\+{\it{r\/}}{\bf $\;$ be$\;\;$}{\rm{dtype}}\,({\it{td\/}}, {\sc{null\_set}}\index{null\_set})\index{dtype}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{truep}}\,({\it{r\/}})$\;\;${\bf then }{\rm{marked}}\,({\bf{nil}}, {\rm{typed}}\,({\it{td\/}}, {\sc{null\_set}}\index{null\_set})\index{typed})\index{marked} \\ 
{\bf elseif }{\rm{errorp}}\,({\it{r\/}})\index{errorp}$\;\;${\bf then }{\rm{marked}}\,({\it{r\/}}, {\rm{default\_value}}\,({\it{td\/}})\index{default\_value})\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{not\_in\_type\_error}}\,({\sc{null\_set}}\index{null\_set}, {\it{td\/}})\index{not\_in\_type\_error}, \\ 
{\rm{default\_value}}\,({\it{td\/}})\index{default\_value})\-\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\- \\ 
{\bf else }{\rm{marked}}\,({\rm{not\_set\_type\_error}}\,({\it{td\/}})\index{not\_set\_type\_error}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{std\_null} \\  
\=\+{\rm{std\_null}}\,({\it{d\/}})\index{std\_null} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\it{d\/}}, {\rm{list}}\,({\tt{'}}{\tt{type\_descriptor}}))\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf let }\=\+{\it{td\/}}{\bf $\;$ be$\;\;$}{\rm{unmark}}\,({\rm{car}}\,({\it{d\/}}))\index{unmark}\- \\ 
{\bf in} \\ 
\=\+{\bf case on }{\rm{root}}\,({\it{td\/}})\index{root}: \\ 
{\bf case = }{\it{mapping\/}} \\ 
{\bf then }{\rm{gnull\_map}}\,({\it{td\/}})\index{gnull\_map} \\ 
{\bf case = }{\it{sequence\/}} \\ 
{\bf $\;\;$then }{\rm{gnull\_seq}}\,({\it{td\/}})\index{gnull\_seq} \\ 
{\bf case = }{\it{set\/}} \\ 
{\bf $\;\;$then }{\rm{gnull\_set}}\,({\it{td\/}})\index{gnull\_set} \\ 
{\bf otherwise }{\rm{marked}}\,(\=\+{\rm{null\_undefined\_error}}\,({\it{td\/}})\index{null\_undefined\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endcase}\-$\;${\bf  endlet}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}
      
\begin{tabbing}{\sc Definition}:\index{std\_ord} \\  
\=\+{\rm{std\_ord}}\,({\it{d\/}})\index{std\_ord} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{td\/}}{\bf $\;$ be$\;\;$}{\rm{type}}\,({\rm{car}}\,({\it{d\/}}))\index{type}\- \\ 
{\bf in} \\ 
\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\it{d\/}}, {\rm{list}}\,({\it{td\/}}))\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{scalar\_typep}}\,({\it{td\/}})\index{scalar\_typep} \\ 
{\bf then }{\rm{marked}}\,({\bf{nil}}, {\rm{typed}}\,({\sc{integer\_desc}}\index{integer\_desc}, {\rm{value}}\,({\rm{car}}\,({\it{d\/}}))\index{value})\index{typed})\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\sc{ord\_arg\_error}}\index{ord\_arg\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{std\_pred} \\  
\=\+{\rm{std\_pred}}\,({\it{d\/}})\index{std\_pred} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{td\/}}{\bf $\;$ be$\;\;$}{\rm{base\_type}}\,({\rm{type}}\,({\rm{car}}\,({\it{d\/}}))\index{type})\index{base\_type}\- \\ 
{\bf in} \\ 
\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\it{d\/}}, {\rm{list}}\,({\it{td\/}}))\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{scalar\_typep}}\,({\it{td\/}})\index{scalar\_typep} \\ 
{\bf then }\=\+{\bf if }{\rm{gtruep}}\,({\rm{gequal}}\,(\=\+{\rm{car}}\,({\it{d\/}}), \\ 
{\rm{std\_lower}}\,({\rm{list}}\,({\rm{marked}}\,(\=\+{\tt{'}}{\tt{type\_descriptor}}, \\ 
{\it{td\/}})\-\index{marked}))\index{std\_lower})\-\index{gequal})\index{gtruep} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\rm{lower\_pred\_error}}\,({\it{td\/}})\index{lower\_pred\_error}, \\ 
{\rm{default\_value}}\,({\it{td\/}})\index{default\_value})\-\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,({\it{td\/}}, {\rm{value}}\,({\rm{car}}\,({\it{d\/}}))\index{value} $-\;1$)\index{typed})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,(\=\+{\sc{pred\_arg\_error}}\index{pred\_arg\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{std\_range} \\  
\=\+{\rm{std\_range}}\,({\it{d\/}})\index{std\_range} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\it{d\/}}, {\rm{list}}\,({\rm{type}}\,({\rm{car}}\,({\it{d\/}}))\index{type}))\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{mapping\_descp}}\,({\rm{type}}\,({\rm{car}}\,({\it{d\/}}))\index{type})\index{mapping\_descp} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\rm{set\_desc}}\,({\bf{nil}}, {\rm{component\_td}}\,({\rm{type}}\,({\rm{car}}\,({\it{d\/}}))\index{type})\index{component\_td})\index{set\_desc}, \\ 
{\rm{vrange}}\,({\rm{value}}\,({\rm{car}}\,({\it{d\/}}))\index{value})\index{vrange})\-\index{typed})\-\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\sc{range\_arg\_error}}\index{range\_arg\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{std\_scale} \\  
\=\+{\rm{std\_scale}}\,({\it{d\/}})\index{std\_scale} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,(\=\+{\it{d\/}}, \\ 
{\rm{list}}\,({\sc{integer\_desc}}\index{integer\_desc}, {\tt{'}}{\tt{type\_descriptor}}))\-\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf let }\=\+{\it{td\/}}{\bf $\;$ be$\;\;$}{\rm{base\_type}}\,({\rm{unmark}}\,({\rm{cadr}}\,({\it{d\/}}))\index{unmark})\index{base\_type}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{scalar\_typep}}\,({\it{td\/}})\index{scalar\_typep} \\ 
{\bf then }\=\+{\bf let }\=\+{\it{ok\/}}{\bf $\;$ be$\;\;$}{\rm{dtype}}\,({\it{td\/}}, {\rm{value}}\,({\rm{car}}\,({\it{d\/}}))\index{value})\index{dtype}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{truep}}\,({\it{ok\/}}) \\ 
{\bf then }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,({\it{td\/}}, {\rm{value}}\,({\rm{car}}\,({\it{d\/}}))\index{value})\index{typed})\-\index{marked} \\ 
{\bf elseif }{\rm{errorp}}\,({\it{ok\/}})\index{errorp} \\ 
{\bf then }{\rm{marked}}\,({\it{ok\/}}, {\rm{default\_value}}\,({\it{td\/}})\index{default\_value})\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{scale\_int\_arg\_error}}\,(\=\+{\rm{value}}\,({\rm{car}}\,({\it{d\/}}))\index{value}, \\ 
{\it{td\/}})\-\index{scale\_int\_arg\_error}, \\ 
{\rm{default\_value}}\,({\it{td\/}})\index{default\_value})\-\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\- \\ 
{\bf else }{\rm{marked}}\,(\=\+{\rm{scale\_type\_arg\_error}}\,({\it{td\/}})\index{scale\_type\_arg\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{std\_size} \\  
\=\+{\rm{std\_size}}\,({\it{d\/}})\index{std\_size} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\it{d\/}}, {\rm{list}}\,({\rm{type}}\,({\rm{car}}\,({\it{d\/}}))\index{type}))\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }\=\+{\rm{mapping\_descp}}\,({\rm{type}}\,({\rm{car}}\,({\it{d\/}}))\index{type})\index{mapping\_descp} \\ 
$\vee$$\;\;\;\;${\rm{sequence\_descp}}\,({\rm{type}}\,({\rm{car}}\,({\it{d\/}}))\index{type})\index{sequence\_descp} \\ 
$\vee$$\;\;\;\;${\rm{set\_descp}}\,({\rm{type}}\,({\rm{car}}\,({\it{d\/}}))\index{type})\index{set\_descp}\- \\ 
{\bf then }{\rm{marked}}\,({\bf{nil}}, {\rm{typed}}\,({\sc{integer\_desc}}\index{integer\_desc}, {\rm{vsize}}\,({\rm{value}}\,({\rm{car}}\,({\it{d\/}}))\index{value})\index{vsize})\index{typed})\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\sc{size\_arg\_error}}\index{size\_arg\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{std\_upper} \\  
\=\+{\rm{std\_upper}}\,({\it{d\/}})\index{std\_upper} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\it{d\/}}, {\rm{list}}\,({\tt{'}}{\tt{type\_descriptor}}))\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf let }\=\+{\it{td\/}}{\bf $\;$ be$\;\;$}{\rm{unmark}}\,({\rm{car}}\,({\it{d\/}}))\index{unmark}\- \\ 
{\bf in} \\ 
\=\+{\bf let }\=\+{\it{r\/}}{\bf $\;$ be$\;\;$}{\rm{tmax}}\,({\it{td\/}})\index{tmax}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{r\/}} $=$ {\bf{nil}} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\rm{unbounded\_type\_error}}\,({\it{td\/}})\index{unbounded\_type\_error}, \\ 
{\rm{default\_value}}\,({\it{td\/}})\index{default\_value})\-\index{marked} \\ 
{\bf elseif }{\rm{errorp}}\,({\it{r\/}})\index{errorp} \\ 
{\bf then }{\rm{marked}}\,({\it{r\/}}, {\rm{default\_value}}\,({\it{td\/}})\index{default\_value})\index{marked} \\ 
{\bf else }{\rm{marked}}\,({\bf{nil}}, {\rm{typed}}\,({\it{td\/}}, {\it{r\/}})\index{typed})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endlet}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{std\_succ} \\  
\=\+{\rm{std\_succ}}\,({\it{d\/}})\index{std\_succ} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{td\/}}{\bf $\;$ be$\;\;$}{\rm{base\_type}}\,({\rm{type}}\,({\rm{car}}\,({\it{d\/}}))\index{type})\index{base\_type}\- \\ 
{\bf in} \\ 
\=\+{\bf let }\=\+{\it{arg\_err\/}}{\bf $\;$ be$\;\;$}{\rm{arg\_check}}\,({\it{d\/}}, {\rm{list}}\,({\it{td\/}}))\index{arg\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{arg\_err\/}} $=$ {\bf{nil}} \\ 
{\bf then }\=\+{\bf if }{\rm{scalar\_typep}}\,({\it{td\/}})\index{scalar\_typep} \\ 
{\bf then }\=\+{\bf if }{\rm{gtruep}}\,({\rm{gequal}}\,(\=\+{\rm{car}}\,({\it{d\/}}), \\ 
{\rm{std\_upper}}\,({\rm{list}}\,({\rm{marked}}\,(\=\+{\tt{'}}{\tt{type\_descriptor}}, \\ 
{\it{td\/}})\-\index{marked}))\index{std\_upper})\-\index{gequal})\index{gtruep} \\ 
{\bf then }{\rm{marked}}\,(\=\+{\rm{upper\_succ\_error}}\,({\it{td\/}})\index{upper\_succ\_error}, \\ 
{\rm{default\_value}}\,({\it{td\/}})\index{default\_value})\-\index{marked} \\ 
{\bf else }{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,({\it{td\/}}, $1\;+$ {\rm{value}}\,({\rm{car}}\,({\it{d\/}}))\index{value})\index{typed})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,(\=\+{\sc{succ\_arg\_error}}\index{succ\_arg\_error}, \\ 
{\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\-\index{marked}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{marked}}\,({\it{arg\_err\/}}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endlet}\-\-
\end{tabbing}



\begin{verbatim}; ***********
;  Variables
; ***********

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{new\_namep} \\  
{\rm{new\_namep}}\,({\it{n\/}}, {\it{v\/}})\index{new\_namep} $=$ (($\neg$ {\rm{in\_map}}\,({\it{v\/}}, {\it{n\/}})\index{in\_map}) $\wedge$ ($\neg$ {\rm{reserved\_idp}}\,({\it{n\/}})\index{reserved\_idp}))
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{free\_variablep}$\;\;$
{\rm{free\_variablep}}\,({\it{n\/}}, {\it{v\/}})\index{free\_variablep} $=$ {\rm{in\_map}}\,({\it{v\/}}, {\it{n\/}})\index{in\_map}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{free\_value}$\;\;$
{\rm{free\_value}}\,({\it{n\/}}, {\it{v\/}})\index{free\_value} $=$ {\rm{mapped\_value}}\,({\it{v\/}}, {\it{n\/}})\index{mapped\_value}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{apply\_var} \\  
\=\+{\rm{apply\_var}}\,({\it{fn\/}}, {\it{v\/}}, {\it{d\/}})\index{apply\_var} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{free\_variablep}}\,({\it{fn\/}}, {\it{v\/}})\index{free\_variablep}$\;\;${\bf then }{\rm{select\_op}}\,({\rm{free\_value}}\,({\it{fn\/}}, {\it{v\/}})\index{free\_value}, {\it{d\/}})\index{select\_op} \\ 
{\bf else }{\rm{marked}}\,({\rm{unknown\_name\_error}}\,({\it{fn\/}})\index{unknown\_name\_error}, {\rm{default\_value}}\,({\sc{integer\_desc}}\index{integer\_desc})\index{default\_value})\index{marked}$\;${\bf  endif}\-\-
\end{tabbing}

  

\begin{verbatim}; ****************
;  Function Calls
; ****************

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{gf\_prec} \\  
\=\+{\rm{gf\_prec}}\,({\it{u\/}})\index{gf\_prec} \\ 
$=$$\;\;\;\;${\rm{subst\_tree}}\,(\=\+{\rm{mk\_entry\_value}}\,({\tt{'}}{\tt{result}})\index{mk\_entry\_value}, \\ 
{\rm{mk\_identifier}}\,({\tt{'}}{\tt{result}})\index{mk\_identifier}, \\ 
{\rm{prec}}\,({\it{u\/}})\index{prec})\-\index{subst\_tree}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{eq\_opp} \\  
\=\+{\rm{eq\_opp}}\,({\it{op\/}}, {\it{etype\/}})\index{eq\_opp} \\ 
$=$$\;\;\;\;$\=\+{\bf if }\=\+{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{eq}})\index{prodn})\index{rule} \\ 
$\vee$$\;\;\;\;${\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{equal}})\index{prodn})\index{rule}\- \\ 
{\bf then }{\rm{equality\_typep}}\,({\it{etype\/}})\index{equality\_typep} \\ 
{\bf elseif }{\rm{rule}}\,({\it{op\/}}, {\rm{prodn}}\,({\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, {\tt{'}}{\tt{iff}})\index{prodn})\index{rule} \\ 
{\bf then }{\rm{boolean\_typep}}\,({\it{etype\/}})\index{boolean\_typep} \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{f\_of\_formals} \\  
\=\+{\rm{f\_of\_formals}}\,({\it{fn\/}}, {\it{fs\/}})\index{f\_of\_formals} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{fs\/}} $\simeq\;${{\bf{nil}}}${}$ \\ 
{\bf then }{\rm{mk\_expression}}\,({\rm{mk\_modified\_primary\_value}}\,({\rm{mk\_identifier}}\,({\it{fn\/}})\index{mk\_identifier})\index{mk\_modified\_primary\_value})\index{mk\_expression} \\ 
{\bf else }{\rm{mk\_expression}}\,({\rm{mk\_tree}}\,(\=\+{\tt{'}}{\tt{modified\_primary\_value}}, \\ 
{\rm{list}}\,(\=\+{\rm{mk\_modified\_primary\_value}}\,({\rm{mk\_identifier}}\,({\it{fn\/}})\index{mk\_identifier})\index{mk\_modified\_primary\_value}, \\ 
{\rm{mk\_value\_modifiers}}\,({\rm{namelist\_to\_actuals}}\,(\=\+{\rm{dparam\_name\_list}}\,({\it{fs\/}})\index{dparam\_name\_list}, \\ 
{\bf{nil}})\-\index{namelist\_to\_actuals})\index{mk\_value\_modifiers})\-)\-\index{mk\_tree})\index{mk\_expression}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{function\_defn} \\  
\=\+{\rm{function\_defn}}\,({\it{u\/}}, {\it{ftype\/}})\index{function\_defn} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{fc\/}}{\bf $\;$ be$\;\;$}{\rm{f\_of\_formals}}\,({\rm{unit\_name}}\,({\it{u\/}})\index{unit\_name}, {\rm{formal\_dargs}}\,({\it{u\/}})\index{formal\_dargs})\index{f\_of\_formals}, \\ 
{\it{result\/}}{\bf $\;$ be$\;\;$}{\rm{mk\_expression}}\,({\tt{'}}{\tt{result}})\index{mk\_expression}\- \\ 
{\bf in} \\ 
\=\+{\bf let }\=\+{\it{e\/}}{\bf $\;$ be$\;\;$}{\rm{postc}}\,({\it{u\/}}, {\tt{'}}{\tt{normal}})\index{postc}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e1}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{binary\_operator}}, {\tt{'}}{\tt{op}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e2}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }\=\+{\bf if }{\rm{eq\_opp}}\,({\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{binary\_operator}})\index{subtree}, {\it{ftype\/}})\index{eq\_opp} \\ 
{\bf then }\=\+{\bf if }\=\+({\rm{subtree\_i}}\,({\it{e\/}}, {\tt{'}}{\tt{expression}}, {\tt{1}})\index{subtree\_i} $=$ {\it{result\/}}) \\ 
$\vee$$\;\;\;\;$(\=\+{\rm{subtree\_i}}\,({\it{e\/}}, {\tt{'}}{\tt{expression}}, {\tt{1}})\index{subtree\_i} \\ 
$=$$\;\;\;\;${\it{fc\/}})\-\- \\ 
{\bf then }{\rm{subst\_tree}}\,(\=\+{\it{fc\/}}, \\ 
{\it{result\/}}, \\ 
{\rm{subtree\_i}}\,({\it{e\/}}, {\tt{'}}{\tt{expression}}, {\tt{2}})\index{subtree\_i})\-\index{subst\_tree} \\ 
{\bf elseif }\=\+(\=\+{\rm{subtree\_i}}\,({\it{e\/}}, {\tt{'}}{\tt{expression}}, {\tt{2}})\index{subtree\_i} \\ 
$=$$\;\;\;\;${\it{result\/}})\- \\ 
$\vee$$\;\;\;\;$(\=\+{\rm{subtree\_i}}\,({\it{e\/}}, {\tt{'}}{\tt{expression}}, {\tt{2}})\index{subtree\_i} \\ 
$=$$\;\;\;\;${\it{fc\/}})\-\- \\ 
{\bf then }{\rm{subst\_tree}}\,(\=\+{\it{fc\/}}, \\ 
{\it{result\/}}, \\ 
{\rm{subtree\_i}}\,({\it{e\/}}, {\tt{'}}{\tt{expression}}, {\tt{1}})\index{subtree\_i})\-\index{subst\_tree} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\- \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\- \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{verbatim}; Previous definition of function_defn
;(defn function_defn (u ftype)
;  (let ((fc (f_of_formals (unit_name u) (formal_dargs u)))
;	(result (mk_expression 'result)))
;  (let ((e (subst_tree result fc (postc u 'NORMAL))))
;
;    (if (rule e (prodn (tag 'expression 'e)
;		       (list (tag 'expression 'e1)
;			     (tag 'binary_operator 'op)
;			     (tag 'expression 'e2))))
;	(if (eq_opp (subtree e 'binary_operator) ftype)
;	    (if (and (equal (subtree_i e 'expression 1) result)
;		     (not (subtreep result (subtree_i e 'expression 2))))
;		(subtree_i e 'expression 2)
;	    (if (and (equal (subtree_i e 'expression 2) result)
;		     (not (subtreep result (subtree_i e 'expression 1))))
;		(subtree_i e 'expression 1)
;	      nil))
;	  nil)
;      nil))))


\end{verbatim}\begin{tabbing}{\sc Definition}:\index{has\_defn} \\  
\=\+{\rm{has\_defn}}\,({\it{u\/}}, {\it{ftype\/}})\index{has\_defn} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{kind}}\,({\it{u\/}})\index{kind} $=$ {\tt{'}}{\tt{function}}$\;\;${\bf then }{\rm{function\_defn}}\,({\it{u\/}}, {\it{ftype\/}})\index{function\_defn} $\not=$ {\bf{nil}} \\ 
{\bf elseif }{\rm{kind}}\,({\it{u\/}})\index{kind} $=$ {\tt{'}}{\tt{constant}}$\;\;${\bf then }{\rm{constant\_value\_exp}}\,({\it{u\/}})\index{constant\_value\_exp} $\not=$ {\bf{nil}} \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gdefn} \\  
\=\+{\rm{gdefn}}\,({\it{u\/}}, {\it{ftype\/}})\index{gdefn} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{kind}}\,({\it{u\/}})\index{kind} $=$ {\tt{'}}{\tt{function}}$\;\;${\bf then }{\rm{function\_defn}}\,({\it{u\/}}, {\it{ftype\/}})\index{function\_defn} \\ 
{\bf elseif }{\rm{kind}}\,({\it{u\/}})\index{kind} $=$ {\tt{'}}{\tt{constant}}$\;\;${\bf then }{\rm{constant\_value\_exp}}\,({\it{u\/}})\index{constant\_value\_exp} \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{formal\_type\_list} \\  
\=\+{\rm{formal\_type\_list}}\,({\it{fs\/}}, {\it{sn\/}}, {\it{x\/}})\index{formal\_type\_list} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{fs\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf else }{\rm{cons}}\,(\=\+{\rm{type\_desc}}\,({\rm{formal\_type}}\,({\rm{car}}\,({\it{fs\/}}))\index{formal\_type}, {\it{sn\/}}, {\bf{nil}}, {\it{x\/}})\index{type\_desc}, \\ 
{\rm{formal\_type\_list}}\,({\rm{cdr}}\,({\it{fs\/}}), {\it{sn\/}}, {\it{x\/}})\index{formal\_type\_list})\-$\;${\bf  endif}\-\-
\end{tabbing}


\noindent{\sc Event}:   Disable reserved\_idp.

\addvspace{18pt}

\noindent{\sc Event}:   Disable dparam\_name.

\addvspace{18pt}

\noindent{\sc Event}:   Disable param\_reserved\_error.

\addvspace{18pt}

\noindent{\sc Event}:   Disable dparam\_name\_list.

\addvspace{18pt}

\noindent{\sc Event}:   Disable duplicate\_param\_names\_error.

\addvspace{18pt}

\noindent{\sc Event}:   Disable access.

\addvspace{18pt}

\noindent{\sc Event}:   Disable function\_access\_error.

\addvspace{18pt}

\begin{tabbing}{\sc Definition}:\index{fformals\_check} \\  
\=\+{\rm{fformals\_check}}\,({\it{fs\/}})\index{fformals\_check} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{fs\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf elseif }{\rm{reserved\_idp}}\,({\rm{dparam\_name}}\,({\rm{car}}\,({\it{fs\/}}))\index{dparam\_name})\index{reserved\_idp} \\ 
{\bf then }{\rm{param\_reserved\_error}}\,({\rm{car}}\,({\it{fs\/}}))\index{param\_reserved\_error} \\ 
{\bf elseif }\=\+({\rm{dparam\_name}}\,({\rm{car}}\,({\it{fs\/}}))\index{dparam\_name} $\in$ {\rm{dparam\_name\_list}}\,({\rm{cdr}}\,({\it{fs\/}}))\index{dparam\_name\_list}) \\ 
$\vee$$\;\;\;\;$({\rm{dparam\_name}}\,({\rm{car}}\,({\it{fs\/}}))\index{dparam\_name} $=$ {\tt{'}}{\tt{result}})\- \\ 
{\bf then }{\rm{duplicate\_param\_names\_error}}\,({\rm{car}}\,({\it{fs\/}}))\index{duplicate\_param\_names\_error} \\ 
{\bf elseif }{\rm{access}}\,({\rm{car}}\,({\it{fs\/}}))\index{access} $=$ {\tt{'}}{\tt{var}}$\;\;${\bf then }{\rm{function\_access\_error}}\,({\rm{car}}\,({\it{fs\/}}))\index{function\_access\_error} \\ 
{\bf else }{\rm{fformals\_check}}\,({\rm{cdr}}\,({\it{fs\/}}))\index{fformals\_check}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{farg\_check} \\  
\=\+{\rm{farg\_check}}\,({\it{fs\/}}, {\it{as\/}}, {\it{fsn\/}}, {\it{x\/}})\index{farg\_check} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{r\/}}{\bf $\;$ be$\;\;$}{\rm{fformals\_check}}\,({\it{fs\/}})\index{fformals\_check}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{r\/}} $=$ {\bf{nil}}$\;\;${\bf then }{\rm{arg\_check}}\,({\it{as\/}}, {\rm{formal\_type\_list}}\,({\it{fs\/}}, {\it{fsn\/}}, {\it{x\/}})\index{formal\_type\_list})\index{arg\_check} \\ 
{\bf else }{\it{r\/}}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{bind\_args} \\  
\=\+{\rm{bind\_args}}\,({\it{fs\/}}, {\it{as\/}}, {\it{fsn\/}}, {\it{x\/}})\index{bind\_args} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{fs\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\sc{empty\_map}}\index{empty\_map} \\ 
{\bf else }{\rm{add\_to\_map}}\,(\=\+{\rm{bind\_args}}\,({\rm{rcdr}}\,({\it{fs\/}})\index{rcdr}, {\rm{rcdr}}\,({\it{as\/}})\index{rcdr}, {\it{fsn\/}}, {\it{x\/}})\index{bind\_args}, \\ 
{\rm{dparam\_name}}\,({\rm{rcar}}\,({\it{fs\/}})\index{rcar})\index{dparam\_name}, \\ 
{\rm{marked}}\,(\=\+{\bf{nil}}, \\ 
{\rm{typed}}\,(\=\+{\rm{type\_desc}}\,(\=\+{\rm{formal\_type}}\,({\rm{rcar}}\,({\it{fs\/}})\index{rcar})\index{formal\_type}, \\ 
{\it{fsn\/}}, \\ 
{\bf{nil}}, \\ 
{\it{x\/}})\-\index{type\_desc}, \\ 
{\rm{value}}\,({\rm{rcar}}\,({\it{as\/}})\index{rcar})\index{value})\-\index{typed})\-\index{marked})\-\index{add\_to\_map}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{mk\_entry\_name} \\  
{\rm{mk\_entry\_name}}\,({\it{n\/}})\index{mk\_entry\_name} $=$ {\rm{pack}}\,({\rm{rcons}}\,({\rm{unpack}}\,({\it{n\/}}), {\sc{ascii\_single\_quote}}\index{ascii\_single\_quote})\index{rcons})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{type\_namep} \\  
\=\+{\rm{type\_namep}}\,({\it{tn\/}}, {\it{sn\/}}, {\it{x\/}})\index{type\_namep} \\ 
$=$$\;\;\;\;$(\=\+({\it{tn\/}} $\in$ {\tt{'}}{\tt{(}}{\tt{boolean}}{\tt{ }}{\tt{character}}{\tt{ }}{\tt{integer}}{\tt{ }}{\tt{rational}}{\tt{)}}) \\ 
$\vee$$\;\;\;\;$({\rm{kind}}\,({\rm{ref\_unit}}\,({\rm{ref}}\,({\it{tn\/}}, {\it{sn\/}}, {\it{x\/}})\index{ref})\index{ref\_unit})\index{kind} $=$ {\tt{'}}{\tt{type}}))\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{type\_name\_expp} \\  
{\rm{type\_name\_expp}}\,({\it{fn\/}}, {\it{ap\/}}, {\it{sn\/}}, {\it{x\/}})\index{type\_name\_expp} $=$ ({\rm{type\_namep}}\,({\it{fn\/}}, {\it{sn\/}}, {\it{x\/}})\index{type\_namep} $\wedge$ ({\it{ap\/}} $\simeq\;${{\bf{nil}}}${}$))
\end{tabbing}



\begin{verbatim}; ***********************
;  Expression Evaluation
; ***********************

; Note:  Semantic errors that don't come up during evaluation of expressions
;        are not detected.  
;
;        1. Uniqueness of local names requirements are enforced only by the
;           reference resolution mechanism and by requiring unique names for 
;           data objects in the environment.  For example, in
;        
;               f(x) & all f : t, g(x,f)
;
;           the use of f both as a function name and as a bound identifier is
;           not detected, and in 
;
;               function f (i : i) : boolean = pending
;
;           the use of i both as a parameter name and as a type name is not
;           detected.  
;
;        2. Errors in conditional exit specifications of functions are
;           detected only if they make it impossible to locate the function
;           definition.  None of the errors in
;
;               function f (x : integer) : boolean =
;               begin
;                 exit case (is normal : (assume result = g(x));
;     		             is     c1 : (assume c1(x));
;		             is     c1 : (assume c2(x)));
;               end;
;
;           are detected.
;
;        3. Errors are detected in only the evaluated parts of if expressions.
;           For example, no errors are detected in
;
;               if false then
;                 'a'
;               elif true then
;                 3
;               elif 1/2 then
;                 [set: binary 28]
;               else 4 + "a string"
;               fi
;
;        4. Errors in scope, unit, and name declarations are detected only if
;           they come up in a unit reference.



\end{verbatim}\begin{tabbing}{\sc Definition}:\index{bound\_values} \\  
\=\+{\rm{bound\_values}}\,({\it{e\/}}, {\it{c\/}}, {\it{x\/}})\index{bound\_values} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{list}}\,({\tt{'}}{\tt{all}}, {\rm{tag}}\,({\tt{'}}{\tt{bound\_expression}}, {\tt{'}}{\tt{b}})\index{tag}))\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{bound\_values}}\,({\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{bound\_expression}})\index{subtree}, {\it{c\/}}, {\it{x\/}})\index{bound\_values} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{list}}\,({\tt{'}}{\tt{some}}, {\rm{tag}}\,({\tt{'}}{\tt{bound\_expression}}, {\tt{'}}{\tt{b}})\index{tag}))\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{bound\_values}}\,({\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{bound\_expression}})\index{subtree}, {\it{c\/}}, {\it{x\/}})\index{bound\_values} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{bound\_expression}}, {\tt{'}}{\tt{b}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{identifier\_list}}, {\tt{'}}{\tt{q}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{s}})\index{tag}, \\ 
{\tt{'}}{\tt{comma}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{e}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }{\rm{marked\_typed\_value\_set}}\,({\rm{type\_desc}}\,(\=\+{\rm{subtree}}\,(\=\+{\it{e\/}}, \\ 
{\tt{'}}{\tt{type\_specification}})\-\index{subtree}, \\ 
{\it{c\/}}, \\ 
{\bf{nil}}, \\ 
{\it{x\/}})\-\index{type\_desc})\index{marked\_typed\_value\_set} \\ 
{\bf elseif }{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{opt\_each\_clause}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{each}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{identifier}}, {\tt{'}}{\tt{i}})\index{tag}, \\ 
{\tt{'}}{\tt{colon}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{type\_specification}}, {\tt{'}}{\tt{ts}})\index{tag}, \\ 
{\tt{'}}{\tt{comma}})\-)\-\index{prodn})\-\index{rule} \\ 
{\bf then }\=\+{\bf let }\=\+{\it{td\/}}{\bf $\;$ be$\;\;$}{\rm{type\_desc}}\,(\=\+{\rm{subtree}}\,({\it{e\/}}, {\tt{'}}{\tt{type\_specification}})\index{subtree}, \\ 
{\it{c\/}}, \\ 
{\bf{nil}}, \\ 
{\it{x\/}})\-\index{type\_desc}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{bounded\_index\_typep}}\,({\it{td\/}})\index{bounded\_index\_typep} \\ 
{\bf then }{\rm{marked\_typed\_value\_set}}\,({\it{td\/}})\index{marked\_typed\_value\_set} \\ 
{\bf else }{\rm{each\_id\_type\_error}}\,({\it{e\/}}, {\it{c\/}})\index{each\_id\_type\_error}$\;${\bf  endif}\-$\;${\bf  endlet}\- \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}



\begin{verbatim}; =================================
;  Lemmas for GF Group Termination
; =================================

; Make these lemmas more reasonable if there is time.


; ==============================================
;  Case of Characters Does Not Affect Tree Size
; ==============================================

\end{verbatim}\begin{tabbing}{\sc Theorem}:  upper\_case\_tree\_size \\ \index{upper\_case\_tree\_size}
{\rm{ascii\_characterp}}\,({\it{x\/}})\index{ascii\_characterp} $\rightarrow$ ({\rm{tree\_size}}\,({\rm{upper\_case}}\,({\it{x\/}})\index{upper\_case})\index{tree\_size} $=$ {\rm{tree\_size}}\,({\it{x\/}})\index{tree\_size})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  uc\_list\_tree\_size \\ \index{uc\_list\_tree\_size}
{\rm{ascii\_character\_listp}}\,({\it{x\/}})\index{ascii\_character\_listp} $\rightarrow$ ({\rm{tree\_size}}\,({\rm{uc\_list}}\,({\it{x\/}})\index{uc\_list})\index{tree\_size} $=$ {\rm{tree\_size}}\,({\it{x\/}})\index{tree\_size})
\end{tabbing}


\noindent{\sc Event}:   Disable upper\_case\_tree\_size.

\addvspace{18pt}

\noindent{\sc Event}:   Disable uc\_list\_tree\_size.

\addvspace{18pt}


\begin{verbatim}; ==========================================================
;  Else Part of If Expression Is Smaller than If Expression
; ==========================================================

; -------------------------
;  IF is smaller than ELIF
; -------------------------

\end{verbatim}\begin{tabbing}{\sc Theorem}:  lessp\_subtrees\_imp\_lessp\_tree\_size \\ \index{lessp\_subtrees\_imp\_lessp\_tree!\_size}
\=\+(\=\+{\rm{treep}}\,({\it{x\/}})\index{treep} \\ 
$\wedge$$\;\;\;\;${\rm{treep}}\,({\it{y\/}})\index{treep} \\ 
$\wedge$$\;\;\;\;$({\rm{tree\_size}}\,({\rm{subtrees}}\,({\it{x\/}})\index{subtrees})\index{tree\_size} $<$ {\rm{tree\_size}}\,({\rm{subtrees}}\,({\it{y\/}})\index{subtrees})\index{tree\_size}))\- \\ 
$\rightarrow$$\;\;\;\;$({\rm{tree\_size}}\,({\it{x\/}})\index{tree\_size} $<$ {\rm{tree\_size}}\,({\it{y\/}})\index{tree\_size})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  same\_leaf\_imp\_same\_tree\_size1 \\ \index{same\_leaf\_imp\_same\_tree\_si!ze1}
\=\+(\=\+{\rm{leafp}}\,({\it{x\/}})\index{leafp} \\ 
$\wedge$$\;\;\;\;${\rm{leafp}}\,({\it{y\/}})\index{leafp} \\ 
$\wedge$$\;\;\;\;$({\rm{root}}\,({\it{x\/}})\index{root} $=$ {\rm{root}}\,({\it{y\/}})\index{root}) \\ 
$\wedge$$\;\;\;\;$({\rm{lexeme}}\,({\it{x\/}})\index{lexeme} $=$ {\rm{lexeme}}\,({\it{y\/}})\index{lexeme}))\- \\ 
$\rightarrow$$\;\;\;\;$({\rm{tree\_size}}\,({\it{x\/}})\index{tree\_size} $=$ {\rm{tree\_size}}\,({\it{y\/}})\index{tree\_size})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  same\_leaf\_imp\_same\_tree\_size2 \\ \index{same\_leaf\_imp\_same\_tree\_si!ze2}
\=\+(\=\+{\rm{leafp}}\,({\it{x\/}})\index{leafp} \\ 
$\wedge$$\;\;\;\;${\rm{leafp}}\,({\it{y\/}})\index{leafp} \\ 
$\wedge$$\;\;\;\;$({\rm{root}}\,({\it{x\/}})\index{root} $=$ {\rm{root}}\,({\it{y\/}})\index{root}) \\ 
$\wedge$$\;\;\;\;$({\rm{uc\_list}}\,({\rm{lexeme}}\,({\it{x\/}})\index{lexeme})\index{uc\_list} $=$ {\rm{uc\_list}}\,({\rm{lexeme}}\,({\it{y\/}})\index{lexeme})\index{uc\_list}))\- \\ 
$\rightarrow$$\;\;\;\;$({\rm{tree\_size}}\,({\it{x\/}})\index{tree\_size} $=$ {\rm{tree\_size}}\,({\it{y\/}})\index{tree\_size})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  leaf\_equal\_imp\_tree\_size\_equal \\ \index{leaf\_equal\_imp\_tree\_size\_eq!ual}
{\rm{leaf\_equal}}\,({\it{x\/}}, {\it{y\/}})\index{leaf\_equal} $\rightarrow$ ({\rm{tree\_size}}\,({\it{x\/}})\index{tree\_size} $=$ {\rm{tree\_size}}\,({\it{y\/}})\index{tree\_size})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  tree\_equal\_imp\_tree\_size\_equal \\ \index{tree\_equal\_imp\_tree\_size\_eq!ual}
{\rm{tree\_equal}}\,({\it{x\/}}, {\it{y\/}})\index{tree\_equal} $\rightarrow$ ({\rm{tree\_size}}\,({\it{x\/}})\index{tree\_size} $=$ {\rm{tree\_size}}\,({\it{y\/}})\index{tree\_size})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  elif\_leafp \\ \index{elif\_leafp}
\=\+({\rm{parse\_tree\_leafp}}\,({\it{e\/}})\index{parse\_tree\_leafp} $\wedge$ ({\rm{root}}\,({\it{e\/}})\index{root} $=$ {\tt{'}}{\tt{elif}})) \\ 
$\rightarrow$$\;\;\;\;${\rm{tree\_equal}}\,({\it{e\/}}, {\rm{mk\_reserved\_word}}\,({\tt{'}}{\tt{elif}})\index{mk\_reserved\_word})\index{tree\_equal}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  mk\_rhs\_imp\_root \\ \index{mk\_rhs\_imp\_root}
\=\+({\rm{parse\_treep}}\,({\it{e\/}})\index{parse\_treep} $\wedge$ ({\rm{mk\_rhs}}\,({\it{e\/}})\index{mk\_rhs} $=$ {\tt{'}}{\tt{elif}})) \\ 
$\rightarrow$$\;\;\;\;$({\rm{parse\_tree\_leafp}}\,({\it{e\/}})\index{parse\_tree\_leafp} $\wedge$ ({\rm{root}}\,({\it{e\/}})\index{root} $=$ {\tt{'}}{\tt{elif}}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  if\_exp\_else\_subtrees\_car \\ \index{if\_exp\_else\_subtrees\_car}
\=\+{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{if\_expression\_else\_part}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{elif}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{b}})\index{tag}, \\ 
{\tt{'}}{\tt{then}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{p}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{if\_expression\_else\_part}}, {\tt{'}}{\tt{e2}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
$\rightarrow$$\;\;\;\;${\rm{tree\_equal}}\,({\rm{car}}\,({\rm{subtrees}}\,({\it{e\/}})\index{subtrees}), {\rm{mk\_reserved\_word}}\,({\tt{'}}{\tt{elif}})\index{mk\_reserved\_word})\index{tree\_equal}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp\_if\_than\_elif \\ \index{lessp\_if\_than\_elif}
\=\+{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{if\_expression\_else\_part}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{elif}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{b}})\index{tag}, \\ 
{\tt{'}}{\tt{then}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{p}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{if\_expression\_else\_part}}, {\tt{'}}{\tt{e2}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
$\rightarrow$$\;\;\;\;$({\rm{tree\_size}}\,({\rm{mk\_reserved\_word}}\,({\tt{'}}{\tt{if}})\index{mk\_reserved\_word})\index{tree\_size} $<$ {\rm{tree\_size}}\,({\rm{car}}\,({\rm{subtrees}}\,({\it{e\/}})\index{subtrees}))\index{tree\_size})\-
\end{tabbing}


\begin{verbatim}; ---------------------
;  Subtrees Are a List
; ---------------------

\end{verbatim}\begin{tabbing}{\sc Theorem}:  listp\_if\_exp\_else\_subtrees \\ \index{listp\_if\_exp\_else\_subtrees}
\=\+{\rm{rule}}\,(\=\+{\it{e\/}}, \\ 
{\rm{prodn}}\,(\=\+{\rm{tag}}\,({\tt{'}}{\tt{if\_expression\_else\_part}}, {\tt{'}}{\tt{e}})\index{tag}, \\ 
{\rm{list}}\,(\=\+{\tt{'}}{\tt{elif}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{b}})\index{tag}, \\ 
{\tt{'}}{\tt{then}}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{expression}}, {\tt{'}}{\tt{p}})\index{tag}, \\ 
{\rm{tag}}\,({\tt{'}}{\tt{if\_expression\_else\_part}}, {\tt{'}}{\tt{e2}})\index{tag})\-)\-\index{prodn})\-\index{rule} \\ 
$\rightarrow$$\;\;\;\;${\rm{listp}}\,({\rm{subtrees}}\,({\it{e\/}})\index{subtrees})\-
\end{tabbing}


\begin{verbatim}; --------------------------
;  The Else Part Is Smaller
; --------------------------

\end{verbatim}\begin{tabbing}{\sc Theorem}:  lessp\_car\_imp\_lessp\_tree\_size \\ \index{lessp\_car\_imp\_lessp\_tree\_si!ze}
\=\+(\=\+{\rm{listp}}\,({\it{x\/}}) \\ 
$\wedge$$\;\;\;\;${\rm{listp}}\,({\it{y\/}}) \\ 
$\wedge$$\;\;\;\;$({\rm{tree\_size}}\,({\rm{car}}\,({\it{x\/}}))\index{tree\_size} $<$ {\rm{tree\_size}}\,({\rm{car}}\,({\it{y\/}}))\index{tree\_size}) \\ 
$\wedge$$\;\;\;\;$({\rm{tree\_size}}\,({\rm{cdr}}\,({\it{x\/}}))\index{tree\_size} $=$ {\rm{tree\_size}}\,({\rm{cdr}}\,({\it{y\/}}))\index{tree\_size}))\- \\ 
$\rightarrow$$\;\;\;\;$({\rm{tree\_size}}\,({\it{x\/}})\index{tree\_size} $<$ {\rm{tree\_size}}\,({\it{y\/}})\index{tree\_size})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp\_mk\_tree\_car\_imp\_lessp\_tree\_size \\ \index{lessp\_mk\_tree\_car\_imp\_lessp!\_tree\_size}
\=\+(\=\+{\rm{treep}}\,({\it{e\/}})\index{treep} \\ 
$\wedge$$\;\;\;\;${\rm{listp}}\,({\rm{subtrees}}\,({\it{e\/}})\index{subtrees}) \\ 
$\wedge$$\;\;\;\;$({\rm{tree\_size}}\,({\it{k\/}})\index{tree\_size} $<$ {\rm{tree\_size}}\,({\rm{car}}\,({\rm{subtrees}}\,({\it{e\/}})\index{subtrees}))\index{tree\_size}))\- \\ 
$\rightarrow$$\;\;\;\;$({\rm{tree\_size}}\,({\rm{mk\_tree}}\,({\it{nt\/}}, {\rm{cons}}\,({\it{k\/}}, {\rm{cdr}}\,({\rm{subtrees}}\,({\it{e\/}})\index{subtrees})))\index{mk\_tree})\index{tree\_size} $<$ {\rm{tree\_size}}\,({\it{e\/}})\index{tree\_size})\-
\end{tabbing}


\noindent{\sc Event}:   Disable lessp\_car\_imp\_lessp\_tree\_size.

\addvspace{18pt}

\begin{tabbing}{\sc Theorem}:  leq\_if\_exp\_else\_part \\ \index{leq\_if\_exp\_else\_part}
\=\+({\rm{tree\_size}}\,({\rm{if\_else\_exp}}\,({\it{e\/}})\index{if\_else\_exp})\index{tree\_size} $\not<$ {\rm{tree\_size}}\,({\it{e\/}})\index{tree\_size}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{tree\_size}}\,({\rm{if\_else\_exp}}\,({\it{e\/}})\index{if\_else\_exp})\index{tree\_size} $=$ {\rm{tree\_size}}\,({\it{e\/}})\index{tree\_size})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp\_if\_exp\_else\_part \\ \index{lessp\_if\_exp\_else\_part}
\=\+{\rm{rule}}\,({\it{e\/}}, {\rm{prodn}}\,({\it{x\/}}, {\it{y\/}})\index{prodn})\index{rule} \\ 
$\rightarrow$$\;\;\;\;$({\rm{tree\_size}}\,({\rm{if\_else\_exp}}\,({\rm{subtree}}\,({\it{e\/}}, {\it{n\/}})\index{subtree})\index{if\_else\_exp})\index{tree\_size} $<$ {\rm{tree\_size}}\,({\it{e\/}})\index{tree\_size})\-
\end{tabbing}


\begin{verbatim}; =======================================
;  Gname Is Smaller Than Identifier Tree
; =======================================

\end{verbatim}\begin{tabbing}{\sc Theorem}:  identifierp\_imp\_treep \\ \index{identifierp\_imp\_treep}
{\rm{identifierp}}\,({\it{e\/}})\index{identifierp} $\rightarrow$ {\rm{treep}}\,({\it{e\/}})\index{treep}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp\_gname\_tree\_size\_0 \\ \index{lessp\_gname\_tree\_size\_0}
{\rm{treep}}\,({\it{e\/}})\index{treep} $\rightarrow$ ({\rm{tree\_size}}\,({\rm{gname}}\,({\it{e\/}})\index{gname})\index{tree\_size} $<$ {\rm{tree\_size}}\,({\it{e\/}})\index{tree\_size})
\end{tabbing}
	   
\begin{tabbing}{\sc Theorem}:  lessp\_gname\_tree\_size \\ \index{lessp\_gname\_tree\_size}
{\rm{identifierp}}\,({\it{e\/}})\index{identifierp} $\rightarrow$ ({\rm{tree\_size}}\,({\rm{gname}}\,({\it{e\/}})\index{gname})\index{tree\_size} $<$ {\rm{tree\_size}}\,({\it{e\/}})\index{tree\_size})
\end{tabbing}


\begin{verbatim}; ===================================================
;  Object Name Is Smaller Than Containing Expression
; ===================================================

\end{verbatim}\begin{tabbing}{\sc Theorem}:  leq\_object\_name\_tree\_size \\ \index{leq\_object\_name\_tree\_size}
\=\+({\rm{tree\_size}}\,({\rm{object\_name}}\,({\it{e\/}})\index{object\_name})\index{tree\_size} $\not<$ {\rm{tree\_size}}\,({\it{e\/}})\index{tree\_size}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{tree\_size}}\,({\rm{object\_name}}\,({\it{e\/}})\index{object\_name})\index{tree\_size} $=$ {\rm{tree\_size}}\,({\it{e\/}})\index{tree\_size})\-
\end{tabbing}


\noindent{\sc Event}:   Disable leq\_object\_name\_tree\_size.

\addvspace{18pt}

\begin{tabbing}{\sc Theorem}:  lessp\_object\_name\_tree\_size \\ \index{lessp\_object\_name\_tree\_size}
\=\+{\rm{rule}}\,({\it{e\/}}, {\rm{prodn}}\,({\it{x\/}}, {\it{y\/}})\index{prodn})\index{rule} \\ 
$\rightarrow$$\;\;\;\;$({\rm{tree\_size}}\,({\rm{object\_name}}\,({\rm{subtree}}\,({\it{e\/}}, {\it{n\/}})\index{subtree})\index{object\_name})\index{tree\_size} $<$ {\rm{tree\_size}}\,({\it{e\/}})\index{tree\_size})\-
\end{tabbing}


\begin{verbatim}; ==================================================
;  Argument List Smaller Than Containing Expression
; ==================================================

\end{verbatim}\begin{tabbing}{\sc Theorem}:  leq\_arg\_list\_tree\_size \\ \index{leq\_arg\_list\_tree\_size}
\=\+({\rm{tree\_size}}\,({\rm{arg\_list}}\,({\it{e\/}})\index{arg\_list})\index{tree\_size} $\not<$ {\rm{tree\_size}}\,({\it{e\/}})\index{tree\_size}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{tree\_size}}\,({\rm{arg\_list}}\,({\it{e\/}})\index{arg\_list})\index{tree\_size} $=$ {\rm{tree\_size}}\,({\it{e\/}})\index{tree\_size})\-
\end{tabbing}


\noindent{\sc Event}:   Disable leq\_arg\_list\_tree\_size.

\addvspace{18pt}

\begin{tabbing}{\sc Theorem}:  lessp\_arg\_list\_tree\_size \\ \index{lessp\_arg\_list\_tree\_size}
{\rm{rule}}\,({\it{e\/}}, {\rm{prodn}}\,({\it{x\/}}, {\it{y\/}})\index{prodn})\index{rule} $\rightarrow$ ({\rm{tree\_size}}\,({\rm{arg\_list}}\,({\rm{subtree}}\,({\it{e\/}}, {\it{n\/}})\index{subtree})\index{arg\_list})\index{tree\_size} $<$ {\rm{tree\_size}}\,({\it{e\/}})\index{tree\_size})
\end{tabbing}


\begin{verbatim}; ========================================================
;  Bound Identifier Is Smaller Than Containing Expression
; ========================================================

\end{verbatim}\begin{tabbing}{\sc Theorem}:  leq\_bound\_id\_tree\_size \\ \index{leq\_bound\_id\_tree\_size}
\=\+({\rm{tree\_size}}\,({\rm{bound\_id}}\,({\it{e\/}})\index{bound\_id})\index{tree\_size} $\not<$ {\rm{tree\_size}}\,({\it{e\/}})\index{tree\_size}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{tree\_size}}\,({\rm{bound\_id}}\,({\it{e\/}})\index{bound\_id})\index{tree\_size} $=$ {\rm{tree\_size}}\,({\it{e\/}})\index{tree\_size})\-
\end{tabbing}


\noindent{\sc Event}:   Disable leq\_bound\_id\_tree\_size.

\addvspace{18pt}

\begin{tabbing}{\sc Theorem}:  lessp\_bound\_id\_tree\_size \\ \index{lessp\_bound\_id\_tree\_size}
{\rm{rule}}\,({\it{e\/}}, {\rm{prodn}}\,({\it{x\/}}, {\it{y\/}})\index{prodn})\index{rule} $\rightarrow$ ({\rm{tree\_size}}\,({\rm{bound\_id}}\,({\rm{subtree}}\,({\it{e\/}}, {\it{n\/}})\index{subtree})\index{bound\_id})\index{tree\_size} $<$ {\rm{tree\_size}}\,({\it{e\/}})\index{tree\_size})
\end{tabbing}




\noindent{\sc Event}:   Disable *1*gfalse.

\addvspace{18pt}

\noindent{\sc Event}:   Disable *1*gizero.

\addvspace{18pt}

\noindent{\sc Event}:   Disable *1*gtrue.

\addvspace{18pt}

\noindent{\sc Event}:   Disable *1*boolean\_desc.

\addvspace{18pt}

\noindent{\sc Event}:   Disable *1*integer\_desc.

\addvspace{18pt}

\noindent{\sc Event}:   Disable *1*mk\_unary\_operator.

\addvspace{18pt}

\noindent{\sc Event}:   Disable gf\_prec.

\addvspace{18pt}

\noindent{\sc Event}:   Disable gand.

\addvspace{18pt}

\noindent{\sc Event}:   Disable gchar.

\addvspace{18pt}

\noindent{\sc Event}:   Disable gdefn.

\addvspace{18pt}

\noindent{\sc Event}:   Disable gfalse.

\addvspace{18pt}

\noindent{\sc Event}:   Disable gizero.

\addvspace{18pt}

\noindent{\sc Event}:   Disable gle.

\addvspace{18pt}

\noindent{\sc Event}:   Disable gmap\_insert.

\addvspace{18pt}

\noindent{\sc Event}:   Disable gmapomit.

\addvspace{18pt}

\noindent{\sc Event}:   Disable gor.

\addvspace{18pt}

\noindent{\sc Event}:   Disable grange\_elements.

\addvspace{18pt}

\noindent{\sc Event}:   Disable gseq\_insert\_before.

\addvspace{18pt}

\noindent{\sc Event}:   Disable gseq\_insert\_behind.

\addvspace{18pt}

\noindent{\sc Event}:   Disable gseqomit.

\addvspace{18pt}

\noindent{\sc Event}:   Disable gset\_or\_seq.

\addvspace{18pt}

\noindent{\sc Event}:   Disable gstring\_seq.

\addvspace{18pt}

\noindent{\sc Event}:   Disable gtrue.

\addvspace{18pt}

\noindent{\sc Event}:   Disable gtruep.

\addvspace{18pt}

\noindent{\sc Event}:   Disable arg\_list.

\addvspace{18pt}

\noindent{\sc Event}:   Disable add\_to\_map.

\addvspace{18pt}

\noindent{\sc Event}:   Disable apply\_binary\_op.

\addvspace{18pt}

\noindent{\sc Event}:   Disable apply\_unary\_op.

\addvspace{18pt}

\noindent{\sc Event}:   Disable apply\_var.

\addvspace{18pt}

\noindent{\sc Event}:   Disable bad\_value\_modifiers\_error.

\addvspace{18pt}

\noindent{\sc Event}:   Disable base\_type.

\addvspace{18pt}

\noindent{\sc Event}:   Disable bind\_args.

\addvspace{18pt}

\noindent{\sc Event}:   Disable boolean\_desc.

\addvspace{18pt}

\noindent{\sc Event}:   Disable bound\_id.

\addvspace{18pt}

\noindent{\sc Event}:   Disable bound\_values.

\addvspace{18pt}

\noindent{\sc Event}:   Disable cdr\_quantified\_exp.

\addvspace{18pt}

\noindent{\sc Event}:   Disable character\_valuep.

\addvspace{18pt}

\noindent{\sc Event}:   Disable condition\_params\_error.

\addvspace{18pt}

\noindent{\sc Event}:   Disable default\_value.

\addvspace{18pt}

\noindent{\sc Event}:   Disable determinate.

\addvspace{18pt}

\noindent{\sc Event}:   Disable digit\_listp.

\addvspace{18pt}

\noindent{\sc Event}:   Disable each\_clausep.

\addvspace{18pt}

\noindent{\sc Event}:   Disable entry\_name.

\addvspace{18pt}

\noindent{\sc Event}:   Disable entry\_not\_true\_error.

\addvspace{18pt}

\noindent{\sc Event}:   Disable entry\_valuep.

\addvspace{18pt}

\noindent{\sc Event}:   Disable errorp.

\addvspace{18pt}

\noindent{\sc Event}:   Disable farg\_check.

\addvspace{18pt}

\noindent{\sc Event}:   Disable fn\_call\_formp.

\addvspace{18pt}

\noindent{\sc Event}:   Disable formal\_dargs.

\addvspace{18pt}

\noindent{\sc Event}:   Disable free\_variablep.

\addvspace{18pt}

\noindent{\sc Event}:   Disable gname.

\addvspace{18pt}

\noindent{\sc Event}:   Disable has\_defn.

\addvspace{18pt}

\noindent{\sc Event}:   Disable identifierp.

\addvspace{18pt}

\noindent{\sc Event}:   Disable if\_else\_exp.

\addvspace{18pt}

\noindent{\sc Event}:   Disable in\_type.

\addvspace{18pt}

\noindent{\sc Event}:   Disable indeterminate.

\addvspace{18pt}

\noindent{\sc Event}:   Disable indeterminate\_fn\_result\_error.

\addvspace{18pt}

\noindent{\sc Event}:   Disable integer\_desc.

\addvspace{18pt}

\noindent{\sc Event}:   Disable kind.

\addvspace{18pt}

\noindent{\sc Event}:   Disable length.

\addvspace{18pt}

\noindent{\sc Event}:   Disable minteger.

\addvspace{18pt}

\noindent{\sc Event}:   Disable mk\_entry\_name.

\addvspace{18pt}

\noindent{\sc Event}:   Disable mk\_identifier.

\addvspace{18pt}

\noindent{\sc Event}:   Disable mk\_unary\_operator.

\addvspace{18pt}

\noindent{\sc Event}:   Disable n\_too\_small.

\addvspace{18pt}

\noindent{\sc Event}:   Disable name\_already\_in\_use\_error.

\addvspace{18pt}

\noindent{\sc Event}:   Disable new\_namep.

\addvspace{18pt}

\noindent{\sc Event}:   Disable no\_function\_defn\_error.

\addvspace{18pt}

\noindent{\sc Event}:   Disable not\_expression\_error.

\addvspace{18pt}

\noindent{\sc Event}:   Disable not\_function\_or\_const\_error.

\addvspace{18pt}

\noindent{\sc Event}:   Disable object\_name.

\addvspace{18pt}

\noindent{\sc Event}:   Disable put\_op.

\addvspace{18pt}

\noindent{\sc Event}:   Disable rcar.

\addvspace{18pt}

\noindent{\sc Event}:   Disable rcdr.

\addvspace{18pt}

\noindent{\sc Event}:   Disable rcons.

\addvspace{18pt}

\noindent{\sc Event}:   Disable record\_get.

\addvspace{18pt}

\noindent{\sc Event}:   Disable ref.

\addvspace{18pt}

\noindent{\sc Event}:   Disable result\_type.

\addvspace{18pt}

\noindent{\sc Event}:   Disable select\_op.

\addvspace{18pt}

\noindent{\sc Event}:   Disable std\_domain.

\addvspace{18pt}

\noindent{\sc Event}:   Disable std\_first.

\addvspace{18pt}

\noindent{\sc Event}:   Disable std\_initial.

\addvspace{18pt}

\noindent{\sc Event}:   Disable std\_last.

\addvspace{18pt}

\noindent{\sc Event}:   Disable std\_lower.

\addvspace{18pt}

\noindent{\sc Event}:   Disable std\_max.

\addvspace{18pt}

\noindent{\sc Event}:   Disable std\_min.

\addvspace{18pt}

\noindent{\sc Event}:   Disable std\_nonfirst.

\addvspace{18pt}

\noindent{\sc Event}:   Disable std\_nonlast.

\addvspace{18pt}

\noindent{\sc Event}:   Disable std\_null.

\addvspace{18pt}

\noindent{\sc Event}:   Disable std\_ord.

\addvspace{18pt}

\noindent{\sc Event}:   Disable std\_pred.

\addvspace{18pt}

\noindent{\sc Event}:   Disable std\_range.

\addvspace{18pt}

\noindent{\sc Event}:   Disable std\_scale.

\addvspace{18pt}

\noindent{\sc Event}:   Disable std\_size.

\addvspace{18pt}

\noindent{\sc Event}:   Disable std\_succ.

\addvspace{18pt}

\noindent{\sc Event}:   Disable std\_upper.

\addvspace{18pt}

\noindent{\sc Event}:   Disable string\_valuep.

\addvspace{18pt}

\noindent{\sc Event}:   Disable subsequence\_get.

\addvspace{18pt}

\noindent{\sc Event}:   Disable tree\_size.

\addvspace{18pt}

\noindent{\sc Event}:   Disable type.

\addvspace{18pt}

\noindent{\sc Event}:   Disable type\_desc.

\addvspace{18pt}

\noindent{\sc Event}:   Disable type\_name\_expp.

\addvspace{18pt}

\noindent{\sc Event}:   Disable typed.

\addvspace{18pt}

\noindent{\sc Event}:   Disable unmark.

\addvspace{18pt}

\noindent{\sc Event}:   Disable value.

\addvspace{18pt}


\begin{verbatim}#|
(do-mutual '(


; ***************************
;  Set/Sequence Constructors
; ***************************

(defn GF_element_list (e c v n x)

  (if (rule e (prodn (tag 'range 'r)
		     (list 'OPEN_PAREN (tag 'range_limits 'r2) 'CLOSE_PAREN)))
      (GF_element_list (subtree e 'range_limits) c v n x)

  (if (rule e (prodn (tag 'element_list 'e)
		     (tag 'value_list 'v)))
      (GF_element_list (subtree e 'value_list) c v n x)

  (if (rule e (prodn (tag 'element_list 'e)
		     (tag 'range_limits 'r)))
      (GF_element_list (subtree e 'range_limits) c v n x)

  (if (rule e (prodn (tag 'range_limits 'r)
		     (list (tag 'expression 'lo) 'DOT_DOT
			   (tag 'expression 'hi))))
      (Grange_elements (GF (subtree_i e 'expression 1) c v n x)
		       (GF (subtree_i e 'expression 2) c v n x))

  (if (rule e (prodn (tag 'value_list 'v)
		     (tag 'expression 'e)))
      (rcons nil (GF (subtree e 'expression) c v n x))

  (if (rule e (prodn (tag 'value_list 'v)
		     (list (tag 'value_list 'v2) 'COMMA
			   (tag 'expression 'e))))
      (rcons (GF_element_list (subtree e 'value_list) c v n x)
	     (GF (subtree e 'expression) c v n x))

    nil))))))
  ( (ord-lessp (cons (cons (add1 n)
			   (add1 (tree_size e)))
		     (count c))) )) ; (count c) is a place filler

(defn GF_element_type (e c v n x)

  (if (rule e (prodn (tag 'range 'r)
		     (list 'OPEN_PAREN (tag 'range_limits 'r2) 'CLOSE_PAREN)))
      (GF_element_type (subtree e 'range_limits) c v n x)

  (if (rule e (prodn (tag 'element_list 'e)
		     (tag 'value_list 'v)))
      (GF_element_type (subtree e 'value_list) c v n x)

  (if (rule e (prodn (tag 'element_list 'e)
		     (tag 'range_limits 'r)))
      (GF_element_type (subtree e 'range_limits) c v n x)

  (if (rule e (prodn (tag 'range_limits 'r)
		     (list (tag 'expression 'lo) 'DOT_DOT
			   (tag 'expression 'hi))))
      (base_type (type (GF (subtree_i e 'expression 1) c v n x)))

  (if (rule e (prodn (tag 'value_list 'v)
		     (tag 'expression 'e)))
      (base_type (type (GF (subtree e 'expression) c v n x)))

  (if (rule e (prodn (tag 'value_list 'v)
		     (list (tag 'value_list 'v2) 'COMMA
			   (tag 'expression 'e))))
      (GF_element_type (subtree e 'value_list) c v n x)

    nil))))))
  ( (ord-lessp (cons (cons (add1 n)
			   (add1 (tree_size e)))
		     (count c))) )) ; (count c) is a place filler



; ************************
;  Quantified expressions
; ************************

(defn GF_all (id vs e c v n x)
  (if (nlistp vs)
      (Gtrue)
  (if (new_namep id v)
      (if (zerop n)
	  (marked (n_too_small)
		  (default_value (boolean_desc)))
        (Gand (GF_all id (rcdr vs) e c v n x)
	      (GF e c (add_to_map v id (rcar vs)) (sub1 n) x)))
    (marked (name_already_in_use_error id)
	    (default_value (boolean_desc)))))
  ( (ord-lessp (cons (cons (add1 n)
			   (add1 (tree_size id)))
		     (count vs))) ))

(defn GF_some (id vs e c v n x)
  (if (nlistp vs)
      (Gfalse)
    (if (new_namep id v)
      (if (zerop n)
	  (marked (n_too_small)
		  (default_value (boolean_desc)))
	(Gor (GF_some id (rcdr vs) e c v n x)
	     (GF e c (add_to_map v id (rcar vs)) (sub1 n) x)))
      (marked (name_already_in_use_error id)
	      (default_value (boolean_desc)))))
  ( (ord-lessp (cons (cons (add1 n)
			   (add1 (tree_size id)))
		     (count vs))) ))


; *********************
;  Value Modifications
; *********************

(defn GF_each (id vs bv e c v n x)
  ; e is the <component modification>
  (if (nlistp vs)
      bv
  (if (new_namep id v)
      (if (zerop n)
	  (marked (n_too_small)
		  (default_value (base_type (type bv))))
	(GF_each id (cdr vs)
		 (GF_modifiers bv e c (add_to_map v id (car vs)) (sub1 n) x)
		 e c v n x))
    (marked (name_already_in_use_error id)
	    (default_value (base_type (type bv))))))
  ( (ord-lessp (cons (cons (add1 n)
			   (add1 (tree_size e)))
		     (count vs))) ))

(defn GF_adp (e c v n x)

  (if (rule e (prodn (tag 'arg_list 'as)
		     (list 'OPEN_PAREN (tag 'value_list 'vs)
			   'CLOSE_PAREN)))
      (GF_adp (subtree e 'value_list) c v n x)

  (if (rule e (prodn (tag 'value_list 'vs)
		     (tag 'expression 'e)))
      (rcons nil (GF (subtree e 'expression) c v n x))

  (if (rule e (prodn (tag 'value_list 'vs)
		     (list (tag 'value_list 'vs2)
			   'COMMA (tag 'expression 'e))))
      (rcons (GF_adp (subtree e 'value_list) c v n x)
	     (GF (subtree e 'expression) c v n x))
    nil)))

  ( (ord-lessp (cons (cons (add1 n)
			   (add1 (tree_size e)))
		     (count c))) )) ; (count c) is a place filler

(defn GF_selectors (e c v n x)

  (if (rule e (prodn (tag 'selector_list 's)
		     (tag 'component_selectors 's2)))
      (GF_selectors (subtree e 'component_selectors) c v n x)

  (if (rule e (prodn (tag 'selector_list 's)
		     (list (tag 'selector_list 's2)
			   (tag 'component_selectors 's3))))
      (append (GF_selectors (subtree e 'selector_list) c v n x)
	      (GF_selectors (subtree e 'component_selectors) c v n x))

  (if (rule e (prodn (tag 'component_selectors 's)
		     (list 'DOT (tag 'IDENTIFIER 'fn))))
      (list (marked 'field_name
		    (gname (subtree e 'IDENTIFIER))))

  (if (rule e (prodn (tag 'component_selectors 's)
		     (tag 'arg_list 'd)))
      (GF_adp (subtree e 'arg_list) c v n x)

  (if (rule e (prodn (tag 'arg_list 'as)
		     (list 'OPEN_PAREN (tag 'value_list 'vs)
			   'CLOSE_PAREN)))
      (GF_adp (subtree e 'value_list) c v n x)

    nil)))))

  ( (ord-lessp (cons (cons (add1 n)
			   (add1 (tree_size e)))
		     (count c))) )) ; (count c) is a place filler

(defn GF_modifiers (bv e c v n x)
  ; e is the <value modifiers>

  (if (rule e (prodn (tag 'value_modifiers 'm)
		     (tag 'component_selectors 's)))
      (GF_modifiers bv (subtree e 'component_selectors) c v n x)

  (if (rule e (prodn (tag 'component_selectors 's)
		     (list 'DOT (tag 'IDENTIFIER 'fn))))
      (record_get bv 
		  (marked 'field_name
			  (gname (subtree e 'IDENTIFIER)))
		  (type bv))

  (if (rule e (prodn (tag 'component_selectors 's)
		     (tag 'arg_list 'd)))
      (select_op bv (GF_adp (subtree e 'arg_list) c v n x))

  (if (rule e (prodn (tag 'value_modifiers 'm)
		     (tag 'range 'r)))
      (GF_modifiers bv (subtree e 'range) c v n x)

  (if (rule e (prodn (tag 'range 'r)
		     (list 'OPEN_PAREN (tag 'range_limits 'r2)
			   'CLOSE_PAREN)))
      (GF_modifiers bv (subtree e 'range_limits) c v n x)

  (if (rule e (prodn (tag 'range_limits 'r)
		     (list (tag 'expression 'lo) 'DOT_DOT
			   (tag 'expression 'hi))))
      (subsequence_get bv
		       (GF (subtree_i e 'expression 1) c v n x)
		       (GF (subtree_i e 'expression 2) c v n x))

  (if (rule e (prodn (tag 'value_modifiers 'm)
		     (tag 'value_alterations 'a)))
      (GF_modifiers bv (subtree e 'value_alterations) c v n x)

  (if (rule e (prodn (tag 'value_alterations 'a)
		     (list 'WITH 'OPEN_PAREN
			   (tag 'component_alterations_list 'al)
			   'CLOSE_PAREN)))
      (GF_modifiers bv (subtree e 'component_alterations_list) c v n x)

  (if (rule e (prodn (tag 'component_alterations_list 'al)
		     (tag 'component_alterations 'a)))
      (GF_modifiers bv (subtree e 'component_alterations) c v n x)

  (if (rule e (prodn (tag 'component_alterations_list 'al)
		     (list (tag 'component_alterations_list 'al2)
			   'SEMI_COLON (tag 'component_alterations 'a))))
      (GF_modifiers (GF_modifiers bv (subtree e 'component_alterations_list)
				  c v n x)
		    (subtree e 'component_alterations) c v n x)

  (if (rule e (prodn (tag 'component_alterations 'as)
		     (list (tag 'opt_each_clause 'e)
			   (tag 'component_assignment 'a))))
      (if (each_clausep (subtree e 'opt_each_clause))
	  (let ((vs (bound_values (subtree e 'opt_each_clause) c x)))
	    (if (errorp vs)
		(marked vs (default_value (base_type (type bv))))
	      (GF_each (bound_id (subtree e 'opt_each_clause))
		       vs bv (subtree e 'component_assignment) c v n x)))
	(GF_modifiers bv (subtree e 'component_assignment) c v n x))

  (if (rule e (prodn (tag 'component_alterations 'as)
		     (list (tag 'opt_each_clause 'e)
			   (tag 'component_creation 'c))))
      (if (each_clausep (subtree e 'opt_each_clause))
	  (let ((vs (bound_values (subtree e 'opt_each_clause) c x)))
	    (if (errorp vs)
		(marked vs (default_value (base_type (type bv))))
	      (GF_each (bound_id (subtree e 'opt_each_clause))
		       vs bv (subtree e 'component_creation) c v n x)))
	(GF_modifiers bv (subtree e 'component_creation) c v n x))

  (if (rule e (prodn (tag 'component_alterations 'as)
		     (list (tag 'opt_each_clause 'e)
			   (tag 'component_deletion 'd))))
      (if (each_clausep (subtree e 'opt_each_clause))
	  (let ((vs (bound_values (subtree e 'opt_each_clause) c x)))
	    (if (errorp vs)
		(marked vs (default_value (base_type (type bv))))
	      (GF_each (bound_id (subtree e 'opt_each_clause))
		       vs bv (subtree e 'component_deletion) c v n x)))
	(GF_modifiers bv (subtree e 'component_deletion) c v n x))

  (if (rule e (prodn (tag 'component_assignment 'a)
		     (list (tag 'selector_list 's)
			   'COLON_EQUAL (tag 'expression 'e))))
      (put_op bv
	      (GF_selectors (subtree e 'selector_list) c v n x)
	      (GF (subtree e 'expression) c v n x))

  (if (rule e (prodn (tag 'component_creation 'c)
		     (list 'BEFORE (tag 'selector_list 's)
			   'COLON_EQUAL (tag 'expression 'e))))
      (let ((s (GF_selectors (subtree e 'selector_list) c v n x))
	    (u (GF (subtree e 'expression) c v n x)))
	(put_op bv (rcdr s)
		(Gseq_insert_before (select_op bv (rcdr s)) (rcar s) u)))

  (if (rule e (prodn (tag 'component_creation 'c)
		     (list 'BEHIND (tag 'selector_list 's)
			   'COLON_EQUAL (tag 'expression 'e))))
      (let ((s (GF_selectors (subtree e 'selector_list) c v n x))
	    (u (GF (subtree e 'expression) c v n x)))
	(put_op bv (rcdr s)
		(Gseq_insert_behind (select_op bv (rcdr s)) (rcar s) u)))

  (if (rule e (prodn (tag 'component_creation 'c)
		     (list 'INTO (tag 'selector_list 's)
			   'COLON_EQUAL (tag 'expression 'e))))
      (let ((s (GF_selectors (subtree e 'selector_list) c v n x))
	    (u (GF (subtree e 'expression) c v n x)))
	(put_op bv (rcdr s)
		(Gmap_insert (select_op bv (rcdr s)) (rcar s) u)))

  (if (rule e (prodn (tag 'component_deletion 'd)
		     (list 'SEQOMIT (tag 'selector_list 's))))
      (let ((s (GF_selectors (subtree e 'selector_list) c v n x)))
	(put_op bv (rcdr s)
		(Gseqomit (select_op bv (rcdr s)) (rcar s))))

  (if (rule e (prodn (tag 'component_deletion 'd)
		     (list 'MAPOMIT (tag 'selector_list 's))))
      (let ((s (GF_selectors (subtree e 'selector_list) c v n x)))
	(put_op bv (rcdr s)
		(Gmapomit (select_op bv (rcdr s)) (rcar s))))

    (marked (bad_value_modifiers_error e)
	    (default_value (base_type (type bv)))))))))))))))))))))))

  ( (ord-lessp (cons (cons (add1 n)
			   (add1 (tree_size e)))
		     (count c))) )) ; (count c) is a place filler



; ************************************
;  Name references and function calls
; ************************************

(defn apply_fun (fn d sn n x)
  (let ((h (car (ref fn sn x)))  ; scope fn is declared in
	(u (cdr (ref fn sn x)))) ; the function declaration
    (if (or (equal (kind u) 'function)
	    (equal (kind u) 'constant))
	(let ((ftype (type_desc (result_type u) h nil x))
	      (fs (formal_dargs u)))                  ; formals
	(let ((a (if (equal (length fs) 0) nil d))    ; actuals
	      (s (if (equal (length fs) 0) d nil)))   ; selectors
	  (if (zerop (fix n))
	      (marked (n_too_small)
		      (default_value ftype))
	    (select_op 
	     (let ((arg_err (farg_check fs a h x)))
	       (if (equal arg_err nil)
		   (let ((v (add_to_map (bind_args fs a h x)
					(mk_entry_name 'result)
					(std_initial
					 (list (marked 'type_descriptor
						       ftype))))))
		     (if (Gtruep (GF (GF_prec u) h v (sub1 n) x))
			 (if (has_defn u ftype)
			     (let ((r (GF (Gdefn u ftype)
					  h v (sub1 n) x)))
			       (if (and (determinate r)
					(truep (in_type ftype r)))
				   (marked nil
					   (typed ftype (value r)))
				 (marked
				   (indeterminate_fn_result_error fn sn)
				   (default_value ftype))))
			   (marked (no_function_defn_error fn sn)
				   (default_value ftype)))
		       (marked (entry_not_true_error fn sn)
			       (default_value ftype))))
		 (marked arg_err (default_value ftype))))
	     s))))
    (if (equal (kind u) 'error)
	(marked u (default_value (integer_desc)))
      (marked (not_function_or_const_error fn sn)
	      (default_value (integer_desc))))))
  ( (ord-lessp (cons (cons (add1 n)
			   (add1 (tree_size fn)))
		     (tree_size fn))) ))

(defn Gapply (fn ap sn v n x)
  (if (free_variablep fn v)
      (apply_var fn v ap)
  (if (equal fn 'false)
      (select_op (Gfalse) ap)
  (if (equal fn 'true)
      (select_op (Gtrue) ap)
  (if (type_name_expp fn ap sn x)
      (marked 'type_descriptor
	      (type_desc (mk_identifier fn) sn nil x))
  (if (equal fn 'domain)
      (std_domain ap)
  (if (equal fn 'first)
      (std_first ap)
  (if (equal fn 'initial)
      (std_initial ap)
  (if (equal fn 'last)
      (std_last ap)
  (if (equal fn 'lower)
      (std_lower ap)
  (if (equal fn 'max)
      (std_max ap)
  (if (equal fn 'min)
      (std_min ap)
  (if (equal fn 'nonfirst)
      (std_nonfirst ap)
  (if (equal fn 'nonlast)
      (std_nonlast ap)
  (if (equal fn 'null)
      (std_null ap)
  (if (equal fn 'ord)
      (std_ord ap)
  (if (equal fn 'pred)
      (std_pred ap)
  (if (equal fn 'range)
      (std_range ap)
  (if (equal fn 'scale)
      (std_scale ap)
  (if (equal fn 'size)
      (std_size ap)
  (if (equal fn 'succ)
      (std_succ ap)
  (if (equal fn 'upper)
      (std_upper ap)
    (apply_fun fn ap sn n x))))))))))))))))))))))
  ( (ord-lessp (cons (cons (add1 n)
			   (add1 (tree_size fn)))
		     (add1 (tree_size fn)))) ))



(defn GF (e c v n x)
  ; The meta-function GF(e,c,v,n,x) gives the value that results when the
  ; expression e is evaluated, in the context of scope c with free variables
  ; bound as determined in the environment v, by at most n applications of
  ; functions described by the Gypsy sentence x.
  ;
  ; The domain and range of GF(e,c,v,n,x) are as follows:
  ;
  ;   e is the parse tree representing the expression to be evaluated.
  ;   c is the (litatom) name of the Gypsy scope in which e is evaluated.
  ;   v is the name-value mapping that maps names of free variables
  ;     into their (marked typed) values.  
  ;   n is the maximum allowed depth of Gypsy function calls and quantifiers
  ;   x is the parse tree representing the Gypsy sentence that is being
  ;     interpreted.  This is the complete sentence containing the list of all
  ;     available scopes.  
  ;   GF(e,c,v,n,x) is the marked, typed value that results from evaluating e.
  ;


  ; ************************
  ; 
  ;    <expression> ::= ...
  ;
  ; ************************

  (if (rule e (prodn (tag 'expression 'e)
		     (tag 'modified_primary_value 'm)))
      (GF (subtree e 'modified_primary_value) c v n x)

  (if (rule e (prodn (tag 'expression 'e)
		     (list 'ALL (tag 'bound_expression 'b))))
      (let ((vs (bound_values e c x)))
	(if (errorp vs)
	    (marked vs (default_value (boolean_desc)))
	  (GF_all (bound_id (subtree e 'bound_expression))
		  vs (cdr_quantified_exp e) c v n x)))

  (if (rule e (prodn (tag 'expression 'e)
		     (list 'SOME (tag 'bound_expression 'b))))
      (let ((vs (bound_values e c x)))
	(if (errorp vs)
	    (marked vs (default_value (boolean_desc)))
	  (GF_some (bound_id (subtree e 'bound_expression))
		   vs (cdr_quantified_exp e) c v n x)))

  (if (rule e (prodn (tag 'expression 'e)
		     (list (tag 'unary_operator 'op) (tag 'expression 'e2))))
      (apply_unary_op (subtree e 'unary_operator)
		      (GF (subtree e 'expression) c v n x))

  (if (rule e (prodn (tag 'expression 'e)
		     (list (tag 'expression 'e1) (tag 'binary_operator 'op)
			   (tag 'expression 'e2))))
      (apply_binary_op (subtree e 'binary_operator)
		       (GF (subtree_i e 'expression 1) c v n x)
		       (GF (subtree_i e 'expression 2) c v n x))


  ; ********************************
  ; 
  ;    <modified primary value> ::=
  ;
  ; ********************************

  (if (rule e (prodn (tag 'modified_primary_value 'm)
		     (tag 'primary_value 'p)))
      (GF (subtree e 'primary_value) c v n x)

  (if (rule e (prodn (tag 'modified_primary_value 'm)
		     (list (tag 'modified_primary_value 'm2)
			   (tag 'value_modifiers 'vm))))
      (if (fn_call_formp e)
	  (Gapply (object_name (subtree e 'modified_primary_value))
		  (GF_adp (arg_list (subtree e 'value_modifiers))
			  c v n x)
		  c v n x)
	(GF_modifiers (GF (subtree e 'modified_primary_value) c v n x)
		      (subtree e 'value_modifiers) c v n x))

  (if (rule e (prodn (tag 'modified_primary_value 'm)
		     (list (tag 'modified_primary_value 'm2)
			   (tag 'actual_condition_parameters 'cp))))
      ; Condition parameters allowed only in <specification expression>
      ; with validation directive (p. 35, Gypsy 2.05 Report).  
      ; **** Weed them out before calling GF in that case. ****
      (let ((r (GF (subtree e 'modified_primary_value) c v n x)))
	(marked (condition_params_error e)
		(default_value (type r))))


  ; ***********************
  ; 
  ;    <primary value> ::=
  ;
  ; ***********************

  (if (rule e (prodn (tag 'primary_value 'p)
		     (tag 'literal_value 'l)))
      (GF (subtree e 'literal_value) c v n x)

  (if (rule e (prodn (tag 'primary_value 'p)
		     (tag 'set_or_sequence_value 's)))
      (GF (subtree e 'set_or_sequence_value) c v n x)

  (if (rule e (prodn (tag 'primary_value 'p)
		     (tag 'ENTRY_VALUE 'e)))
      (GF (subtree e 'ENTRY_VALUE) c v n x)

  (if (rule e (prodn (tag 'primary_value 'p)
		     (tag 'IDENTIFIER 'on)))
      (GF (subtree e 'IDENTIFIER) c v n x)

  (if (rule e (prodn (tag 'primary_value 'p)
		     (tag 'if_expression 'i)))
      (GF (subtree e 'if_expression) c v n x)

  (if (rule e (prodn (tag 'primary_value 'p)
		     (list 'OPEN_PAREN (tag 'expression 'e) 'CLOSE_PAREN)))
      (GF (subtree e 'expression) c v n x)


  ; --------------------------------------------------------------------------
  ;
  ;  From here down to parse tree leaves, clauses are in alphabetical order 
  ;  by the left-hand side of the productions.  Everything that is a parse
  ;  tree for an expression should be covered.
  ;
  ; --------------------------------------------------------------------------


  ; ***********************
  ; 
  ;    <constant body> ::=
  ;
  ; ***********************

  ; I don't think the following needs to be here.  siebert 9/Sept/90
  (if (rule e (prodn (tag 'constant_body 'b)
		     (tag 'expression 'e)))
      (GF (subtree e 'expression) c v n x)


  ; ***********************
  ; 
  ;    <if expression> ::=
  ;
  ; ***********************

  (if (rule e (prodn (tag 'if_expression 'i)
		     (list 'IF (tag 'expression 'b) 'THEN
			   (tag 'expression 'p)
			   (tag 'if_expression_else_part 'e))))

      ; Note:  this does not require all potential value expressions to be the
      ; same type or all boolean expressions to be boolean.
      (let ((bv (GF (subtree_i e 'expression 1) c v n x)))
	(if (indeterminate bv)
	    (marked (mark bv)
		    (default_value
		      (type (GF (subtree_i e 'expression 2)
				c v n x))))
        (if (truep (in_type (boolean_desc) bv))
	    (if (Gtruep bv)
		(GF (subtree_i e 'expression 2) c v n x)
	      (GF (if_else_exp (subtree e 'if_expression_else_part))
		  c v n x))
	  (marked (if_test_not_boolean_error e c)
		  (default_value
		    (type (GF (subtree_i e 'expression 2)
			      c v n x)))))))


  ; ***********************
  ; 
  ;    <literal value> ::=
  ;
  ; ***********************

  (if (rule e (prodn (tag 'literal_value 'l)
		     (tag 'CHARACTER_VALUE 'ch)))
      (GF (subtree e 'CHARACTER_VALUE) c v n x)

  (if (rule e (prodn (tag 'literal_value 'l)
		     (tag 'number 'n)))
      (GF (subtree e 'number) c v n x)

  (if (rule e (prodn (tag 'literal_value 'l)
		     (tag 'STRING_VALUE 's)))
      (GF (subtree e 'STRING_VALUE) c v n x)


  ; ****************
  ; 
  ;    <number> ::=
  ;
  ; ****************

  (if (rule e (prodn (tag 'number 'n)
		     (tag 'DIGIT_LIST 's)))
      (minteger e)

  (if (rule e (prodn (tag 'number 'n)
		     (list (tag 'base 'b) (tag 'DIGIT_LIST 's))))
      (minteger e)


  ; *****************************************
  ; 
  ;    <pre-computable label expression> ::=
  ;
  ; *****************************************

  (if (rule e (prodn (tag 'pre_computable_label_expression 'p)
		     (tag 'number 'n)))
      (GF (subtree e 'number) c v n x)

  (if (rule e (prodn (tag 'pre_computable_label_expression 'p)
		     (list 'MINUS (tag 'number 'n))))
      (apply_unary_op (mk_unary_operator 'MINUS)
		      (GF (subtree e 'number) c v n x))

  (if (rule e (prodn (tag 'pre_computable_label_expression 'p)
		     (tag 'CHARACTER_VALUE 'ch)))
      (GF (subtree e 'CHARACTER_VALUE) c v n x)

  (if (rule e (prodn (tag 'pre_computable_label_expression 'p)
		     (tag 'IDENTIFIER 'i)))
      (GF (subtree e 'IDENTIFIER) c v n x)


  ; ********************************
  ; 
  ;    <set or sequence value> ::=
  ;
  ; ********************************

  (if (rule e (prodn (tag 'set_or_sequence_value 's)
		     (list 'OPEN_PAREN (tag 'set_or_seq_mark 'm)
			   (tag 'element_list 'e) 'CLOSE_PAREN)))
      (Gset_or_seq (subtree e 'set_or_seq_mark)
		   (GF_element_list (subtree e 'element_list) c v n x)
		   (GF_element_type (subtree e 'element_list) c v n x))

  (if (rule e (prodn (tag 'set_or_sequence_value 's)
		     (tag 'range 'r)))
      (Gset_or_seq nil
		   (GF_element_list (subtree e 'range) c v n x)
		   (GF_element_type (subtree e 'range) c v n x))


  ; *********************
  ; 
  ;    PARSE TREE LEAVES
  ;
  ; *********************

  (if (character_valuep e)
      (Gchar e)

  (if (digit_listp e)
      (minteger e)

  (if (entry_valuep e)
      (apply_var (entry_name e) v nil)

  (if (identifierp e)
      (Gapply (gname e) nil c v n x)

  (if (string_valuep e)
      (Gstring_seq e)

    (marked (not_expression_error e) (default_value (integer_desc)))

    ))))))))))))))))))))))))))))))))
  ( (ord-lessp (cons (cons (add1 n)
			   (add1 (tree_size e)))
		     (count c))) )) ; (count c) is a place filler

))
|#

\end{verbatim}%\item 
\begin{verbatim}



#|
(do-mutual '(


; ***************************
;  Set/Sequence Constructors
; ***************************

(defn GF_element_list (e c v n x)

  (if (rule e (prodn (tag 'range 'r)
		     (list 'OPEN_PAREN (tag 'range_limits 'r2) 'CLOSE_PAREN)))
      (GF_element_list (subtree e 'range_limits) c v n x)

  (if (rule e (prodn (tag 'element_list 'e)
		     (tag 'value_list 'v)))
      (GF_element_list (subtree e 'value_list) c v n x)

  (if (rule e (prodn (tag 'element_list 'e)
		     (tag 'range_limits 'r)))
      (GF_element_list (subtree e 'range_limits) c v n x)

  (if (rule e (prodn (tag 'range_limits 'r)
		     (list (tag 'expression 'lo) 'DOT_DOT
			   (tag 'expression 'hi))))
      (Grange_elements (GF (subtree_i e 'expression 1) c v n x)
		       (GF (subtree_i e 'expression 2) c v n x))

  (if (rule e (prodn (tag 'value_list 'v)
		     (tag 'expression 'e)))
      (rcons nil (GF (subtree e 'expression) c v n x))

  (if (rule e (prodn (tag 'value_list 'v)
		     (list (tag 'value_list 'v2) 'COMMA
			   (tag 'expression 'e))))
      (rcons (GF_element_list (subtree e 'value_list) c v n x)
	     (GF (subtree e 'expression) c v n x))

    nil))))))
  ( (ord-lessp (cons (cons (add1 n)
			   (add1 (tree_size e)))
		     (count c))) )) ; (count c) is a place filler

(defn GF_element_type (e c v n x)

  (if (rule e (prodn (tag 'range 'r)
		     (list 'OPEN_PAREN (tag 'range_limits 'r2) 'CLOSE_PAREN)))
      (GF_element_type (subtree e 'range_limits) c v n x)

  (if (rule e (prodn (tag 'element_list 'e)
		     (tag 'value_list 'v)))
      (GF_element_type (subtree e 'value_list) c v n x)

  (if (rule e (prodn (tag 'element_list 'e)
		     (tag 'range_limits 'r)))
      (GF_element_type (subtree e 'range_limits) c v n x)

  (if (rule e (prodn (tag 'range_limits 'r)
		     (list (tag 'expression 'lo) 'DOT_DOT
			   (tag 'expression 'hi))))
      (base_type (type (GF (subtree_i e 'expression 1) c v n x)))

  (if (rule e (prodn (tag 'value_list 'v)
		     (tag 'expression 'e)))
      (base_type (type (GF (subtree e 'expression) c v n x)))

  (if (rule e (prodn (tag 'value_list 'v)
		     (list (tag 'value_list 'v2) 'COMMA
			   (tag 'expression 'e))))
      (GF_element_type (subtree e 'value_list) c v n x)

    nil))))))
  ( (ord-lessp (cons (cons (add1 n)
			   (add1 (tree_size e)))
		     (count c))) )) ; (count c) is a place filler



; ************************
;  Quantified expressions
; ************************

(defn GF_all (id vs e c v n x)
  (if (nlistp vs)
      (Gtrue)
  (if (new_namep id v)
      (if (zerop n)
	  (marked (n_too_small)
		  (default_value (boolean_desc)))
        (Gand (GF_all id (rcdr vs) e c v n x)
	      (GF e c (add_to_map v id (rcar vs)) (sub1 n) x)))
    (marked (name_already_in_use_error id)
	    (default_value (boolean_desc)))))
  ( (ord-lessp (cons (cons (add1 n)
			   (add1 (tree_size id)))
		     (count vs))) ))

(defn GF_some (id vs e c v n x)
  (if (nlistp vs)
      (Gfalse)
    (if (new_namep id v)
      (if (zerop n)
	  (marked (n_too_small)
		  (default_value (boolean_desc)))
	(Gor (GF_some id (rcdr vs) e c v n x)
	     (GF e c (add_to_map v id (rcar vs)) (sub1 n) x)))
      (marked (name_already_in_use_error id)
	      (default_value (boolean_desc)))))
  ( (ord-lessp (cons (cons (add1 n)
			   (add1 (tree_size id)))
		     (count vs))) ))


; *********************
;  Value Modifications
; *********************

(defn GF_each (id vs bv e c v n x)
  ; e is the <component modification>
  (if (nlistp vs)
      bv
  (if (new_namep id v)
      (if (zerop n)
	  (marked (n_too_small)
		  (default_value (base_type (type bv))))
	(GF_each id (cdr vs)
		 (GF_modifiers bv e c (add_to_map v id (car vs)) (sub1 n) x)
		 e c v n x))
    (marked (name_already_in_use_error id)
	    (default_value (base_type (type bv))))))
  ( (ord-lessp (cons (cons (add1 n)
			   (add1 (tree_size e)))
		     (count vs))) ))

(defn GF_adp (e c v n x)

  (if (rule e (prodn (tag 'arg_list 'as)
		     (list 'OPEN_PAREN (tag 'value_list 'vs)
			   'CLOSE_PAREN)))
      (GF_adp (subtree e 'value_list) c v n x)

  (if (rule e (prodn (tag 'value_list 'vs)
		     (tag 'expression 'e)))
      (rcons nil (GF (subtree e 'expression) c v n x))

  (if (rule e (prodn (tag 'value_list 'vs)
		     (list (tag 'value_list 'vs2)
			   'COMMA (tag 'expression 'e))))
      (rcons (GF_adp (subtree e 'value_list) c v n x)
	     (GF (subtree e 'expression) c v n x))
    nil)))

  ( (ord-lessp (cons (cons (add1 n)
			   (add1 (tree_size e)))
		     (count c))) )) ; (count c) is a place filler

(defn GF_selectors (e c v n x)

  (if (rule e (prodn (tag 'selector_list 's)
		     (tag 'component_selectors 's2)))
      (GF_selectors (subtree e 'component_selectors) c v n x)

  (if (rule e (prodn (tag 'selector_list 's)
		     (list (tag 'selector_list 's2)
			   (tag 'component_selectors 's3))))
      (append (GF_selectors (subtree e 'selector_list) c v n x)
	      (GF_selectors (subtree e 'component_selectors) c v n x))

  (if (rule e (prodn (tag 'component_selectors 's)
		     (list 'DOT (tag 'IDENTIFIER 'fn))))
      (list (marked 'field_name
		    (gname (subtree e 'IDENTIFIER))))

  (if (rule e (prodn (tag 'component_selectors 's)
		     (tag 'arg_list 'd)))
      (GF_adp (subtree e 'arg_list) c v n x)

  (if (rule e (prodn (tag 'arg_list 'as)
		     (list 'OPEN_PAREN (tag 'value_list 'vs)
			   'CLOSE_PAREN)))
      (GF_adp (subtree e 'value_list) c v n x)

    nil)))))

  ( (ord-lessp (cons (cons (add1 n)
			   (add1 (tree_size e)))
		     (count c))) )) ; (count c) is a place filler

(defn GF_modifiers (bv e c v n x)
  ; e is the <value modifiers>

  (if (rule e (prodn (tag 'value_modifiers 'm)
		     (tag 'component_selectors 's)))
      (GF_modifiers bv (subtree e 'component_selectors) c v n x)

  (if (rule e (prodn (tag 'component_selectors 's)
		     (list 'DOT (tag 'IDENTIFIER 'fn))))
      (record_get bv 
		  (marked 'field_name
			  (gname (subtree e 'IDENTIFIER)))
		  (type bv))

  (if (rule e (prodn (tag 'component_selectors 's)
		     (tag 'arg_list 'd)))
      (select_op bv (GF_adp (subtree e 'arg_list) c v n x))

  (if (rule e (prodn (tag 'value_modifiers 'm)
		     (tag 'range 'r)))
      (GF_modifiers bv (subtree e 'range) c v n x)

  (if (rule e (prodn (tag 'range 'r)
		     (list 'OPEN_PAREN (tag 'range_limits 'r2)
			   'CLOSE_PAREN)))
      (GF_modifiers bv (subtree e 'range_limits) c v n x)

  (if (rule e (prodn (tag 'range_limits 'r)
		     (list (tag 'expression 'lo) 'DOT_DOT
			   (tag 'expression 'hi))))
      (subsequence_get bv
		       (GF (subtree_i e 'expression 1) c v n x)
		       (GF (subtree_i e 'expression 2) c v n x))

  (if (rule e (prodn (tag 'value_modifiers 'm)
		     (tag 'value_alterations 'a)))
      (GF_modifiers bv (subtree e 'value_alterations) c v n x)

  (if (rule e (prodn (tag 'value_alterations 'a)
		     (list 'WITH 'OPEN_PAREN
			   (tag 'component_alterations_list 'al)
			   'CLOSE_PAREN)))
      (GF_modifiers bv (subtree e 'component_alterations_list) c v n x)

  (if (rule e (prodn (tag 'component_alterations_list 'al)
		     (tag 'component_alterations 'a)))
      (GF_modifiers bv (subtree e 'component_alterations) c v n x)

  (if (rule e (prodn (tag 'component_alterations_list 'al)
		     (list (tag 'component_alterations_list 'al2)
			   'SEMI_COLON (tag 'component_alterations 'a))))
      (GF_modifiers (GF_modifiers bv (subtree e 'component_alterations_list)
				  c v n x)
		    (subtree e 'component_alterations) c v n x)

  (if (rule e (prodn (tag 'component_alterations 'as)
		     (list (tag 'opt_each_clause 'e)
			   (tag 'component_assignment 'a))))
      (if (each_clausep (subtree e 'opt_each_clause))
	  (let ((vs (bound_values (subtree e 'opt_each_clause) c x)))
	    (if (errorp vs)
		(marked vs (default_value (base_type (type bv))))
	      (GF_each (bound_id (subtree e 'opt_each_clause))
		       vs bv (subtree e 'component_assignment) c v n x)))
	(GF_modifiers bv (subtree e 'component_assignment) c v n x))

  (if (rule e (prodn (tag 'component_alterations 'as)
		     (list (tag 'opt_each_clause 'e)
			   (tag 'component_creation 'c))))
      (if (each_clausep (subtree e 'opt_each_clause))
	  (let ((vs (bound_values (subtree e 'opt_each_clause) c x)))
	    (if (errorp vs)
		(marked vs (default_value (base_type (type bv))))
	      (GF_each (bound_id (subtree e 'opt_each_clause))
		       vs bv (subtree e 'component_creation) c v n x)))
	(GF_modifiers bv (subtree e 'component_creation) c v n x))

  (if (rule e (prodn (tag 'component_alterations 'as)
		     (list (tag 'opt_each_clause 'e)
			   (tag 'component_deletion 'd))))
      (if (each_clausep (subtree e 'opt_each_clause))
	  (let ((vs (bound_values (subtree e 'opt_each_clause) c x)))
	    (if (errorp vs)
		(marked vs (default_value (base_type (type bv))))
	      (GF_each (bound_id (subtree e 'opt_each_clause))
		       vs bv (subtree e 'component_deletion) c v n x)))
	(GF_modifiers bv (subtree e 'component_deletion) c v n x))

  (if (rule e (prodn (tag 'component_assignment 'a)
		     (list (tag 'selector_list 's)
			   'COLON_EQUAL (tag 'expression 'e))))
      (put_op bv
	      (GF_selectors (subtree e 'selector_list) c v n x)
	      (GF (subtree e 'expression) c v n x))

  (if (rule e (prodn (tag 'component_creation 'c)
		     (list 'BEFORE (tag 'selector_list 's)
			   'COLON_EQUAL (tag 'expression 'e))))
      (let ((s (GF_selectors (subtree e 'selector_list) c v n x))
	    (u (GF (subtree e 'expression) c v n x)))
	(put_op bv (rcdr s)
		(Gseq_insert_before (select_op bv (rcdr s)) (rcar s) u)))

  (if (rule e (prodn (tag 'component_creation 'c)
		     (list 'BEHIND (tag 'selector_list 's)
			   'COLON_EQUAL (tag 'expression 'e))))
      (let ((s (GF_selectors (subtree e 'selector_list) c v n x))
	    (u (GF (subtree e 'expression) c v n x)))
	(put_op bv (rcdr s)
		(Gseq_insert_behind (select_op bv (rcdr s)) (rcar s) u)))

  (if (rule e (prodn (tag 'component_creation 'c)
		     (list 'INTO (tag 'selector_list 's)
			   'COLON_EQUAL (tag 'expression 'e))))
      (let ((s (GF_selectors (subtree e 'selector_list) c v n x))
	    (u (GF (subtree e 'expression) c v n x)))
	(put_op bv (rcdr s)
		(Gmap_insert (select_op bv (rcdr s)) (rcar s) u)))

  (if (rule e (prodn (tag 'component_deletion 'd)
		     (list 'SEQOMIT (tag 'selector_list 's))))
      (let ((s (GF_selectors (subtree e 'selector_list) c v n x)))
	(put_op bv (rcdr s)
		(Gseqomit (select_op bv (rcdr s)) (rcar s))))

  (if (rule e (prodn (tag 'component_deletion 'd)
		     (list 'MAPOMIT (tag 'selector_list 's))))
      (let ((s (GF_selectors (subtree e 'selector_list) c v n x)))
	(put_op bv (rcdr s)
		(Gmapomit (select_op bv (rcdr s)) (rcar s))))

    (marked (bad_value_modifiers_error e)
	    (default_value (base_type (type bv)))))))))))))))))))))))

  ( (ord-lessp (cons (cons (add1 n)
			   (add1 (tree_size e)))
		     (count c))) )) ; (count c) is a place filler



; ************************************
;  Name references and function calls
; ************************************

(defn apply_fun (fn d sn n x)
  (let ((h (car (ref fn sn x)))  ; scope fn is declared in
	(u (cdr (ref fn sn x)))) ; the function declaration
    (if (or (equal (kind u) 'function)
	    (equal (kind u) 'constant))
	(let ((ftype (type_desc (result_type u) h nil x))
	      (fs (formal_dargs u)))                  ; formals
	(let ((a (if (equal (length fs) 0) nil d))    ; actuals
	      (s (if (equal (length fs) 0) d nil)))   ; selectors
	  (if (zerop (fix n))
	      (marked (n_too_small)
		      (default_value ftype))
	    (select_op 
	     (let ((arg_err (farg_check fs a h x)))
	       (if (equal arg_err nil)
		   (let ((v (add_to_map (bind_args fs a h x)
					(mk_entry_name 'result)
					(std_initial
					 (list (marked 'type_descriptor
						       ftype))))))
		     (if (Gtruep (GF (GF_prec u) h v (sub1 n) x))
			 (if (has_defn u ftype)
			     (let ((r (GF (Gdefn u ftype)
					  h v (sub1 n) x)))
			       (if (and (determinate r)
					(truep (in_type ftype r)))
				   (marked nil
					   (typed ftype (value r)))
				 (marked
				   (indeterminate_fn_result_error fn sn)
				   (default_value ftype))))
			   (marked (no_function_defn_error fn sn)
				   (default_value ftype)))
		       (marked (entry_not_true_error fn sn)
			       (default_value ftype))))
		 (marked arg_err (default_value ftype))))
	     s))))
    (if (equal (kind u) 'error)
	(marked u (default_value (integer_desc)))
      (marked (not_function_or_const_error fn sn)
	      (default_value (integer_desc))))))
  ( (ord-lessp (cons (cons (add1 n)
			   (add1 (tree_size fn)))
		     (tree_size fn))) ))

(defn Gapply (fn ap sn v n x)
  (if (free_variablep fn v)
      (apply_var fn v ap)
  (if (equal fn 'false)
      (select_op (Gfalse) ap)
  (if (equal fn 'true)
      (select_op (Gtrue) ap)
  (if (type_name_expp fn ap sn x)
      (marked 'type_descriptor
	      (type_desc (mk_identifier fn) sn nil x))
  (if (equal fn 'domain)
      (std_domain ap)
  (if (equal fn 'first)
      (std_first ap)
  (if (equal fn 'initial)
      (std_initial ap)
  (if (equal fn 'last)
      (std_last ap)
  (if (equal fn 'lower)
      (std_lower ap)
  (if (equal fn 'max)
      (std_max ap)
  (if (equal fn 'min)
      (std_min ap)
  (if (equal fn 'nonfirst)
      (std_nonfirst ap)
  (if (equal fn 'nonlast)
      (std_nonlast ap)
  (if (equal fn 'null)
      (std_null ap)
  (if (equal fn 'ord)
      (std_ord ap)
  (if (equal fn 'pred)
      (std_pred ap)
  (if (equal fn 'range)
      (std_range ap)
  (if (equal fn 'scale)
      (std_scale ap)
  (if (equal fn 'size)
      (std_size ap)
  (if (equal fn 'succ)
      (std_succ ap)
  (if (equal fn 'upper)
      (std_upper ap)
    (apply_fun fn ap sn n x))))))))))))))))))))))
  ( (ord-lessp (cons (cons (add1 n)
			   (add1 (tree_size fn)))
		     (add1 (tree_size fn)))) ))



(defn GF (e c v n x)
  ; The meta-function GF(e,c,v,n,x) gives the value that results when the
  ; expression e is evaluated, in the context of scope c with free variables
  ; bound as determined in the environment v, by at most n applications of
  ; functions described by the Gypsy sentence x.
  ;
  ; The domain and range of GF(e,c,v,n,x) are as follows:
  ;
  ;   e is the parse tree representing the expression to be evaluated.
  ;   c is the (litatom) name of the Gypsy scope in which e is evaluated.
  ;   v is the name-value mapping that maps names of free variables
  ;     into their (marked typed) values.  
  ;   n is the maximum allowed depth of Gypsy function calls and quantifiers
  ;   x is the parse tree representing the Gypsy sentence that is being
  ;     interpreted.  This is the complete sentence containing the list of all
  ;     available scopes.  
  ;   GF(e,c,v,n,x) is the marked, typed value that results from evaluating e.
  ;


  ; ************************
  ; 
  ;    <expression> ::= ...
  ;
  ; ************************

  (if (rule e (prodn (tag 'expression 'e)
		     (tag 'modified_primary_value 'm)))
      (GF (subtree e 'modified_primary_value) c v n x)

  (if (rule e (prodn (tag 'expression 'e)
		     (list 'ALL (tag 'bound_expression 'b))))
      (let ((vs (bound_values e c x)))
	(if (errorp vs)
	    (marked vs (default_value (boolean_desc)))
	  (GF_all (bound_id (subtree e 'bound_expression))
		  vs (cdr_quantified_exp e) c v n x)))

  (if (rule e (prodn (tag 'expression 'e)
		     (list 'SOME (tag 'bound_expression 'b))))
      (let ((vs (bound_values e c x)))
	(if (errorp vs)
	    (marked vs (default_value (boolean_desc)))
	  (GF_some (bound_id (subtree e 'bound_expression))
		   vs (cdr_quantified_exp e) c v n x)))

  (if (rule e (prodn (tag 'expression 'e)
		     (list (tag 'unary_operator 'op) (tag 'expression 'e2))))
      (apply_unary_op (subtree e 'unary_operator)
		      (GF (subtree e 'expression) c v n x))

  (if (rule e (prodn (tag 'expression 'e)
		     (list (tag 'expression 'e1) (tag 'binary_operator 'op)
			   (tag 'expression 'e2))))
      (apply_binary_op (subtree e 'binary_operator)
		       (GF (subtree_i e 'expression 1) c v n x)
		       (GF (subtree_i e 'expression 2) c v n x))


  ; ********************************
  ; 
  ;    <modified primary value> ::=
  ;
  ; ********************************

  (if (rule e (prodn (tag 'modified_primary_value 'm)
		     (tag 'primary_value 'p)))
      (GF (subtree e 'primary_value) c v n x)

  (if (rule e (prodn (tag 'modified_primary_value 'm)
		     (list (tag 'modified_primary_value 'm2)
			   (tag 'value_modifiers 'vm))))
      (if (fn_call_formp e)
	  (Gapply (object_name (subtree e 'modified_primary_value))
		  (GF_adp (arg_list (subtree e 'value_modifiers))
			  c v n x)
		  c v n x)
	(GF_modifiers (GF (subtree e 'modified_primary_value) c v n x)
		      (subtree e 'value_modifiers) c v n x))

  (if (rule e (prodn (tag 'modified_primary_value 'm)
		     (list (tag 'modified_primary_value 'm2)
			   (tag 'actual_condition_parameters 'cp))))
      ; Condition parameters allowed only in <specification expression>
      ; with validation directive (p. 35, Gypsy 2.05 Report).  
      ; **** Weed them out before calling GF in that case. ****
      (let ((r (GF (subtree e 'modified_primary_value) c v n x)))
	(marked (condition_params_error e)
		(default_value (type r))))


  ; ***********************
  ; 
  ;    <primary value> ::=
  ;
  ; ***********************

  (if (rule e (prodn (tag 'primary_value 'p)
		     (tag 'literal_value 'l)))
      (GF (subtree e 'literal_value) c v n x)

  (if (rule e (prodn (tag 'primary_value 'p)
		     (tag 'set_or_sequence_value 's)))
      (GF (subtree e 'set_or_sequence_value) c v n x)

  (if (rule e (prodn (tag 'primary_value 'p)
		     (tag 'ENTRY_VALUE 'e)))
      (GF (subtree e 'ENTRY_VALUE) c v n x)

  (if (rule e (prodn (tag 'primary_value 'p)
		     (tag 'IDENTIFIER 'on)))
      (GF (subtree e 'IDENTIFIER) c v n x)

  (if (rule e (prodn (tag 'primary_value 'p)
		     (tag 'if_expression 'i)))
      (GF (subtree e 'if_expression) c v n x)

  (if (rule e (prodn (tag 'primary_value 'p)
		     (list 'OPEN_PAREN (tag 'expression 'e) 'CLOSE_PAREN)))
      (GF (subtree e 'expression) c v n x)


  ; --------------------------------------------------------------------------
  ;
  ;  From here down to parse tree leaves, clauses are in alphabetical order 
  ;  by the left-hand side of the productions.  Everything that is a parse
  ;  tree for an expression should be covered.
  ;
  ; --------------------------------------------------------------------------


  ; ***********************
  ; 
  ;    <constant body> ::=
  ;
  ; ***********************

  ; I don't think the following needs to be here.  siebert 9/Sept/90
  (if (rule e (prodn (tag 'constant_body 'b)
		     (tag 'expression 'e)))
      (GF (subtree e 'expression) c v n x)


  ; ***********************
  ; 
  ;    <if expression> ::=
  ;
  ; ***********************

  (if (rule e (prodn (tag 'if_expression 'i)
		     (list 'IF (tag 'expression 'b) 'THEN
			   (tag 'expression 'p)
			   (tag 'if_expression_else_part 'e))))

      ; Note:  this does not require all potential value expressions to be the
      ; same type or all boolean expressions to be boolean.
      (let ((bv (GF (subtree_i e 'expression 1) c v n x)))
	(if (indeterminate bv)
	    (marked (mark bv)
		    (default_value
		      (type (GF (subtree_i e 'expression 2)
				c v n x))))
        (if (truep (in_type (boolean_desc) bv))
	    (if (Gtruep bv)
		(GF (subtree_i e 'expression 2) c v n x)
	      (GF (if_else_exp (subtree e 'if_expression_else_part))
		  c v n x))
	  (marked (if_test_not_boolean_error e c)
		  (default_value
		    (type (GF (subtree_i e 'expression 2)
			      c v n x)))))))


  ; ***********************
  ; 
  ;    <literal value> ::=
  ;
  ; ***********************

  (if (rule e (prodn (tag 'literal_value 'l)
		     (tag 'CHARACTER_VALUE 'ch)))
      (GF (subtree e 'CHARACTER_VALUE) c v n x)

  (if (rule e (prodn (tag 'literal_value 'l)
		     (tag 'number 'n)))
      (GF (subtree e 'number) c v n x)

  (if (rule e (prodn (tag 'literal_value 'l)
		     (tag 'STRING_VALUE 's)))
      (GF (subtree e 'STRING_VALUE) c v n x)


  ; ****************
  ; 
  ;    <number> ::=
  ;
  ; ****************

  (if (rule e (prodn (tag 'number 'n)
		     (tag 'DIGIT_LIST 's)))
      (minteger e)

  (if (rule e (prodn (tag 'number 'n)
		     (list (tag 'base 'b) (tag 'DIGIT_LIST 's))))
      (minteger e)


  ; *****************************************
  ; 
  ;    <pre-computable label expression> ::=
  ;
  ; *****************************************

  (if (rule e (prodn (tag 'pre_computable_label_expression 'p)
		     (tag 'number 'n)))
      (GF (subtree e 'number) c v n x)

  (if (rule e (prodn (tag 'pre_computable_label_expression 'p)
		     (list 'MINUS (tag 'number 'n))))
      (apply_unary_op (mk_unary_operator 'MINUS)
		      (GF (subtree e 'number) c v n x))

  (if (rule e (prodn (tag 'pre_computable_label_expression 'p)
		     (tag 'CHARACTER_VALUE 'ch)))
      (GF (subtree e 'CHARACTER_VALUE) c v n x)

  (if (rule e (prodn (tag 'pre_computable_label_expression 'p)
		     (tag 'IDENTIFIER 'i)))
      (GF (subtree e 'IDENTIFIER) c v n x)


  ; ********************************
  ; 
  ;    <set or sequence value> ::=
  ;
  ; ********************************

  (if (rule e (prodn (tag 'set_or_sequence_value 's)
		     (list 'OPEN_PAREN (tag 'set_or_seq_mark 'm)
			   (tag 'element_list 'e) 'CLOSE_PAREN)))
      (Gset_or_seq (subtree e 'set_or_seq_mark)
		   (GF_element_list (subtree e 'element_list) c v n x)
		   (GF_element_type (subtree e 'element_list) c v n x))

  (if (rule e (prodn (tag 'set_or_sequence_value 's)
		     (tag 'range 'r)))
      (Gset_or_seq nil
		   (GF_element_list (subtree e 'range) c v n x)
		   (GF_element_type (subtree e 'range) c v n x))


  ; *********************
  ; 
  ;    PARSE TREE LEAVES
  ;
  ; *********************

  (if (character_valuep e)
      (Gchar e)

  (if (digit_listp e)
      (minteger e)

  (if (entry_valuep e)
      (apply_var (entry_name e) v nil)

  (if (identifierp e)
      (Gapply (gname e) nil c v n x)

  (if (string_valuep e)
      (Gstring_seq e)

    (marked (not_expression_error e) (default_value (integer_desc)))

    ))))))))))))))))))))))))))))))))
  ( (ord-lessp (cons (cons (add1 n)
			   (add1 (tree_size e)))
		     (count c))) )) ; (count c) is a place filler

))
|#

(DEFN MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                   (MUTUAL-FLG AP BV C D E FN ID N SN V VS X)
                                   (CASE MUTUAL-FLG
                                    (GF
                                     (COND
                                      ((RULE E
                                             (PRODN (TAG 'EXPRESSION 'E)
                                                    (TAG 'MODIFIED_PRIMARY_VALUE 'M)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                             'GF
                                                                             T
                                                                             T
                                                                             C
                                                                             T
                                                                             (SUBTREE E 'MODIFIED_PRIMARY_VALUE)
                                                                             T
                                                                             T
                                                                             N
                                                                             T
                                                                             V
                                                                             T
                                                                             X))
                                      ((RULE E
                                             (PRODN (TAG 'EXPRESSION 'E)
                                                    (LIST 'ALL
                                                          (TAG 'BOUND_EXPRESSION 'B))))
                                       (IF
                                        (ERRORP (BOUND_VALUES E C X))
                                        (MARKED (BOUND_VALUES E C X)
                                                (DEFAULT_VALUE (BOOLEAN_DESC)))
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                        'GF_ALL
                                                                        T T
                                                                        C T
                                                                        (CDR_QUANTIFIED_EXP E)
                                                                        T
                                                                        (BOUND_ID (SUBTREE E 'BOUND_EXPRESSION))
                                                                        N T
                                                                        V
                                                                        (BOUND_VALUES E C X)
                                                                        X)))
                                      ((RULE E
                                             (PRODN (TAG 'EXPRESSION 'E)
                                                    (LIST 'SOME
                                                          (TAG 'BOUND_EXPRESSION 'B))))
                                       (IF
                                        (ERRORP (BOUND_VALUES E C X))
                                        (MARKED (BOUND_VALUES E C X)
                                                (DEFAULT_VALUE (BOOLEAN_DESC)))
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                        'GF_SOME
                                                                        T T
                                                                        C T
                                                                        (CDR_QUANTIFIED_EXP E)
                                                                        T
                                                                        (BOUND_ID (SUBTREE E 'BOUND_EXPRESSION))
                                                                        N T
                                                                        V
                                                                        (BOUND_VALUES E C X)
                                                                        X)))
                                      ((RULE E
                                             (PRODN (TAG 'EXPRESSION 'E)
                                                    (LIST (TAG 'UNARY_OPERATOR 'OP)
                                                          (TAG 'EXPRESSION 'E2))))
                                       (APPLY_UNARY_OP
                                        (SUBTREE E 'UNARY_OPERATOR)
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                         'GF
                                                                                         T
                                                                                         T
                                                                                         C
                                                                                         T
                                                                                         (SUBTREE E 'EXPRESSION)
                                                                                         T
                                                                                         T
                                                                                         N
                                                                                         T
                                                                                         V
                                                                                         T
                                                                                         X)))
                                      ((RULE E
                                             (PRODN (TAG 'EXPRESSION 'E)
                                                    (LIST (TAG 'EXPRESSION 'E1)
                                                          (TAG 'BINARY_OPERATOR 'OP)
                                                          (TAG 'EXPRESSION 'E2))))
                                       (APPLY_BINARY_OP
                                        (SUBTREE E 'BINARY_OPERATOR)
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                     'GF
                                                                                     T
                                                                                     T
                                                                                     C
                                                                                     T
                                                                                     (SUBTREE_I E 'EXPRESSION 1)
                                                                                     T
                                                                                     T
                                                                                     N
                                                                                     T
                                                                                     V
                                                                                     T
                                                                                     X)
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                     'GF
                                                                                     T
                                                                                     T
                                                                                     C
                                                                                     T
                                                                                     (SUBTREE_I E 'EXPRESSION 2)
                                                                                     T
                                                                                     T
                                                                                     N
                                                                                     T
                                                                                     V
                                                                                     T
                                                                                     X)))
                                      ((RULE E
                                             (PRODN (TAG 'MODIFIED_PRIMARY_VALUE 'M)
                                                    (TAG 'PRIMARY_VALUE 'P)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                      'GF
                                                                                      T
                                                                                      T
                                                                                      C
                                                                                      T
                                                                                      (SUBTREE E 'PRIMARY_VALUE)
                                                                                      T
                                                                                      T
                                                                                      N
                                                                                      T
                                                                                      V
                                                                                      T
                                                                                      X))
                                      ((RULE E
                                             (PRODN (TAG 'MODIFIED_PRIMARY_VALUE 'M)
                                                    (LIST (TAG 'MODIFIED_PRIMARY_VALUE 'M2)
                                                          (TAG 'VALUE_MODIFIERS 'VM))))
                                       (IF
                                        (FN_CALL_FORMP E)
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                         'GAPPLY
                                         (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                         'GF_ADP
                                                                         T T C
                                                                         T
                                                                         (ARG_LIST (SUBTREE E 'VALUE_MODIFIERS))
                                                                         T T N
                                                                         T V T
                                                                         X)
                                         T T T T
                                         (OBJECT_NAME (SUBTREE E 'MODIFIED_PRIMARY_VALUE))
                                         T N C V T X)
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                         'GF_MODIFIERS
                                         T
                                         (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                             'GF
                                                                             T
                                                                             T
                                                                             C
                                                                             T
                                                                             (SUBTREE E 'MODIFIED_PRIMARY_VALUE)
                                                                             T
                                                                             T
                                                                             N
                                                                             T
                                                                             V
                                                                             T
                                                                             X)
                                         C T
                                         (SUBTREE E 'VALUE_MODIFIERS)
                                         T T N T V T X)))
                                      ((RULE E
                                             (PRODN (TAG 'MODIFIED_PRIMARY_VALUE 'M)
                                                    (LIST (TAG 'MODIFIED_PRIMARY_VALUE 'M2)
                                                          (TAG 'ACTUAL_CONDITION_PARAMETERS
                                                               'CP))))
                                       (MARKED
                                        (CONDITION_PARAMS_ERROR E)
                                        (DEFAULT_VALUE
                                         (TYPE
                                          (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                             'GF
                                                                             T
                                                                             T
                                                                             C
                                                                             T
                                                                             (SUBTREE E 'MODIFIED_PRIMARY_VALUE)
                                                                             T
                                                                             T
                                                                             N
                                                                             T
                                                                             V
                                                                             T
                                                                             X)))))
                                      ((RULE E
                                             (PRODN (TAG 'PRIMARY_VALUE 'P)
                                                    (TAG 'LITERAL_VALUE 'L)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                      'GF
                                                                                      T
                                                                                      T
                                                                                      C
                                                                                      T
                                                                                      (SUBTREE E 'LITERAL_VALUE)
                                                                                      T
                                                                                      T
                                                                                      N
                                                                                      T
                                                                                      V
                                                                                      T
                                                                                      X))
                                      ((RULE E
                                             (PRODN (TAG 'PRIMARY_VALUE 'P)
                                                    (TAG 'SET_OR_SEQUENCE_VALUE 'S)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                              'GF
                                                                              T
                                                                              T
                                                                              C
                                                                              T
                                                                              (SUBTREE E 'SET_OR_SEQUENCE_VALUE)
                                                                              T
                                                                              T
                                                                              N
                                                                              T
                                                                              V
                                                                              T
                                                                              X))
                                      ((RULE E
                                             (PRODN (TAG 'PRIMARY_VALUE 'P)
                                                    (TAG 'ENTRY_VALUE 'E)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                        'GF
                                                                                        T
                                                                                        T
                                                                                        C
                                                                                        T
                                                                                        (SUBTREE E 'ENTRY_VALUE)
                                                                                        T
                                                                                        T
                                                                                        N
                                                                                        T
                                                                                        V
                                                                                        T
                                                                                        X))
                                      ((RULE E
                                             (PRODN (TAG 'PRIMARY_VALUE 'P)
                                                    (TAG 'IDENTIFIER 'ON)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                         'GF
                                                                                         T
                                                                                         T
                                                                                         C
                                                                                         T
                                                                                         (SUBTREE E 'IDENTIFIER)
                                                                                         T
                                                                                         T
                                                                                         N
                                                                                         T
                                                                                         V
                                                                                         T
                                                                                         X))
                                      ((RULE E
                                             (PRODN (TAG 'PRIMARY_VALUE 'P)
                                                    (TAG 'IF_EXPRESSION 'I)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                      'GF
                                                                                      T
                                                                                      T
                                                                                      C
                                                                                      T
                                                                                      (SUBTREE E 'IF_EXPRESSION)
                                                                                      T
                                                                                      T
                                                                                      N
                                                                                      T
                                                                                      V
                                                                                      T
                                                                                      X))
                                      ((RULE E
                                             (PRODN (TAG 'PRIMARY_VALUE 'P)
                                                    (LIST 'OPEN_PAREN
                                                          (TAG 'EXPRESSION 'E)
                                                          'CLOSE_PAREN)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                         'GF
                                                                                         T
                                                                                         T
                                                                                         C
                                                                                         T
                                                                                         (SUBTREE E 'EXPRESSION)
                                                                                         T
                                                                                         T
                                                                                         N
                                                                                         T
                                                                                         V
                                                                                         T
                                                                                         X))
                                      ((RULE E
                                             (PRODN (TAG 'CONSTANT_BODY 'B)
                                                    (TAG 'EXPRESSION 'E)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                         'GF
                                                                                         T
                                                                                         T
                                                                                         C
                                                                                         T
                                                                                         (SUBTREE E 'EXPRESSION)
                                                                                         T
                                                                                         T
                                                                                         N
                                                                                         T
                                                                                         V
                                                                                         T
                                                                                         X))
                                      ((RULE E
                                             (PRODN (TAG 'IF_EXPRESSION 'I)
                                                    (LIST 'IF
                                                          (TAG 'EXPRESSION 'B)
                                                          'THEN
                                                          (TAG 'EXPRESSION 'P)
                                                          (TAG 'IF_EXPRESSION_ELSE_PART 'E))))
                                       (COND
                                        ((INDETERMINATE
                                          (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                     'GF
                                                                                     T
                                                                                     T
                                                                                     C
                                                                                     T
                                                                                     (SUBTREE_I E 'EXPRESSION 1)
                                                                                     T
                                                                                     T
                                                                                     N
                                                                                     T
                                                                                     V
                                                                                     T
                                                                                     X))
                                         (MARKED
                                          (MARK
                                           (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                     'GF
                                                                                     T
                                                                                     T
                                                                                     C
                                                                                     T
                                                                                     (SUBTREE_I E 'EXPRESSION 1)
                                                                                     T
                                                                                     T
                                                                                     N
                                                                                     T
                                                                                     V
                                                                                     T
                                                                                     X))
                                          (DEFAULT_VALUE
                                           (TYPE
                                            (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                     'GF
                                                                                     T
                                                                                     T
                                                                                     C
                                                                                     T
                                                                                     (SUBTREE_I E 'EXPRESSION 2)
                                                                                     T
                                                                                     T
                                                                                     N
                                                                                     T
                                                                                     V
                                                                                     T
                                                                                     X)))))
                                        ((TRUEP
                                          (IN_TYPE
                                           (BOOLEAN_DESC)
                                           (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                     'GF
                                                                                     T
                                                                                     T
                                                                                     C
                                                                                     T
                                                                                     (SUBTREE_I E 'EXPRESSION 1)
                                                                                     T
                                                                                     T
                                                                                     N
                                                                                     T
                                                                                     V
                                                                                     T
                                                                                     X)))
                                         (IF
                                          (GTRUEP
                                           (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                     'GF
                                                                                     T
                                                                                     T
                                                                                     C
                                                                                     T
                                                                                     (SUBTREE_I E 'EXPRESSION 1)
                                                                                     T
                                                                                     T
                                                                                     N
                                                                                     T
                                                                                     V
                                                                                     T
                                                                                     X))
                                          (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                     'GF
                                                                                     T
                                                                                     T
                                                                                     C
                                                                                     T
                                                                                     (SUBTREE_I E 'EXPRESSION 2)
                                                                                     T
                                                                                     T
                                                                                     N
                                                                                     T
                                                                                     V
                                                                                     T
                                                                                     X)
                                          (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                              'GF
                                                              T T C T
                                                              (IF_ELSE_EXP (SUBTREE E 'IF_EXPRESSION_ELSE_PART))
                                                              T T N T V T X)))
                                        (T
                                         (MARKED
                                          (IF_TEST_NOT_BOOLEAN_ERROR E C)
                                          (DEFAULT_VALUE
                                           (TYPE
                                            (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                     'GF
                                                                                     T
                                                                                     T
                                                                                     C
                                                                                     T
                                                                                     (SUBTREE_I E 'EXPRESSION 2)
                                                                                     T
                                                                                     T
                                                                                     N
                                                                                     T
                                                                                     V
                                                                                     T
                                                                                     X)))))))
                                      ((RULE E
                                             (PRODN (TAG 'LITERAL_VALUE 'L)
                                                    (TAG 'CHARACTER_VALUE 'CH)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                    'GF
                                                                                    T
                                                                                    T
                                                                                    C
                                                                                    T
                                                                                    (SUBTREE E 'CHARACTER_VALUE)
                                                                                    T
                                                                                    T
                                                                                    N
                                                                                    T
                                                                                    V
                                                                                    T
                                                                                    X))
                                      ((RULE E
                                             (PRODN (TAG 'LITERAL_VALUE 'L)
                                                    (TAG 'NUMBER 'N)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                             'GF
                                                                                             T
                                                                                             T
                                                                                             C
                                                                                             T
                                                                                             (SUBTREE E 'NUMBER)
                                                                                             T
                                                                                             T
                                                                                             N
                                                                                             T
                                                                                             V
                                                                                             T
                                                                                             X))
                                      ((RULE E
                                             (PRODN (TAG 'LITERAL_VALUE 'L)
                                                    (TAG 'STRING_VALUE 'S)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                       'GF
                                                                                       T
                                                                                       T
                                                                                       C
                                                                                       T
                                                                                       (SUBTREE E 'STRING_VALUE)
                                                                                       T
                                                                                       T
                                                                                       N
                                                                                       T
                                                                                       V
                                                                                       T
                                                                                       X))
                                      ((RULE E
                                             (PRODN (TAG 'NUMBER 'N)
                                                    (TAG 'DIGIT_LIST 'S)))
                                       (MINTEGER E))
                                      ((RULE E
                                             (PRODN (TAG 'NUMBER 'N)
                                                    (LIST (TAG 'BASE 'B)
                                                          (TAG 'DIGIT_LIST 'S))))
                                       (MINTEGER E))
                                      ((RULE E
                                             (PRODN (TAG 'PRE_COMPUTABLE_LABEL_EXPRESSION
                                                         'P)
                                                    (TAG 'NUMBER 'N)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                             'GF
                                                                                             T
                                                                                             T
                                                                                             C
                                                                                             T
                                                                                             (SUBTREE E 'NUMBER)
                                                                                             T
                                                                                             T
                                                                                             N
                                                                                             T
                                                                                             V
                                                                                             T
                                                                                             X))
                                      ((RULE E
                                             (PRODN (TAG 'PRE_COMPUTABLE_LABEL_EXPRESSION
                                                         'P)
                                                    (LIST 'MINUS (TAG 'NUMBER 'N))))
                                       (APPLY_UNARY_OP
                                        (MK_UNARY_OPERATOR 'MINUS)
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                             'GF
                                                                                             T
                                                                                             T
                                                                                             C
                                                                                             T
                                                                                             (SUBTREE E 'NUMBER)
                                                                                             T
                                                                                             T
                                                                                             N
                                                                                             T
                                                                                             V
                                                                                             T
                                                                                             X)))
                                      ((RULE E
                                             (PRODN (TAG 'PRE_COMPUTABLE_LABEL_EXPRESSION
                                                         'P)
                                                    (TAG 'CHARACTER_VALUE 'CH)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                    'GF
                                                                                    T
                                                                                    T
                                                                                    C
                                                                                    T
                                                                                    (SUBTREE E 'CHARACTER_VALUE)
                                                                                    T
                                                                                    T
                                                                                    N
                                                                                    T
                                                                                    V
                                                                                    T
                                                                                    X))
                                      ((RULE E
                                             (PRODN (TAG 'PRE_COMPUTABLE_LABEL_EXPRESSION
                                                         'P)
                                                    (TAG 'IDENTIFIER 'I)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                         'GF
                                                                                         T
                                                                                         T
                                                                                         C
                                                                                         T
                                                                                         (SUBTREE E 'IDENTIFIER)
                                                                                         T
                                                                                         T
                                                                                         N
                                                                                         T
                                                                                         V
                                                                                         T
                                                                                         X))
                                      ((RULE E
                                             (PRODN (TAG 'SET_OR_SEQUENCE_VALUE 'S)
                                                    (LIST 'OPEN_PAREN
                                                          (TAG 'SET_OR_SEQ_MARK 'M)
                                                          (TAG 'ELEMENT_LIST 'E)
                                                          'CLOSE_PAREN)))
                                       (GSET_OR_SEQ
                                        (SUBTREE E 'SET_OR_SEQ_MARK)
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                       'GF_ELEMENT_LIST
                                                                                       T
                                                                                       T
                                                                                       C
                                                                                       T
                                                                                       (SUBTREE E 'ELEMENT_LIST)
                                                                                       T
                                                                                       T
                                                                                       N
                                                                                       T
                                                                                       V
                                                                                       T
                                                                                       X)
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                       'GF_ELEMENT_TYPE
                                                                                       T
                                                                                       T
                                                                                       C
                                                                                       T
                                                                                       (SUBTREE E 'ELEMENT_LIST)
                                                                                       T
                                                                                       T
                                                                                       N
                                                                                       T
                                                                                       V
                                                                                       T
                                                                                       X)))
                                      ((RULE E
                                             (PRODN (TAG 'SET_OR_SEQUENCE_VALUE 'S)
                                                    (TAG 'RANGE 'R)))
                                       (GSET_OR_SEQ NIL
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                              'GF_ELEMENT_LIST
                                                                                              T
                                                                                              T
                                                                                              C
                                                                                              T
                                                                                              (SUBTREE E 'RANGE)
                                                                                              T
                                                                                              T
                                                                                              N
                                                                                              T
                                                                                              V
                                                                                              T
                                                                                              X)
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                              'GF_ELEMENT_TYPE
                                                                                              T
                                                                                              T
                                                                                              C
                                                                                              T
                                                                                              (SUBTREE E 'RANGE)
                                                                                              T
                                                                                              T
                                                                                              N
                                                                                              T
                                                                                              V
                                                                                              T
                                                                                              X)))
                                      ((CHARACTER_VALUEP E) (GCHAR E))
                                      ((DIGIT_LISTP E) (MINTEGER E))
                                      ((ENTRY_VALUEP E)
                                       (APPLY_VAR (ENTRY_NAME E) V NIL))
                                      ((IDENTIFIERP E)
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                                        'GAPPLY
                                                                                                        NIL
                                                                                                        T
                                                                                                        T
                                                                                                        T
                                                                                                        T
                                                                                                        (GNAME E)
                                                                                                        T
                                                                                                        N
                                                                                                        C
                                                                                                        V
                                                                                                        T
                                                                                                        X))
                                      ((STRING_VALUEP E) (GSTRING_SEQ E))
                                      (T (MARKED (NOT_EXPRESSION_ERROR E)
                                                 (DEFAULT_VALUE (INTEGER_DESC))))))
                                    (GAPPLY
                                     (COND
                                      ((FREE_VARIABLEP FN V)
                                       (APPLY_VAR FN V AP))
                                      ((EQUAL FN 'FALSE)
                                       (SELECT_OP (GFALSE) AP))
                                      ((EQUAL FN 'TRUE)
                                       (SELECT_OP (GTRUE) AP))
                                      ((TYPE_NAME_EXPP FN AP SN X)
                                       (MARKED 'TYPE_DESCRIPTOR
                                               (TYPE_DESC (MK_IDENTIFIER FN)
                                                          SN NIL X)))
                                      ((EQUAL FN 'DOMAIN) (STD_DOMAIN AP))
                                      ((EQUAL FN 'FIRST) (STD_FIRST AP))
                                      ((EQUAL FN 'INITIAL)
                                       (STD_INITIAL AP))
                                      ((EQUAL FN 'LAST) (STD_LAST AP))
                                      ((EQUAL FN 'LOWER) (STD_LOWER AP))
                                      ((EQUAL FN 'MAX) (STD_MAX AP))
                                      ((EQUAL FN 'MIN) (STD_MIN AP))
                                      ((EQUAL FN 'NONFIRST)
                                       (STD_NONFIRST AP))
                                      ((EQUAL FN 'NONLAST)
                                       (STD_NONLAST AP))
                                      ((EQUAL FN 'NULL) (STD_NULL AP))
                                      ((EQUAL FN 'ORD) (STD_ORD AP))
                                      ((EQUAL FN 'PRED) (STD_PRED AP))
                                      ((EQUAL FN 'RANGE) (STD_RANGE AP))
                                      ((EQUAL FN 'SCALE) (STD_SCALE AP))
                                      ((EQUAL FN 'SIZE) (STD_SIZE AP))
                                      ((EQUAL FN 'SUCC) (STD_SUCC AP))
                                      ((EQUAL FN 'UPPER) (STD_UPPER AP))
                                      (T
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                                      'APPLY_FUN
                                                                                                      T
                                                                                                      T
                                                                                                      T
                                                                                                      AP
                                                                                                      T
                                                                                                      FN
                                                                                                      T
                                                                                                      N
                                                                                                      SN
                                                                                                      T
                                                                                                      T
                                                                                                      X))))
                                    (APPLY_FUN
                                     (COND
                                      ((OR (EQUAL (KIND (CDR (REF FN SN X)))
                                                  'FUNCTION)
                                           (EQUAL (KIND (CDR (REF FN SN X)))
                                                  'CONSTANT))
                                       (IF
                                        (ZEROP (FIX N))
                                        (MARKED (N_TOO_SMALL)
                                                (DEFAULT_VALUE (TYPE_DESC (RESULT_TYPE (CDR (REF FN SN X)))
                                                                          (CAR (REF FN SN X))
                                                                          NIL
                                                                          X)))
                                        (SELECT_OP
                                         (IF
                                          (EQUAL
                                               (FARG_CHECK (FORMAL_DARGS (CDR (REF FN SN X)))
                                                           (IF (EQUAL (LENGTH (FORMAL_DARGS (CDR (REF FN SN X))))
                                                                      0)
                                                               NIL D)
                                                           (CAR (REF FN SN X))
                                                           X)
                                               NIL)
                                          (IF
                                           (GTRUEP
                                            (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                             'GF
                                             T T
                                             (CAR (REF FN SN X))
                                             T
                                             (GF_PREC (CDR (REF FN SN X)))
                                             T T
                                             (SUB1 N)
                                             T
                                             (ADD_TO_MAP
                                              (BIND_ARGS (FORMAL_DARGS (CDR (REF FN SN X)))
                                                         (IF (EQUAL (LENGTH (FORMAL_DARGS (CDR (REF FN SN X))))
                                                                    0)
                                                             NIL D)
                                                         (CAR (REF FN SN X))
                                                         X)
                                              (MK_ENTRY_NAME 'RESULT)
                                              (STD_INITIAL
                                                       (LIST (MARKED 'TYPE_DESCRIPTOR
                                                                     (TYPE_DESC (RESULT_TYPE (CDR (REF FN SN X)))
                                                                                (CAR (REF FN SN X))
                                                                                NIL
                                                                                X)))))
                                             T X))
                                           (IF
                                            (HAS_DEFN (CDR (REF FN SN X))
                                                      (TYPE_DESC (RESULT_TYPE (CDR (REF FN SN X)))
                                                                 (CAR (REF FN SN X))
                                                                 NIL X))
                                            (IF
                                             (AND
                                              (DETERMINATE
                                               (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                'GF
                                                T T
                                                (CAR (REF FN SN X))
                                                T
                                                (GDEFN (CDR (REF FN SN X))
                                                       (TYPE_DESC (RESULT_TYPE (CDR (REF FN SN X)))
                                                                  (CAR (REF FN SN X))
                                                                  NIL X))
                                                T T
                                                (SUB1 N)
                                                T
                                                (ADD_TO_MAP
                                                 (BIND_ARGS
                                                           (FORMAL_DARGS (CDR (REF FN SN X)))
                                                           (IF (EQUAL (LENGTH (FORMAL_DARGS (CDR (REF FN SN X))))
                                                                      0)
                                                               NIL D)
                                                           (CAR (REF FN SN X))
                                                           X)
                                                 (MK_ENTRY_NAME 'RESULT)
                                                 (STD_INITIAL
                                                       (LIST (MARKED 'TYPE_DESCRIPTOR
                                                                     (TYPE_DESC (RESULT_TYPE (CDR (REF FN SN X)))
                                                                                (CAR (REF FN SN X))
                                                                                NIL
                                                                                X)))))
                                                T X))
                                              (TRUEP
                                               (IN_TYPE
                                                (TYPE_DESC (RESULT_TYPE (CDR (REF FN SN X)))
                                                           (CAR (REF FN SN X))
                                                           NIL X)
                                                (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                 'GF
                                                 T T
                                                 (CAR (REF FN SN X))
                                                 T
                                                 (GDEFN (CDR (REF FN SN X))
                                                        (TYPE_DESC (RESULT_TYPE (CDR (REF FN SN X)))
                                                                   (CAR (REF FN SN X))
                                                                   NIL X))
                                                 T T
                                                 (SUB1 N)
                                                 T
                                                 (ADD_TO_MAP
                                                  (BIND_ARGS
                                                           (FORMAL_DARGS (CDR (REF FN SN X)))
                                                           (IF (EQUAL (LENGTH (FORMAL_DARGS (CDR (REF FN SN X))))
                                                                      0)
                                                               NIL D)
                                                           (CAR (REF FN SN X))
                                                           X)
                                                  (MK_ENTRY_NAME 'RESULT)
                                                  (STD_INITIAL
                                                       (LIST (MARKED 'TYPE_DESCRIPTOR
                                                                     (TYPE_DESC (RESULT_TYPE (CDR (REF FN SN X)))
                                                                                (CAR (REF FN SN X))
                                                                                NIL
                                                                                X)))))
                                                 T X))))
                                             (MARKED NIL
                                              (TYPED
                                               (TYPE_DESC (RESULT_TYPE (CDR (REF FN SN X)))
                                                          (CAR (REF FN SN X))
                                                          NIL X)
                                               (VALUE
                                                (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                 'GF
                                                 T T
                                                 (CAR (REF FN SN X))
                                                 T
                                                 (GDEFN (CDR (REF FN SN X))
                                                        (TYPE_DESC (RESULT_TYPE (CDR (REF FN SN X)))
                                                                   (CAR (REF FN SN X))
                                                                   NIL X))
                                                 T T
                                                 (SUB1 N)
                                                 T
                                                 (ADD_TO_MAP
                                                  (BIND_ARGS
                                                           (FORMAL_DARGS (CDR (REF FN SN X)))
                                                           (IF (EQUAL (LENGTH (FORMAL_DARGS (CDR (REF FN SN X))))
                                                                      0)
                                                               NIL D)
                                                           (CAR (REF FN SN X))
                                                           X)
                                                  (MK_ENTRY_NAME 'RESULT)
                                                  (STD_INITIAL
                                                       (LIST (MARKED 'TYPE_DESCRIPTOR
                                                                     (TYPE_DESC (RESULT_TYPE (CDR (REF FN SN X)))
                                                                                (CAR (REF FN SN X))
                                                                                NIL
                                                                                X)))))
                                                 T X))))
                                             (MARKED (INDETERMINATE_FN_RESULT_ERROR FN SN)
                                                     (DEFAULT_VALUE (TYPE_DESC (RESULT_TYPE (CDR (REF FN SN X)))
                                                                               (CAR (REF FN SN X))
                                                                               NIL
                                                                               X))))
                                            (MARKED (NO_FUNCTION_DEFN_ERROR FN SN)
                                                    (DEFAULT_VALUE (TYPE_DESC (RESULT_TYPE (CDR (REF FN SN X)))
                                                                              (CAR (REF FN SN X))
                                                                              NIL
                                                                              X))))
                                           (MARKED (ENTRY_NOT_TRUE_ERROR FN SN)
                                                   (DEFAULT_VALUE (TYPE_DESC (RESULT_TYPE (CDR (REF FN SN X)))
                                                                             (CAR (REF FN SN X))
                                                                             NIL
                                                                             X))))
                                          (MARKED
                                               (FARG_CHECK (FORMAL_DARGS (CDR (REF FN SN X)))
                                                           (IF (EQUAL (LENGTH (FORMAL_DARGS (CDR (REF FN SN X))))
                                                                      0)
                                                               NIL D)
                                                           (CAR (REF FN SN X))
                                                           X)
                                               (DEFAULT_VALUE (TYPE_DESC (RESULT_TYPE (CDR (REF FN SN X)))
                                                                         (CAR (REF FN SN X))
                                                                         NIL
                                                                         X))))
                                         (IF (EQUAL (LENGTH (FORMAL_DARGS (CDR (REF FN SN X))))
                                                    0)
                                             D NIL))))
                                      ((EQUAL (KIND (CDR (REF FN SN X)))
                                              'ERROR)
                                       (MARKED (CDR (REF FN SN X))
                                               (DEFAULT_VALUE (INTEGER_DESC))))
                                      (T (MARKED (NOT_FUNCTION_OR_CONST_ERROR FN SN)
                                                 (DEFAULT_VALUE (INTEGER_DESC))))))
                                    (GF_MODIFIERS
                                     (COND
                                      ((RULE E
                                             (PRODN (TAG 'VALUE_MODIFIERS 'M)
                                                    (TAG 'COMPONENT_SELECTORS 'S)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                'GF_MODIFIERS
                                                                                T
                                                                                BV
                                                                                C
                                                                                T
                                                                                (SUBTREE E 'COMPONENT_SELECTORS)
                                                                                T
                                                                                T
                                                                                N
                                                                                T
                                                                                V
                                                                                T
                                                                                X))
                                      ((RULE E
                                             (PRODN (TAG 'COMPONENT_SELECTORS 'S)
                                                    (LIST 'DOT (TAG 'IDENTIFIER 'FN))))
                                       (RECORD_GET BV
                                                   (MARKED 'FIELD_NAME
                                                           (GNAME (SUBTREE E 'IDENTIFIER)))
                                                   (TYPE BV)))
                                      ((RULE E
                                             (PRODN (TAG 'COMPONENT_SELECTORS 'S)
                                                    (TAG 'ARG_LIST 'D)))
                                       (SELECT_OP BV
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                           'GF_ADP
                                                                                           T
                                                                                           T
                                                                                           C
                                                                                           T
                                                                                           (SUBTREE E 'ARG_LIST)
                                                                                           T
                                                                                           T
                                                                                           N
                                                                                           T
                                                                                           V
                                                                                           T
                                                                                           X)))
                                      ((RULE E
                                             (PRODN (TAG 'VALUE_MODIFIERS 'M)
                                                    (TAG 'RANGE 'R)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                              'GF_MODIFIERS
                                                                                              T
                                                                                              BV
                                                                                              C
                                                                                              T
                                                                                              (SUBTREE E 'RANGE)
                                                                                              T
                                                                                              T
                                                                                              N
                                                                                              T
                                                                                              V
                                                                                              T
                                                                                              X))
                                      ((RULE E
                                             (PRODN (TAG 'RANGE 'R)
                                                    (LIST 'OPEN_PAREN
                                                          (TAG 'RANGE_LIMITS 'R2)
                                                          'CLOSE_PAREN)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                       'GF_MODIFIERS
                                                                                       T
                                                                                       BV
                                                                                       C
                                                                                       T
                                                                                       (SUBTREE E 'RANGE_LIMITS)
                                                                                       T
                                                                                       T
                                                                                       N
                                                                                       T
                                                                                       V
                                                                                       T
                                                                                       X))
                                      ((RULE E
                                             (PRODN (TAG 'RANGE_LIMITS 'R)
                                                    (LIST (TAG 'EXPRESSION 'LO)
                                                          'DOT_DOT
                                                          (TAG 'EXPRESSION 'HI))))
                                       (SUBSEQUENCE_GET BV
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                     'GF
                                                                                     T
                                                                                     T
                                                                                     C
                                                                                     T
                                                                                     (SUBTREE_I E 'EXPRESSION 1)
                                                                                     T
                                                                                     T
                                                                                     N
                                                                                     T
                                                                                     V
                                                                                     T
                                                                                     X)
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                     'GF
                                                                                     T
                                                                                     T
                                                                                     C
                                                                                     T
                                                                                     (SUBTREE_I E 'EXPRESSION 2)
                                                                                     T
                                                                                     T
                                                                                     N
                                                                                     T
                                                                                     V
                                                                                     T
                                                                                     X)))
                                      ((RULE E
                                             (PRODN (TAG 'VALUE_MODIFIERS 'M)
                                                    (TAG 'VALUE_ALTERATIONS 'A)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                  'GF_MODIFIERS
                                                                                  T
                                                                                  BV
                                                                                  C
                                                                                  T
                                                                                  (SUBTREE E 'VALUE_ALTERATIONS)
                                                                                  T
                                                                                  T
                                                                                  N
                                                                                  T
                                                                                  V
                                                                                  T
                                                                                  X))
                                      ((RULE E
                                             (PRODN (TAG 'VALUE_ALTERATIONS 'A)
                                                    (LIST 'WITH
                                                          'OPEN_PAREN
                                                          (TAG 'COMPONENT_ALTERATIONS_LIST
                                                               'AL)
                                                          'CLOSE_PAREN)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                           'GF_MODIFIERS
                                                                           T
                                                                           BV
                                                                           C
                                                                           T
                                                                           (SUBTREE E
                                                                                    'COMPONENT_ALTERATIONS_LIST)
                                                                           T
                                                                           T
                                                                           N
                                                                           T
                                                                           V
                                                                           T
                                                                           X))
                                      ((RULE E
                                             (PRODN (TAG 'COMPONENT_ALTERATIONS_LIST
                                                         'AL)
                                                    (TAG 'COMPONENT_ALTERATIONS 'A)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                              'GF_MODIFIERS
                                                                              T
                                                                              BV
                                                                              C
                                                                              T
                                                                              (SUBTREE E 'COMPONENT_ALTERATIONS)
                                                                              T
                                                                              T
                                                                              N
                                                                              T
                                                                              V
                                                                              T
                                                                              X))
                                      ((RULE E
                                             (PRODN (TAG 'COMPONENT_ALTERATIONS_LIST
                                                         'AL)
                                                    (LIST (TAG 'COMPONENT_ALTERATIONS_LIST
                                                               'AL2)
                                                          'SEMI_COLON
                                                          (TAG 'COMPONENT_ALTERATIONS 'A))))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                        'GF_MODIFIERS
                                        T
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                           'GF_MODIFIERS
                                                                           T
                                                                           BV
                                                                           C T
                                                                           (SUBTREE E
                                                                                    'COMPONENT_ALTERATIONS_LIST)
                                                                           T T
                                                                           N T
                                                                           V T
                                                                           X)
                                        C T
                                        (SUBTREE E 'COMPONENT_ALTERATIONS)
                                        T T N T V T X))
                                      ((RULE E
                                             (PRODN (TAG 'COMPONENT_ALTERATIONS 'AS)
                                                    (LIST (TAG 'OPT_EACH_CLAUSE 'E)
                                                          (TAG 'COMPONENT_ASSIGNMENT 'A))))
                                       (IF
                                        (EACH_CLAUSEP (SUBTREE E 'OPT_EACH_CLAUSE))
                                        (IF
                                         (ERRORP (BOUND_VALUES (SUBTREE E 'OPT_EACH_CLAUSE)
                                                               C X))
                                         (MARKED (BOUND_VALUES (SUBTREE E 'OPT_EACH_CLAUSE)
                                                               C X)
                                                 (DEFAULT_VALUE (BASE_TYPE (TYPE BV))))
                                         (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                      'GF_EACH
                                                                      T BV C
                                                                      T
                                                                      (SUBTREE E 'COMPONENT_ASSIGNMENT)
                                                                      T
                                                                      (BOUND_ID (SUBTREE E 'OPT_EACH_CLAUSE))
                                                                      N T V
                                                                      (BOUND_VALUES (SUBTREE E 'OPT_EACH_CLAUSE)
                                                                                    C
                                                                                    X)
                                                                      X))
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                               'GF_MODIFIERS
                                                                               T
                                                                               BV
                                                                               C
                                                                               T
                                                                               (SUBTREE E 'COMPONENT_ASSIGNMENT)
                                                                               T
                                                                               T
                                                                               N
                                                                               T
                                                                               V
                                                                               T
                                                                               X)))
                                      ((RULE E
                                             (PRODN (TAG 'COMPONENT_ALTERATIONS 'AS)
                                                    (LIST (TAG 'OPT_EACH_CLAUSE 'E)
                                                          (TAG 'COMPONENT_CREATION 'C))))
                                       (IF
                                        (EACH_CLAUSEP (SUBTREE E 'OPT_EACH_CLAUSE))
                                        (IF
                                         (ERRORP (BOUND_VALUES (SUBTREE E 'OPT_EACH_CLAUSE)
                                                               C X))
                                         (MARKED (BOUND_VALUES (SUBTREE E 'OPT_EACH_CLAUSE)
                                                               C X)
                                                 (DEFAULT_VALUE (BASE_TYPE (TYPE BV))))
                                         (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                      'GF_EACH
                                                                      T BV C
                                                                      T
                                                                      (SUBTREE E 'COMPONENT_CREATION)
                                                                      T
                                                                      (BOUND_ID (SUBTREE E 'OPT_EACH_CLAUSE))
                                                                      N T V
                                                                      (BOUND_VALUES (SUBTREE E 'OPT_EACH_CLAUSE)
                                                                                    C
                                                                                    X)
                                                                      X))
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                 'GF_MODIFIERS
                                                                                 T
                                                                                 BV
                                                                                 C
                                                                                 T
                                                                                 (SUBTREE E 'COMPONENT_CREATION)
                                                                                 T
                                                                                 T
                                                                                 N
                                                                                 T
                                                                                 V
                                                                                 T
                                                                                 X)))
                                      ((RULE E
                                             (PRODN (TAG 'COMPONENT_ALTERATIONS 'AS)
                                                    (LIST (TAG 'OPT_EACH_CLAUSE 'E)
                                                          (TAG 'COMPONENT_DELETION 'D))))
                                       (IF
                                        (EACH_CLAUSEP (SUBTREE E 'OPT_EACH_CLAUSE))
                                        (IF
                                         (ERRORP (BOUND_VALUES (SUBTREE E 'OPT_EACH_CLAUSE)
                                                               C X))
                                         (MARKED (BOUND_VALUES (SUBTREE E 'OPT_EACH_CLAUSE)
                                                               C X)
                                                 (DEFAULT_VALUE (BASE_TYPE (TYPE BV))))
                                         (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                      'GF_EACH
                                                                      T BV C
                                                                      T
                                                                      (SUBTREE E 'COMPONENT_DELETION)
                                                                      T
                                                                      (BOUND_ID (SUBTREE E 'OPT_EACH_CLAUSE))
                                                                      N T V
                                                                      (BOUND_VALUES (SUBTREE E 'OPT_EACH_CLAUSE)
                                                                                    C
                                                                                    X)
                                                                      X))
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                 'GF_MODIFIERS
                                                                                 T
                                                                                 BV
                                                                                 C
                                                                                 T
                                                                                 (SUBTREE E 'COMPONENT_DELETION)
                                                                                 T
                                                                                 T
                                                                                 N
                                                                                 T
                                                                                 V
                                                                                 T
                                                                                 X)))
                                      ((RULE E
                                             (PRODN (TAG 'COMPONENT_ASSIGNMENT 'A)
                                                    (LIST (TAG 'SELECTOR_LIST 'S)
                                                          'COLON_EQUAL
                                                          (TAG 'EXPRESSION 'E))))
                                       (PUT_OP BV
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                      'GF_SELECTORS
                                                                                      T
                                                                                      T
                                                                                      C
                                                                                      T
                                                                                      (SUBTREE E 'SELECTOR_LIST)
                                                                                      T
                                                                                      T
                                                                                      N
                                                                                      T
                                                                                      V
                                                                                      T
                                                                                      X)
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                         'GF
                                                                                         T
                                                                                         T
                                                                                         C
                                                                                         T
                                                                                         (SUBTREE E 'EXPRESSION)
                                                                                         T
                                                                                         T
                                                                                         N
                                                                                         T
                                                                                         V
                                                                                         T
                                                                                         X)))
                                      ((RULE E
                                             (PRODN (TAG 'COMPONENT_CREATION 'C)
                                                    (LIST 'BEFORE
                                                          (TAG 'SELECTOR_LIST 'S)
                                                          'COLON_EQUAL
                                                          (TAG 'EXPRESSION 'E))))
                                       (PUT_OP BV
                                        (RCDR
                                         (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                      'GF_SELECTORS
                                                                                      T
                                                                                      T
                                                                                      C
                                                                                      T
                                                                                      (SUBTREE E 'SELECTOR_LIST)
                                                                                      T
                                                                                      T
                                                                                      N
                                                                                      T
                                                                                      V
                                                                                      T
                                                                                      X))
                                        (GSEQ_INSERT_BEFORE
                                         (SELECT_OP BV
                                          (RCDR
                                           (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                      'GF_SELECTORS
                                                                                      T
                                                                                      T
                                                                                      C
                                                                                      T
                                                                                      (SUBTREE E 'SELECTOR_LIST)
                                                                                      T
                                                                                      T
                                                                                      N
                                                                                      T
                                                                                      V
                                                                                      T
                                                                                      X)))
                                         (RCAR
                                          (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                      'GF_SELECTORS
                                                                                      T
                                                                                      T
                                                                                      C
                                                                                      T
                                                                                      (SUBTREE E 'SELECTOR_LIST)
                                                                                      T
                                                                                      T
                                                                                      N
                                                                                      T
                                                                                      V
                                                                                      T
                                                                                      X))
                                         (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                         'GF
                                                                                         T
                                                                                         T
                                                                                         C
                                                                                         T
                                                                                         (SUBTREE E 'EXPRESSION)
                                                                                         T
                                                                                         T
                                                                                         N
                                                                                         T
                                                                                         V
                                                                                         T
                                                                                         X))))
                                      ((RULE E
                                             (PRODN (TAG 'COMPONENT_CREATION 'C)
                                                    (LIST 'BEHIND
                                                          (TAG 'SELECTOR_LIST 'S)
                                                          'COLON_EQUAL
                                                          (TAG 'EXPRESSION 'E))))
                                       (PUT_OP BV
                                        (RCDR
                                         (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                      'GF_SELECTORS
                                                                                      T
                                                                                      T
                                                                                      C
                                                                                      T
                                                                                      (SUBTREE E 'SELECTOR_LIST)
                                                                                      T
                                                                                      T
                                                                                      N
                                                                                      T
                                                                                      V
                                                                                      T
                                                                                      X))
                                        (GSEQ_INSERT_BEHIND
                                         (SELECT_OP BV
                                          (RCDR
                                           (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                      'GF_SELECTORS
                                                                                      T
                                                                                      T
                                                                                      C
                                                                                      T
                                                                                      (SUBTREE E 'SELECTOR_LIST)
                                                                                      T
                                                                                      T
                                                                                      N
                                                                                      T
                                                                                      V
                                                                                      T
                                                                                      X)))
                                         (RCAR
                                          (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                      'GF_SELECTORS
                                                                                      T
                                                                                      T
                                                                                      C
                                                                                      T
                                                                                      (SUBTREE E 'SELECTOR_LIST)
                                                                                      T
                                                                                      T
                                                                                      N
                                                                                      T
                                                                                      V
                                                                                      T
                                                                                      X))
                                         (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                         'GF
                                                                                         T
                                                                                         T
                                                                                         C
                                                                                         T
                                                                                         (SUBTREE E 'EXPRESSION)
                                                                                         T
                                                                                         T
                                                                                         N
                                                                                         T
                                                                                         V
                                                                                         T
                                                                                         X))))
                                      ((RULE E
                                             (PRODN (TAG 'COMPONENT_CREATION 'C)
                                                    (LIST 'INTO
                                                          (TAG 'SELECTOR_LIST 'S)
                                                          'COLON_EQUAL
                                                          (TAG 'EXPRESSION 'E))))
                                       (PUT_OP BV
                                        (RCDR
                                         (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                      'GF_SELECTORS
                                                                                      T
                                                                                      T
                                                                                      C
                                                                                      T
                                                                                      (SUBTREE E 'SELECTOR_LIST)
                                                                                      T
                                                                                      T
                                                                                      N
                                                                                      T
                                                                                      V
                                                                                      T
                                                                                      X))
                                        (GMAP_INSERT
                                         (SELECT_OP BV
                                          (RCDR
                                           (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                      'GF_SELECTORS
                                                                                      T
                                                                                      T
                                                                                      C
                                                                                      T
                                                                                      (SUBTREE E 'SELECTOR_LIST)
                                                                                      T
                                                                                      T
                                                                                      N
                                                                                      T
                                                                                      V
                                                                                      T
                                                                                      X)))
                                         (RCAR
                                          (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                      'GF_SELECTORS
                                                                                      T
                                                                                      T
                                                                                      C
                                                                                      T
                                                                                      (SUBTREE E 'SELECTOR_LIST)
                                                                                      T
                                                                                      T
                                                                                      N
                                                                                      T
                                                                                      V
                                                                                      T
                                                                                      X))
                                         (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                         'GF
                                                                                         T
                                                                                         T
                                                                                         C
                                                                                         T
                                                                                         (SUBTREE E 'EXPRESSION)
                                                                                         T
                                                                                         T
                                                                                         N
                                                                                         T
                                                                                         V
                                                                                         T
                                                                                         X))))
                                      ((RULE E
                                             (PRODN (TAG 'COMPONENT_DELETION 'D)
                                                    (LIST 'SEQOMIT
                                                          (TAG 'SELECTOR_LIST 'S))))
                                       (PUT_OP BV
                                        (RCDR
                                         (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                      'GF_SELECTORS
                                                                                      T
                                                                                      T
                                                                                      C
                                                                                      T
                                                                                      (SUBTREE E 'SELECTOR_LIST)
                                                                                      T
                                                                                      T
                                                                                      N
                                                                                      T
                                                                                      V
                                                                                      T
                                                                                      X))
                                        (GSEQOMIT
                                         (SELECT_OP BV
                                          (RCDR
                                           (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                      'GF_SELECTORS
                                                                                      T
                                                                                      T
                                                                                      C
                                                                                      T
                                                                                      (SUBTREE E 'SELECTOR_LIST)
                                                                                      T
                                                                                      T
                                                                                      N
                                                                                      T
                                                                                      V
                                                                                      T
                                                                                      X)))
                                         (RCAR
                                          (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                      'GF_SELECTORS
                                                                                      T
                                                                                      T
                                                                                      C
                                                                                      T
                                                                                      (SUBTREE E 'SELECTOR_LIST)
                                                                                      T
                                                                                      T
                                                                                      N
                                                                                      T
                                                                                      V
                                                                                      T
                                                                                      X)))))
                                      ((RULE E
                                             (PRODN (TAG 'COMPONENT_DELETION 'D)
                                                    (LIST 'MAPOMIT
                                                          (TAG 'SELECTOR_LIST 'S))))
                                       (PUT_OP BV
                                        (RCDR
                                         (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                      'GF_SELECTORS
                                                                                      T
                                                                                      T
                                                                                      C
                                                                                      T
                                                                                      (SUBTREE E 'SELECTOR_LIST)
                                                                                      T
                                                                                      T
                                                                                      N
                                                                                      T
                                                                                      V
                                                                                      T
                                                                                      X))
                                        (GMAPOMIT
                                         (SELECT_OP BV
                                          (RCDR
                                           (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                      'GF_SELECTORS
                                                                                      T
                                                                                      T
                                                                                      C
                                                                                      T
                                                                                      (SUBTREE E 'SELECTOR_LIST)
                                                                                      T
                                                                                      T
                                                                                      N
                                                                                      T
                                                                                      V
                                                                                      T
                                                                                      X)))
                                         (RCAR
                                          (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                      'GF_SELECTORS
                                                                                      T
                                                                                      T
                                                                                      C
                                                                                      T
                                                                                      (SUBTREE E 'SELECTOR_LIST)
                                                                                      T
                                                                                      T
                                                                                      N
                                                                                      T
                                                                                      V
                                                                                      T
                                                                                      X)))))
                                      (T (MARKED (BAD_VALUE_MODIFIERS_ERROR E)
                                                 (DEFAULT_VALUE (BASE_TYPE (TYPE BV)))))))
                                    (GF_SELECTORS
                                     (COND
                                      ((RULE E
                                             (PRODN (TAG 'SELECTOR_LIST 'S)
                                                    (TAG 'COMPONENT_SELECTORS 'S2)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                'GF_SELECTORS
                                                                                T
                                                                                T
                                                                                C
                                                                                T
                                                                                (SUBTREE E 'COMPONENT_SELECTORS)
                                                                                T
                                                                                T
                                                                                N
                                                                                T
                                                                                V
                                                                                T
                                                                                X))
                                      ((RULE E
                                             (PRODN (TAG 'SELECTOR_LIST 'S)
                                                    (LIST (TAG 'SELECTOR_LIST 'S2)
                                                          (TAG 'COMPONENT_SELECTORS 'S3))))
                                       (APPEND
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                      'GF_SELECTORS
                                                                                      T
                                                                                      T
                                                                                      C
                                                                                      T
                                                                                      (SUBTREE E 'SELECTOR_LIST)
                                                                                      T
                                                                                      T
                                                                                      N
                                                                                      T
                                                                                      V
                                                                                      T
                                                                                      X)
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                'GF_SELECTORS
                                                                                T
                                                                                T
                                                                                C
                                                                                T
                                                                                (SUBTREE E 'COMPONENT_SELECTORS)
                                                                                T
                                                                                T
                                                                                N
                                                                                T
                                                                                V
                                                                                T
                                                                                X)))
                                      ((RULE E
                                             (PRODN (TAG 'COMPONENT_SELECTORS 'S)
                                                    (LIST 'DOT (TAG 'IDENTIFIER 'FN))))
                                       (LIST (MARKED 'FIELD_NAME
                                                     (GNAME (SUBTREE E 'IDENTIFIER)))))
                                      ((RULE E
                                             (PRODN (TAG 'COMPONENT_SELECTORS 'S)
                                                    (TAG 'ARG_LIST 'D)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                           'GF_ADP
                                                                                           T
                                                                                           T
                                                                                           C
                                                                                           T
                                                                                           (SUBTREE E 'ARG_LIST)
                                                                                           T
                                                                                           T
                                                                                           N
                                                                                           T
                                                                                           V
                                                                                           T
                                                                                           X))
                                      ((RULE E
                                             (PRODN (TAG 'ARG_LIST 'AS)
                                                    (LIST 'OPEN_PAREN
                                                          (TAG 'VALUE_LIST 'VS)
                                                          'CLOSE_PAREN)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                         'GF_ADP
                                                                                         T
                                                                                         T
                                                                                         C
                                                                                         T
                                                                                         (SUBTREE E 'VALUE_LIST)
                                                                                         T
                                                                                         T
                                                                                         N
                                                                                         T
                                                                                         V
                                                                                         T
                                                                                         X))
                                      (T NIL)))
                                    (GF_ADP
                                     (COND
                                      ((RULE E
                                             (PRODN (TAG 'ARG_LIST 'AS)
                                                    (LIST 'OPEN_PAREN
                                                          (TAG 'VALUE_LIST 'VS)
                                                          'CLOSE_PAREN)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                         'GF_ADP
                                                                                         T
                                                                                         T
                                                                                         C
                                                                                         T
                                                                                         (SUBTREE E 'VALUE_LIST)
                                                                                         T
                                                                                         T
                                                                                         N
                                                                                         T
                                                                                         V
                                                                                         T
                                                                                         X))
                                      ((RULE E
                                             (PRODN (TAG 'VALUE_LIST 'VS)
                                                    (TAG 'EXPRESSION 'E)))
                                       (RCONS NIL
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                         'GF
                                                                                         T
                                                                                         T
                                                                                         C
                                                                                         T
                                                                                         (SUBTREE E 'EXPRESSION)
                                                                                         T
                                                                                         T
                                                                                         N
                                                                                         T
                                                                                         V
                                                                                         T
                                                                                         X)))
                                      ((RULE E
                                             (PRODN (TAG 'VALUE_LIST 'VS)
                                                    (LIST (TAG 'VALUE_LIST 'VS2)
                                                          'COMMA
                                                          (TAG 'EXPRESSION 'E))))
                                       (RCONS
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                         'GF_ADP
                                                                                         T
                                                                                         T
                                                                                         C
                                                                                         T
                                                                                         (SUBTREE E 'VALUE_LIST)
                                                                                         T
                                                                                         T
                                                                                         N
                                                                                         T
                                                                                         V
                                                                                         T
                                                                                         X)
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                         'GF
                                                                                         T
                                                                                         T
                                                                                         C
                                                                                         T
                                                                                         (SUBTREE E 'EXPRESSION)
                                                                                         T
                                                                                         T
                                                                                         N
                                                                                         T
                                                                                         V
                                                                                         T
                                                                                         X)))
                                      (T NIL)))
                                    (GF_EACH
                                     (COND
                                      ((NLISTP VS) BV)
                                      ((NEW_NAMEP ID V)
                                       (IF
                                        (ZEROP N)
                                        (MARKED (N_TOO_SMALL)
                                                (DEFAULT_VALUE (BASE_TYPE (TYPE BV))))
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                         'GF_EACH
                                         T
                                         (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                       'GF_MODIFIERS
                                                                                       T
                                                                                       BV
                                                                                       C
                                                                                       T
                                                                                       E
                                                                                       T
                                                                                       T
                                                                                       (SUB1 N)
                                                                                       T
                                                                                       (ADD_TO_MAP V ID (CAR VS))
                                                                                       T
                                                                                       X)
                                         C T E T ID N T V
                                         (CDR VS)
                                         X)))
                                      (T (MARKED (NAME_ALREADY_IN_USE_ERROR ID)
                                                 (DEFAULT_VALUE (BASE_TYPE (TYPE BV)))))))
                                    (GF_SOME
                                     (COND
                                      ((NLISTP VS) (GFALSE))
                                      ((NEW_NAMEP ID V)
                                       (IF
                                        (ZEROP N)
                                        (MARKED (N_TOO_SMALL)
                                                (DEFAULT_VALUE (BOOLEAN_DESC)))
                                        (GOR
                                         (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                                        'GF_SOME
                                                                                                        T
                                                                                                        T
                                                                                                        C
                                                                                                        T
                                                                                                        E
                                                                                                        T
                                                                                                        ID
                                                                                                        N
                                                                                                        T
                                                                                                        V
                                                                                                        (RCDR VS)
                                                                                                        X)
                                         (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                      'GF
                                                                                      T
                                                                                      T
                                                                                      C
                                                                                      T
                                                                                      E
                                                                                      T
                                                                                      T
                                                                                      (SUB1 N)
                                                                                      T
                                                                                      (ADD_TO_MAP V ID (RCAR VS))
                                                                                      T
                                                                                      X))))
                                      (T (MARKED (NAME_ALREADY_IN_USE_ERROR ID)
                                                 (DEFAULT_VALUE (BOOLEAN_DESC))))))
                                    (GF_ALL
                                     (COND
                                      ((NLISTP VS) (GTRUE))
                                      ((NEW_NAMEP ID V)
                                       (IF
                                        (ZEROP N)
                                        (MARKED (N_TOO_SMALL)
                                                (DEFAULT_VALUE (BOOLEAN_DESC)))
                                        (GAND
                                         (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                                        'GF_ALL
                                                                                                        T
                                                                                                        T
                                                                                                        C
                                                                                                        T
                                                                                                        E
                                                                                                        T
                                                                                                        ID
                                                                                                        N
                                                                                                        T
                                                                                                        V
                                                                                                        (RCDR VS)
                                                                                                        X)
                                         (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                      'GF
                                                                                      T
                                                                                      T
                                                                                      C
                                                                                      T
                                                                                      E
                                                                                      T
                                                                                      T
                                                                                      (SUB1 N)
                                                                                      T
                                                                                      (ADD_TO_MAP V ID (RCAR VS))
                                                                                      T
                                                                                      X))))
                                      (T (MARKED (NAME_ALREADY_IN_USE_ERROR ID)
                                                 (DEFAULT_VALUE (BOOLEAN_DESC))))))
                                    (GF_ELEMENT_TYPE
                                     (COND
                                      ((RULE E
                                             (PRODN (TAG 'RANGE 'R)
                                                    (LIST 'OPEN_PAREN
                                                          (TAG 'RANGE_LIMITS 'R2)
                                                          'CLOSE_PAREN)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                       'GF_ELEMENT_TYPE
                                                                                       T
                                                                                       T
                                                                                       C
                                                                                       T
                                                                                       (SUBTREE E 'RANGE_LIMITS)
                                                                                       T
                                                                                       T
                                                                                       N
                                                                                       T
                                                                                       V
                                                                                       T
                                                                                       X))
                                      ((RULE E
                                             (PRODN (TAG 'ELEMENT_LIST 'E)
                                                    (TAG 'VALUE_LIST 'V)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                         'GF_ELEMENT_TYPE
                                                                                         T
                                                                                         T
                                                                                         C
                                                                                         T
                                                                                         (SUBTREE E 'VALUE_LIST)
                                                                                         T
                                                                                         T
                                                                                         N
                                                                                         T
                                                                                         V
                                                                                         T
                                                                                         X))
                                      ((RULE E
                                             (PRODN (TAG 'ELEMENT_LIST 'E)
                                                    (TAG 'RANGE_LIMITS 'R)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                       'GF_ELEMENT_TYPE
                                                                                       T
                                                                                       T
                                                                                       C
                                                                                       T
                                                                                       (SUBTREE E 'RANGE_LIMITS)
                                                                                       T
                                                                                       T
                                                                                       N
                                                                                       T
                                                                                       V
                                                                                       T
                                                                                       X))
                                      ((RULE E
                                             (PRODN (TAG 'RANGE_LIMITS 'R)
                                                    (LIST (TAG 'EXPRESSION 'LO)
                                                          'DOT_DOT
                                                          (TAG 'EXPRESSION 'HI))))
                                       (BASE_TYPE
                                        (TYPE
                                         (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                     'GF
                                                                                     T
                                                                                     T
                                                                                     C
                                                                                     T
                                                                                     (SUBTREE_I E 'EXPRESSION 1)
                                                                                     T
                                                                                     T
                                                                                     N
                                                                                     T
                                                                                     V
                                                                                     T
                                                                                     X))))
                                      ((RULE E
                                             (PRODN (TAG 'VALUE_LIST 'V)
                                                    (TAG 'EXPRESSION 'E)))
                                       (BASE_TYPE
                                        (TYPE
                                         (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                         'GF
                                                                                         T
                                                                                         T
                                                                                         C
                                                                                         T
                                                                                         (SUBTREE E 'EXPRESSION)
                                                                                         T
                                                                                         T
                                                                                         N
                                                                                         T
                                                                                         V
                                                                                         T
                                                                                         X))))
                                      ((RULE E
                                             (PRODN (TAG 'VALUE_LIST 'V)
                                                    (LIST (TAG 'VALUE_LIST 'V2)
                                                          'COMMA
                                                          (TAG 'EXPRESSION 'E))))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                         'GF_ELEMENT_TYPE
                                                                                         T
                                                                                         T
                                                                                         C
                                                                                         T
                                                                                         (SUBTREE E 'VALUE_LIST)
                                                                                         T
                                                                                         T
                                                                                         N
                                                                                         T
                                                                                         V
                                                                                         T
                                                                                         X))
                                      (T NIL)))
                                    (OTHERWISE
                                     (COND
                                      ((RULE E
                                             (PRODN (TAG 'RANGE 'R)
                                                    (LIST 'OPEN_PAREN
                                                          (TAG 'RANGE_LIMITS 'R2)
                                                          'CLOSE_PAREN)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                       'GF_ELEMENT_LIST
                                                                                       T
                                                                                       T
                                                                                       C
                                                                                       T
                                                                                       (SUBTREE E 'RANGE_LIMITS)
                                                                                       T
                                                                                       T
                                                                                       N
                                                                                       T
                                                                                       V
                                                                                       T
                                                                                       X))
                                      ((RULE E
                                             (PRODN (TAG 'ELEMENT_LIST 'E)
                                                    (TAG 'VALUE_LIST 'V)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                         'GF_ELEMENT_LIST
                                                                                         T
                                                                                         T
                                                                                         C
                                                                                         T
                                                                                         (SUBTREE E 'VALUE_LIST)
                                                                                         T
                                                                                         T
                                                                                         N
                                                                                         T
                                                                                         V
                                                                                         T
                                                                                         X))
                                      ((RULE E
                                             (PRODN (TAG 'ELEMENT_LIST 'E)
                                                    (TAG 'RANGE_LIMITS 'R)))
                                       (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                       'GF_ELEMENT_LIST
                                                                                       T
                                                                                       T
                                                                                       C
                                                                                       T
                                                                                       (SUBTREE E 'RANGE_LIMITS)
                                                                                       T
                                                                                       T
                                                                                       N
                                                                                       T
                                                                                       V
                                                                                       T
                                                                                       X))
                                      ((RULE E
                                             (PRODN (TAG 'RANGE_LIMITS 'R)
                                                    (LIST (TAG 'EXPRESSION 'LO)
                                                          'DOT_DOT
                                                          (TAG 'EXPRESSION 'HI))))
                                       (GRANGE_ELEMENTS
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                     'GF
                                                                                     T
                                                                                     T
                                                                                     C
                                                                                     T
                                                                                     (SUBTREE_I E 'EXPRESSION 1)
                                                                                     T
                                                                                     T
                                                                                     N
                                                                                     T
                                                                                     V
                                                                                     T
                                                                                     X)
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                     'GF
                                                                                     T
                                                                                     T
                                                                                     C
                                                                                     T
                                                                                     (SUBTREE_I E 'EXPRESSION 2)
                                                                                     T
                                                                                     T
                                                                                     N
                                                                                     T
                                                                                     V
                                                                                     T
                                                                                     X)))
                                      ((RULE E
                                             (PRODN (TAG 'VALUE_LIST 'V)
                                                    (TAG 'EXPRESSION 'E)))
                                       (RCONS NIL
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                         'GF
                                                                                         T
                                                                                         T
                                                                                         C
                                                                                         T
                                                                                         (SUBTREE E 'EXPRESSION)
                                                                                         T
                                                                                         T
                                                                                         N
                                                                                         T
                                                                                         V
                                                                                         T
                                                                                         X)))
                                      ((RULE E
                                             (PRODN (TAG 'VALUE_LIST 'V)
                                                    (LIST (TAG 'VALUE_LIST 'V2)
                                                          'COMMA
                                                          (TAG 'EXPRESSION 'E))))
                                       (RCONS
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                         'GF_ELEMENT_LIST
                                                                                         T
                                                                                         T
                                                                                         C
                                                                                         T
                                                                                         (SUBTREE E 'VALUE_LIST)
                                                                                         T
                                                                                         T
                                                                                         N
                                                                                         T
                                                                                         V
                                                                                         T
                                                                                         X)
                                        (MUTUAL-GF-GAPPLY-APPLY_FUN-GF_MODIFIERS-GF_SELECTORS-GF_ADP-GF_EACH-GF_SOME-GF_ALL-GF_ELEMENT_TYPE-GF_ELEMENT_LIST
                                                                                         'GF
                                                                                         T
                                                                                         T
                                                                                         C
                                                                                         T
                                                                                         (SUBTREE E 'EXPRESSION)
                                                                                         T
                                                                                         T
                                                                                         N
                                                                                         T
                                                                                         V
                                                                                         T
                                                                                         X)))
                                      (T NIL))))
                                   ((ORD-LESSP (CASE MUTUAL-FLG
                                                     (GF (CONS (CONS (ADD1 N) (ADD1 (TREE_SIZE E)))
                                                               (COUNT C)))
                                                     (GAPPLY (CONS (CONS (ADD1 N) (ADD1 (TREE_SIZE FN)))
                                                                   (ADD1 (TREE_SIZE FN))))
                                                     (APPLY_FUN (CONS (CONS (ADD1 N) (ADD1 (TREE_SIZE FN)))
                                                                      (TREE_SIZE FN)))
                                                     (GF_MODIFIERS (CONS (CONS (ADD1 N) (ADD1 (TREE_SIZE E)))
                                                                         (COUNT C)))
                                                     (GF_SELECTORS (CONS (CONS (ADD1 N) (ADD1 (TREE_SIZE E)))
                                                                         (COUNT C)))
                                                     (GF_ADP (CONS (CONS (ADD1 N) (ADD1 (TREE_SIZE E)))
                                                                   (COUNT C)))
                                                     (GF_EACH (CONS (CONS (ADD1 N) (ADD1 (TREE_SIZE E)))
                                                                    (COUNT VS)))
                                                     (GF_SOME (CONS (CONS (ADD1 N) (ADD1 (TREE_SIZE ID)))
                                                                    (COUNT VS)))
                                                     (GF_ALL (CONS (CONS (ADD1 N) (ADD1 (TREE_SIZE ID)))
                                                                   (COUNT VS)))
                                                     (GF_ELEMENT_TYPE (CONS (CONS (ADD1 N) (ADD1 (TREE_SIZE E)))
                                                                            (COUNT C)))
                                                     (OTHERWISE (CONS (CONS (ADD1 N) (ADD1 (TREE_SIZE E)))
                                                                      (COUNT C)))))))
\end{verbatim}


\begin{tabbing}{\sc Definition}:\index{gf} \\  
\=\+{\rm{gf}}\,({\it{e\/}}, {\it{c\/}}, {\it{v\/}}, {\it{n\/}}, {\it{x\/}})\index{gf} \\ 
$=$$\;\;\;\;${\rm{mutual-gf-gapply-apply\_fun-gf\_modifiers-gf\_selectors-gf\_adp-gf\_each-gf\_some-gf\_all-gf\_element\_type-gf\_element\_list}}\,(\=\+{\tt{'}}{\tt{gf}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{c\/}}, \\ 
{\bf{t}}, \\ 
{\it{e\/}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{n\/}}, \\ 
{\bf{t}}, \\ 
{\it{v\/}}, \\ 
{\bf{t}}, \\ 
{\it{x\/}})\-\index{mutual-gf-gapply-apply\_fun-gf\_!modifiers-gf\_selectors-gf\_adp-gf\_each-gf\_some-gf\_all-gf\_element...}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gapply} \\  
\=\+{\rm{gapply}}\,({\it{fn\/}}, {\it{ap\/}}, {\it{sn\/}}, {\it{v\/}}, {\it{n\/}}, {\it{x\/}})\index{gapply} \\ 
$=$$\;\;\;\;${\rm{mutual-gf-gapply-apply\_fun-gf\_modifiers-gf\_selectors-gf\_adp-gf\_each-gf\_some-gf\_all-gf\_element\_type-gf\_element\_list}}\,(\=\+{\tt{'}}{\tt{gapply}}, \\ 
{\it{ap\/}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{fn\/}}, \\ 
{\bf{t}}, \\ 
{\it{n\/}}, \\ 
{\it{sn\/}}, \\ 
{\it{v\/}}, \\ 
{\bf{t}}, \\ 
{\it{x\/}})\-\index{mutual-gf-gapply-apply\_fun-gf\_!modifiers-gf\_selectors-gf\_adp-gf\_each-gf\_some-gf\_all-gf\_element...}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{apply\_fun} \\  
\=\+{\rm{apply\_fun}}\,({\it{fn\/}}, {\it{d\/}}, {\it{sn\/}}, {\it{n\/}}, {\it{x\/}})\index{apply\_fun} \\ 
$=$$\;\;\;\;${\rm{mutual-gf-gapply-apply\_fun-gf\_modifiers-gf\_selectors-gf\_adp-gf\_each-gf\_some-gf\_all-gf\_element\_type-gf\_element\_list}}\,(\=\+{\tt{'}}{\tt{apply\_fun}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{d\/}}, \\ 
{\bf{t}}, \\ 
{\it{fn\/}}, \\ 
{\bf{t}}, \\ 
{\it{n\/}}, \\ 
{\it{sn\/}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{x\/}})\-\index{mutual-gf-gapply-apply\_fun-gf\_!modifiers-gf\_selectors-gf\_adp-gf\_each-gf\_some-gf\_all-gf\_element...}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gf\_modifiers} \\  
\=\+{\rm{gf\_modifiers}}\,({\it{bv\/}}, {\it{e\/}}, {\it{c\/}}, {\it{v\/}}, {\it{n\/}}, {\it{x\/}})\index{gf\_modifiers} \\ 
$=$$\;\;\;\;${\rm{mutual-gf-gapply-apply\_fun-gf\_modifiers-gf\_selectors-gf\_adp-gf\_each-gf\_some-gf\_all-gf\_element\_type-gf\_element\_list}}\,(\=\+{\tt{'}}{\tt{gf\_modifiers}}, \\ 
{\bf{t}}, \\ 
{\it{bv\/}}, \\ 
{\it{c\/}}, \\ 
{\bf{t}}, \\ 
{\it{e\/}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{n\/}}, \\ 
{\bf{t}}, \\ 
{\it{v\/}}, \\ 
{\bf{t}}, \\ 
{\it{x\/}})\-\index{mutual-gf-gapply-apply\_fun-gf\_!modifiers-gf\_selectors-gf\_adp-gf\_each-gf\_some-gf\_all-gf\_element...}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gf\_selectors} \\  
\=\+{\rm{gf\_selectors}}\,({\it{e\/}}, {\it{c\/}}, {\it{v\/}}, {\it{n\/}}, {\it{x\/}})\index{gf\_selectors} \\ 
$=$$\;\;\;\;${\rm{mutual-gf-gapply-apply\_fun-gf\_modifiers-gf\_selectors-gf\_adp-gf\_each-gf\_some-gf\_all-gf\_element\_type-gf\_element\_list}}\,(\=\+{\tt{'}}{\tt{gf\_selectors}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{c\/}}, \\ 
{\bf{t}}, \\ 
{\it{e\/}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{n\/}}, \\ 
{\bf{t}}, \\ 
{\it{v\/}}, \\ 
{\bf{t}}, \\ 
{\it{x\/}})\-\index{mutual-gf-gapply-apply\_fun-gf\_!modifiers-gf\_selectors-gf\_adp-gf\_each-gf\_some-gf\_all-gf\_element...}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gf\_adp} \\  
\=\+{\rm{gf\_adp}}\,({\it{e\/}}, {\it{c\/}}, {\it{v\/}}, {\it{n\/}}, {\it{x\/}})\index{gf\_adp} \\ 
$=$$\;\;\;\;${\rm{mutual-gf-gapply-apply\_fun-gf\_modifiers-gf\_selectors-gf\_adp-gf\_each-gf\_some-gf\_all-gf\_element\_type-gf\_element\_list}}\,(\=\+{\tt{'}}{\tt{gf\_adp}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{c\/}}, \\ 
{\bf{t}}, \\ 
{\it{e\/}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{n\/}}, \\ 
{\bf{t}}, \\ 
{\it{v\/}}, \\ 
{\bf{t}}, \\ 
{\it{x\/}})\-\index{mutual-gf-gapply-apply\_fun-gf\_!modifiers-gf\_selectors-gf\_adp-gf\_each-gf\_some-gf\_all-gf\_element...}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gf\_each} \\  
\=\+{\rm{gf\_each}}\,({\it{id\/}}, {\it{vs\/}}, {\it{bv\/}}, {\it{e\/}}, {\it{c\/}}, {\it{v\/}}, {\it{n\/}}, {\it{x\/}})\index{gf\_each} \\ 
$=$$\;\;\;\;${\rm{mutual-gf-gapply-apply\_fun-gf\_modifiers-gf\_selectors-gf\_adp-gf\_each-gf\_some-gf\_all-gf\_element\_type-gf\_element\_list}}\,(\=\+{\tt{'}}{\tt{gf\_each}}, \\ 
{\bf{t}}, \\ 
{\it{bv\/}}, \\ 
{\it{c\/}}, \\ 
{\bf{t}}, \\ 
{\it{e\/}}, \\ 
{\bf{t}}, \\ 
{\it{id\/}}, \\ 
{\it{n\/}}, \\ 
{\bf{t}}, \\ 
{\it{v\/}}, \\ 
{\it{vs\/}}, \\ 
{\it{x\/}})\-\index{mutual-gf-gapply-apply\_fun-gf\_!modifiers-gf\_selectors-gf\_adp-gf\_each-gf\_some-gf\_all-gf\_element...}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gf\_some} \\  
\=\+{\rm{gf\_some}}\,({\it{id\/}}, {\it{vs\/}}, {\it{e\/}}, {\it{c\/}}, {\it{v\/}}, {\it{n\/}}, {\it{x\/}})\index{gf\_some} \\ 
$=$$\;\;\;\;${\rm{mutual-gf-gapply-apply\_fun-gf\_modifiers-gf\_selectors-gf\_adp-gf\_each-gf\_some-gf\_all-gf\_element\_type-gf\_element\_list}}\,(\=\+{\tt{'}}{\tt{gf\_some}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{c\/}}, \\ 
{\bf{t}}, \\ 
{\it{e\/}}, \\ 
{\bf{t}}, \\ 
{\it{id\/}}, \\ 
{\it{n\/}}, \\ 
{\bf{t}}, \\ 
{\it{v\/}}, \\ 
{\it{vs\/}}, \\ 
{\it{x\/}})\-\index{mutual-gf-gapply-apply\_fun-gf\_!modifiers-gf\_selectors-gf\_adp-gf\_each-gf\_some-gf\_all-gf\_element...}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gf\_all} \\  
\=\+{\rm{gf\_all}}\,({\it{id\/}}, {\it{vs\/}}, {\it{e\/}}, {\it{c\/}}, {\it{v\/}}, {\it{n\/}}, {\it{x\/}})\index{gf\_all} \\ 
$=$$\;\;\;\;${\rm{mutual-gf-gapply-apply\_fun-gf\_modifiers-gf\_selectors-gf\_adp-gf\_each-gf\_some-gf\_all-gf\_element\_type-gf\_element\_list}}\,(\=\+{\tt{'}}{\tt{gf\_all}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{c\/}}, \\ 
{\bf{t}}, \\ 
{\it{e\/}}, \\ 
{\bf{t}}, \\ 
{\it{id\/}}, \\ 
{\it{n\/}}, \\ 
{\bf{t}}, \\ 
{\it{v\/}}, \\ 
{\it{vs\/}}, \\ 
{\it{x\/}})\-\index{mutual-gf-gapply-apply\_fun-gf\_!modifiers-gf\_selectors-gf\_adp-gf\_each-gf\_some-gf\_all-gf\_element...}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gf\_element\_type} \\  
\=\+{\rm{gf\_element\_type}}\,({\it{e\/}}, {\it{c\/}}, {\it{v\/}}, {\it{n\/}}, {\it{x\/}})\index{gf\_element\_type} \\ 
$=$$\;\;\;\;${\rm{mutual-gf-gapply-apply\_fun-gf\_modifiers-gf\_selectors-gf\_adp-gf\_each-gf\_some-gf\_all-gf\_element\_type-gf\_element\_list}}\,(\=\+{\tt{'}}{\tt{gf\_element\_type}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{c\/}}, \\ 
{\bf{t}}, \\ 
{\it{e\/}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{n\/}}, \\ 
{\bf{t}}, \\ 
{\it{v\/}}, \\ 
{\bf{t}}, \\ 
{\it{x\/}})\-\index{mutual-gf-gapply-apply\_fun-gf\_!modifiers-gf\_selectors-gf\_adp-gf\_each-gf\_some-gf\_all-gf\_element...}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{gf\_element\_list} \\  
\=\+{\rm{gf\_element\_list}}\,({\it{e\/}}, {\it{c\/}}, {\it{v\/}}, {\it{n\/}}, {\it{x\/}})\index{gf\_element\_list} \\ 
$=$$\;\;\;\;${\rm{mutual-gf-gapply-apply\_fun-gf\_modifiers-gf\_selectors-gf\_adp-gf\_each-gf\_some-gf\_all-gf\_element\_type-gf\_element\_list}}\,(\=\+{\tt{'}}{\tt{gf\_element\_list}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{c\/}}, \\ 
{\bf{t}}, \\ 
{\it{e\/}}, \\ 
{\bf{t}}, \\ 
{\bf{t}}, \\ 
{\it{n\/}}, \\ 
{\bf{t}}, \\ 
{\it{v\/}}, \\ 
{\bf{t}}, \\ 
{\it{x\/}})\-\index{mutual-gf-gapply-apply\_fun-gf\_!modifiers-gf\_selectors-gf\_adp-gf\_each-gf\_some-gf\_all-gf\_element...}\-
\end{tabbing}


\begin{verbatim}; *********************
;  The Meta Function F
; *********************

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{meta\_f} \\  
\=\+{\rm{meta\_f}}\,({\it{e\/}}, {\it{c\/}}, {\it{v\/}}, {\it{n\/}}, {\it{x\/}})\index{meta\_f} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{pte\/}}{\bf $\;$ be$\;\;$}{\rm{pt}}\,({\it{e\/}}, {\tt{'}}{\tt{expression}})\index{pt}, \\ 
{\it{ptx\/}}{\bf $\;$ be$\;\;$}{\rm{pt}}\,({\it{x\/}}, {\tt{'}}{\tt{program\_description}})\index{pt}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\it{pte\/}} $=$ {\bf{nil}} \\ 
{\bf then }{\rm{marked}}\,({\tt{'}}{\tt{expression\_syntax\_error}}, {\bf{nil}})\index{marked} \\ 
{\bf elseif }{\it{ptx\/}} $=$ {\bf{nil}} \\ 
{\bf then }{\rm{marked}}\,({\tt{'}}{\tt{program\_description\_syntax\_error}}, {\bf{nil}})\index{marked} \\ 
{\bf else }{\rm{gf}}\,({\it{pte\/}}, {\it{c\/}}, {\it{v\/}}, {\it{n\/}}, {\it{ptx\/}})\index{gf}$\;${\bf  endif}\-$\;${\bf  endlet}\-\-
\end{tabbing}


\noindent{\sc Event}:   Make the library {\tt{"gf"}}.

\addvspace{18pt}

%\end{list}
\printindex
\end{document}
