diff --git a/changelog b/changelog index b07242a..7463253 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,17 @@ +20110109 tpd src/axiom-website/patches.html 20110109.01.tpd.patch +20110109 tpd src/interp/Makefile move to lisp tangle +20110109 tpd src/interp/apply.lisp move to lisp tangle +20110109 tpd src/interp/as.lisp move to lisp tangle +20110109 tpd src/interp/ax.boot move to lisp tangle +20110109 tpd src/interp/ax.lisp move to lisp tangle +20110109 tpd src/interp/axext_l.lisp move to lisp tangle +20110109 tpd src/interp/bc-matrix.lisp move to lisp tangle +20110109 tpd src/interp/br-con.lisp move to lisp tangle +20110109 tpd src/interp/buildom.lisp move to lisp tangle +20110109 tpd src/interp/c-doc.lisp move to lisp tangle +20110109 tpd src/interp/category.lisp move to lisp tangle +20110109 tpd src/interp/cattable.lisp move to lisp tangle +20110109 tpd src/interp/cfuns.lisp move to lisp tangle 20110108 tpd src/axiom-website/patches.html 20110108.02.tpd.patch 20110108 tpd src/interp/Makefile convert bookvol5 to lisp tangle 20110108 tpd books/bookvol5 convert to lisp tangle diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index e832ea7..41763c5 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -3335,5 +3335,7 @@ books/bookvol9 treeshake compiler
books/bookvol9 treeshake compiler
20110108.02.tpd.patch books/bookvol5 convert to lisp tangle
+20110109.01.tpd.patch +*.lisp.pamphlet moving to lisp tangle
diff --git a/src/interp/Makefile.pamphlet b/src/interp/Makefile.pamphlet index fbdf7b6..257b96d 100644 --- a/src/interp/Makefile.pamphlet +++ b/src/interp/Makefile.pamphlet @@ -736,7 +736,8 @@ ${OUT}/apply.${O}: ${MID}/apply.lisp ${MID}/apply.lisp: ${IN}/apply.lisp.pamphlet @ echo 11 making ${MID}/apply.lisp from ${IN}/apply.lisp.pamphlet @( cd ${MID} ; \ - ${TANGLE} ${IN}/apply.lisp.pamphlet >apply.lisp ) + echo '(tangle "${IN}/apply.lisp.pamphlet" "*" "apply.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -759,7 +760,8 @@ ${OUT}/cfuns.${O}: ${MID}/cfuns.lisp ${MID}/cfuns.lisp: ${IN}/cfuns.lisp.pamphlet @ echo 25 making ${MID}/cfuns.lisp from ${IN}/cfuns.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/cfuns.lisp.pamphlet >cfuns.lisp ) + echo '(tangle "${IN}/cfuns.lisp.pamphlet" "*" "cfuns.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -1030,7 +1032,8 @@ ${OUT}/buildom.${O}: ${MID}/buildom.lisp ${MID}/buildom.lisp: ${IN}/buildom.lisp.pamphlet @ echo 137 making ${MID}/buildom.lisp from ${IN}/buildom.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/buildom.lisp.pamphlet >buildom.lisp ) + echo '(tangle "${IN}/buildom.lisp.pamphlet" "*" "buildom.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -1491,7 +1494,8 @@ ${MID}/category.lisp: ${IN}/category.lisp.pamphlet @ echo 137 making ${MID}/category.lisp from \ ${IN}/category.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/category.lisp.pamphlet >category.lisp ) + echo '(tangle "${IN}/category.lisp.pamphlet" "*" "category.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -1515,7 +1519,8 @@ ${MID}/cattable.lisp: ${IN}/cattable.lisp.pamphlet @ echo 137 making ${MID}/cattable.lisp from \ ${IN}/cattable.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/cattable.lisp.pamphlet >cattable.lisp ) + echo '(tangle "${IN}/cattable.lisp.pamphlet" "*" "cattable.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -1538,7 +1543,8 @@ ${OUT}/c-doc.${O}: ${MID}/c-doc.lisp ${MID}/c-doc.lisp: ${IN}/c-doc.lisp.pamphlet @ echo 137 making ${MID}/c-doc.lisp from ${IN}/c-doc.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/c-doc.lisp.pamphlet >c-doc.lisp ) + echo '(tangle "${IN}/c-doc.lisp.pamphlet" "*" "c-dc.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -2823,7 +2829,8 @@ ${OUT}/as.${O}: ${MID}/as.lisp ${MID}/as.lisp: ${IN}/as.lisp.pamphlet @ echo 137 making ${MID}/as.lisp from ${IN}/as.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/as.lisp.pamphlet >as.lisp ) + echo '(tangle "${IN}/as.lisp.pamphlet" "*" "as.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -2854,7 +2861,8 @@ ${MID}/bc-matrix.lisp: ${IN}/bc-matrix.lisp.pamphlet @ echo 137 making ${MID}/bc-matrix.lisp from \ ${IN}/bc-matrix.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/bc-matrix.lisp.pamphlet >bc-matrix.lisp ) + echo '(tangle "${IN}/bc-matrix.lisp.pamphlet" "*" "bc-matrix.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -2960,7 +2968,8 @@ ${OUT}/ax.${O}: ${MID}/ax.lisp ${MID}/ax.lisp: ${IN}/ax.lisp.pamphlet @ echo 137 making ${MID}/ax.lisp from ${IN}/ax.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/ax.lisp.pamphlet >ax.lisp ) + echo '(tangle "${IN}/ax.lisp.pamphlet" "*" "ax.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -2989,7 +2998,8 @@ ${OUT}/br-con.${O}: ${MID}/br-con.lisp ${MID}/br-con.lisp: ${IN}/br-con.lisp.pamphlet @ echo 137 making ${MID}/br-con.lisp from ${IN}/br-con.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/br-con.lisp.pamphlet >br-con.lisp ) + echo '(tangle "${IN}/br-con.lisp.pamphlet" "*" "br-con.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -3181,7 +3191,8 @@ ${OUT}/axext_l.${O}: ${MID}/axext_l.lisp ${MID}/axext_l.lisp: ${IN}/axext_l.lisp.pamphlet @ echo 608 making ${MID}/axext_l.lisp from ${IN}/axext_l.lisp.pamphlet @(cd ${MID} ; \ - ${TANGLE} ${IN}/axext_l.lisp.pamphlet >axext_l.lisp ) + echo '(tangle "${IN}/axext_l.lisp.pamphlet" "*" "axext_l.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ diff --git a/src/interp/apply.lisp.pamphlet b/src/interp/apply.lisp.pamphlet index a1a5ece..1200b92 100644 --- a/src/interp/apply.lisp.pamphlet +++ b/src/interp/apply.lisp.pamphlet @@ -9,7 +9,7 @@ \eject \tableofcontents \eject -<<*>>= +\begin{chunk}{*} (in-package "BOOT" ) @@ -517,30 +517,6 @@ (SETQ T$ (CONS |x'| (CONS |m'| (CONS |e'| NIL)))) (|convert| T$ |m|)))))))) -;-- This version tends to give problems with #1 and categories -;-- applyMapping([op,:argl],m,e,ml) == -;-- #argl^=#ml-1 => nil -;-- mappingHasCategoryTarget := -;-- isCategoryForm(first ml,e) => --is op a functor? -;-- form:= [op,:argl'] -;-- pairlis:= [[v,:a] for a in argl for v in $FormalMapVariableList] -;-- ml:= SUBLIS(pairlis,ml) -;-- true -;-- false -;-- argl':= -;-- [T.expr for x in argl for m' in rest ml] where -;-- T() == [.,.,e]:= comp(x,m',e) or return "failed" -;-- if argl'="failed" then return nil -;-- mappingHasCategoryTarget => convert([form,first ml,e],m) -;-- form:= -;-- not MEMBER(op,$formalArgList) and ATOM op => -;-- [op',:argl',"$"] where -;-- op':= INTERN STRCONC(STRINGIMAGE $prefix,";",STRINGIMAGE op) -;-- ["call",["applyFun",op],:argl'] -;-- pairlis:= [[v,:a] for a in argl' for v in $FormalMapVariableList] -;-- convert([form,SUBLIS(pairlis,first ml),e],m) - - ;applyMapping([op,:argl],m,e,ml) == ; #argl^=#ml-1 => nil ; isCategoryForm(first ml,e) => @@ -893,7 +869,7 @@ (declare (ignore op) (ignore dc)) (cons fnexpr (cons bindings nil))) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/as.lisp.pamphlet b/src/interp/as.lisp.pamphlet index 063a298..1698c87 100644 --- a/src/interp/as.lisp.pamphlet +++ b/src/interp/as.lisp.pamphlet @@ -9,7 +9,7 @@ \eject \tableofcontents \eject -<<*>>= +\begin{chunk}{*} (IN-PACKAGE "BOOT" ) ;--global hash tables for new compiler @@ -4801,7 +4801,7 @@ (SEQ (EXIT (SPADLET |p| (|quickAnd| |q| |p|))))) |p|))))) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/ax.boot.pamphlet b/src/interp/ax.boot.pamphlet index 19a8ba8..bfbb7a3 100644 --- a/src/interp/ax.boot.pamphlet +++ b/src/interp/ax.boot.pamphlet @@ -20,10 +20,10 @@ This used to read: axForm := ['Sequence, ['Import, [], 'AxiomLib], :axForms] \end{verbatim} but was changed to read: -<>= +\begin{chunk}{aldor mod 1} axForm := ['Sequence, _ ['Import, [], 'AxiomLib], ['Import, [], 'Boolean], :axForms] -@ +\end{chunk} \section{Overview} \subsection{makeAxExportForm} The most important function in \file{ax.boot} is the function @@ -47,7 +47,7 @@ part of the constructor. The function is actually used in \file{src/aldor/genax.lsp} and is an auxiliary part in the construction of the interface for the interaction of the Aldor compiler with Axiom. -<>= +\begin{chunk}{makeAxExportForm} makeAxExportForm(filename, constructors) == $defaultFlag : local := false $literals := [] @@ -66,7 +66,7 @@ makeAxExportForm(filename, constructors) == ['Import, [], 'AxiomLib], ['Import, [], 'Boolean], :axForms] axForm -@ +\end{chunk} The basic translation is easily demonstrated with a few examples. For better readability, we look at the corresponding SPAD form of the constructor (instead of its internal LISP representation). @@ -485,7 +485,7 @@ Here we add an else clause. The original code read: It appears that Aldor allows a richer syntax for [[has]] conditions since the call to [[axFormatOp]] appears to allow nested IF conditions.OQ -<>= +\begin{chunk}{axFormatPred aldor change} axFormatPred pred == atom pred => pred [op,:args] := pred @@ -504,9 +504,9 @@ axFormatPred pred == op = 'NOT => ['Not,:axArglist] error "unknown predicate" -@ +\end{chunk} \section{License} -<>= +\begin{verbatim} -- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. -- All rights reserved. -- @@ -538,9 +538,8 @@ axFormatPred pred == -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<> +\end{verbatim} +\begin{chunk}{*} $stripTypes := false $pretendFlag := false @@ -557,7 +556,7 @@ sourceFilesToAxFile(filename, sourceFiles) == $extendedDomains := nil setExtendedDomains(l) == - $extendedDomains := l + $extendedDomains := l fileConstructors name == [INTERN(con,"BOOT") for con in SRCABBREVS SOURCEPATH STRING name] @@ -576,12 +575,12 @@ makeAxFile(filename, constructors) == axForms := [['Foreign, ['Declare, 'dummyDefault, 'Exit], 'Lisp], :axForms] axForms := APPEND(axDoLiterals(), axForms) -<> +\getchunk{aldor mod 1} st := MAKE_-OUTSTREAM(filename) PPRINT(axForm,st) CLOSE st -<> +\getchunk{makeAxExportForm} stripType type == $stripTypes => @@ -604,7 +603,7 @@ modemapToAx(modemap) == ['Define, ['Declare, constructor, ['Apply, "->", optcomma argdecls, 'Category]], ['Lambda, argdecls, 'Category, - ['Label, constructor, + ['Label, constructor, addDefaults(constructor, axFormatType categoryInfo)]]] constructor in $extendedDomains => NULL args => @@ -671,8 +670,8 @@ axFormatType(typeform) == axAddLiteral('bracket, ['Apply, 'List, 'Symbol], [ 'Apply, 'Tuple, 'Symbol]) axAddLiteral('string, 'Symbol, 'Literal) ['RestrictTo, ['Apply, 'bracket, - :[axFormatType a for a in args]], - ['Apply, 'List, 'Symbol] ] + :[axFormatType a for a in args]], + ['Apply, 'List, 'Symbol] ] typeform is [op] => op = '$ => '% op = 'Void => ['Comma] @@ -684,7 +683,7 @@ axFormatType(typeform) == ['With, [], makeTypeSequence( APPEND([axFormatType c for c in cats], - [axFormatOp op for op in ops]))] + [axFormatOp op for op in ops]))] ['With, [], makeTypeSequence([axFormatType c for c in rest typeform])] typeform is ['CATEGORY, type, :ops] => ['With, [], axFormatOpList ops] @@ -750,7 +749,7 @@ axFormatOpSig(name, [result,:argtypes]) == axFormatConstantOp(name, [result]) == ['Declare, axOpTran name, axFormatType result] -<> +\getchunk{axFormatPred aldor change} axFormatCondOp op == $pretendFlag:local := true @@ -851,11 +850,11 @@ axAddLiteral(name, type, dom) == axDoLiterals() == [ [ 'Import, - [ 'With, [], - ['Declare, name, [ 'Apply, '_-_> , dom , '_% ]]], - type ] for [name, type, dom] in $literals] + [ 'With, [], + ['Declare, name, [ 'Apply, '_-_> , dom , '_% ]]], + type ] for [name, type, dom] in $literals] -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/ax.lisp.pamphlet b/src/interp/ax.lisp.pamphlet index c4ffb63..35c64b3 100644 --- a/src/interp/ax.lisp.pamphlet +++ b/src/interp/ax.lisp.pamphlet @@ -505,7 +505,7 @@ axFormatPred pred == error "unknown predicate" \end{verbatim} -<<*>>= +\begin{chunk}{*} ;$stripTypes := false (SPADLET |$stripTypes| NIL) @@ -2242,7 +2242,7 @@ axFormatPred pred == (CONS |type| NIL))) G167158))))))))))) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/axext_l.lisp.pamphlet b/src/interp/axext_l.lisp.pamphlet index 7eb8509..a9f5c53 100644 --- a/src/interp/axext_l.lisp.pamphlet +++ b/src/interp/axext_l.lisp.pamphlet @@ -10,7 +10,7 @@ \tableofcontents \eject \section{License} -<>= +\begin{verbatim} ;; Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ;; All rights reserved. ;; @@ -42,9 +42,8 @@ ;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<> +\end{verbatim} +\begin{chunk}{*} ;; File containing primitives needed by exextend in order to interop with axiom ;; This file could do with some declares @@ -55,7 +54,7 @@ (defun H-integer (l e) (|AXL-LiteralToInteger| l)) - + (defun H-string (l e) (|AXL-LiteralToString| l)) @@ -63,9 +62,9 @@ (|AXL-error| l)) (eval-when (load eval) - (defconstant |G-axclique_string_305639517| (cons #'H-String nil)) - (defconstant |G-axclique_integer_685864888| (cons #'H-integer nil)) - (defconstant |G-axclique_error_011667951| (cons #'H-error nil))) + (defconstant |G-axclique_string_305639517| (cons #'H-String nil)) + (defconstant |G-axclique_integer_685864888| (cons #'H-integer nil)) + (defconstant |G-axclique_error_011667951| (cons #'H-error nil))) ;; Literals should be null-terminated strings @@ -79,7 +78,7 @@ (defmacro |AXL-LiteralToDoubleFloat| (l) `(read-from-string ,l nil (|DFlo0|) - :preserve-whitespace t)) + :preserve-whitespace t)) (defmacro |AXL-LiteralToString| (l) `(subseq ,l 0 (- (length ,l) 1))) @@ -98,15 +97,15 @@ (defmacro |AXL-plusInteger| (a b) `(the |BInt| (+ (the |BInt| ,a) - (the |BInt| ,b)))) + (the |BInt| ,b)))) (defmacro |AXL-minusInteger| (a b) `(the |BInt| (- (the |BInt| ,a) - (the |BInt| ,b)))) + (the |BInt| ,b)))) (defmacro |AXL-timesInteger| (a b) `(the |BInt| (* (the |BInt| ,a) - (the |BInt| ,b)))) + (the |BInt| ,b)))) (defmacro |AXL-eqInteger| (a b) `(= (the |BInt| ,a) @@ -130,15 +129,15 @@ (defmacro |AXL-plusSingleInteger| (a b) `(the |SInt| (+ (the |SInt| ,a) - (the |SInt| ,b)))) + (the |SInt| ,b)))) (defmacro |AXL-minusSingleInteger| (a b) `(the |SInt| (- (the |SInt| ,a) - (the |SInt| ,b)))) + (the |SInt| ,b)))) (defmacro |AXL-timesSingleInteger| (a b) `(the |SInt| (* (the |SInt| ,a) - (the |SInt| ,b)))) + (the |SInt| ,b)))) (defmacro |AXL-eqSingleInteger| (a b) `(= (the |SInt| ,a) @@ -215,7 +214,7 @@ (defun |AXL-spitSInt| (x) (print x)) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/bc-matrix.lisp.pamphlet b/src/interp/bc-matrix.lisp.pamphlet index a480dc3..ae7be57 100644 --- a/src/interp/bc-matrix.lisp.pamphlet +++ b/src/interp/bc-matrix.lisp.pamphlet @@ -9,7 +9,7 @@ \eject \tableofcontents \eject -<<*>>= +\begin{chunk}{*} (IN-PACKAGE "BOOT" ) @@ -3609,7 +3609,7 @@ (DEFUN |htMkName| (|s| |n|) (STRCONC |s| (STRINGIMAGE |n|))) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/br-con.lisp.pamphlet b/src/interp/br-con.lisp.pamphlet index 8846015..e9350bc 100644 --- a/src/interp/br-con.lisp.pamphlet +++ b/src/interp/br-con.lisp.pamphlet @@ -9,8 +9,7 @@ \eject \tableofcontents \eject -@ -<<*>>= +\begin{chunk}{*} (IN-PACKAGE "BOOT" ) ;--====================> WAS b-con.boot <================================ @@ -27235,7 +27234,7 @@ $dbKindAlist := (SPADLET |$newConstructorList| NIL) (|deleteFile| "libdb.text"))) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/buildom.lisp.pamphlet b/src/interp/buildom.lisp.pamphlet index b327b93..0261725 100644 --- a/src/interp/buildom.lisp.pamphlet +++ b/src/interp/buildom.lisp.pamphlet @@ -9,7 +9,7 @@ \eject \tableofcontents \eject -<<*>>= +\begin{chunk}{*} (IN-PACKAGE "BOOT" ) ;SETANDFILEQ($noCategoryDomains, '(Domain Mode SubDomain)) @@ -1672,7 +1672,7 @@ (CONS |cList| (CONS |e| NIL))))))))) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/c-doc.lisp.pamphlet b/src/interp/c-doc.lisp.pamphlet index 98cf4d5..eba762d 100644 --- a/src/interp/c-doc.lisp.pamphlet +++ b/src/interp/c-doc.lisp.pamphlet @@ -9,8 +9,7 @@ \eject \tableofcontents \eject -@ -<<*>>= +\begin{chunk}{*} (IN-PACKAGE "BOOT" ) @@ -4313,7 +4312,7 @@ (SPADLET |u| (CDR |u|)))))) |u|))))) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/category.lisp.pamphlet b/src/interp/category.lisp.pamphlet index ca7d5b8..b700bdf 100644 --- a/src/interp/category.lisp.pamphlet +++ b/src/interp/category.lisp.pamphlet @@ -13,16 +13,16 @@ Functions for building categories. Sorry to say, this hack is needed by isCategoryType -<<*>>= +\begin{chunk}{*} (IN-PACKAGE "BOOT" ) ;Category() == nil (DEFUN |Category| NIL NIL) -@ +\end{chunk} \subsection{CategoryPrint} -<<*>>= +\begin{chunk}{*} ;CategoryPrint(D,$e) == ; SAY "--------------------------------------" ; SAY "Name (and arguments) of category:" @@ -87,7 +87,7 @@ Sorry to say, this hack is needed by isCategoryType |u|)) ('T (PRETTYPRINT |u|)))))))))))) -@ +\end{chunk} \subsection{sigParams} This code is a performance improvement by Waldek Hebisch. The essence of the speedup appears to be caused by two factors. @@ -101,7 +101,7 @@ Union, Mapping, List, and Record. \verb|$PrimitiveDomainNames| is a list of domains that we need not cache. It is set in init.lisp.pamphlet. -<<*>>= +\begin{chunk}{*} ;sigParams(sigList) == ; result:=nil ; myhash:=MAKE_-HASHTABLE 'EQUAL @@ -213,7 +213,7 @@ It is set in init.lisp.pamphlet. ('T NIL))))) |result|))))) -@ +\end{chunk} \subsection{mkCategory} This code defines the structure of a category. It creates a new category vector. The arguments are: @@ -225,7 +225,7 @@ of category object. \item domList \item PrincipalAncestor -- principal ancestor (if any) \end{itemize} -<<*>>= +\begin{chunk}{*} ;mkCategory(domainOrPackage,sigList,attList,domList,PrincipalAncestor) == ; NSigList:= nil ; if PrincipalAncestor=nil then count:= 6 else count:= SIZE PrincipalAncestor @@ -439,19 +439,19 @@ of category object. (SEQ (EXIT (SETELT |v| |sequence| |nsig|)))) |v|))))) -@ +\end{chunk} \subsection{isCategory} -<<*>>= +\begin{chunk}{*} ;isCategory a == REFVECP a and #a>5 and a.3=["Category"] (DEFUN |isCategory| (|a|) (AND (REFVECP |a|) (> (|#| |a|) 5) (BOOT-EQUAL (ELT |a| 3) (CONS '|Category| NIL)))) -@ +\end{chunk} \subsection{DropImplementations} Subsumption code (for operators) -<<*>>= +\begin{chunk}{*} ;DropImplementations (a is [sig,pred,:implem]) == ; if implem is [[q,:.]] and (q="ELT" or q="CONST") ; then if (q="ELT") then [sig,pred] @@ -477,9 +477,9 @@ Subsumption code (for operators) ('T (CONS (APPEND |sig| '(|constant|)) (CONS |pred| NIL))))) ('T |a|)))))) -@ +\end{chunk} \subsection{SigListUnion} -<<*>>= +\begin{chunk}{*} ;SigListUnion(extra,original) == ; --augments original %with everything in extra that is not in original ; for (o:=[[ofn,osig,:.],opred,:.]) in original repeat @@ -694,9 +694,9 @@ Subsumption code (for operators) (SPADLET |original| (CONS |e| |original|)))))) |original|))))) -@ +\end{chunk} \subsection{mkOr} -<<*>>= +\begin{chunk}{*} ;mkOr(a,b) == ; a=true => true ; b=true => true @@ -785,9 +785,9 @@ Subsumption code (for operators) ('T (CONS |a| (CONS |b| NIL))))) (COND ((EQL (LENGTH |l|) 1) (CAR |l|)) ('T (CONS 'OR |l|)))))))) -@ +\end{chunk} \subsection{mkOr2} -<<*>>= +\begin{chunk}{*} ;mkOr2(a,b) == ; --a is a condition, "b" a list of them ; MEMBER(a,b) => b @@ -847,9 +847,9 @@ Subsumption code (for operators) (COND (|aRedundant| |b|) ('T (CONS |a| |b|)))) ('T (CONS |a| |b|))))))) -@ +\end{chunk} \subsection{mkAnd} -<<*>>= +\begin{chunk}{*} ;mkAnd(a,b) == ; a=true => b ; b=true => a @@ -918,9 +918,9 @@ Subsumption code (for operators) ('T (CONS |a| (CONS |b| NIL))))) (COND ((EQL (LENGTH |l|) 1) (CAR |l|)) ('T (CONS 'AND |l|)))))))) -@ +\end{chunk} \subsection{mkAnd2} -<<*>>= +\begin{chunk}{*} ;mkAnd2(a,b) == ; --a is a condition, "b" a list of them ; MEMBER(a,b) => b @@ -980,9 +980,9 @@ Subsumption code (for operators) (COND (|aRedundant| |b|) ('T (CONS |a| |b|)))) ('T (CONS |a| |b|))))))) -@ +\end{chunk} \subsection{SigListMember} -<<*>>= +\begin{chunk}{*} ;SigListMember(m,list) == ; list=nil => false ; SigEqual(m,first list) => true @@ -994,9 +994,9 @@ Subsumption code (for operators) ((|SigEqual| |m| (CAR LIST)) 'T) ('T (|SigListMember| |m| (CDR LIST))))) -@ +\end{chunk} \subsection{SigEqual} -<<*>>= +\begin{chunk}{*} ;SigEqual([sig1,pred1,:.],[sig2,pred2,:.]) == ; -- Notice asymmetry: checks that arg1 is a consequence of arg2 ; sig1=sig2 and PredImplies(pred2,pred1) @@ -1012,9 +1012,9 @@ Subsumption code (for operators) (AND (BOOT-EQUAL |sig1| |sig2|) (|PredImplies| |pred2| |pred1|)))))) -@ +\end{chunk} \subsection{PredImplies} -<<*>>= +\begin{chunk}{*} ;PredImplies(a,b) == ; --true if a => b in the sense of logical implication ;--a = "true" => true @@ -1026,9 +1026,9 @@ Subsumption code (for operators) (DEFUN |PredImplies| (|a| |b|) (COND ((BOOT-EQUAL |a| 'T) 'T) ((BOOT-EQUAL |a| |b|) 'T) ('T NIL))) -@ +\end{chunk} \subsection{SigListOpSubsume} -<<*>>= +\begin{chunk}{*} ;SigListOpSubsume([[name1,sig1,:.],:.],list) == ; --does m subsume another operator in the list? ; --see "operator subsumption" in SYSTEM SCRIPT @@ -1067,9 +1067,9 @@ Subsumption code (for operators) (CONS |n| |ans|)))))))) (RETURN |ans|))))))) -@ +\end{chunk} \subsection{SigOpsubsume} -<<*>>= +\begin{chunk}{*} ;SigOpsubsume([[name1,sig1,:flag1],pred1,:.],[[name2,sig2,:flag2],pred2,:.]) == ; --flag1 = flag2 and :this really should be checked ; name1=name2 and LENGTH sig1=LENGTH sig2 and SourceLevelSubsume(sig1,sig2) @@ -1090,9 +1090,9 @@ Subsumption code (for operators) (BOOT-EQUAL (LENGTH |sig1|) (LENGTH |sig2|)) (|SourceLevelSubsume| |sig1| |sig2|)))))) -@ +\end{chunk} \subsection{SourceLevelSubsume} -<<*>>= +\begin{chunk}{*} ;SourceLevelSubsume([out1,:in1],[out2,:in2]) == ; -- Checks for source-level subsumption in the sense of SYSTEM SCRIPT ; -- true if the first signature subsumes the second @@ -1130,9 +1130,9 @@ Subsumption code (for operators) (|SourceLevelSubset| |inarg2| |inarg1|)))))))))))))) -@ +\end{chunk} \subsection{SourceLevelSubset} -<<*>>= +\begin{chunk}{*} ;SourceLevelSubset(a,b) == ; --true if a is a source-level subset of b ; a=b => true @@ -1163,9 +1163,9 @@ Subsumption code (for operators) 'T) ('T NIL))))) -@ +\end{chunk} \subsection{MachineLevelSubsume} -<<*>>= +\begin{chunk}{*} ;MachineLevelSubsume([name1,[out1,:in1],:flag1],[name2,[out2,:in2],:flag2]) == ; -- Checks for machine-level subsumption in the sense of SYSTEM SCRIPT ; -- true if the first signature subsumes the second @@ -1210,9 +1210,9 @@ Subsumption code (for operators) (|MachineLevelSubset| |inarg2| |inarg1|)))))))))))))) -@ +\end{chunk} \subsection{MachineLevelSubset} -<<*>>= +\begin{chunk}{*} ;MachineLevelSubset(a,b) == ; --true if a is a machine-level subset of b ; a=b => true @@ -1255,10 +1255,10 @@ Subsumption code (for operators) 'T) ('T NIL)))))) -@ +\end{chunk} \subsection{FindFundAncs} Ancestor chasing code -<<*>>= +\begin{chunk}{*} ;FindFundAncs l == ; --l is a list of categories and associated conditions (a list of 2-lists ; --returns a list of them and all their fundamental ancestors @@ -1374,9 +1374,9 @@ Ancestor chasing code ('T NIL))))) (CONS (CAR |l|) |ans|))))))))))) -@ +\end{chunk} \subsection{CatEval} -<<*>>= +\begin{chunk}{*} ;CatEval x == ; REFVECP x => x ; $InteractiveMode => CAR compMakeCategoryObject(x,$CategoryFrame) @@ -1390,9 +1390,9 @@ Ancestor chasing code (CAR (|compMakeCategoryObject| |x| |$CategoryFrame|))) ('T (CAR (|compMakeCategoryObject| |x| |$e|))))) -@ +\end{chunk} \subsection{AncestorP} -<<*>>= +\begin{chunk}{*} ;AncestorP(xname,leaves) == ; -- checks for being a principal ancestor of one of the leaves ; MEMBER(xname,leaves) => xname @@ -1414,9 +1414,9 @@ Ancestor chasing code (CAR (ELT (|CatEval| |y|) 4))) (EXIT (RETURN |y|))))))))))))) -@ +\end{chunk} \subsection{CondAncestorP} -<<*>>= +\begin{chunk}{*} ;CondAncestorP(xname,leaves,condition) == ; -- checks for being a principal ancestor of one of the leaves ; for u in leaves repeat @@ -1449,9 +1449,9 @@ Ancestor chasing code |condition|) (EXIT (RETURN |u'|))))))))))))))) -@ +\end{chunk} \subsection{DescendantP} -<<*>>= +\begin{chunk}{*} ;DescendantP(a,b) == ; -- checks to see if a is any kind of Descendant of b ; a=b => true @@ -1503,7 +1503,7 @@ Ancestor chasing code 'T) ('T NIL))))))))) -@ +\end{chunk} \subsection{JoinInner} The implementation of Join \subsubsection{hasCategoryBug} @@ -1549,7 +1549,7 @@ At least in GCL, the code for lengthenvec need not copy the vec to a new location. In this case the FundamentalAncesters array is adjustable and in GCL the adjust-array need not, and in this case, does not do a copy. -<<*>>= +\begin{chunk}{*} ;JoinInner(l,$e) == ; $NewCatVec: local := nil ; CondList:= nil @@ -2317,9 +2317,9 @@ copy. (|mkCategory| '|domain| |sigl| |attl| |globalDomains| |$NewCatVec|)))))) -@ +\end{chunk} \subsection{isCategoryForm} -<<*>>= +\begin{chunk}{*} ;isCategoryForm(x,e) == ; x is [name,:.] => categoryForm? name ; atom x => u:= get(x,"macro",e) => isCategoryForm(u,e) @@ -2335,7 +2335,7 @@ copy. ((SPADLET |u| (|get| |x| '|macro| |e|)) (EXIT (|isCategoryForm| |u| |e|)))))))))) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} [[pamphlet:src/interp/macros.lisp.pamphlet]] diff --git a/src/interp/cattable.lisp.pamphlet b/src/interp/cattable.lisp.pamphlet index c730e5b..bd37e50 100644 --- a/src/interp/cattable.lisp.pamphlet +++ b/src/interp/cattable.lisp.pamphlet @@ -9,7 +9,7 @@ \eject \tableofcontents \eject -<<*>>= +\begin{chunk}{*} (IN-PACKAGE "BOOT" ) @@ -2138,7 +2138,7 @@ |extensions|))))))) (HPUT *ANCESTORS-HASH* |key| |extensions|)))))))))) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/cfuns.lisp.pamphlet b/src/interp/cfuns.lisp.pamphlet index 18120a5..f0885e9 100644 --- a/src/interp/cfuns.lisp.pamphlet +++ b/src/interp/cfuns.lisp.pamphlet @@ -10,7 +10,7 @@ \tableofcontents \eject \section{License} -<>= +\begin{verbatim} ;; Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ;; All rights reserved. ;; @@ -42,9 +42,9 @@ ;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<> +\end{verbatim} +\begin{chunk}{*} + (in-package "BOOT") @@ -100,7 +100,7 @@ #+(AND KCL ELF) (defun |hashString| (string) (system:|hashString| string)) -@ +\end{chunk} The MYCOMBINE function causes a problem as of GCL-2.6.8pre. Camm has rewritten it. This used to read: \begin{verbatim} @@ -113,7 +113,7 @@ Camm has rewritten it. This used to read: "}" ) \end{verbatim} -<<*>>= +\begin{chunk}{*} #+(AND KCL (NOT ELF)) (Clines "int MYCOMBINE(i,j)" @@ -130,7 +130,7 @@ Camm has rewritten it. This used to read: (defun |hashCombine| (x y) (system:|hashCombine| x y)) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing