diff --git a/books/bookvol9.pamphlet b/books/bookvol9.pamphlet index 6284835..3894d0b 100644 --- a/books/bookvol9.pamphlet +++ b/books/bookvol9.pamphlet @@ -4456,6 +4456,67 @@ An angry JHD - August 15th., 1984 @ +\defplist{SubsetCategory}{compSubsetCategory} +<>= +(eval-when (eval load) + (setf (get '|SubsetCategory| 'special) '|compSubsetCategory|)) + +@ + +\defun{compSubsetCategory}{compSubsetCategory} +\calls{compSubsetCategory}{put} +\calls{compSubsetCategory}{comp} +\calls{compSubsetCategory}{msubst} +\usesdollar{compSubsetCategory}{lhsOfColon} +<>= +(defun |compSubsetCategory| (arg m e) + (let (cat r) + (declare (special |$lhsOfColon|)) + (setq cat (second arg)) + (setq r (third arg)) + ; --1. put "Subsets" property on R to allow directly coercion to subset; + ; -- allow automatic coercion from subset to R but not vice versa + (setq e (|put| r '|Subsets| (list (list |$lhsOfColon| '|isFalse|)) e)) + ; --2. give the subset domain modemaps of cat plus 3 new functions + (|comp| + (list '|Join| cat + (msubst |$lhsOfColon| '$ + (list 'category '|domain| + (list 'signature '|coerce| (list r '$)) + (list 'signature '|lift| (list r '$)) + (list 'signature '|reduce| (list '$ r))))) + m e))) + +@ + +\defplist{|}{compSuchthat} +<>= +(eval-when (eval load) + (setf (get '\| 'special) '|compSuchthat|)) + +@ + +\defun{compSuchthat}{compSuchthat} +\calls{compSuchthat}{comp} +\calls{compSuchthat}{put} +\usesdollar{compSuchthat}{Boolean} +<>= +(defun |compSuchthat| (arg m e) + (let (x p xp mp tmp1 pp) + (declare (special |$Boolean|)) + (setq x (second arg)) + (setq p (third arg)) + (when (setq tmp1 (|comp| x m e)) + (setq xp (first tmp1)) + (setq mp (second tmp1)) + (setq e (third tmp1)) + (when (setq tmp1 (|comp| p |$Boolean| e)) + (setq pp (first tmp1)) + (setq e (third tmp1)) + (setq e (|put| xp '|condition| pp e)) + (list xp mp e))))) + +@ \defplist{vector}{compVector} <>= @@ -11718,6 +11779,8 @@ if \verb|$InteractiveMode| then use a null outputstream <> <> <> +<> +<> <> <> <> diff --git a/changelog b/changelog index 10c373f..6ff19c1 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,8 @@ +20101206 tpd src/axiom-website/patches.html 20101206.04.tpd.patch +20101206 tpd src/interp/postprop.lisp merged with bookvol9, removed. +20101206 tpd src/interp/compiler.lisp treeshake compiler +20101206 tpd src/interp/Makefile remove postprop.lisp +20101206 tpd books/bookvol9 merge and remove postprop.lisp 20101206 tpd src/axiom-website/patches.html 20101206.03.tpd.patch 20101206 tpd src/interp/postprop.lisp treeshake compiler 20101206 tpd src/interp/define.lisp treeshake compiler diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index 18f09db..c017e33 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -3301,5 +3301,7 @@ books/bookvol9 treeshake compiler
books/bookvol12 add discussion of GTFL
20101206.03.tpd.patch books/bookvol9 treeshake compiler
+20101206.04.tpd.patch +books/bookvol9 merge and remove postprop.lisp
diff --git a/src/interp/Makefile.pamphlet b/src/interp/Makefile.pamphlet index 704226f..ba96091 100644 --- a/src/interp/Makefile.pamphlet +++ b/src/interp/Makefile.pamphlet @@ -178,7 +178,6 @@ OBJS= ${OUT}/vmlisp.${O} \ ${OUT}/template.${O} ${OUT}/termrw.${O} \ ${OUT}/fortcall.${O} \ ${OUT}/parsing.${O} \ - ${OUT}/postprop.lisp \ ${OUT}/apply.${O} ${OUT}/c-doc.${O} \ ${OUT}/c-util.${O} ${OUT}/profile.${O} \ ${OUT}/category.${O} ${OUT}/compiler.${O} \ @@ -592,7 +591,6 @@ ${DEPSYS}: ${DEP} ${OUT}/sys-pkg.${LISP} ${OUT}/nocompil.${LISP} \ ${OUT}/bookvol5.${LISP} ${OUT}/util.${LISP} \ ${OUT}/parsing.${LISP} \ ${OUT}/newaux.${LISP} \ - ${OUT}/postprop.lisp \ ${OUT}/g-boot.lisp ${OUT}/c-util.lisp \ ${OUT}/g-util.lisp \ ${OUT}/clam.lisp \ @@ -615,10 +613,6 @@ ${DEPSYS}: ${DEP} ${OUT}/sys-pkg.${LISP} ${OUT}/nocompil.${LISP} \ '(compile-file "${OUT}/newaux.${LISP}"' \ ':output-file "${OUT}/newaux.${O}"))' >> ${OUT}/makedep.lisp @ echo '(load "${OUT}/newaux")' >> ${OUT}/makedep.lisp - @ echo '(unless (probe-file "${OUT}/postprop.${O}")' \ - '(compile-file "${OUT}/postprop.lisp"' \ - ':output-file "${OUT}/postprop.${O}"))' >> ${OUT}/makedep.lisp - @ echo '(load "${OUT}/postprop")' >> ${OUT}/makedep.lisp @ echo '(unless (probe-file "${OUT}/clam.${O}")' \ '(compile-file "${OUT}/clam.lisp"' \ ':output-file "${OUT}/clam.${O}"))' >> ${OUT}/makedep.lisp @@ -961,23 +955,6 @@ ${MID}/patches.lisp: ${IN}/patches.lisp.pamphlet @ -\subsection{postprop.lisp \cite{30}} -<>= -${OUT}/postprop.lisp: ${MID}/postprop.lisp - @ echo 103 making ${OUT}/postprop.lisp from ${MID}/postprop.lisp - @ rm -f ${OUT}/postprop.${O} - @ cp ${MID}/postprop.lisp ${OUT}/postprop.lisp - -@ -<>= -${MID}/postprop.lisp: ${IN}/postprop.lisp.pamphlet - @ echo 104 making ${MID}/postprop.lisp \ - from ${IN}/postprop.lisp.pamphlet - @ (cd ${MID} ; \ - ${TANGLE} ${IN}/postprop.lisp.pamphlet >postprop.lisp ) - -@ - \subsection{sockio.lisp \cite{33}} <>= ${OUT}/sockio.${O}: ${MID}/sockio.lisp @@ -3595,9 +3572,6 @@ clean: <> <> -<> -<> - <> <> diff --git a/src/interp/compiler.lisp.pamphlet b/src/interp/compiler.lisp.pamphlet index 0c13237..688e70f 100644 --- a/src/interp/compiler.lisp.pamphlet +++ b/src/interp/compiler.lisp.pamphlet @@ -854,66 +854,6 @@ @ -\subsection{compSubsetCategory} -Compile SubsetCategory -<<*>>= -;compSubsetCategory(["SubsetCategory",cat,R],m,e) == -; --1. put "Subsets" property on R to allow directly coercion to subset; -; -- allow automatic coercion from subset to R but not vice versa -; e:= put(R,"Subsets",[[$lhsOfColon,"isFalse"]],e) -; --2. give the subset domain modemaps of cat plus 3 new functions -; comp(["Join",cat,C'],m,e) where -; C'() == -; substitute($lhsOfColon,"$",C'') where -; C''() == -; ["CATEGORY","domain",["SIGNATURE","coerce",[R,"$"]],["SIGNATURE", -; "lift",[R,"$"]],["SIGNATURE","reduce",["$",R]]] - -(DEFUN |compSubsetCategory| (G168021 |m| |e|) - (PROG (|cat| R) - (declare (special |$lhsOfColon|)) - (RETURN - (PROGN - (COND - ((EQ (CAR G168021) '|SubsetCategory|) (CAR G168021))) - (SPADLET |cat| (CADR G168021)) - (SPADLET R (CADDR G168021)) - (SPADLET |e| - (|put| R '|Subsets| - (CONS (CONS |$lhsOfColon| - (CONS '|isFalse| NIL)) - NIL) - |e|)) - (|comp| (CONS '|Join| - (CONS |cat| - (CONS (MSUBST |$lhsOfColon| '$ - (CONS 'CATEGORY - (CONS '|domain| - (CONS - (CONS 'SIGNATURE - (CONS '|coerce| - (CONS - (CONS R (CONS '$ NIL)) - NIL))) - (CONS - (CONS 'SIGNATURE - (CONS '|lift| - (CONS - (CONS R (CONS '$ NIL)) - NIL))) - (CONS - (CONS 'SIGNATURE - (CONS '|reduce| - (CONS - (CONS '$ - (CONS R NIL)) - NIL))) - NIL)))))) - NIL))) - |m| |e|))))) - -@ - \subsection{assignError} <<*>>= ;assignError(val,m',form,m) == @@ -1423,34 +1363,6 @@ Compile SubsetCategory (PROGN (|replaceExitEtc,fn| |x| |tag| |opFlag| |opMode|) |x|)) @ -\subsection{compSuchthat} -Compile suchthat -<<*>>= -;compSuchthat([.,x,p],m,e) == -; [x',m',e]:= comp(x,m,e) or return nil -; [p',.,e]:= comp(p,$Boolean,e) or return nil -; e:= put(x',"condition",p',e) -; [x',m',e] - -(DEFUN |compSuchthat| (G168962 |m| |e|) - (PROG (|x| |p| |x'| |m'| |LETTMP#1| |p'|) - (declare (special |$Boolean|)) - (RETURN - (PROGN - (SPADLET |x| (CADR G168962)) - (SPADLET |p| (CADDR G168962)) - (SPADLET |LETTMP#1| (OR (|comp| |x| |m| |e|) (RETURN NIL))) - (SPADLET |x'| (CAR |LETTMP#1|)) - (SPADLET |m'| (CADR |LETTMP#1|)) - (SPADLET |e| (CADDR |LETTMP#1|)) - (SPADLET |LETTMP#1| - (OR (|comp| |p| |$Boolean| |e|) (RETURN NIL))) - (SPADLET |p'| (CAR |LETTMP#1|)) - (SPADLET |e| (CADDR |LETTMP#1|)) - (SPADLET |e| (|put| |x'| '|condition| |p'| |e|)) - (CONS |x'| (CONS |m'| (CONS |e| NIL))))))) - -@ \subsection{compHasFormat} <<*>>= ;compHasFormat (pred is ["has",olda,b]) == diff --git a/src/interp/postprop.lisp.pamphlet b/src/interp/postprop.lisp.pamphlet deleted file mode 100644 index c7dcf06..0000000 --- a/src/interp/postprop.lisp.pamphlet +++ /dev/null @@ -1,104 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/interp postprop.lisp} -\author{Timothy Daly} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{License} -<>= -;; Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. -;; All rights reserved. -;; -;; Redistribution and use in source and binary forms, with or without -;; modification, are permitted provided that the following conditions are -;; met: -;; -;; - Redistributions of source code must retain the above copyright -;; notice, this list of conditions and the following disclaimer. -;; -;; - Redistributions in binary form must reproduce the above copyright -;; notice, this list of conditions and the following disclaimer in -;; the documentation and/or other materials provided with the -;; distribution. -;; -;; - Neither the name of The Numerical ALgorithms Group Ltd. nor the -;; names of its contributors may be used to endorse or promote products -;; derived from this software without specific prior written permission. -;; -;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -;; IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -;; TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -;; PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER -;; OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -;; EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -;; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -;; PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -;; LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -@ -<<*>>= -<> - -(in-package "BOOT") - -(mapcar #'(lambda (x) (MAKEPROP (CAR X) 'special (CADR X))) - '( -; (|add| |compAdd|) -; (\@ |compAtSign|) -; (CAPSULE |compCapsule|) -; (|case| |compCase|) -; (|Record| |compCat|) -; (|Mapping| |compCat|) -; (|Union| |compCat|) -; (CATEGORY |compCategory|) -; (\:\: |compCoerce|) - (COLLECTV |compCollectV|) -; (\: |compColon|) -; (CONS |compCons|) -; (|ListCategory| |compConstructorCategory|) -; (|RecordCategory| |compConstructorCategory|) -; (|UnionCategory| |compConstructorCategory|) -; (|VectorCategory| |compConstructorCategory|) -; (|construct| |compConstruct|) -; (DEF |compDefine|) -; (|elt| |compElt|) -; (|exit| |compExit|) -; (|has| |compHas|) -; (IF |compIf|) -; (|import| |compImport|) -; (|is| |compIs|) -; (|Join| |compJoin|) -; (|+->| |compLambda|) -; (|leave| |compLeave|) -; (MDEF |compMacro|) -; (|pretend| |compPretend|) -; (QUOTE |compQuote|) -; (REDUCE |compReduce|) -; (COLLECT |compRepeatOrCollect|) -; (REPEAT |compRepeatOrCollect|) -; (|return| |compReturn|) -; (LET |compSetq|) -; (SETQ |compSetq|) -; (SEQ |compSeq|) -; (|String| |compString|) -; (|SubDomain| |compSubDomain|) - (|SubsetCategory| |compSubsetCategory|) - (\| |compSuchthat|) -; (VECTOR |compVector|) -; (|where| |compWhere|) -)) - - -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document}