diff --git a/changelog b/changelog index 7463253..80d006c 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,30 @@ +20110109 tpd src/axiom-website/patches.html 20110109.02.tpd.patch +20110109 tpd src/interp/Makefile move to lisp tangle +20110109 tpd src/interp/c-util.lisp move to lisp tangle +20110109 tpd src/interp/clam.lisp move to lisp tangle +20110109 tpd src/interp/clammed.lisp move to lisp tangle +20110109 tpd src/interp/compiler.lisp move to lisp tangle +20110109 tpd src/interp/compress.lisp move to lisp tangle +20110109 tpd src/interp/database.lisp move to lisp tangle +20110109 tpd src/interp/debugsys.lisp move to lisp tangle +20110109 tpd src/interp/define.lisp move to lisp tangle +20110109 tpd src/interp/foam_l.lisp move to lisp tangle +20110109 tpd src/interp/format.lisp move to lisp tangle +20110109 tpd src/interp/fortcall.lisp move to lisp tangle +20110109 tpd src/interp/functor.lisp move to lisp tangle +20110109 tpd src/interp/g-boot.lisp move to lisp tangle +20110109 tpd src/interp/g-cndata.lisp move to lisp tangle +20110109 tpd src/interp/g-error.lisp move to lisp tangle +20110109 tpd src/interp/g-opt.lisp move to lisp tangle +20110109 tpd src/interp/g-timer.lisp move to lisp tangle +20110109 tpd src/interp/g-util.lisp move to lisp tangle +20110109 tpd src/interp/hashcode.lisp move to lisp tangle +20110109 tpd src/interp/ht-util.lisp move to lisp tangle +20110109 tpd src/interp/htcheck.lisp move to lisp tangle +20110109 tpd src/interp/hypertex.lisp move to lisp tangle +20110109 tpd src/interp/i-analy.lisp move to lisp tangle +20110109 tpd src/interp/i-code.lisp move to lisp tangle +20110109 tpd src/interp/i-coerce.lisp move to lisp tangle 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 diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index 41763c5..dc3fbd3 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -3337,5 +3337,7 @@ books/bookvol9 treeshake compiler
books/bookvol5 convert to lisp tangle
20110109.01.tpd.patch *.lisp.pamphlet moving to lisp tangle
+20110109.02.tpd.patch +*.lisp.pamphlet moving to lisp tangle
diff --git a/src/interp/Makefile.pamphlet b/src/interp/Makefile.pamphlet index 257b96d..745cb6b 100644 --- a/src/interp/Makefile.pamphlet +++ b/src/interp/Makefile.pamphlet @@ -799,7 +799,8 @@ files (or .lsp or .clisp) and saved it here. ${MID}/debugsys.lisp: ${IN}/debugsys.lisp.pamphlet @ echo 39 making ${MID}/debugsys.lisp from ${IN}/debugsys.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/debugsys.lisp.pamphlet >debugsys.lisp ) + echo '(tangle "${IN}/debugsys.lisp.pamphlet" "*" "debugsys.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -823,7 +824,8 @@ ${MID}/fortcall.lisp: ${IN}/fortcall.lisp.pamphlet @ echo 137 making ${MID}/fortcall.lisp from \ ${IN}/fortcall.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/fortcall.lisp.pamphlet >fortcall.lisp ) + echo '(tangle "${IN}/fortcall.lisp.pamphlet" "*" "fortcall.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ \subsection{hypertex.lisp} @@ -846,7 +848,8 @@ ${MID}/hypertex.lisp: ${IN}/hypertex.lisp.pamphlet @ echo 137 making ${MID}/hypertex.lisp from \ ${IN}/hypertex.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/hypertex.lisp.pamphlet >hypertex.lisp ) + echo '(tangle "${IN}/hypertex.lisp.pamphlet" "*" "hypertex.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -1056,7 +1059,8 @@ ${OUT}/c-util.${O}: ${MID}/c-util.lisp ${MID}/c-util.lisp: ${IN}/c-util.lisp.pamphlet @ echo 137 making ${MID}/c-util.lisp from ${IN}/c-util.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/c-util.lisp.pamphlet >c-util.lisp ) + echo '(tangle "${IN}/c-util.lisp.pamphlet" "*" "c-util.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ <>= @@ -1064,7 +1068,8 @@ ${OUT}/c-util.lisp: ${IN}/c-util.lisp.pamphlet @ echo 221 making ${OUT}/c-util.lisp from ${IN}/c-util.lisp.pamphlet @ rm -f ${OUT}/c-util.${O} @( cd ${OUT} ; \ - ${TANGLE} ${IN}/c-util.lisp.pamphlet >c-util.lisp ) + echo '(tangle "${IN}/c-util.lisp.pamphlet" "*" "c-util.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -1543,7 +1548,7 @@ ${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} ; \ - echo '(tangle "${IN}/c-doc.lisp.pamphlet" "*" "c-dc.lisp")' \ + echo '(tangle "${IN}/c-doc.lisp.pamphlet" "*" "c-doc.lisp")' \ | ${OBJ}/${SYS}/bin/lisp ) @ @@ -1567,7 +1572,8 @@ ${OUT}/clam.${O}: ${MID}/clam.lisp ${MID}/clam.lisp: ${IN}/clam.lisp.pamphlet @ echo 137 making ${MID}/clam.lisp from ${IN}/clam.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/clam.lisp.pamphlet >clam.lisp ) + echo '(tangle "${IN}/clam.lisp.pamphlet" "*" "clam.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ <>= @@ -1575,7 +1581,8 @@ ${OUT}/clam.lisp: ${IN}/clam.lisp.pamphlet @ echo 221 making ${OUT}/clam.lisp from ${IN}/clam.lisp.pamphlet @ rm -f ${OUT}/clam.${O} @( cd ${OUT} ; \ - ${TANGLE} ${IN}/clam.lisp.pamphlet >clam.lisp ) + echo '(tangle "${IN}/clam.lisp.pamphlet" "*" "clam.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -1598,7 +1605,8 @@ ${OUT}/clammed.${O}: ${MID}/clammed.lisp ${MID}/clammed.lisp: ${IN}/clammed.lisp.pamphlet @ echo 137 making ${MID}/clammed.lisp from ${IN}/clammed.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/clammed.lisp.pamphlet >clammed.lisp ) + echo '(tangle "${IN}/clammed.lisp.pamphlet" "*" "clammed.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -1622,7 +1630,8 @@ ${MID}/compiler.lisp: ${IN}/compiler.lisp.pamphlet @ echo 137 making ${MID}/compiler.lisp from \ ${IN}/compiler.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/compiler.lisp.pamphlet >compiler.lisp ) + echo '(tangle "${IN}/compiler.lisp.pamphlet" "*" "compiler.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -1669,7 +1678,8 @@ ${MID}/compress.lisp: ${IN}/compress.lisp.pamphlet @ echo 137 making ${MID}/compress.lisp from \ ${IN}/compress.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/compress.lisp.pamphlet >compress.lisp ) + echo '(tangle "${IN}/compress.lisp.pamphlet" "*" "compress.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -1693,7 +1703,8 @@ ${MID}/database.lisp: ${IN}/database.lisp.pamphlet @ echo 137 making ${MID}/database.lisp from \ ${IN}/database.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/database.lisp.pamphlet >database.lisp ) + echo '(tangle "${IN}/database.lisp.pamphlet" "*" "database.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -1716,7 +1727,8 @@ ${OUT}/define.${O}: ${MID}/define.lisp ${MID}/define.lisp: ${IN}/define.lisp.pamphlet @ echo 137 making ${MID}/define.lisp from ${IN}/define.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/define.lisp.pamphlet >define.lisp ) + echo '(tangle "${IN}/define.lisp.pamphlet" "*" "define.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -1739,7 +1751,8 @@ ${OUT}/format.${O}: ${MID}/format.lisp ${MID}/format.lisp: ${IN}/format.lisp.pamphlet @ echo 137 making ${MID}/format.lisp from ${IN}/format.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/format.lisp.pamphlet >format.lisp ) + echo '(tangle "${IN}/format.lisp.pamphlet" "*" "format.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -1762,7 +1775,8 @@ ${OUT}/functor.${O}: ${MID}/functor.lisp ${MID}/functor.lisp: ${IN}/functor.lisp.pamphlet @ echo 137 making ${MID}/functor.lisp from ${IN}/functor.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/functor.lisp.pamphlet >functor.lisp ) + echo '(tangle "${IN}/functor.lisp.pamphlet" "*" "functor.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -1785,7 +1799,8 @@ ${OUT}/g-boot.${O}: ${MID}/g-boot.lisp ${MID}/g-boot.lisp: ${IN}/g-boot.lisp.pamphlet @ echo 137 making ${MID}/g-boot.lisp from ${IN}/g-boot.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/g-boot.lisp.pamphlet >g-boot.lisp ) + echo '(tangle "${IN}/g-boot.lisp.pamphlet" "*" "g-boot.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ <>= @@ -1793,7 +1808,8 @@ ${OUT}/g-boot.lisp: ${IN}/g-boot.lisp.pamphlet @ echo 221 making ${OUT}/g-boot.lisp from ${IN}/g-boot.lisp.pamphlet @ rm -f ${OUT}/g-boot.${O} @( cd ${OUT} ; \ - ${TANGLE} ${IN}/g-boot.lisp.pamphlet >g-boot.lisp ) + echo '(tangle "${IN}/g-boot.lisp.pamphlet" "*" "g-boot.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -1817,7 +1833,8 @@ ${MID}/g-cndata.lisp: ${IN}/g-cndata.lisp.pamphlet @ echo 137 making ${MID}/g-cndata.lisp from \ ${IN}/g-cndata.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/g-cndata.lisp.pamphlet >g-cndata.lisp ) + echo '(tangle "${IN}/g-cndata.lisp.pamphlet" "*" "g-cndata.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -1840,7 +1857,8 @@ ${OUT}/g-error.${O}: ${MID}/g-error.lisp ${MID}/g-error.lisp: ${IN}/g-error.lisp.pamphlet @ echo 137 making ${MID}/g-error.lisp from ${IN}/g-error.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/g-error.lisp.pamphlet >g-error.lisp ) + echo '(tangle "${IN}/g-error.lisp.pamphlet" "*" "g-error.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -1863,7 +1881,8 @@ ${OUT}/g-opt.${O}: ${MID}/g-opt.lisp ${MID}/g-opt.lisp: ${IN}/g-opt.lisp.pamphlet @ echo 137 making ${MID}/g-opt.lisp from ${IN}/g-opt.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/g-opt.lisp.pamphlet >g-opt.lisp ) + echo '(tangle "${IN}/g-opt.lisp.pamphlet" "*" "g-opt.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -1886,7 +1905,8 @@ ${OUT}/g-timer.${O}: ${MID}/g-timer.lisp ${MID}/g-timer.lisp: ${IN}/g-timer.lisp.pamphlet @ echo 137 making ${MID}/g-timer.lisp from ${IN}/g-timer.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/g-timer.lisp.pamphlet >g-timer.lisp ) + echo '(tangle "${IN}/g-timer.lisp.pamphlet" "*" "g-timer.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -1909,7 +1929,8 @@ ${OUT}/g-util.${O}: ${MID}/g-util.lisp ${MID}/g-util.lisp: ${IN}/g-util.lisp.pamphlet @ echo 137 making ${MID}/g-util.lisp from ${IN}/g-util.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/g-util.lisp.pamphlet >g-util.lisp ) + echo '(tangle "${IN}/g-util.lisp.pamphlet" "*" "g-util.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ <>= @@ -1917,7 +1938,8 @@ ${OUT}/g-util.lisp: ${IN}/g-util.lisp.pamphlet @ echo 221 making ${OUT}/g-util.lisp from ${IN}/g-util.lisp.pamphlet @ rm -f ${OUT}/g-util.${O} @( cd ${OUT} ; \ - ${TANGLE} ${IN}/g-util.lisp.pamphlet >g-util.lisp ) + echo '(tangle "${IN}/g-util.lisp.pamphlet" "*" "g-util.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -1962,7 +1984,8 @@ ${OUT}/i-analy.${O}: ${MID}/i-analy.lisp ${MID}/i-analy.lisp: ${IN}/i-analy.lisp.pamphlet @ echo 137 making ${MID}/i-analy.lisp from ${IN}/i-analy.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/i-analy.lisp.pamphlet >i-analy.lisp ) + echo '(tangle "${IN}/i-analy.lisp.pamphlet" "*" "i-analy.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -1985,7 +2008,8 @@ ${OUT}/i-code.${O}: ${MID}/i-code.lisp ${MID}/i-code.lisp: ${IN}/i-code.lisp.pamphlet @ echo 137 making ${MID}/i-code.lisp from ${IN}/i-code.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/i-code.lisp.pamphlet >i-code.lisp ) + echo '(tangle "${IN}/i-code.lisp.pamphlet" "*" "i-code.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -2009,7 +2033,8 @@ ${MID}/i-coerce.lisp: ${IN}/i-coerce.lisp.pamphlet @ echo 137 making ${MID}/i-coerce.lisp from \ ${IN}/i-coerce.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/i-coerce.lisp.pamphlet >i-coerce.lisp ) + echo '(tangle "${IN}/i-coerce.lisp.pamphlet" "*" "i-coerce.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -2893,7 +2918,8 @@ ${MID}/ht-util.lisp: ${IN}/ht-util.lisp.pamphlet @ echo 137 making ${MID}/ht-util.lisp from \ ${IN}/ht-util.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/ht-util.lisp.pamphlet >ht-util.lisp ) + echo '(tangle "${IN}/ht-util.lisp.pamphlet" "*" "ht-util.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -2939,7 +2965,8 @@ ${OUT}/htcheck.${O}: ${MID}/htcheck.lisp ${MID}/htcheck.lisp: ${IN}/htcheck.lisp.pamphlet @ echo 137 making ${MID}/htcheck.lisp from ${IN}/htcheck.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/htcheck.lisp.pamphlet >htcheck.lisp ) + echo '(tangle "${IN}/htcheck.lisp.pamphlet" "*" "htcheck.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -3143,7 +3170,8 @@ ${MID}/hashcode.lisp: ${IN}/hashcode.lisp.pamphlet @ echo 137 making ${MID}/hashcode.lisp from \ ${IN}/hashcode.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/hashcode.lisp.pamphlet >hashcode.lisp ) + echo '(tangle "${IN}/hashcode.lisp.pamphlet" "*" "hashcode.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ @@ -3216,7 +3244,8 @@ ${OUT}/foam_l.${O}: ${MID}/foam_l.lisp ${MID}/foam_l.lisp: ${IN}/foam_l.lisp.pamphlet @ echo 611 making ${MID}/foam_l.lisp from ${IN}/foam_l.lisp.pamphlet @(cd ${MID} ; \ - ${TANGLE} ${IN}/foam_l.lisp.pamphlet >foam_l.lisp ) + echo '(tangle "${IN}/foam_l.lisp.pamphlet" "*" "foam_l.lisp")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ diff --git a/src/interp/c-util.lisp.pamphlet b/src/interp/c-util.lisp.pamphlet index 5f6d6d6..88bf0c3 100644 --- a/src/interp/c-util.lisp.pamphlet +++ b/src/interp/c-util.lisp.pamphlet @@ -9,7 +9,7 @@ \eject \tableofcontents \eject -<<*>>= +\begin{chunk}{*} (IN-PACKAGE "BOOT" ) @@ -3149,7 +3149,7 @@ (SPADLET |$notseen| (GENSYM)) (|traverse,traverseInner| |ob| |fn| |arg|))))) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/clam.lisp.pamphlet b/src/interp/clam.lisp.pamphlet index 50945a0..1e41121 100644 --- a/src/interp/clam.lisp.pamphlet +++ b/src/interp/clam.lisp.pamphlet @@ -9,7 +9,7 @@ \eject \tableofcontents \eject -<<*>>= +\begin{chunk}{*} (in-package "BOOT") @@ -2377,7 +2377,7 @@ ";")))))))))))) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/clammed.lisp.pamphlet b/src/interp/clammed.lisp.pamphlet index a0c487e..01320da 100644 --- a/src/interp/clammed.lisp.pamphlet +++ b/src/interp/clammed.lisp.pamphlet @@ -9,7 +9,7 @@ \eject \tableofcontents \eject -<<*>>= +\begin{chunk}{*} (in-package "BOOT") @@ -916,7 +916,7 @@ (SETQ |underDomainOf;AL| (MAKE-HASHTABLE 'UEQUAL)) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/compiler.lisp.pamphlet b/src/interp/compiler.lisp.pamphlet index 688e70f..95c5451 100644 --- a/src/interp/compiler.lisp.pamphlet +++ b/src/interp/compiler.lisp.pamphlet @@ -9,7 +9,7 @@ \eject \tableofcontents \eject -<<*>>= +\begin{chunk}{*} (IN-PACKAGE "BOOT" ) @@ -18,8 +18,9 @@ (defvar |$globalMacroStack| nil) (defvar |$abbreviationStack| nil) +\end{chunk} \subsection{compUniquely} -<<*>>= +\begin{chunk}{*} ;compUniquely(x,m,e) == ; $compUniquelyIfTrue: local:= true ; CATCH("compUniquely",comp(x,m,e)) @@ -32,9 +33,9 @@ (SPADLET |$compUniquelyIfTrue| 'T) (CATCH '|compUniquely| (|comp| |x| |m| |e|)))))) -@ +\end{chunk} \subsection{tc} -<<*>>= +\begin{chunk}{*} ;tc() == ; $tripleCache:= nil ; comp($x,$m,$f) @@ -43,10 +44,10 @@ (declare (special |$tripleCache| |$x| |$m| |$f|)) (PROGN (SPADLET |$tripleCache| NIL) (|comp| |$x| |$m| |$f|))) -@ +\end{chunk} \subsection{convertOrCroak} -<<*>>= +\begin{chunk}{*} ;convertOrCroak(T,m) == ; u:= convert(T,m) => u ; userError ["CANNOT CONVERT: ",T.expr,"%l"," OF MODE: ",T.mode,"%l", @@ -68,9 +69,9 @@ (CONS '| TO MODE: | (CONS |m| (CONS '|%l| NIL))))))))))))))) -@ +\end{chunk} \subsection{mkUnion} -<<*>>= +\begin{chunk}{*} ;mkUnion(a,b) == ; b="$" and $Rep is ["Union",:l] => b ; a is ["Union",:l] => @@ -100,9 +101,9 @@ (CONS '|Union| (|union| (CONS |a| NIL) |l|))) ('T (CONS '|Union| (CONS |a| (CONS |b| NIL)))))))) -@ +\end{chunk} \subsection{maxSuperType} -<<*>>= +\begin{chunk}{*} ;maxSuperType(m,e) == ; typ:= get(m,"SuperDomain",e) => maxSuperType(typ,e) ; m @@ -115,9 +116,9 @@ (|maxSuperType| |typ| |e|)) ('T |m|))))) -@ +\end{chunk} \subsection{hasType} -<<*>>= +\begin{chunk}{*} ;hasType(x,e) == ; fn get(x,"condition",e) where ; fn x == @@ -151,9 +152,9 @@ (DEFUN |hasType| (|x| |e|) (|hasType,fn| (|get| |x| '|condition| |e|))) -@ +\end{chunk} \subsection{outputComp} -<<*>>= +\begin{chunk}{*} ;outputComp(x,e) == ; u:=comp(['_:_:,x,$Expression],$Expression,e) => u ; x is ['construct,:argl] => @@ -209,9 +210,9 @@ (CONS |$Expression| (CONS |e| NIL)))) ('T (CONS |x| (CONS |$Expression| (CONS |e| NIL))))))))) -@ +\end{chunk} \subsection{compExpressionList} -<<*>>= +\begin{chunk}{*} ;compExpressionList(argl,m,e) == ; Tl:= [[.,.,e]:= comp(x,$Expression,e) or return "failed" for x in argl] ; Tl="failed" => nil @@ -268,9 +269,9 @@ (CONS |$Expression| (CONS |e| NIL))) |m|)))))))) -@ +\end{chunk} \subsection{compFormPartiallyBottomUp} -<<*>>= +\begin{chunk}{*} ;compFormPartiallyBottomUp(form,m,e,modemapList,partialModeList) == ; mmList:= [mm for mm in modemapList | compFormMatch(mm,partialModeList)] => ; compForm3(form,m,e,mmList) @@ -299,9 +300,9 @@ (CONS |mm| G167545)))))))))) (EXIT (|compForm3| |form| |m| |e| |mmList|)))))))) -@ +\end{chunk} \subsection{compFormMatch} -<<*>>= +\begin{chunk}{*} ;compFormMatch(mm,partialModeList) == ; mm is [[.,.,:argModeList],:.] and match(argModeList,partialModeList) where ; match(a,b) == @@ -331,9 +332,9 @@ 'T))))) (|compFormMatch,match| |argModeList| |partialModeList|))))) -@ +\end{chunk} \subsection{compForm3} -<<*>>= +\begin{chunk}{*} ;compForm3(form is [op,:argl],m,e,modemapList) == ; T:= ; or/ @@ -386,9 +387,9 @@ ('T T$))) ('T T$))))))) -@ +\end{chunk} \subsection{getFormModemaps} -<<*>>= +\begin{chunk}{*} ;getFormModemaps(form is [op,:argl],e) == ; op is ["elt",domain,op1] => ; [x for x in getFormModemaps([op1,:argl],e) | x is [[ =domain,:.],:.]] @@ -528,9 +529,9 @@ (CONS '| arguments| NIL))))))))) ('T |finalModemapList|))))))))) -@ +\end{chunk} \subsection{getConstructorFormOfMode} -<<*>>= +\begin{chunk}{*} ;getConstructorFormOfMode(m,e) == ; isConstructorForm m => m ; if m="$" then m:= "Rep" @@ -554,9 +555,9 @@ 'T)))) (COND ((|isConstructorForm| |v|) (EXIT |v|)))))))))))) -@ +\end{chunk} \subsection{getConstructorMode} -<<*>>= +\begin{chunk}{*} ;getConstructorMode(x,e) == ; atom x => (u:= getmode(x,e) or return nil; getConstructorFormOfMode(u,e)) ; x is ["elt",y,a] => @@ -642,9 +643,9 @@ (|isConstructorForm| R)) (EXIT R)))))))))))) -@ +\end{chunk} \subsection{isConstructorForm} -<<*>>= +\begin{chunk}{*} ;isConstructorForm u == u is [name,:.] and MEMBER(name,'(Record Vector List)) (DEFUN |isConstructorForm| (|u|) @@ -653,9 +654,9 @@ (AND (PAIRP |u|) (PROGN (SPADLET |name| (QCAR |u|)) 'T) (|member| |name| '(|Record| |Vector| |List|)))))) -@ +\end{chunk} \subsection{eltModemapFilter} -<<*>>= +\begin{chunk}{*} ;eltModemapFilter(name,mmList,e) == ; isConstantId(name,e) => ; l:= [mm for mm in mmList | mm is [[.,.,.,sel,:.],:.] and sel=name] => l @@ -720,9 +721,9 @@ NIL))) ('T |mmList|)))))) -@ +\end{chunk} \subsection{seteltModemapFilter} -<<*>>= +\begin{chunk}{*} ;seteltModemapFilter(name,mmList,e) == ; isConstantId(name,e) => ; l:= [mm for (mm:= [[.,.,.,sel,:.],:.]) in mmList | sel=name] => l @@ -769,9 +770,9 @@ NIL))) ('T |mmList|)))))) -@ +\end{chunk} \subsection{substituteIntoFunctorModemap} -<<*>>= +\begin{chunk}{*} ;substituteIntoFunctorModemap(argl,modemap is [[dc,:sig],:.],e) == ; #dc^=#sig => ; keyedSystemError("S2GE0016",['"substituteIntoFunctorModemap", @@ -852,10 +853,10 @@ (CONS |e| NIL))) ('T NIL))))))) -@ +\end{chunk} \subsection{assignError} -<<*>>= +\begin{chunk}{*} ;assignError(val,m',form,m) == ; message:= ; val => @@ -892,9 +893,9 @@ (CONS |m| NIL))))))))))) (|stackMessage| |message|))))) -@ +\end{chunk} \subsection{setqMultiple} -<<*>>= +\begin{chunk}{*} ;setqMultiple(nameList,val,m,e) == ; val is ["CONS",:.] and m=$NoValueMode => ; setqMultipleExplicit(nameList,uncons val,m,e) @@ -1118,9 +1119,9 @@ (CONS |g| NIL)))) (CONS |m'| (CONS |e| NIL))))))))))))))) -@ +\end{chunk} \subsection{setqMultipleExplicit} -<<*>>= +\begin{chunk}{*} ;setqMultipleExplicit(nameList,valList,m,e) == ; #nameList^=#valList => ; stackMessage ["Multiple assignment error; # of items in: ",nameList, @@ -1274,9 +1275,9 @@ (CONS (CADDR (|last| |reAssignList|)) NIL))))))))))))) -@ +\end{chunk} \subsection{replaceExitEtc} -<<*>>= +\begin{chunk}{*} ;replaceExitEtc(x,tag,opFlag,opMode) == ; (fn(x,tag,opFlag,opMode); x) where ; fn(x,tag,opFlag,opMode) == @@ -1362,9 +1363,9 @@ (DEFUN |replaceExitEtc| (|x| |tag| |opFlag| |opMode|) (PROGN (|replaceExitEtc,fn| |x| |tag| |opFlag| |opMode|) |x|)) -@ +\end{chunk} \subsection{compHasFormat} -<<*>>= +\begin{chunk}{*} ;compHasFormat (pred is ["has",olda,b]) == ; argl := rest $form ; formals := TAKE(#argl,$FormalMapVariableList) @@ -1451,9 +1452,9 @@ (CONS '|HasCategory| (CONS |a| (CONS (|mkDomainConstructor| |b|) NIL)))))))))) -@ +\end{chunk} \subsection{canReturn} -<<*>>= +\begin{chunk}{*} ;canReturn(expr,level,exitCount,ValueFlag) == --SPAD: exit and friends ; atom expr => ValueFlag and level=exitCount ; (op:= first expr)="QUOTE" => ValueFlag and level=exitCount @@ -1711,9 +1712,9 @@ |exitCount| |ValueFlag|))))))))) ('T (|systemErrorHere| "canReturn"))))))) -@ +\end{chunk} \subsection{compBoolean} -<<*>>= +\begin{chunk}{*} ;compBoolean(p,m,E) == ; [p',m,E]:= comp(p,m,E) or return nil ; [p',m,getSuccessEnvironment(p,E),getInverseEnvironment(p,E)] @@ -1731,9 +1732,9 @@ (CONS (|getSuccessEnvironment| |p| E) (CONS (|getInverseEnvironment| |p| E) NIL)))))))) -@ +\end{chunk} \subsection{getSuccessEnvironment} -<<*>>= +\begin{chunk}{*} ;getSuccessEnvironment(a,e) == ; -- the next four lines try to ensure that explicit special-case tests ; -- prevent implicit ones from being generated @@ -1806,9 +1807,9 @@ (CONS |a| (|get| |x| '|condition| |e|)) |e|)) ('T |e|))))) -@ +\end{chunk} \subsection{getInverseEnvironment} -<<*>>= +\begin{chunk}{*} ;getInverseEnvironment(a,E) == ; atom a => E ; [op,:argl]:= a @@ -1922,9 +1923,9 @@ E)))) ('T E)))))))) -@ +\end{chunk} \subsection{getUnionMode} -<<*>>= +\begin{chunk}{*} ;getUnionMode(x,e) == ; m:= ; atom x => getmode(x,e) @@ -1941,9 +1942,9 @@ ('T (RETURN NIL)))) (|isUnionMode| |m| |e|))))) -@ +\end{chunk} \subsection{isUnionMode} -<<*>>= +\begin{chunk}{*} ;isUnionMode(m,e) == ; m is ["Union",:.] => m ; (m':= getmode(m,e)) is ["Mapping",["UnionCategory",:.]] => CADR m' @@ -1978,9 +1979,9 @@ ('T NIL))) ('T NIL))))) -@ +\end{chunk} \subsection{compFromIf} -<<*>>= +\begin{chunk}{*} ;compFromIf(a,m,E) == ; a="noBranch" => ["noBranch",m,E] ; true => comp(a,m,E) @@ -1991,16 +1992,16 @@ (CONS '|noBranch| (CONS |m| (CONS E NIL)))) ('T (|comp| |a| |m| E)))) -@ +\end{chunk} \subsection{quotify} -<<*>>= +\begin{chunk}{*} ;quotify x == x (DEFUN |quotify| (|x|) |x|) -@ +\end{chunk} \subsection{unknownTypeError} -<<*>>= +\begin{chunk}{*} ;unknownTypeError name == ; name:= ; name is [op,:.] => op @@ -2023,14 +2024,14 @@ (CONS '|%d| (CONS '|is not a known type| NIL)))) NIL))))) -@ +\end{chunk} \section{Functions for coercion by the compiler} \subsection{coerce} The function coerce is used by the old compiler for coercions. The function coerceInteractive is used by the interpreter. One should always call the correct function, since the representation of basic objects may not be the same. -<<*>>= +\begin{chunk}{*} ;coerce(T,m) == ; $InteractiveMode => ; keyedSystemError("S2GE0016",['"coerce", @@ -2084,9 +2085,9 @@ of basic objects may not be the same. NIL) ('T (|stackMessage| (|coerce,fn| (CAR T$) (CADR T$) |m|))))))))) -@ +\end{chunk} \subsection{coerceEasy} -<<*>>= +\begin{chunk}{*} ;coerceEasy(T,m) == ; m=$EmptyMode => T ; m=$NoValueMode or m=$Void => [T.expr,m,T.env] @@ -2119,9 +2120,9 @@ of basic objects may not be the same. (|modeEqualSubst| (CADR T$) |m| (CADDR T$))) (CONS (CAR T$) (CONS |m| (CONS (CADDR T$) NIL)))))) -@ +\end{chunk} \subsection{coerceSubset} -<<*>>= +\begin{chunk}{*} ;coerceSubset([x,m,e],m') == ; isSubset(m,m',e) or m="Rep" and m'="$" => [x,m',e] ; m is ['SubDomain,=m',:.] => [x,m',e] @@ -2160,9 +2161,9 @@ of basic objects may not be the same. (CONS |x| (CONS |m'| (CONS |e| NIL)))) ('T NIL)))))) -@ +\end{chunk} \subsection{coerceHard} -<<*>>= +\begin{chunk}{*} ;coerceHard(T,m) == ; $e: local:= T.env ; m':= T.mode @@ -2241,9 +2242,9 @@ of basic objects may not be the same. ('T (|coerceExtraHard| T$ |m|)))) ('T (|coerceExtraHard| T$ |m|))))))) -@ +\end{chunk} \subsection{coerceExtraHard} -<<*>>= +\begin{chunk}{*} ;coerceExtraHard(T is [x,m',e],m) == ; T':= autoCoerceByModemap(T,m) => T' ; isUnionMode(m',e) is ["Union",:l] and (t:= hasType(x,e)) and @@ -2281,9 +2282,9 @@ of basic objects may not be the same. (CONS |m| (CONS |e| NIL)))) ('T NIL)))))) -@ +\end{chunk} \subsection{coerceable} -<<*>>= +\begin{chunk}{*} ;coerceable(m,m',e) == ; m=m' => m ; -- must find any free parameters in m @@ -2303,9 +2304,9 @@ of basic objects may not be the same. |m'|) ('T NIL))))) -@ +\end{chunk} \subsection{coerceExit} -<<*>>= +\begin{chunk}{*} ;coerceExit([x,m,e],m') == ; m':= resolve(m,m') ; x':= replaceExitEtc(x,catchTag:= MKQ GENSYM(),"TAGGEDexit",$exitMode) @@ -2329,9 +2330,9 @@ of basic objects may not be the same. (CONS |m| (CONS |e| NIL))) |m'|))))) -@ +\end{chunk} \subsection{coerceByModemap} -<<*>>= +\begin{chunk}{*} ;coerceByModemap([x,m,e],m') == ;--+ modified 6/27 for new runtime system ; u:= @@ -2404,9 +2405,9 @@ of basic objects may not be the same. (CONS (CONS '|call| (CONS |fn| (CONS |x| NIL))) (CONS |m'| (CONS |e| NIL)))))))) -@ +\end{chunk} \subsection{autoCoerceByModemap} -<<*>>= +\begin{chunk}{*} ;autoCoerceByModemap([x,source,e],target) == ; u:= ; [cexpr @@ -2553,11 +2554,11 @@ of basic objects may not be the same. (CONS (CONS '|call| (CONS |fn| (CONS |x| NIL))) (CONS |target| (CONS |e| NIL)))))))))) -@ +\end{chunk} \subsection{resolve} Very old resolve should only be used in the old (preWATT) compiler -<<*>>= +\begin{chunk}{*} ;resolve(din,dout) == ; din=$NoValueMode or dout=$NoValueMode => $NoValueMode ; dout=$EmptyMode => din @@ -2581,9 +2582,9 @@ should only be used in the old (preWATT) compiler ('T (|mkUnion| |din| |dout|)))) ('T |dout|))) -@ +\end{chunk} \subsection{modeEqual} -<<*>>= +\begin{chunk}{*} ;modeEqual(x,y) == ; -- this is the late modeEqual ; -- orders Unions @@ -2648,9 +2649,9 @@ should only be used in the old (preWATT) compiler (AND G170749 (|modeEqual| |u| |v|)))))))))))))) -@ +\end{chunk} \subsection{modeEqualSubst} -<<*>>= +\begin{chunk}{*} ;modeEqualSubst(m1,m,e) == ; modeEqual(m1, m) => true ; atom m1 => get(m1,"value",e) is [m',:.] and modeEqual(m',m) @@ -2697,9 +2698,9 @@ should only be used in the old (preWATT) compiler |e|))))))))) ('T NIL)))))) -@ +\end{chunk} \subsection{convertSpadToAsFile} -<<*>>= +\begin{chunk}{*} ;convertSpadToAsFile path == ; -- can assume path has type = .spad ; $globalMacroStack : local := nil -- for spad -> as translator @@ -2775,9 +2776,9 @@ should only be used in the old (preWATT) compiler (CATCH 'SPAD_READER (|compiler| (CONS |path| NIL))) (SHUT |$outStream|) (|mkCheck|) '|done|)))))) -@ +\end{chunk} \subsection{compilerDoitWithScreenedLisplib} -<<*>>= +\begin{chunk}{*} ;compilerDoitWithScreenedLisplib(constructor, fun) == ; EMBED('RWRITE, ; '(LAMBDA (KEY VALUE STREAM) @@ -2803,7 +2804,7 @@ should only be used in the old (preWATT) compiler (|compilerDoit| |constructor| |fun|) (UNEMBED 'RWRITE)))) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/compress.lisp.pamphlet b/src/interp/compress.lisp.pamphlet index c625dc5..741dc9e 100644 --- a/src/interp/compress.lisp.pamphlet +++ b/src/interp/compress.lisp.pamphlet @@ -9,7 +9,7 @@ \eject \tableofcontents \eject -<<*>>= +\begin{chunk}{*} (IN-PACKAGE "BOOT" ) @@ -85,7 +85,7 @@ (|minimalise,min| |x|) |x|)))) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/database.lisp.pamphlet b/src/interp/database.lisp.pamphlet index 4c0ebb9..3897ebd 100644 --- a/src/interp/database.lisp.pamphlet +++ b/src/interp/database.lisp.pamphlet @@ -9,7 +9,7 @@ \eject \tableofcontents \eject -<<*>>= +\begin{chunk}{*} (IN-PACKAGE "BOOT" ) (SETANDFILEQ |$getUnexposedOperations| 'T) @@ -2440,7 +2440,7 @@ |found|)))))) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/debugsys.lisp.pamphlet b/src/interp/debugsys.lisp.pamphlet index a26734c..36c8fc7 100644 --- a/src/interp/debugsys.lisp.pamphlet +++ b/src/interp/debugsys.lisp.pamphlet @@ -46,12 +46,12 @@ in the handling of their autoload code. The use-fast-links function is a speed optimization on function calls. It basically assumes that the call has been properly constructed so the compiler can skip argument checks. -<>= +\begin{chunk}{use-fast-links} #+:gcl (si::use-fast-links nil) -@ +\end{chunk} \section{The debugsys.lisp code} -<<*>>= -<> +\begin{chunk}{*} +\getchunk{use-fast-links} (unless (system:getenv "AXIOM") (format t "The AXIOM shell variable must be set~%") (format t "The likely value is axiom/mnt/linux~%")) @@ -75,11 +75,11 @@ constructed so the compiler can skip argument checks. (defun thesymb (file) (intern (concatenate 'string (system:getenv "AXIOM") "/../.." file))) (progn (setq timestamp (user::thepath "/src/timestamp")) (yearweek)) -@ +\end{chunk} The [[*build-version*]] variable is only introduced into the system from the Makefile. Since this isn't going thru the Makefile when loaded by hand we need to establish a value. -<<*>>= +\begin{chunk}{*} (setq *build-version* "debug") (build-interpsys (append @@ -246,7 +246,7 @@ loaded by hand we need to establish a value. (user::thepath (concatenate 'string "/mnt/" *sys* "/bin/"))) (gbc t) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/define.lisp.pamphlet b/src/interp/define.lisp.pamphlet index 66c404f..d7c669e 100644 --- a/src/interp/define.lisp.pamphlet +++ b/src/interp/define.lisp.pamphlet @@ -9,7 +9,7 @@ \eject \tableofcontents \eject -<<*>>= +\begin{chunk}{*} (IN-PACKAGE "BOOT" ) ;--% FUNCTIONS WHICH MUNCH ON == STATEMENTS @@ -4882,7 +4882,7 @@ (|error| '|CategoryDefaults is a reserved name|)) ('T (|buildFunctor| |form| |signature| |data| |localParList| |e|)))) -@ +\end{chunk} \section{compCapsuleItems} The variable [[data]] appears to be unbound at runtime. Optimized code won't check for this but interpreted code fails. We should @@ -4895,7 +4895,7 @@ The [[compCapsuleInner]] function in this file LOOKS like it sets data and expects code to manipulate the assigned data structure. Since we can't be sure we take the least disruptive course of action. -<<*>>= +\begin{chunk}{*} ;compCapsuleItems(itemlist,$predl,$e) == ; $TOP__LEVEL: local := nil ; $myFunctorBody :local -- := data ---needed for translator @@ -5927,7 +5927,7 @@ Since we can't be sure we take the least disruptive course of action. (PUSH (MKQ (CONS (CDR |x|) (CONS |pred| NIL))) |$sigList|))))))))))) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/foam_l.lisp.pamphlet b/src/interp/foam_l.lisp.pamphlet index a4e1932..e500e71 100644 --- a/src/interp/foam_l.lisp.pamphlet +++ b/src/interp/foam_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,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}{*} + ;;; ;;; FOAM Operations for Common Lisp ;;; @@ -257,13 +257,13 @@ (defmacro |SFloEQ| (x y) `(= (the |SFlo| ,x) (the |SFlo| ,y))) (defmacro |SFloNE| (x y) `(/= (the |SFlo| ,x) (the |SFlo| ,y))) (defmacro |SFloNegate| (x) `(the |SFlo| (- (the |SFlo| ,x)))) -(defmacro |SFloNext| (x) `(the |SFlo| (+ (the |SFlo| ,x) 1.0s0))) -(defmacro |SFloPrev| (x) `(the |SFlo| (- (the |SFlo| ,x) 1.0s0))) +(defmacro |SFloNext| (x) `(the |SFlo| (+ (the |SFlo| ,x) 1.0s0))) +(defmacro |SFloPrev| (x) `(the |SFlo| (- (the |SFlo| ,x) 1.0s0))) (defmacro |SFloMinus| (x y) `(the |SFlo| (- (the |SFlo| ,x) (the |SFlo| ,y)))) (defmacro |SFloTimes| (x y) `(the |SFlo| (* (the |SFlo| ,x) (the |SFlo| ,y)))) (defmacro |SFloTimesPlus| (x y z) `(the |SFlo| (+ (* (the |SFlo| ,x) (the |SFlo| ,y)) (the |SFlo| ,z)))) -(defmacro |SFloDivide| (x y) `(the |SFlo| (/ (the |SFlo| ,x) (the |SFlo| ,y)))) +(defmacro |SFloDivide| (x y) `(the |SFlo| (/ (the |SFlo| ,x) (the |SFlo| ,y)))) (defmacro |SFloRPlus| (x y r) `(error "unimplemented operation -- SFloRPlus")) (defmacro |SFloRMinus| (x y r) `(error "unimplemented operation -- SFloRTimes")) (defmacro |SFloRTimes| (x y r) `(error "unimplemented operation -- SFloRTimes")) @@ -291,8 +291,8 @@ (defmacro |DFloLT| (x y) `(< (the |DFlo| ,x) (the |DFlo| ,y))) (defmacro |DFloNE| (x y) `(/= (the |DFlo| ,x) (the |DFlo| ,y))) (defmacro |DFloNegate| (x) `(the |DFlo| (- (the |DFlo| ,x)))) -(defmacro |DFloNext| (x) `(the |DFlo| (+ (the |DFlo| ,x) 1.0d0))) -(defmacro |DFloPrev| (x) `(the |DFlo| (- (the |DFlo| ,x) 1.0d0))) +(defmacro |DFloNext| (x) `(the |DFlo| (+ (the |DFlo| ,x) 1.0d0))) +(defmacro |DFloPrev| (x) `(the |DFlo| (- (the |DFlo| ,x) 1.0d0))) (defmacro |DFloPlus| (x y) `(the |DFlo| (+ (the |DFlo| ,x) (the |DFlo| ,y)))) (defmacro |DFloMinus| (x y) `(the |DFlo| (- (the |DFlo| ,x) (the |DFlo| ,y)))) (defmacro |DFloTimes| (x y) `(the |DFlo| (* (the |DFlo| ,x) (the |DFlo| ,y)))) @@ -436,7 +436,7 @@ (defmacro |BIntBit| (x i) `(let ((xx ,x) (ii ,i)) (declare (type |BInt| xx) (type |SInt| ii)) - (logbitp ii xx))) + (logbitp ii xx))) ;;(defmacro |BIntAbs| (x) `(the |BInt| (abs (the |BInt| ,x)))) (defmacro |PtrNil| () ()) @@ -466,10 +466,10 @@ (defmacro |ScanSFlo| (arr i) `(read-from-string ,arr nil (|SFlo0|) - :start ,i :preserve-whitespace t)) + :start ,i :preserve-whitespace t)) (defmacro |ScanDFlo| (arr i) `(read-from-string ,arr nil (|DFlo0|) - :start ,i :preserve-whitespace t)) + :start ,i :preserve-whitespace t)) (defmacro |ScanSInt| (arr i) `(parse-integer ,arr :start ,i :junk-allowed t)) (defmacro |ScanBInt| (arr i) @@ -500,14 +500,14 @@ (defmacro |SetClosFun| (x y) `(rplaca ,x ,y)) (defmacro |SetClosEnv| (x y) `(rplacd ,x ,y)) -(defmacro |MakeEnv| (x y) +(defmacro |MakeEnv| (x y) `(let ((xx ,x) (yy ,y)) (cons yy (cons xx nil)))) -(defmacro |EnvLevel| (x) `(car ,x)) -(defmacro |EnvNext| (x) `(cadr ,x)) -(defmacro |EnvInfo| (x) `(if (and (consp ,x) (consp (cdr ,x))) - (cddr ,x) nil)) -(defmacro |SetEnvInfo| (x val) `(rplacd (cdr ,x) ,val)) +(defmacro |EnvLevel| (x) `(car ,x)) +(defmacro |EnvNext| (x) `(cadr ,x)) +(defmacro |EnvInfo| (x) `(if (and (consp ,x) (consp (cdr ,x))) + (cddr ,x) nil)) +(defmacro |SetEnvInfo| (x val) `(rplacd (cdr ,x) ,val)) #+:CCL (defmacro |FoamEnvEnsure| (e) @@ -558,32 +558,32 @@ (defun insert-types (slots) (mapcar #'(lambda (slot) - `(,(car slot) ,(type2init (cadr slot)) - :type ,(cadr slot))) - slots)) + `(,(car slot) ,(type2init (cadr slot)) + :type ,(cadr slot))) + slots)) (defmacro |RNew| (name) (let* ((struct-args (get name 'struct-args)) - (init-args (mapcar #'(lambda (x) (type2init (cadr x))) - struct-args)) - (count (length struct-args))) + (init-args (mapcar #'(lambda (x) (type2init (cadr x))) + struct-args)) + (count (length struct-args))) (cond ((> count 2) `(vector ,@init-args)) - ((= count 2) `(cons ,@init-args)) - (t `(list ,@init-args))))) + ((= count 2) `(cons ,@init-args)) + (t `(list ,@init-args))))) (defmacro |RElt| (name field index rec) (let ((count (length (get name 'struct-args)))) (cond ((> count 2) `(svref ,rec ,index)) - ((= count 2) - (if (zerop index) `(car ,rec) `(cdr ,rec))) - (t `(car ,rec))))) + ((= count 2) + (if (zerop index) `(car ,rec) `(cdr ,rec))) + (t `(car ,rec))))) (defmacro |SetRElt| (name field index rec val) (let ((count (length (get name 'struct-args)))) (cond ((> count 2) `(setf (svref ,rec ,index) ,val)) - ((= count 2) - (if (zerop index) `(rplaca ,rec ,val) `(rplacd ,rec ,val))) - (t `(rplaca ,rec ,val))))) + ((= count 2) + (if (zerop index) `(rplaca ,rec ,val) `(rplacd ,rec ,val))) + (t `(rplaca ,rec ,val))))) (defmacro |AElt| (name index) `(aref ,name ,index)) @@ -608,25 +608,25 @@ (defmacro |SetLex| (accessor n var val) `(progn ;; (print ',accessor) - (setf (,accessor ,var) ,val))) + (setf (,accessor ,var) ,val))) ;; Atomic arguments for fun don't need a let to hold the fun. ;; CCall's with arguments need a let to hold the prog and the env. (defmacro |CCall| (fun &rest args) (cond ((and (atom fun) (null args)) - `(funcall (|FunProg| (|ClosFun| ,fun)) (|ClosEnv| ,fun))) - ((null args) - `(let ((c ,fun)) - (funcall (|FunProg| (|ClosFun| c)) (|ClosEnv| c)))) - ((atom fun) - `(let ((fun (|FunProg| (|ClosFun| ,fun))) - (env (|ClosEnv| ,fun))) - (funcall fun ,@args env))) - (t - `(let ((c ,fun)) - (let ((fun (|FunProg| (|ClosFun| c))) - (env (|ClosEnv| c))) - (funcall fun ,@args env)))))) + `(funcall (|FunProg| (|ClosFun| ,fun)) (|ClosEnv| ,fun))) + ((null args) + `(let ((c ,fun)) + (funcall (|FunProg| (|ClosFun| c)) (|ClosEnv| c)))) + ((atom fun) + `(let ((fun (|FunProg| (|ClosFun| ,fun))) + (env (|ClosEnv| ,fun))) + (funcall fun ,@args env))) + (t + `(let ((c ,fun)) + (let ((fun (|FunProg| (|ClosFun| c))) + (env (|ClosEnv| c))) + (funcall fun ,@args env)))))) (defmacro |FoamFree| (o) '()) @@ -640,8 +640,8 @@ (defmacro defprog (type temps &rest body) `(progn (defun ,(caar type) ,(mapcar #'car (cadr type)) - (typed-let ,temps ,@body)) - (alloc-prog-info #',(caar type) (make-FoamProgInfoStruct)))) + (typed-let ,temps ,@body)) + (alloc-prog-info #',(caar type) (make-FoamProgInfoStruct)))) (defmacro defspecials (&rest lst) `(proclaim '(special ,@lst))) @@ -658,17 +658,17 @@ #-:CCL (defmacro typed-let (letvars &rest forms) `(let ,(mapcar #'(lambda (var) - (list (car var) (type2init (cadr var)))) - letvars ) + (list (car var) (type2init (cadr var)))) + letvars ) (declare ,@(mapcar #'(lambda (var) - (list 'type (cadr var) (car var))) - letvars)) + (list 'type (cadr var) (car var))) + letvars)) ,@forms)) #+:CCL (defmacro typed-let (letvars &rest forms) `(let ,(mapcar #'(lambda (var) (car var)) - letvars ) + letvars ) ,@forms)) (defmacro cases (&rest junk) @@ -678,15 +678,15 @@ ;;; Boot macros (defmacro file-exports (lst) `(eval-when (load eval) - (when (fboundp 'process-export-entry) - (mapcar #'process-export-entry ,lst)) - nil)) + (when (fboundp 'process-export-entry) + (mapcar #'process-export-entry ,lst)) + nil)) (defmacro file-imports (lst) `(eval-when (load eval) - (when (fboundp 'process-import-entry) - (mapcar #'process-import-entry ,lst)) - nil)) + (when (fboundp 'process-import-entry) + (mapcar #'process-import-entry ,lst)) + nil)) (defmacro ignore-var (var) `(declare (ignore ,var))) @@ -695,8 +695,8 @@ (if (eq type '|Char|) `(make-string ,size) `(make-array ,size - :element-type ',type - :initial-element ,(type2init type)))) + :element-type ',type + :initial-element ,(type2init type)))) #-:CCL (defun type2init (x) @@ -734,9 +734,9 @@ ;needs to stop when it gets a null character (defun |strLength| (s) (dotimes (i (length s)) - (let ((c (schar s i))) - (if (char= c |CharCode0|) - (return i)))) + (let ((c (schar s i))) + (if (char= c |CharCode0|) + (return i)))) (length s)) (defun |formatSInt| (n) (format nil "~D" n)) @@ -752,10 +752,10 @@ ;needs to stop when it gets a null character (defun |printString| (cs s) (dotimes (i (length s)) - (let ((c (schar s i))) - (if (char= c |CharCode0|) - (return i) - (princ c cs))))) + (let ((c (schar s i))) + (if (char= c |CharCode0|) + (return i) + (princ c cs))))) (defun |printSInt| (cs n) (format cs "~D" n)) (defun |printBInt| (cs n) (format cs "~D" n)) @@ -776,46 +776,46 @@ ;; the given input stream (defun |fgetss| (s i1 i2 f) (labels ((aux (n) - (if (= n i2) - (progn (setf (schar s n) (code-char 0)) - (- n i1)) - (let ((c (read-char f))) - (setf (schar s n) c) - (if (equal c #\newline) - (progn (setf (char s (+ n 1)) (code-char 0)) - (- n i1)) - (aux (+ n 1))))))) - (aux i1))) - + (if (= n i2) + (progn (setf (schar s n) (code-char 0)) + (- n i1)) + (let ((c (read-char f))) + (setf (schar s n) c) + (if (equal c #\newline) + (progn (setf (char s (+ n 1)) (code-char 0)) + (- n i1)) + (aux (+ n 1))))))) + (aux i1))) + ;; write s[i1..i2) to the output stream f ;; stop on any null characters (defun |fputss| (s i1 i2 f) (labels ((aux (n) - (if (= n i2) (- n i1) - (let ((c (schar s n))) - (if (equal (code-char 0) c) - (- n i1) - (progn (princ c f) - (aux (+ n 1)))))))) - (setq i2 (if (minusp i2) (|strLength| s) - (min i2 (|strLength| s)))) - (aux i1))) + (if (= n i2) (- n i1) + (let ((c (schar s n))) + (if (equal (code-char 0) c) + (- n i1) + (progn (princ c f) + (aux (+ n 1)))))))) + (setq i2 (if (minusp i2) (|strLength| s) + (min i2 (|strLength| s)))) + (aux i1))) ;; function for compiling and loading from lisp (defun compile-as-file (file &optional (opts nil)) (let* ((path (pathname file)) - (name (pathname-name path)) - (dir (pathname-directory path)) - (type (pathname-type path)) - (lpath (make-pathname :name name :type "l")) - (cpath (make-pathname :name name :type "o"))) + (name (pathname-name path)) + (dir (pathname-directory path)) + (type (pathname-type path)) + (lpath (make-pathname :name name :type "l")) + (cpath (make-pathname :name name :type "o"))) (if (null type) - (setq path (make-pathname :directory dir :name name :type "as"))) + (setq path (make-pathname :directory dir :name name :type "as"))) (if opts - (system (format nil "axiomxl ~A -Flsp ~A" opts (namestring path))) - (system (format nil "axiomxl -Flsp ~A" (namestring path)))) + (system (format nil "axiomxl ~A -Flsp ~A" opts (namestring path))) + (system (format nil "axiomxl -Flsp ~A" (namestring path)))) (compile-file (namestring lpath)) (load (namestring cpath)))) @@ -852,10 +852,10 @@ (defun |Halt| (n) (error (cond ((= n 101) "System Error: Unfortunate use of dependant type") - ((= n 102) "User error: Reached a 'never'") - ((= n 103) "User error: Bad union branch") - ((= n 104) "User error: Assertion failed") - (t (format nil "Unknown halt condition ~a" n))))) + ((= n 102) "User error: Reached a 'never'") + ((= n 103) "User error: Bad union branch") + ((= n 104) "User error: Assertion failed") + (t (format nil "Unknown halt condition ~a" n))))) ;; debuging (defvar *foam-debug-var* nil) (defun |fiGetDebugVar| () *foam-debug-var*) @@ -894,7 +894,7 @@ ( (|politicallySound| (car u) (car v)) (|magicEq1| (cdr u) (cdr v))) nil )) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/format.lisp.pamphlet b/src/interp/format.lisp.pamphlet index daa61c9..07de055 100644 --- a/src/interp/format.lisp.pamphlet +++ b/src/interp/format.lisp.pamphlet @@ -9,7 +9,7 @@ \eject \tableofcontents \eject -<<*>>= +\begin{chunk}{*} (IN-PACKAGE "BOOT" ) ;--% Functions for display formatting system objects @@ -3073,7 +3073,7 @@ ((ATOM (SPADLET |r| (|form2String| |u|))) (CONS |r| NIL)) ('T |r|))))) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/fortcall.lisp.pamphlet b/src/interp/fortcall.lisp.pamphlet index efb0317..58010e3 100644 --- a/src/interp/fortcall.lisp.pamphlet +++ b/src/interp/fortcall.lisp.pamphlet @@ -9,7 +9,7 @@ \eject \tableofcontents \eject -<<*>>= +\begin{chunk}{*} (IN-PACKAGE "BOOT" ) @@ -2955,7 +2955,7 @@ NIL)) NIL))))))))))))) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/functor.lisp.pamphlet b/src/interp/functor.lisp.pamphlet index 9594d41..26a87ba 100644 --- a/src/interp/functor.lisp.pamphlet +++ b/src/interp/functor.lisp.pamphlet @@ -9,7 +9,7 @@ \eject \tableofcontents \eject -<<*>>= +\begin{chunk}{*} (IN-PACKAGE "BOOT" ) ;--% Domain printing @@ -4549,7 +4549,7 @@ (SPADLET |p| (SUBLISLIS |args| |$TriangleVariableList| |p|)) (SUBLISLIS |args| |$FormalMapVariableList| |p|))) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/g-boot.lisp.pamphlet b/src/interp/g-boot.lisp.pamphlet index 44aeded..990eea3 100644 --- a/src/interp/g-boot.lisp.pamphlet +++ b/src/interp/g-boot.lisp.pamphlet @@ -9,7 +9,7 @@ \eject \tableofcontents \eject -<<*>>= +\begin{chunk}{*} (IN-PACKAGE "BOOT" ) @@ -1186,7 +1186,7 @@ (|bootLabelsForGO| |e|) (|bootTran| |e|))))) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/g-cndata.lisp.pamphlet b/src/interp/g-cndata.lisp.pamphlet index cce4edb..930af69 100644 --- a/src/interp/g-cndata.lisp.pamphlet +++ b/src/interp/g-cndata.lisp.pamphlet @@ -9,7 +9,7 @@ \eject \tableofcontents \eject -<<*>>= +\begin{chunk}{*} (IN-PACKAGE "BOOT" ) @@ -707,7 +707,7 @@ (RETURN (QCAR |l|)))) (SPADLET |l| (QCDR |l|)))))))))) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/g-error.lisp.pamphlet b/src/interp/g-error.lisp.pamphlet index eff338b..9d08dd7 100644 --- a/src/interp/g-error.lisp.pamphlet +++ b/src/interp/g-error.lisp.pamphlet @@ -9,7 +9,7 @@ \eject \tableofcontents \eject -<<*>>= +\begin{chunk}{*} (IN-PACKAGE "BOOT" ) (SETANDFILEQ |$SystemError| '|SystemError|) @@ -378,7 +378,7 @@ (COND (|$printMsgsToFile| (|sayMSG2File| |msg'|))) (|spadThrow|))))) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/g-opt.lisp.pamphlet b/src/interp/g-opt.lisp.pamphlet index 78ed045..2310744 100644 --- a/src/interp/g-opt.lisp.pamphlet +++ b/src/interp/g-opt.lisp.pamphlet @@ -9,7 +9,7 @@ \eject \tableofcontents \eject -<<*>>= +\begin{chunk}{*} (IN-PACKAGE "BOOT" ) @@ -1538,7 +1538,7 @@ (RECORDCOPY |optRECORDCOPY|))) (MAKEPROP (CAR |x|) 'OPTIMIZE (CADR |x|)))) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/g-timer.lisp.pamphlet b/src/interp/g-timer.lisp.pamphlet index 8b55510..ac6314b 100644 --- a/src/interp/g-timer.lisp.pamphlet +++ b/src/interp/g-timer.lisp.pamphlet @@ -9,7 +9,7 @@ \eject \tableofcontents \eject -<<*>>= +\begin{chunk}{*} (IN-PACKAGE "BOOT" ) @@ -659,7 +659,7 @@ (DEFUN |statisticsSummary| () "No statistics available.") -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/g-util.lisp.pamphlet b/src/interp/g-util.lisp.pamphlet index c3c0804..2ef35cf 100644 --- a/src/interp/g-util.lisp.pamphlet +++ b/src/interp/g-util.lisp.pamphlet @@ -9,7 +9,7 @@ \eject \tableofcontents \eject -<<*>>= +\begin{chunk}{*} (IN-PACKAGE "BOOT" ) @@ -1471,7 +1471,7 @@ (|char| '&))))) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/hashcode.lisp.pamphlet b/src/interp/hashcode.lisp.pamphlet index 25934d1..e7f5757 100644 --- a/src/interp/hashcode.lisp.pamphlet +++ b/src/interp/hashcode.lisp.pamphlet @@ -9,7 +9,7 @@ \eject \tableofcontents \eject -<<*>>= +\begin{chunk}{*} (IN-PACKAGE "BOOT" ) ;-- Type hasher for old compiler style type names which produces a hash code @@ -216,7 +216,7 @@ (SPADLET |$VoidHash| (|hashString| "Void")) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/ht-util.lisp.pamphlet b/src/interp/ht-util.lisp.pamphlet index 6eabe42..6ef0a96 100644 --- a/src/interp/ht-util.lisp.pamphlet +++ b/src/interp/ht-util.lisp.pamphlet @@ -10,7 +10,7 @@ \tableofcontents \eject \section{License} -<<*>>= +\begin{chunk}{*} (IN-PACKAGE "BOOT" ) ;-- HyperTeX Utilities for generating basic Command pages @@ -4550,7 +4550,7 @@ ('T (SPADLET |u| (SUBSTRING |u| 0 |k|)))) |u|))))) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/htcheck.lisp.pamphlet b/src/interp/htcheck.lisp.pamphlet index de7f665..87487c3 100644 --- a/src/interp/htcheck.lisp.pamphlet +++ b/src/interp/htcheck.lisp.pamphlet @@ -9,7 +9,7 @@ \eject \tableofcontents \eject -<<*>>= +\begin{chunk}{*} (IN-PACKAGE "BOOT" ) ;$primitiveHtCommands := '( @@ -272,7 +272,7 @@ (|buildHtMacroTable|) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/hypertex.lisp.pamphlet b/src/interp/hypertex.lisp.pamphlet index e3325ce..cb3411b 100644 --- a/src/interp/hypertex.lisp.pamphlet +++ b/src/interp/hypertex.lisp.pamphlet @@ -9,7 +9,7 @@ \eject \tableofcontents \eject -<<*>>= +\begin{chunk}{*} (IN-PACKAGE "BOOT" ) @@ -133,7 +133,7 @@ (declare (special |$MenuServer| |$SpadError|)) (|sockSendInt| |$MenuServer| |$SpadError|)) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/i-analy.lisp.pamphlet b/src/interp/i-analy.lisp.pamphlet index 1b7d951..3695637 100644 --- a/src/interp/i-analy.lisp.pamphlet +++ b/src/interp/i-analy.lisp.pamphlet @@ -10,7 +10,7 @@ \tableofcontents \eject \section{License} -<<*>>= +\begin{chunk}{*} (IN-PACKAGE "BOOT" ) @@ -2383,7 +2383,7 @@ ((NEQUAL (|getUnname| |arg|) '|construct|) NIL) ('T 'T))))))))) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/i-code.lisp.pamphlet b/src/interp/i-code.lisp.pamphlet index 0878527..123825b 100755 --- a/src/interp/i-code.lisp.pamphlet +++ b/src/interp/i-code.lisp.pamphlet @@ -9,7 +9,7 @@ \eject \tableofcontents \eject -<<*>>= +\begin{chunk}{*} (IN-PACKAGE "BOOT" ) ;--% Interpreter Code Generation Routines @@ -386,7 +386,7 @@ (CONS (MKQ (|mapCatchName| |$mapName|)) (CONS |body| NIL)))))))) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing diff --git a/src/interp/i-coerce.lisp.pamphlet b/src/interp/i-coerce.lisp.pamphlet index c3faaf2..7ee1b95 100644 --- a/src/interp/i-coerce.lisp.pamphlet +++ b/src/interp/i-coerce.lisp.pamphlet @@ -37,7 +37,7 @@ The special routines that do the coercions typically involve a "2" (currently in COT BOOT) and this is controlled by coerceByTable. Note that the special routines are in the file COERCEFN BOOT. \end{verbatim} -<<*>>= +\begin{chunk}{*} (IN-PACKAGE "BOOT" ) ;--% Algebraic coercions using interactive code @@ -1006,7 +1006,7 @@ The special routines that do the coercions typically involve a "2" ('T NIL)))))) -@ +\end{chunk} \section{Function getConstantFromDomain} [[getConstantFromDomain]] is used to look up the constants $0$ and $1$ from the given [[domainForm]]. @@ -1015,7 +1015,7 @@ from the given [[domainForm]]. domain modemap contains the constant [[$EmptyMode]] which indicates that the domain is not fully formed. In this case we return [[NIL]]. \end{enumerate} -<<*>>= +\begin{chunk}{*} ;getConstantFromDomain(form,domainForm) == ; isPartialMode domainForm => NIL ; opAlist := getOperationAlistFromLisplib first domainForm @@ -1116,7 +1116,7 @@ that the domain is not fully formed. In this case we return [[NIL]]. (|evalDomain| |domain|))) (SPADCALL |object1| |object2| |eqfunc|))))) -@ +\end{chunk} \begin{verbatim} main algorithms for canCoerceFrom and coerceInteractive @@ -1157,7 +1157,7 @@ all boot coercion functions have the following result: Interpreter Coercion Query Functions \end{verbatim} -<<*>>= +\begin{chunk}{*} ;canCoerce1(t1,t2) == ; -- general test for coercion ; -- the result is NIL if it fails @@ -4595,7 +4595,7 @@ Interpreter Coercion Query Functions (BOOT-EQUAL |t| |m|)))))))) -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} nothing