diff --git a/books/bookvol5.pamphlet b/books/bookvol5.pamphlet index 3952931..335891e 100644 --- a/books/bookvol5.pamphlet +++ b/books/bookvol5.pamphlet @@ -8827,6 +8827,73 @@ of the form ('expression expr position) @ +\defun{pfCopyWithPos}{pfCopyWithPos} +\calls{pfCopyWithPos}{pfLeaf?} +\calls{pfCopyWithPos}{pfLeaf} +\calls{pfCopyWithPos}{pfAbSynOp} +\calls{pfCopyWithPos}{tokPart} +\calls{pfCopyWithPos}{pfTree} +\calls{pfCopyWithPos}{pfParts} +\calls{pfCopyWithPos}{pfCopyWithPos} +<>= +(defun |pfCopyWithPos| (pform pos) + (if (|pfLeaf?| pform) + (|pfLeaf| (|pfAbSynOp| pform) (|tokPart| pform) pos) + (|pfTree| (|pfAbSynOp| pform) + (loop for p in (|pfParts| pform) + collect (|pfCopyWithPos| p pos))))) + +@ + +\defun{pfMapParts}{pfMapParts} +\calls{pfMapParts}{pfLeaf?} +\calls{pfMapParts}{pfParts} +\calls{pfMapParts}{pfTree} +\calls{pfMapParts}{pfAbSynOp} +<>= +(defun |pfMapParts| (f pform) + (let (same parts1 parts0) + (if (|pfLeaf?| pform) + pform + (progn + (setq parts0 (|pfParts| pform)) + (setq parts1 (loop for p in parts0 collect (funcall f p))) + (if (reduce #'(lambda (u v) (and u v)) (mapcar #'eq parts0 parts1)) + pform + (|pfTree| (|pfAbSynOp| pform) parts1)))))) + +@ + +\defun{pf0ApplicationArgs}{pf0ApplicationArgs} +\calls{pf0ApplicationArgs}{pf0FlattenSyntacticTuple} +\calls{pf0ApplicationArgs}{pfApplicationArg} +<>= +(defun |pf0ApplicationArgs| (pform) + (|pf0FlattenSyntacticTuple| (|pfApplicationArg| pform))) + +@ + +\defun{pf0FlattenSyntacticTuple}{pf0FlattenSyntacticTuple} +\calls{pf0FlattenSyntacticTuple}{pfTuple?} +\calls{pf0FlattenSyntacticTuple}{pf0FlattenSyntacticTuple} +\calls{pf0FlattenSyntacticTuple}{pf0TupleParts} +<>= +(defun |pf0FlattenSyntacticTuple| (pform) + (if (null (|pfTuple?| pform)) + (list pform) + ; [:pf0FlattenSyntacticTuple p for p in pf0TupleParts pform] + ((lambda (arg0 arg1 p) + (loop + (cond + ((or (atom arg1) (progn (setq p (car arg1)) nil)) + (return (nreverse arg0))) + (t + (setq arg0 (append (reverse (|pf0FlattenSyntacticTuple| p)) arg0)))) + (setq arg1 (cdr arg1)))) + nil (|pf0TupleParts| pform) nil))) + +@ + \defun{pfSourcePosition}{pfSourcePosition} \calls{pfSourcePosition}{pfLeaf?} \calls{pfSourcePosition}{pfLeafPosition} @@ -16598,7 +16665,8 @@ of synonyms which are in common use. \uses{axiomVersion}{*build-version*} <>= (defun axiomVersion () - (concatenate 'string *build-version* " built on " *yearweek*)) + (declare (special *build-version* *yearweek*)) + (concatenate 'string "Axiom " *build-version* " built on " *yearweek*)) @ @@ -40657,6 +40725,7 @@ This needs to work off the internal exposure list, not the file. <> <> <> +<> <> <> <> @@ -40737,6 +40806,7 @@ This needs to work off the internal exposure list, not the file. <> <> <> +<> <> <> <> @@ -40834,8 +40904,10 @@ This needs to work off the internal exposure list, not the file. <> <> <> +<> <> <> +<> <> <> <> diff --git a/changelog b/changelog index 132c181..2b2a93b 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,7 @@ +20100825 tpd src/axiom-website/patches.html 20100825.01.tpd.patch +20100825 tpd src/interp/Makefile remove ptrop.lisp +20100825 tpd books/bookvol5 merge ptrop +20100825 tpd src/interp/ptrop.lisp merged and removed 20100823 tpd src/axiom-website/patches.html 20100823.01.tpd.patch 20100823 tpd src/interp/Makefile merge varini 20100823 tpd src/interp/compiler.lisp merge varini diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index 87cb6ae..d4b8ae6 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -3079,5 +3079,7 @@ books/bookvolbib Parnas & Madey [PM95], Parnas & Jin [PJ10]
src/axiom-website/download.html add opensuse for july2010
20100823.01.tpd.patch src/interp/varini.lisp removed, merged with bookvol5
+20100825.01.tpd.patch +src/interp/ptrop.lisp merged and removed
diff --git a/src/interp/Makefile.pamphlet b/src/interp/Makefile.pamphlet index 47475a3..d75c407 100644 --- a/src/interp/Makefile.pamphlet +++ b/src/interp/Makefile.pamphlet @@ -169,7 +169,6 @@ OBJS= ${OUT}/vmlisp.${O} \ ${OUT}/nrungo.${O} ${OUT}/nrunopt.${O} \ ${OUT}/nruntime.${O} \ ${OUT}/posit.${O} \ - ${OUT}/ptrop.${O} \ ${OUT}/record.${O} ${OUT}/regress.${O} \ ${OUT}/rulesets.${O} \ ${OUT}/server.${O} \ @@ -3165,29 +3164,6 @@ ${MID}/topics.lisp: ${IN}/topics.lisp.pamphlet @ -\subsection{ptrop.lisp} -<>= -${OUT}/ptrop.${O}: ${MID}/ptrop.lisp - @ echo 136 making ${OUT}/ptrop.${O} from ${MID}/ptrop.lisp - @ ( cd ${MID} ; \ - if [ -z "${NOISE}" ] ; then \ - echo '(progn (compile-file "${MID}/ptrop.lisp"' \ - ':output-file "${OUT}/ptrop.${O}") (${BYE}))' | ${DEPSYS} ; \ - else \ - echo '(progn (compile-file "${MID}/ptrop.lisp"' \ - ':output-file "${OUT}/ptrop.${O}") (${BYE}))' | ${DEPSYS} \ - >${TMP}/trace ; \ - fi ) - -@ -<>= -${MID}/ptrop.lisp: ${IN}/ptrop.lisp.pamphlet - @ echo 137 making ${MID}/ptrop.lisp from ${IN}/ptrop.lisp.pamphlet - @ (cd ${MID} ; \ - ${TANGLE} ${IN}/ptrop.lisp.pamphlet >ptrop.lisp ) - -@ - \subsection{posit.lisp} <>= ${OUT}/posit.${O}: ${MID}/posit.lisp @@ -3211,29 +3187,6 @@ ${MID}/posit.lisp: ${IN}/posit.lisp.pamphlet @ -\subsection{varini.lisp} -<>= -${OUT}/varini.${O}: ${MID}/varini.lisp - @ echo 136 making ${OUT}/varini.${O} from ${MID}/varini.lisp - @ ( cd ${MID} ; \ - if [ -z "${NOISE}" ] ; then \ - echo '(progn (compile-file "${MID}/varini.lisp"' \ - ':output-file "${OUT}/varini.${O}") (${BYE}))' | ${DEPSYS} ; \ - else \ - echo '(progn (compile-file "${MID}/varini.lisp"' \ - ':output-file "${OUT}/varini.${O}") (${BYE}))' | ${DEPSYS} \ - >${TMP}/trace ; \ - fi ) - -@ -<>= -${MID}/varini.lisp: ${IN}/varini.lisp.pamphlet - @ echo 137 making ${MID}/varini.lisp from ${IN}/varini.lisp.pamphlet - @ (cd ${MID} ; \ - ${TANGLE} ${IN}/varini.lisp.pamphlet >varini.lisp ) - -@ - \subsection{nci.lisp} <>= ${OUT}/nci.${O}: ${MID}/nci.lisp @@ -3863,9 +3816,6 @@ clean: <> <> -<> -<> - <> <> @@ -3911,9 +3861,6 @@ clean: <> <> -<> -<> - <> <> diff --git a/src/interp/ptrop.lisp.pamphlet b/src/interp/ptrop.lisp.pamphlet deleted file mode 100644 index 0a283fa..0000000 --- a/src/interp/ptrop.lisp.pamphlet +++ /dev/null @@ -1,129 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/interp ptrop.lisp} -\author{The Axiom Team} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -<<*>>= -(IN-PACKAGE "BOOT") - -;--% Utility operations on Abstract Syntax Trees - -;pfCopyWithPos( pform , pos ) == -; pfLeaf? pform => pfLeaf( pfAbSynOp pform , tokPart pform , pos ) -; pfTree( pfAbSynOp pform , [ pfCopyWithPos( p , pos ) for p in pfParts pform ] ) - -(DEFUN |pfCopyWithPos| (|pform| |pos|) - (PROG () - (RETURN - (COND - ((|pfLeaf?| |pform|) - (|pfLeaf| (|pfAbSynOp| |pform|) (|tokPart| |pform|) |pos|)) - ('T - (|pfTree| (|pfAbSynOp| |pform|) - ((LAMBDA (|bfVar#6| |bfVar#5| |p|) - (LOOP - (COND - ((OR (ATOM |bfVar#5|) - (PROGN (SETQ |p| (CAR |bfVar#5|)) NIL)) - (RETURN (NREVERSE |bfVar#6|))) - ('T - (SETQ |bfVar#6| - (CONS (|pfCopyWithPos| |p| |pos|) |bfVar#6|)))) - (SETQ |bfVar#5| (CDR |bfVar#5|)))) - NIL (|pfParts| |pform|) NIL))))))) - -;pfMapParts(f, pform) == -; pfLeaf? pform => pform -; parts0 := pfParts pform -; parts1 := [FUNCALL(f, p) for p in parts0] -; -- Return the original if no changes. -; same := true -; for p0 in parts0 for p1 in parts1 while same repeat same := EQ(p0,p1) -; same => pform -; pfTree(pfAbSynOp pform, parts1) - -(DEFUN |pfMapParts| (|f| |pform|) - (PROG (|same| |parts1| |parts0|) - (RETURN - (COND - ((|pfLeaf?| |pform|) |pform|) - ('T - (PROGN - (SETQ |parts0| (|pfParts| |pform|)) - (SETQ |parts1| - ((LAMBDA (|bfVar#8| |bfVar#7| |p|) - (LOOP - (COND - ((OR (ATOM |bfVar#7|) - (PROGN (SETQ |p| (CAR |bfVar#7|)) NIL)) - (RETURN (NREVERSE |bfVar#8|))) - ('T - (SETQ |bfVar#8| - (CONS (FUNCALL |f| |p|) |bfVar#8|)))) - (SETQ |bfVar#7| (CDR |bfVar#7|)))) - NIL |parts0| NIL)) - (SETQ |same| T) - ((LAMBDA (|bfVar#9| |p0| |bfVar#10| |p1|) - (LOOP - (COND - ((OR (ATOM |bfVar#9|) - (PROGN (SETQ |p0| (CAR |bfVar#9|)) NIL) - (ATOM |bfVar#10|) - (PROGN (SETQ |p1| (CAR |bfVar#10|)) NIL) - (NOT |same|)) - (RETURN NIL)) - ('T (SETQ |same| (EQ |p0| |p1|)))) - (SETQ |bfVar#9| (CDR |bfVar#9|)) - (SETQ |bfVar#10| (CDR |bfVar#10|)))) - |parts0| NIL |parts1| NIL) - (COND - (|same| |pform|) - ('T (|pfTree| (|pfAbSynOp| |pform|) |parts1|))))))))) - -;pf0ApplicationArgs pform == -; arg := pfApplicationArg pform -; pf0FlattenSyntacticTuple arg - -(DEFUN |pf0ApplicationArgs| (|pform|) - (PROG (|arg|) - (RETURN - (PROGN - (SETQ |arg| (|pfApplicationArg| |pform|)) - (|pf0FlattenSyntacticTuple| |arg|))))) - -;pf0FlattenSyntacticTuple pform == -; not pfTuple? pform => [pform] -; [:pf0FlattenSyntacticTuple p for p in pf0TupleParts pform] - -(DEFUN |pf0FlattenSyntacticTuple| (|pform|) - (PROG () - (RETURN - (COND - ((NULL (|pfTuple?| |pform|)) (LIST |pform|)) - ('T - ((LAMBDA (|bfVar#12| |bfVar#11| |p|) - (LOOP - (COND - ((OR (ATOM |bfVar#11|) - (PROGN (SETQ |p| (CAR |bfVar#11|)) NIL)) - (RETURN (NREVERSE |bfVar#12|))) - ('T - (SETQ |bfVar#12| - (APPEND (REVERSE (|pf0FlattenSyntacticTuple| - |p|)) - |bfVar#12|)))) - (SETQ |bfVar#11| (CDR |bfVar#11|)))) - NIL (|pf0TupleParts| |pform|) NIL)))))) - -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document}