diff --git a/books/bookvol5.pamphlet b/books/bookvol5.pamphlet index 91054a1..07b1e91 100644 --- a/books/bookvol5.pamphlet +++ b/books/bookvol5.pamphlet @@ -23130,7 +23130,8 @@ o )history \end{chunk} \defun{/read}{/read} -\calls{/read}{} +\seebook{/read}{/rf}{9} +\seebook{/read}{/rq}{9} \uses{/read}{/editfile} \begin{chunk}{defun /read} (defun /read (l q) @@ -35562,27 +35563,6 @@ Returns the value of form if form is a variable with a type value \end{chunk} -\defun{/rq}{/rq} -\seebook{/rq}{/rf-1}{9} -\uses{/rq}{echo-meta} -\begin{chunk}{defun /rq} -(defun /RQ (&rest foo &aux (echo-meta nil)) - (declare (special Echo-Meta) (ignore foo)) - (/rf-1 nil)) - -\end{chunk} - -\defun{/rf}{/rf} -Compile with noisy output -\seebook{/rf}{/rf-1}{9} -\uses{/rf}{echo-meta} -\begin{chunk}{defun /rf} -(defun /rf (&rest foo &aux (echo-meta t)) - (declare (special echo-meta) (ignore foo)) - (/rf-1 nil)) - -\end{chunk} - \defvar{boot-line-stack} \begin{chunk}{initvars} (defvar boot-line-stack nil "List of lines returned from preparse") @@ -44790,8 +44770,6 @@ This needs to work off the internal exposure list, not the file. \getchunk{defun restart0} \getchunk{defun restoreHistory} \getchunk{defun retract} -\getchunk{defun /rf} -\getchunk{defun /rq} \getchunk{defun rread} \getchunk{defun ruleLhsTran} \getchunk{defun rulePredicateTran} diff --git a/books/bookvol9.pamphlet b/books/bookvol9.pamphlet index 83aad5a..f3e9b07 100644 --- a/books/bookvol9.pamphlet +++ b/books/bookvol9.pamphlet @@ -4927,8 +4927,6 @@ of the symbol being parsed. The original list read: \end{chunk} \defun{transIs1}{transIs1} -\calls{transIs1}{qcar} -\calls{transIs1}{qcdr} \calls{transIs1}{nreverse0} \calls{transIs1}{transIs} \calls{transIs1}{transIs1} @@ -5132,8 +5130,6 @@ of the symbol being parsed. The original list read: \defun{parseHas}{parseHas} \calls{parseHas}{unabbrevAndLoad} -\calls{parseHas}{qcar} -\calls{parseHas}{qcdr} \calls{parseHas}{getdatabase} \calls{parseHas}{opOf} \calls{parseHas}{makeNonAtomic} @@ -5201,8 +5197,6 @@ of the symbol being parsed. The original list read: \defun{parseHasRhs}{parseHasRhs} \calls{parseHasRhs}{get} -\calls{parseHasRhs}{qcar} -\calls{parseHasRhs}{qcdr} \calls{parseHasRhs}{member} \calls{parseHasRhs}{abbreviation?} \calls{parseHasRhs}{loadIfNecessary} @@ -5923,80 +5917,303 @@ of the symbol being parsed. The original list read: \end{chunk} \chapter{Compile Transformers} - -\defdollar{NoValueMode} -\begin{chunk}{initvars} -(defvar |$NoValueMode| '|NoValueMode|) +With some specific exceptions most compile transformers are invoked +through the property list item ``{\tt special}''. When a specific +keyword is encountered in a list form the {\tt compExpression} function +looks up the keyword on the property list and funcalls the handler +function, passing the form, the mode, and the environment. + +\label{handlers} +If a handler for the keyword is not found then the {\tt compForm} function +is called to attempt to compile the form. +\defun{compExpression}{compExpression} +\calls{compExpression}{getl} +\calls{compExpression}{compForm} +\usesdollar{compExpression}{insideExpressionIfTrue} +\begin{chunk}{defun compExpression} +(defun |compExpression| (form mode env) + (let (|$insideExpressionIfTrue| fn) + (declare (special |$insideExpressionIfTrue|)) + (setq |$insideExpressionIfTrue| t) + (if (and (atom (car form)) (setq fn (getl (car form) 'special))) + (funcall fn form mode env) + (|compForm| form mode env)))) \end{chunk} +The functions in this section are called through the symbol-plist +of the symbol being parsed. In general, each of these functions +takes 3 arguments +\begin{enumerate} +\item the {\bf form} which is specific to the function +\item the {\bf mode} a |Join|, which is a set of categories and domains +\item the {\bf env} which is a list of functions and their modemaps +\end{enumerate} +and the functions return modified versions of the three arguments +suitable for further processing. +\begin{tabular}{ll} +\verb|DEF| & \refto{compDefine}\\ +\verb|add| & \refto{compAdd}\\ +\verb|@| & \refto{compAtSign}\\ +\verb|CAPSULE| & \refto{compCapsule}\\ +\verb|case| & \refto{compCase}\\ +\verb|Mapping| & \refto{compCat}\\ +\verb|Record| & \refto{compCat}\\ +\verb|Union| & \refto{compCat}\\ +\verb|CATEGORY| & \refto{compCategory}\\ +\verb|::| & \refto{compCoerce}\\ +\verb|:| & \refto{compColon}\\ +\verb|CONS| & \refto{compCons}\\ +\verb|construct| & \refto{compConstruct}\\ +\verb|ListCategory| & \refto{compConstructorCategory}\\ +\verb|RecordCategory| & \refto{compConstructorCategory}\\ +\verb|UnionCategory| & \refto{compConstructorCategory}\\ +\verb|VectorCategory| & \refto{compConstructorCategory}\\ +\verb|elt| & \refto{compElt}\\ +\verb|exit| & \refto{compExit}\\ +\verb|has| & \refto{compHas}(pred mode \verb|$e|)\\ +\verb|IF| & \refto{compIf}\\ +\verb|import| & \refto{compImport}\\ +\verb|is| & \refto{compIs}\\ +\verb|Join| & \refto{compJoin}\\ +\verb|+->| & \refto{compLambda}\\ +\verb|leave| & \refto{compLeave}\\ +\verb|MDEF| & \refto{compMacro}\\ +\verb|pretend| & \refto{compPretend}\\ +\verb|QUOTE| & \refto{compQuote}\\ +\verb|REDUCE| & \refto{compReduce}\\ +\verb|COLLECT| & \refto{compRepeatOrCollect}\\ +\verb|REPEAT| & \refto{compRepeatOrCollect}\\ +\verb|return| & \refto{compReturn}\\ +\verb|SEQ| & \refto{compSeq}\\ +\verb|LET| & \refto{compSetq}\\ +\verb|SETQ| & \refto{compSetq}\\ +\verb|String| & \refto{compString}\\ +\verb|SubDomain| & \refto{compSubDomain}\\ +\verb|SubsetCategory| & \refto{compSubsetCategory}\\ +\verb?|? & \refto{compSuchthat}\\ +\verb|VECTOR| & \refto{compVector}\\ +\verb|where| & \refto{compWhere} +\end{tabular} -\defdollar{EmptyMode} -\verb|$EmptyMode| is a contant whose value is \verb|$EmptyMode|. -It is used by isPartialMode to -decide if a modemap is partially constructed. If the \verb|$EmptyMode| -constant occurs anywhere in the modemap structure at any depth -then the modemap is still incomplete. To find this constant the -isPartialMode function calls CONTAINED \verb|$EmptyMode| $Y$ -which will walk the structure $Y$ looking for this constant. -\begin{chunk}{initvars} -(defvar |$EmptyMode| '|EmptyMode|) +\section{Handline Category DEF forms} +This is the graph of the functions used for compDefine. +The syntax is a graphviz dot file. +To generate this graph as a JPEG file, type: +\begin{verbatim} +tangle v9compDefine.dot bookvol9.pamphlet >v9compdefine.dot +dot -Tjpg v9compdefine.dot >v9compdefine.jpg +\end{verbatim} +\begin{chunk}{v9compDefine.dot} +digraph pic { + fontsize=10; + bgcolor="#ECEA81"; + node [shape=box, color=white, style=filled]; -\end{chunk} +"compArgumentConditions" [color="#ECEA81"] +"compDefWhereClause" [color="#ECEA81"] +"compDefine" [color="#ECEA81"] +"compDefine1" [color="#ECEA81"] +"compDefineAddSignature" [color="#ECEA81"] +"compDefineCapsuleFunction" [color="#ECEA81"] +"compDefineCategory" [color="#ECEA81"] +"compDefineCategory1" [color="#ECEA81"] +"compDefineCategory2" [color="#ECEA81"] +"compDefineFunctor" [color="#ECEA81"] +"compDefineFunctor1" [color="#ECEA81"] +"compDefineLisplib" [color="#ECEA81"] +"compInternalFunction" [color="#ECEA81"] +"compMakeDeclaration" [color="#FFFFFF"] +"compFunctorBody" [color="#ECEA81"] +"compOrCroak" [color="#FFFFFF"] +"compile" [color="#ECEA81"] +"compileCases" [color="#ECEA81"] +"compileDocumentation" [color="#ECEA81"] + +"compDefine" -> "compDefine1" +"compDefine1" -> "compDefineCapsuleFunction" +"compDefine1" -> "compDefWhereClause" +"compDefine1" -> "compDefineAddSignature" +"compDefine1" -> "compDefineCategory" +"compDefine1" -> "compDefineFunctor" +"compDefine1" -> "compInternalFunction" +"compDefineCapsuleFunction" -> "compArgumentConditions" +"compDefineCapsuleFunction" -> "compOrCroak" +"compDefineCapsuleFunction" -> "compileCases" +"compDefineCategory" -> "compDefineCategory1" +"compDefineCategory" -> "compDefineLisplib" +"compDefineCategory1" -> "compDefine1" +"compDefineCategory1" -> "compDefineCategory2" +"compDefineCategory2" -> "compMakeDeclaration" +"compDefineCategory2" -> "compOrCroak" +"compDefineCategory2" -> "compile" +"compDefineFunctor" -> "compDefineFunctor1" +"compDefineFunctor" -> "compDefineLisplib" +"compDefineFunctor1" -> "compMakeDeclaration" +"compDefineFunctor1" -> "compFunctorBody" +"compDefineFunctor1" -> "compile" +"compDefineLisplib" -> "compileDocumentation" +"compileCases" -> "compile" -\section{Routines for handling forms} -The functions in this section are called through the symbol-plist -of the symbol being parsed. +} + +\end{chunk} +\includegraphics[scale=0.5]{ps/v9compdefine.eps} +A Category is represented by a DEF form with 4 parts: \begin{itemize} -\item \verb|add| \refto{compAdd}(form mode env) $\rightarrow$ (form mode env) -\item \verb|@| \refto{compAtSign}(form mode env) $\rightarrow$ -\item \verb|CAPSULE| \refto{compCapsule}(form mode env) $\rightarrow$ -\item \verb|case| \refto{compCase}(form mode env) $\rightarrow$ -\item \verb|Mapping| \refto{compCat}(form mode env) $\rightarrow$ -\item \verb|Record| \refto{compCat}(form mode env) $\rightarrow$ -\item \verb|Union| \refto{compCat}(form mode env) $\rightarrow$ -\item \verb|CATEGORY| \refto{compCategory}(form mode env) $\rightarrow$ -\item \verb|::| \refto{compCoerce}(form mode env) $\rightarrow$ -\item \verb|:| \refto{compColon}(form mode env) $\rightarrow$ -\item \verb|CONS| \refto{compCons}(form mode env) $\rightarrow$ -\item \verb|construct| \refto{compConstruct}(form mode env) $\rightarrow$ -\item \verb|ListCategory| \refto{compConstructorCategory}(form mode env) -$\rightarrow$ -\item \verb|RecordCategory| \refto{compConstructorCategory}(form mode env) -$\rightarrow$ -\item \verb|UnionCategory| \refto{compConstructorCategory}(form mode env) -$\rightarrow$ -\item \verb|VectorCategory| \refto{compConstructorCategory}(form mode env) -$\rightarrow$ -\item \verb|DEF| \refto{compDefine}(form mode env) $\rightarrow$ -\item \verb|elt| \refto{compElt}(form mode env) $\rightarrow$ -\item \verb|exit| \refto{compExit}(form mode env) $\rightarrow$ -\item \verb|has| \refto{compHas}(pred mode \verb|$e|) $\rightarrow$ -\item \verb|IF| \refto{compIf}(form mode env) $\rightarrow$ -\item \verb|import| \refto{compImport}(form mode env) $\rightarrow$ -\item \verb|is| \refto{compIs}(form mode env) $\rightarrow$ -\item \verb|Join| \refto{compJoin}(form mode env) $\rightarrow$ -\item \verb|+->| \refto{compLambda}(form mode env) $\rightarrow$ -\item \verb|leave| \refto{compLeave}(form mode env) $\rightarrow$ -\item \verb|MDEF| \refto{compMacro}(form mode env) $\rightarrow$ -\item \verb|pretend| \refto{compPretend} $\rightarrow$ -\item \verb|QUOTE| \refto{compQuote}(form mode env) $\rightarrow$ -\item \verb|REDUCE| \refto{compReduce}(form mode env) $\rightarrow$ -\item \verb|COLLECT| \refto{compRepeatOrCollect}(form mode env) $\rightarrow$ -\item \verb|REPEAT| \refto{compRepeatOrCollect}(form mode env) $\rightarrow$ -\item \verb|return| \refto{compReturn}(form mode env) $\rightarrow$ -\item \verb|SEQ| \refto{compSeq}(form mode env) $\rightarrow$ -\item \verb|LET| \refto{compSetq}(form mode env) $\rightarrow$ -\item \verb|SETQ| \refto{compSetq}(form mode env) $\rightarrow$ -\item \verb|String| \refto{compString}(form mode env) $\rightarrow$ -\item \verb|SubDomain| \refto{compSubDomain}(form mode env) $\rightarrow$ -\item \verb|SubsetCategory| \refto{compSubsetCategory}(form mode env) -$\rightarrow$ -\item \verb?|? \refto{compSuchthat}(form mode env) $\rightarrow$ -\item \verb|VECTOR| \refto{compVector}(form mode env) $\rightarrow$ -\item \verb|where| \refto{compWhere}(form mode eInit) $\rightarrow$ +\item a name +\item a distnature +\item an SC +\item a body \end{itemize} +For example, the BasicType category is written as +\begin{verbatim} +BasicType(): Category == with + "=": (%,%) -> Boolean ++ x=y tests if x and y are equal. + "~=": (%,%) -> Boolean ++ x~=y tests if x and y are not equal. + add + _~_=(x:%,y:%) : Boolean == not(x=y) +\end{verbatim} +Which compiles to the DEF form: +\begin{verbatim} + (DEF + (|BasicType|) + ((|Category|)) + (NIL) + (|add| + (CATEGORY |domain| + (SIGNATURE = ((|Boolean|) $ $)) + (SIGNATURE ~= ((|Boolean|) $ $))) + (CAPSULE + (DEF + (~= |x| |y|) + ((|Boolean|) $ $) + (NIL NIL NIL) + (IF (= |x| |y|) |false| |true|))))) +\end{verbatim} + +\defplist{def}{compDefine plist} +We set up the {\tt compDefine} function to handle the DEF keyword +by setting the {\tt special} keyword on the DEF symbol property list. +\begin{chunk}{postvars} +(eval-when (eval load) + (setf (get 'def 'special) '|compDefine|)) + +\end{chunk} + +\defun{compDefine}{compDefine} +The compDefine function expects three arguments: +\begin{enumerate} +\item the {\bf form} which is an def specifying the domain to define. +\item the {\bf mode} a |Join|, which is a set of categories and domains +\item the {\bf env} which is a list of functions and their modemaps +\end{enumerate} +\calls{compDefine}{compDefine1} +\defsdollar{compDefine}{tripleCache} +\defsdollar{compDefine}{tripleHits} +\defsdollar{compDefine}{macroIfTrue} +\defsdollar{compDefine}{packagesUsed} +\begin{chunk}{defun compDefine} +(defun |compDefine| (form mode env) + (let (|$tripleCache| |$tripleHits| |$macroIfTrue| |$packagesUsed|) + (declare (special |$tripleCache| |$tripleHits| |$macroIfTrue| + |$packagesUsed|)) + (setq |$tripleCache| nil) + (setq |$tripleHits| 0) + (setq |$macroIfTrue| nil) + (setq |$packagesUsed| nil) + (|compDefine1| form mode env))) + +\end{chunk} + +\defun{compDefine1}{compDefine1} +\calls{compDefine1}{macroExpand} +\calls{compDefine1}{isMacro} +\calls{compDefine1}{getSignatureFromMode} +\calls{compDefine1}{compDefine1} +\calls{compDefine1}{compInternalFunction} +\calls{compDefine1}{compDefineAddSignature} +\calls{compDefine1}{compDefWhereClause} +\calls{compDefine1}{compDefineCategory} +\calls{compDefine1}{isDomainForm} +\calls{compDefine1}{getTargetFromRhs} +\calls{compDefine1}{giveFormalParametersValues} +\calls{compDefine1}{addEmptyCapsuleIfNecessary} +\calls{compDefine1}{compDefineFunctor} +\calls{compDefine1}{stackAndThrow} +\calls{compDefine1}{strconc} +\calls{compDefine1}{getAbbreviation} +\calls{compDefine1}{length} +\calls{compDefine1}{compDefineCapsuleFunction} +\usesdollar{compDefine1}{insideExpressionIfTrue} +\usesdollar{compDefine1}{formalArgList} +\usesdollar{compDefine1}{form} +\usesdollar{compDefine1}{op} +\usesdollar{compDefine1}{prefix} +\usesdollar{compDefine1}{insideFunctorIfTrue} +\usesdollar{compDefine1}{Category} +\usesdollar{compDefine1}{insideCategoryIfTrue} +\usesdollar{compDefine1}{insideCapsuleFunctionIfTrue} +\usesdollar{compDefine1}{ConstructorNames} +\usesdollar{compDefine1}{NoValueMode} +\usesdollar{compDefine1}{EmptyMode} +\usesdollar{compDefine1}{insideWhereIfTrue} +\usesdollar{compDefine1}{insideExpressionIfTrue} +\begin{chunk}{defun compDefine1} +(defun |compDefine1| (form mode env) + (let (|$insideExpressionIfTrue| lhs specialCases sig signature rhs newPrefix + (tmp1 t)) + (declare (special |$insideExpressionIfTrue| |$formalArgList| |$form| + |$op| |$prefix| |$insideFunctorIfTrue| |$Category| + |$insideCategoryIfTrue| |$insideCapsuleFunctionIfTrue| + |$ConstructorNames| |$NoValueMode| |$EmptyMode| + |$insideWhereIfTrue| |$insideExpressionIfTrue|)) + (setq |$insideExpressionIfTrue| nil) + (setq form (|macroExpand| form env)) + (setq lhs (second form)) + (setq signature (third form)) + (setq specialCases (fourth form)) + (setq rhs (fifth form)) + (cond + ((and |$insideWhereIfTrue| + (|isMacro| form env) + (or (equal mode |$EmptyMode|) (equal mode |$NoValueMode|))) + (list lhs mode (|put| (car lhs) '|macro| rhs env))) + ((and (null (car signature)) (consp rhs) + (null (member (qfirst rhs) |$ConstructorNames|)) + (setq sig (|getSignatureFromMode| lhs env))) + (|compDefine1| + (list 'def lhs (cons (car sig) (cdr signature)) specialCases rhs) + mode env)) + (|$insideCapsuleFunctionIfTrue| (|compInternalFunction| form mode env)) + (t + (when (equal (car signature) |$Category|) (setq |$insideCategoryIfTrue| t)) + (setq env (|compDefineAddSignature| lhs signature env)) + (cond + ((null (dolist (x (rest signature) tmp1) (setq tmp1 (and tmp1 (null x))))) + (|compDefWhereClause| form mode env)) + ((equal (car signature) |$Category|) + (|compDefineCategory| form mode env nil |$formalArgList|)) + ((and (|isDomainForm| rhs env) (null |$insideFunctorIfTrue|)) + (when (null (car signature)) + (setq signature + (cons (|getTargetFromRhs| lhs rhs + (|giveFormalParametersValues| (cdr lhs) env)) + (cdr signature)))) + (setq rhs (|addEmptyCapsuleIfNecessary| (car signature) rhs)) + (|compDefineFunctor| + (list 'def lhs signature specialCases rhs) + mode env NIL |$formalArgList|)) + ((null |$form|) + (|stackAndThrow| (list "bad == form " form))) + (t + (setq newPrefix + (if |$prefix| + (intern (strconc (|encodeItem| |$prefix|) "," (|encodeItem| |$op|))) + (|getAbbreviation| |$op| (|#| (cdr |$form|))))) + (|compDefineCapsuleFunction| + form mode env newPrefix |$formalArgList|))))))) -\section{Functions which handle == statements} +\end{chunk} \defun{compDefineAddSignature}{compDefineAddSignature} \calls{compDefineAddSignature}{hasFullSignature} @@ -6026,6751 +6243,6654 @@ $\rightarrow$ \end{chunk} -\defun{hasFullSignature}{hasFullSignature} -\tpdhere{test with BASTYPE} -\calls{hasFullSignature}{get} -\begin{chunk}{defun hasFullSignature} -(defun |hasFullSignature| (argl signature env) - (let (target ml u) - (setq target (first signature)) - (setq ml (rest signature)) - (when target - (setq u - (loop for x in argl for m in ml - collect (or m (|get| x '|mode| env) (return 'failed)))) - (unless (eq u 'failed) (cons target u))))) - -\end{chunk} - -\defun{addEmptyCapsuleIfNecessary}{addEmptyCapsuleIfNecessary} -\calls{addEmptyCapsuleIfNecessary}{kar} -\usesdollar{addEmptyCapsuleIfNecessary}{SpecialDomainNames} -\begin{chunk}{defun addEmptyCapsuleIfNecessary} -(defun |addEmptyCapsuleIfNecessary| (target rhs) - (declare (special |$SpecialDomainNames|) (ignore target)) - (if (member (kar rhs) |$SpecialDomainNames|) - rhs - (list '|add| rhs (list 'capsule)))) - -\end{chunk} - -\defun{getTargetFromRhs}{getTargetFromRhs} -\calls{getTargetFromRhs}{stackSemanticError} -\calls{getTargetFromRhs}{getTargetFromRhs} -\calls{getTargetFromRhs}{compOrCroak} -\begin{chunk}{defun getTargetFromRhs} -(defun |getTargetFromRhs| (lhs rhs env) - (declare (special |$EmptyMode|)) - (cond - ((and (consp rhs) (eq (qfirst rhs) 'capsule)) - (|stackSemanticError| - (list "target category of " lhs - " cannot be determined from definition") - nil)) - ((and (consp rhs) (eq (qfirst rhs) '|SubDomain|) (consp (qrest rhs))) - (|getTargetFromRhs| lhs (second rhs) env)) - ((and (consp rhs) (eq (qfirst rhs) '|add|) - (consp (qrest rhs)) (consp (qcddr rhs)) - (eq (qcdddr rhs) nil) - (consp (qthird rhs)) - (eq (qcaaddr rhs) 'capsule)) - (|getTargetFromRhs| lhs (second rhs) env)) - ((and (consp rhs) (eq (qfirst rhs) '|Record|)) - (cons '|RecordCategory| (rest rhs))) - ((and (consp rhs) (eq (qfirst rhs) '|Union|)) - (cons '|UnionCategory| (rest rhs))) - ((and (consp rhs) (eq (qfirst rhs) '|List|)) - (cons '|ListCategory| (rest rhs))) - ((and (consp rhs) (eq (qfirst rhs) '|Vector|)) - (cons '|VectorCategory| (rest rhs))) - (t - (second (|compOrCroak| rhs |$EmptyMode| env))))) - -\end{chunk} - -\defun{giveFormalParametersValues}{giveFormalParametersValues} -\calls{giveFormalParametersValues}{put} -\calls{giveFormalParametersValues}{get} -\begin{chunk}{defun giveFormalParametersValues} -(defun |giveFormalParametersValues| (argl env) - (dolist (x argl) - (setq env - (|put| x '|value| - (list (|genSomeVariable|) (|get| x '|mode| env) nil) env))) - env) +\defun{compDefineFunctor}{compDefineFunctor} +\calls{compDefineFunctor}{compDefineLisplib} +\calls{compDefineFunctor}{compDefineFunctor1} +\usesdollar{compDefineFunctor}{domainShell} +\usesdollar{compDefineFunctor}{profileCompiler} +\usesdollar{compDefineFunctor}{lisplib} +\usesdollar{compDefineFunctor}{profileAlist} +\begin{chunk}{defun compDefineFunctor} +(defun |compDefineFunctor| (df mode env prefix fal) + (let (|$domainShell| |$profileCompiler| |$profileAlist|) + (declare (special |$domainShell| |$profileCompiler| $lisplib |$profileAlist|)) + (setq |$domainShell| nil) + (setq |$profileCompiler| t) + (setq |$profileAlist| nil) + (if $lisplib + (|compDefineLisplib| df mode env prefix fal '|compDefineFunctor1|) + (|compDefineFunctor1| df mode env prefix fal)))) \end{chunk} -\defun{macroExpandInPlace}{macroExpandInPlace} -\calls{macroExpandInPlace}{macroExpand} -\begin{chunk}{defun macroExpandInPlace} -(defun |macroExpandInPlace| (form env) - (let (y) - (setq y (|macroExpand| form env)) - (if (or (atom form) (atom y)) - y - (progn - (rplaca form (car y)) - (rplacd form (cdr y)) - form - )))) - -\end{chunk} - -\defun{macroExpand}{macroExpand} -\calls{macroExpand}{macroExpand} -\calls{macroExpand}{macroExpandList} -\begin{chunk}{defun macroExpand} -(defun |macroExpand| (form env) - (let (u) - (cond - ((atom form) - (if (setq u (|get| form '|macro| env)) - (|macroExpand| u env) - form)) - ((and (consp form) (eq (qfirst form) 'def) - (consp (qrest form)) - (consp (qcddr form)) - (consp (qcdddr form)) - (consp (qcddddr form)) - (eq (qrest (qcddddr form)) nil)) - (list 'def (|macroExpand| (second form) env) - (|macroExpandList| (third form) env) - (|macroExpandList| (fourth form) env) - (|macroExpand| (fifth form) env))) - (t (|macroExpandList| form env))))) - -\end{chunk} - -\defun{macroExpandList}{macroExpandList} -\calls{macroExpandList}{macroExpand} -\calls{macroExpandList}{getdatabase} -\begin{chunk}{defun macroExpandList} -(defun |macroExpandList| (lst env) - (let (tmp) - (if (and (consp lst) (eq (qrest lst) nil) - (identp (qfirst lst)) (getdatabase (qfirst lst) 'niladic) - (setq tmp (|get| (qfirst lst) '|macro| env))) - (|macroExpand| tmp env) - (loop for x in lst collect (|macroExpand| x env))))) - -\end{chunk} - -\defun{compDefineCategory1}{compDefineCategory1} -\calls{compDefineCategory1}{compDefineCategory2} -\calls{compDefineCategory1}{makeCategoryPredicates} -\calls{compDefineCategory1}{compDefine1} -\calls{compDefineCategory1}{mkCategoryPackage} -\usesdollar{compDefineCategory1}{insideCategoryPackageIfTrue} -\usesdollar{compDefineCategory1}{EmptyMode} -\usesdollar{compDefineCategory1}{categoryPredicateList} -\usesdollar{compDefineCategory1}{lisplibCategory} -\usesdollar{compDefineCategory1}{bootStrapMode} -\begin{chunk}{defun compDefineCategory1} -(defun |compDefineCategory1| (df mode env prefix fal) - (let (|$insideCategoryPackageIfTrue| |$categoryPredicateList| form - sig sc cat body categoryCapsule d tmp1 tmp3) - (declare (special |$insideCategoryPackageIfTrue| |$EmptyMode| - |$categoryPredicateList| |$lisplibCategory| - |$bootStrapMode|)) - ;; a category is a DEF form with 4 parts: - ;; ((DEF (|BasicType|) ((|Category|)) (NIL) - ;; (|add| (CATEGORY |domain| (SIGNATURE = ((|Boolean|) $ $)) - ;; (SIGNATURE ~= ((|Boolean|) $ $))) - ;; (CAPSULE (DEF (~= |x| |y|) ((|Boolean|) $ $) (NIL NIL NIL) - ;; (IF (= |x| |y|) |false| |true|)))))) +\defun{compDefineFunctor1}{compDefineFunctor1} +\calls{compDefineFunctor1}{isCategoryPackageName} +\calls{compDefineFunctor1}{getArgumentModeOrMoan} +\calls{compDefineFunctor1}{getModemap} +\calls{compDefineFunctor1}{giveFormalParametersValues} +\calls{compDefineFunctor1}{compMakeCategoryObject} +\calls{compDefineFunctor1}{sayBrightly} +\calls{compDefineFunctor1}{pp} +\calls{compDefineFunctor1}{strconc} +\calls{compDefineFunctor1}{pname} +\calls{compDefineFunctor1}{disallowNilAttribute} +\calls{compDefineFunctor1}{remdup} +\calls{compDefineFunctor1}{NRTgenInitialAttributeAlist} +\calls{compDefineFunctor1}{NRTgetLocalIndex} +\calls{compDefineFunctor1}{compMakeDeclaration} +\calls{compDefineFunctor1}{augModemapsFromCategoryRep} +\calls{compDefineFunctor1}{augModemapsFromCategory} +\calls{compDefineFunctor1}{sublis} +\calls{compDefineFunctor1}{maxindex} +\calls{compDefineFunctor1}{makeFunctorArgumentParameters} +\calls{compDefineFunctor1}{compFunctorBody} +\calls{compDefineFunctor1}{reportOnFunctorCompilation} +\calls{compDefineFunctor1}{compile} +\calls{compDefineFunctor1}{augmentLisplibModemapsFromFunctor} +\calls{compDefineFunctor1}{reportOnFunctorCompilation} +\calls{compDefineFunctor1}{getParentsFor} +\calls{compDefineFunctor1}{computeAncestorsOf} +\calls{compDefineFunctor1}{constructor?} +\calls{compDefineFunctor1}{NRTmakeSlot1Info} +\calls{compDefineFunctor1}{isCategoryPackageName} +\calls{compDefineFunctor1}{lisplibWrite} +\calls{compDefineFunctor1}{mkq} +\calls{compDefineFunctor1}{getdatabase} +\calls{compDefineFunctor1}{NRTgetLookupFunction} +\calls{compDefineFunctor1}{simpBool} +\calls{compDefineFunctor1}{removeZeroOne} +\calls{compDefineFunctor1}{evalAndRwriteLispForm} +\usesdollar{compDefineFunctor1}{lisplib} +\usesdollar{compDefineFunctor1}{top-level} +\usesdollar{compDefineFunctor1}{bootStrapMode} +\usesdollar{compDefineFunctor1}{CategoryFrame} +\usesdollar{compDefineFunctor1}{CheckVectorList} +\usesdollar{compDefineFunctor1}{FormalMapVariableList} +\usesdollar{compDefineFunctor1}{LocalDomainAlist} +\usesdollar{compDefineFunctor1}{NRTaddForm} +\usesdollar{compDefineFunctor1}{NRTaddList} +\usesdollar{compDefineFunctor1}{NRTattributeAlist} +\usesdollar{compDefineFunctor1}{NRTbase} +\usesdollar{compDefineFunctor1}{NRTdeltaLength} +\usesdollar{compDefineFunctor1}{NRTdeltaListComp} +\usesdollar{compDefineFunctor1}{NRTdeltaList} +\usesdollar{compDefineFunctor1}{NRTdomainFormList} +\usesdollar{compDefineFunctor1}{NRTloadTimeAlist} +\usesdollar{compDefineFunctor1}{NRTslot1Info} +\usesdollar{compDefineFunctor1}{NRTslot1PredicateList} +\usesdollar{compDefineFunctor1}{Representation} +\usesdollar{compDefineFunctor1}{addForm} +\usesdollar{compDefineFunctor1}{attributesName} +\usesdollar{compDefineFunctor1}{byteAddress} +\usesdollar{compDefineFunctor1}{byteVec} +\usesdollar{compDefineFunctor1}{compileOnlyCertainItems} +\usesdollar{compDefineFunctor1}{condAlist} +\usesdollar{compDefineFunctor1}{domainShell} +\usesdollar{compDefineFunctor1}{form} +\usesdollar{compDefineFunctor1}{functionLocations} +\usesdollar{compDefineFunctor1}{functionStats} +\usesdollar{compDefineFunctor1}{functorForm} +\usesdollar{compDefineFunctor1}{functorLocalParameters} +\usesdollar{compDefineFunctor1}{functorStats} +\usesdollar{compDefineFunctor1}{functorSpecialCases} +\usesdollar{compDefineFunctor1}{functorTarget} +\usesdollar{compDefineFunctor1}{functorsUsed} +\usesdollar{compDefineFunctor1}{genFVar} +\usesdollar{compDefineFunctor1}{genSDVar} +\usesdollar{compDefineFunctor1}{getDomainCode} +\usesdollar{compDefineFunctor1}{goGetList} +\usesdollar{compDefineFunctor1}{insideCategoryPackageIfTrue} +\usesdollar{compDefineFunctor1}{insideFunctorIfTrue} +\usesdollar{compDefineFunctor1}{isOpPackageName} +\usesdollar{compDefineFunctor1}{libFile} +\usesdollar{compDefineFunctor1}{lisplibAbbreviation} +\usesdollar{compDefineFunctor1}{lisplibAncestors} +\usesdollar{compDefineFunctor1}{lisplibCategoriesExtended} +\usesdollar{compDefineFunctor1}{lisplibCategory} +\usesdollar{compDefineFunctor1}{lisplibForm} +\usesdollar{compDefineFunctor1}{lisplibKind} +\usesdollar{compDefineFunctor1}{lisplibMissingFunctions} +\usesdollar{compDefineFunctor1}{lisplibModemap} +\usesdollar{compDefineFunctor1}{lisplibOperationAlist} +\usesdollar{compDefineFunctor1}{lisplibParents} +\usesdollar{compDefineFunctor1}{lisplibSlot1} +\usesdollar{compDefineFunctor1}{lookupFunction} +\usesdollar{compDefineFunctor1}{myFunctorBody} +\usesdollar{compDefineFunctor1}{mutableDomain} +\usesdollar{compDefineFunctor1}{mutableDomains} +\usesdollar{compDefineFunctor1}{op} +\usesdollar{compDefineFunctor1}{pairlis} +\usesdollar{compDefineFunctor1}{QuickCode} +\usesdollar{compDefineFunctor1}{setelt} +\usesdollar{compDefineFunctor1}{signature} +\usesdollar{compDefineFunctor1}{template} +\usesdollar{compDefineFunctor1}{uncondAlist} +\usesdollar{compDefineFunctor1}{viewNames} +\usesdollar{compDefineFunctor1}{lisplibFunctionLocations} +\begin{chunk}{defun compDefineFunctor1} +(defun |compDefineFunctor1| (df mode |$e| |$prefix| |$formalArgList|) + (declare (special |$e| |$prefix| |$formalArgList|)) + (labels ( + (FindRep (cb) + (loop while cb do + (when (atom cb) (return nil)) + (when (and (consp cb) (consp (qfirst cb)) (eq (qcaar cb) 'let) + (consp (qcdar cb)) (eq (qcadar cb) '|Rep|) + (consp (qcddar cb))) + (return (caddar cb))) + (pop cb)))) + (let (|$addForm| |$viewNames| |$functionStats| |$functorStats| + |$form| |$op| |$signature| |$functorTarget| + |$Representation| |$LocalDomainAlist| |$functorForm| + |$functorLocalParameters| |$CheckVectorList| + |$getDomainCode| |$insideFunctorIfTrue| |$functorsUsed| + |$setelt| $TOP_LEVEL |$genFVar| |$genSDVar| + |$mutableDomain| |$attributesName| |$goGetList| + |$condAlist| |$uncondAlist| |$NRTslot1PredicateList| + |$NRTattributeAlist| |$NRTslot1Info| |$NRTbase| + |$NRTaddForm| |$NRTdeltaList| |$NRTdeltaListComp| + |$NRTaddList| |$NRTdeltaLength| |$NRTloadTimeAlist| + |$NRTdomainFormList| |$template| |$functionLocations| + |$isOpPackageName| |$lookupFunction| |$byteAddress| + |$byteVec| form signature body originale argl signaturep target ds + attributeList parSignature parForm + argPars opp rettype tt bodyp lamOrSlam fun + operationAlist modemap libFn tmp1) + (declare (special $lisplib $top_level |$bootStrapMode| |$CategoryFrame| + |$CheckVectorList| |$FormalMapVariableList| + |$LocalDomainAlist| |$NRTaddForm| |$NRTaddList| + |$NRTattributeAlist| |$NRTbase| |$NRTdeltaLength| + |$NRTdeltaListComp| |$NRTdeltaList| |$NRTdomainFormList| + |$NRTloadTimeAlist| |$NRTslot1Info| |$NRTslot1PredicateList| + |$Representation| |$addForm| |$attributesName| + |$byteAddress| |$byteVec| |$compileOnlyCertainItems| + |$condAlist| |$domainShell| |$form| |$functionLocations| + |$functionStats| |$functorForm| |$functorLocalParameters| + |$functorStats| |$functorSpecialCases| |$functorTarget| + |$functorsUsed| |$genFVar| |$genSDVar| |$getDomainCode| + |$goGetList| |$insideCategoryPackageIfTrue| + |$insideFunctorIfTrue| |$isOpPackageName| |$libFile| + |$lisplibAbbreviation| |$lisplibAncestors| + |$lisplibCategoriesExtended| |$lisplibCategory| + |$lisplibForm| |$lisplibKind| |$lisplibMissingFunctions| + |$lisplibModemap| |$lisplibOperationAlist| |$lisplibParents| + |$lisplibSlot1| |$lookupFunction| |$myFunctorBody| + |$mutableDomain| |$mutableDomains| |$op| |$pairlis| + |$QuickCode| |$setelt| |$signature| |$template| + |$uncondAlist| |$viewNames| |$lisplibFunctionLocations|)) (setq form (second df)) - (setq sig (third df)) - (setq sc (fourth df)) + (setq signature (third df)) + (setq |$functorSpecialCases| (fourth df)) (setq body (fifth df)) - (setq categoryCapsule - (when (and (consp body) (eq (qfirst body) '|add|) - (consp (qrest body)) (consp (qcddr body)) - (eq (qcdddr body) nil)) - (setq tmp1 (third body)) - (setq body (second body)) - tmp1)) - (setq tmp3 (|compDefineCategory2| form sig sc body mode env prefix fal)) - (setq d (first tmp3)) - (setq mode (second tmp3)) - (setq env (third tmp3)) - (when (and categoryCapsule (null |$bootStrapMode|)) - (setq |$insideCategoryPackageIfTrue| t) - (setq |$categoryPredicateList| - (|makeCategoryPredicates| form |$lisplibCategory|)) - (setq env (third - (|compDefine1| - (|mkCategoryPackage| form cat categoryCapsule) |$EmptyMode| env)))) - (list d mode env))) - -\end{chunk} - -\defun{makeCategoryPredicates}{makeCategoryPredicates} -\usesdollar{makeCategoryPredicates}{FormalMapVariableList} -\usesdollar{makeCategoryPredicates}{TriangleVariableList} -\usesdollar{makeCategoryPredicates}{mvl} -\usesdollar{makeCategoryPredicates}{tvl} -\begin{chunk}{defun makeCategoryPredicates} -(defun |makeCategoryPredicates| (form u) - (labels ( - (fn (u pl) - (declare (special |$tvl| |$mvl|)) - (cond - ((and (consp u) (eq (qfirst u) '|Join|) (consp (qrest u))) - (fn (car (reverse (qrest u))) pl)) - ((and (consp u) (eq (qfirst u) '|has|)) - (|insert| (eqsubstlist |$mvl| |$tvl| u) pl)) - ((and (consp u) (member (qfirst u) '(signature attribute))) pl) - ((atom u) pl) - (t (fnl u pl)))) - (fnl (u pl) - (dolist (x u) (setq pl (fn x pl))) - pl)) - (declare (special |$FormalMapVariableList| |$mvl| |$tvl| - |$TriangleVariableList|)) - (setq |$tvl| (take (|#| (cdr form)) |$TriangleVariableList|)) - (setq |$mvl| (take (|#| (cdr form)) (cdr |$FormalMapVariableList|))) - (fn u nil))) - -\end{chunk} - -\defun{mkCategoryPackage}{mkCategoryPackage} -\calls{mkCategoryPackage}{strconc} -\calls{mkCategoryPackage}{pname} -\calls{mkCategoryPackage}{getdatabase} -\calls{mkCategoryPackage}{abbreviationsSpad2Cmd} -\calls{mkCategoryPackage}{JoinInner} -\calls{mkCategoryPackage}{assoc} -\calls{mkCategoryPackage}{sublislis} -\usesdollar{mkCategoryPackage}{options} -\usesdollar{mkCategoryPackage}{categoryPredicateList} -\usesdollar{mkCategoryPackage}{e} -\usesdollar{mkCategoryPackage}{FormalMapVariableList} -\begin{chunk}{defun mkCategoryPackage} -(defun |mkCategoryPackage| (form cat def) - (labels ( - (fn (x oplist) - (cond - ((atom x) oplist) - ((and (consp x) (eq (qfirst x) 'def) (consp (qrest x))) - (cons (second x) oplist)) - (t - (fn (cdr x) (fn (car x) oplist))))) - (gn (cat) - (cond - ((and (consp cat) (eq (qfirst cat) 'category)) (cddr cat)) - ((and (consp cat) (eq (qfirst cat) '|Join|)) (gn (|last| (qrest cat)))) - (t nil)))) - (let (|$options| op argl packageName packageAbb nameForDollar packageArgl - capsuleDefAlist explicitCatPart catvec fullCatOpList op1 sig - catOpList packageCategory nils packageSig) - (declare (special |$options| |$categoryPredicateList| |$e| - |$FormalMapVariableList|)) - (setq op (car form)) - (setq argl (cdr form)) - (setq packageName (intern (strconc (pname op) "&"))) - (setq packageAbb (intern (strconc (getdatabase op 'abbreviation) "-"))) - (setq |$options| nil) - (|abbreviationsSpad2Cmd| (list '|domain| packageAbb packageName)) - (setq nameForDollar (car (setdifference '(s a b c d e f g h i) argl))) - (setq packageArgl (cons nameForDollar argl)) - (setq capsuleDefAlist (fn def nil)) - (setq explicitCatPart (gn cat)) - (setq catvec (|eval| (|mkEvalableCategoryForm| form))) - (setq fullCatOpList (elt (|JoinInner| (list catvec) |$e|) 1)) - (setq catOpList - (loop for x in fullCatOpList do - (setq op1 (caar x)) - (setq sig (cadar x)) - when (|assoc| op1 capsuleDefAlist) - collect (list 'signature op1 sig))) - (when catOpList - (setq packageCategory - (cons 'category - (cons '|domain| (sublislis argl |$FormalMapVariableList| catOpList)))) - (setq nils (loop for x in argl collect nil)) - (setq packageSig (cons packageCategory (cons form nils))) - (setq |$categoryPredicateList| - (subst nameForDollar '$ |$categoryPredicateList| :test #'equal)) - (subst nameForDollar '$ - (list 'def (cons packageName packageArgl) - packageSig (cons nil nils) def) :test #'equal))))) - -\end{chunk} - -\defun{mkEvalableCategoryForm}{mkEvalableCategoryForm} -\calls{mkEvalableCategoryForm}{qcar} -\calls{mkEvalableCategoryForm}{qcdr} -\calls{mkEvalableCategoryForm}{mkEvalableCategoryForm} -\calls{mkEvalableCategoryForm}{compOrCroak} -\calls{mkEvalableCategoryForm}{getdatabase} -\calls{mkEvalableCategoryForm}{get} -\calls{mkEvalableCategoryForm}{mkq} -\refsdollar{mkEvalableCategoryForm}{Category} -\refsdollar{mkEvalableCategoryForm}{e} -\refsdollar{mkEvalableCategoryForm}{EmptyMode} -\refsdollar{mkEvalableCategoryForm}{CategoryFrame} -\refsdollar{mkEvalableCategoryForm}{Category} -\refsdollar{mkEvalableCategoryForm}{CategoryNames} -\defsdollar{mkEvalableCategoryForm}{e} -\begin{chunk}{defun mkEvalableCategoryForm} -(defun |mkEvalableCategoryForm| (c) - (let (op argl tmp1 x m) - (declare (special |$Category| |$e| |$EmptyMode| |$CategoryFrame| - |$CategoryNames|)) - (if (consp c) - (progn - (setq op (qfirst c)) - (setq argl (qrest c)) - (cond - ((eq op '|Join|) - (cons '|Join| - (loop for x in argl - collect (|mkEvalableCategoryForm| x)))) - ((eq op '|DomainSubstitutionMacro|) - (|mkEvalableCategoryForm| (cadr argl))) - ((eq op '|mkCategory|) c) - ((member op |$CategoryNames|) - (setq tmp1 (|compOrCroak| c |$EmptyMode| |$e|)) - (setq x (car tmp1)) - (setq m (cadr tmp1)) - (setq |$e| (caddr tmp1)) - (when (equal m |$Category|) x)) - ((or (eq (getdatabase op 'constructorkind) '|category|) - (|get| op '|isCategory| |$CategoryFrame|)) - (cons op - (loop for x in argl - collect (mkq x)))) - (t - (setq tmp1 (|compOrCroak| c |$EmptyMode| |$e|)) - (setq x (car tmp1)) - (setq m (cadr tmp1)) - (setq |$e| (caddr tmp1)) - (when (equal m |$Category|) x)))) - (mkq c)))) - -\end{chunk} - -\defun{compDefineCategory2}{compDefineCategory2} -\calls{compDefineCategory2}{addBinding} -\calls{compDefineCategory2}{getArgumentModeOrMoan} -\calls{compDefineCategory2}{giveFormalParametersValues} -\calls{compDefineCategory2}{take} -\calls{compDefineCategory2}{sublis} -\calls{compDefineCategory2}{compMakeDeclaration} -\calls{compDefineCategory2}{opOf} -\calls{compDefineCategory2}{optFunctorBody} -\calls{compDefineCategory2}{compOrCroak} -\calls{compDefineCategory2}{mkConstructor} -\calls{compDefineCategory2}{compile} -\calls{compDefineCategory2}{lisplibWrite} -\calls{compDefineCategory2}{removeZeroOne} -\calls{compDefineCategory2}{mkq} -\calls{compDefineCategory2}{evalAndRwriteLispForm} -\calls{compDefineCategory2}{eval} -\calls{compDefineCategory2}{getParentsFor} -\calls{compDefineCategory2}{computeAncestorsOf} -\calls{compDefineCategory2}{constructor?} -\calls{compDefineCategory2}{augLisplibModemapsFromCategory} -\usesdollar{compDefineCategory2}{prefix} -\refsdollar{compDefineCategory2}{formalArgList} -\refsdollar{compDefineCategory2}{definition} -\refsdollar{compDefineCategory2}{form} -\refsdollar{compDefineCategory2}{op} -\refsdollar{compDefineCategory2}{extraParms} -\refsdollar{compDefineCategory2}{lisplibCategory} -\refsdollar{compDefineCategory2}{FormalMapVariableList} -\refsdollar{compDefineCategory2}{libFile} -\refsdollar{compDefineCategory2}{TriangleVariableList} -\refsdollar{compDefineCategory2}{lisplib} -\defsdollar{compDefineCategory2}{formalArgList} -\defsdollar{compDefineCategory2}{insideCategoryIfTrue} -\defsdollar{compDefineCategory2}{top-level} -\defsdollar{compDefineCategory2}{definition} -\defsdollar{compDefineCategory2}{form} -\defsdollar{compDefineCategory2}{op} -\defsdollar{compDefineCategory2}{extraParms} -\defsdollar{compDefineCategory2}{functionStats} -\defsdollar{compDefineCategory2}{functorStats} -\defsdollar{compDefineCategory2}{frontier} -\defsdollar{compDefineCategory2}{getDomainCode} -\defsdollar{compDefineCategory2}{addForm} -\defsdollar{compDefineCategory2}{lisplibAbbreviation} -\defsdollar{compDefineCategory2}{functorForm} -\defsdollar{compDefineCategory2}{lisplibAncestors} -\defsdollar{compDefineCategory2}{lisplibCategory} -\defsdollar{compDefineCategory2}{lisplibParents} -\defsdollar{compDefineCategory2}{lisplibModemap} -\defsdollar{compDefineCategory2}{lisplibKind} -\defsdollar{compDefineCategory2}{lisplibForm} -\defsdollar{compDefineCategory2}{domainShell} -\begin{chunk}{defun compDefineCategory2} -(defun |compDefineCategory2| - (form signature specialCases body mode env |$prefix| |$formalArgList|) - (declare (special |$prefix| |$formalArgList|) (ignore specialCases)) - (let (|$insideCategoryIfTrue| $TOP_LEVEL |$definition| |$form| |$op| - |$extraParms| |$functionStats| |$functorStats| |$frontier| - |$getDomainCode| |$addForm| argl sargl aList signaturep opp formp - formalBody formals actuals g fun pairlis parSignature parForm modemap) - (declare (special |$insideCategoryIfTrue| $top_level |$definition| - |$form| |$op| |$extraParms| |$functionStats| - |$functorStats| |$frontier| |$getDomainCode| - |$addForm| |$lisplibAbbreviation| |$functorForm| - |$lisplibAncestors| |$lisplibCategory| - |$FormalMapVariableList| |$lisplibParents| - |$lisplibModemap| |$lisplibKind| |$lisplibForm| - $lisplib |$domainShell| |$libFile| - |$TriangleVariableList|)) -; 1. bind global variables - (setq |$insideCategoryIfTrue| t) - (setq $top_level nil) - (setq |$definition| nil) - (setq |$form| nil) - (setq |$op| nil) - (setq |$extraParms| nil) -; 1.1 augment e to add declaration $: