diff --git a/books/bookvol10.3.pamphlet b/books/bookvol10.3.pamphlet index 3756f73..1404c79 100644 --- a/books/bookvol10.3.pamphlet +++ b/books/bookvol10.3.pamphlet @@ -52837,7 +52837,7 @@ HashTable(Key, Entry, hashfn): Exports == Implementation where t1 = t2 == EQ(t1, t2)$Lisp keys t == HKEYS(t)$Lisp - # t == HCOUNT(t)$Lisp + # t == HASH_-TABLE_-COUNT(t)$Lisp setelt(t, k, e) == HPUT(t,k,e)$Lisp remove_!(k:Key, t:%) == r := HGET(t,k,failMsg)$Lisp @@ -116436,7 +116436,7 @@ SingleInteger(): Join(IntegerNumberSystem,Logic,OpenMath) with one?(x) == x = 1 max(x,y) == QSMAX(x,y)$Lisp min(x,y) == QSMIN(x,y)$Lisp - hash(x) == HASHEQ(x)$Lisp + hash(x) == SXHASH(x)$Lisp length(x) == INTEGER_-LENGTH(x)$Lisp shift(x,n) == QSLEFTSHIFT(x,n)$Lisp mulmod(a,b,p) == QSMULTMOD(a,b,p)$Lisp @@ -145387,9 +145387,9 @@ Note that this code is not included in the generated catdef.spad file. (DEFUN |DFLOAT;zero?;$B;64| (|x| |$|) (ZEROP |x|)) -(PUT (QUOTE |DFLOAT;hash;$I;65|) (QUOTE |SPADreplace|) (QUOTE HASHEQ)) +(PUT (QUOTE |DFLOAT;hash;$I;65|) (QUOTE |SPADreplace|) (QUOTE SXHASH)) -(DEFUN |DFLOAT;hash;$I;65| (|x| |$|) (HASHEQ |x|)) +(DEFUN |DFLOAT;hash;$I;65| (|x| |$|) (SXHASH |x|)) (DEFUN |DFLOAT;recip;$U;66| (|x| |$|) (COND @@ -149775,10 +149775,10 @@ Note that this code is not included in the generated catdef.spad file. (PUT (QUOTE |SINT;hash;2$;41|) (QUOTE |SPADreplace|) - (QUOTE HASHEQ)) + (QUOTE SXHASH)) (DEFUN |SINT;hash;2$;41| (|x| $) - (HASHEQ |x|)) + (SXHASH |x|)) (PUT (QUOTE |SINT;length;2$;42|) diff --git a/books/bookvol5.pamphlet b/books/bookvol5.pamphlet index ba3f6ba..6349ed4 100644 --- a/books/bookvol5.pamphlet +++ b/books/bookvol5.pamphlet @@ -21257,13 +21257,12 @@ RREAD takes erroval to return if key is missing \defun{unwritable?}{unwritable?} \calls{unwritable?}{pairp} \calls{unwritable?}{vecp} -\calls{unwritable?}{hashtablep} \calls{unwritable?}{placep} <>= (defun |unwritable?| (ob) (cond ((or (pairp ob) (vecp ob)) nil) - ((or (compiled-function-p ob) (hashtablep ob)) t) + ((or (compiled-function-p ob) (hash-table-p ob)) t) ((or (placep ob) (readtablep ob)) t) ((floatp ob) t) (t nil))) @@ -21313,7 +21312,6 @@ back. \calls{writify,writifyInner}{qsetvelt} \calls{writify,writifyInner}{qvelt} \calls{writify,writifyInner}{constructor?} -\calls{writify,writifyInner}{hashtablep} \calls{writify,writifyInner}{hkeys} \calls{writify,writifyInner}{hashtable-class} \calls{writify,writifyInner}{placep} @@ -21397,7 +21395,7 @@ back. (when (compiled-function-p ob) (exit (throw '|writifyTag| '|writifyFailed|))) - (when (hashtablep ob) + (when (hash-table-p ob) (setq nob (cons 'writified!! nil)) (hput |$seen| ob nob) (hput |$seen| nob nob) @@ -21519,7 +21517,6 @@ back. \calls{dewritify,dewritifyInner}{error} \calls{dewritify,dewritifyInner}{poundsign} \calls{dewritify,dewritifyInner}{nequal} -\calls{dewritify,dewritifyInner}{hasheq} \calls{dewritify,dewritifyInner}{hput} \calls{dewritify,dewritifyInner}{dewritify,dewritifyInner} \calls{dewritify,dewritifyInner}{concat} @@ -21563,7 +21560,7 @@ back. (exit (symbol-function oname)))) (when (null (compiled-function-p f)) (exit (|error| "A required BPI does not exist."))) - (when (and (> (|#| ob) 3) (nequal (hasheq f) (elt ob 3))) + (when (and (> (|#| ob) 3) (nequal (sxhash f) (elt ob 3))) (exit (|error| "A required BPI has been redefined."))) (hput |$seen| ob f) (exit f)))) @@ -35977,7 +35974,6 @@ The localdatabase function tries to find files in the order of: \calls{localdatabase}{asharp} \calls{localdatabase}{astran} \calls{localdatabase}{localasy} -\calls{localdatabase}{hclear} \usesdollar{localdatabase}{forceDatabaseUpdate} \usesdollar{localdatabase}{ConstructorCache} \uses{localdatabase}{*index-filename*} @@ -36034,7 +36030,7 @@ The localdatabase function tries to find files in the order of: (setq key (pathname-name (first (last (pathname-directory file))))) (setq object (concatenate 'string (directory-namestring file) "code")) (localnrlib key file object make-database? noexpose)) - (hclear |$ConstructorCache|)))) + (clrhash |$ConstructorCache|)))) @ @@ -37331,6 +37327,105 @@ but the Axiom semantics are not the same. Because Axiom was originally written in Maclisp, then VMLisp, and then Common Lisp some of these old semantics survive. +\section{SingleInteger} +\defun{qsquotient}{qsquotient} +<>= +(defun qsquotient (a b) + (the fixnum (truncate (the fixnum a) (the fixnum b)))) + +@ + +\defun{qsremainder}{qsremainder} +<>= +(defun qsremainder (a b) + (the fixnum (rem (the fixnum a) (the fixnum b)))) + +@ + +\defmacro{qsdifference} +<>= +(defmacro qsdifference (x y) + `(the fixnum (- (the fixnum ,x) (the fixnum ,y)))) + +@ + +\defmacro{qslessp} +<>= +(defmacro qslessp (a b) + `(< (the fixnum ,a) (the fixnum ,b))) + +@ + +\defmacro{qsadd1} +<>= +(defmacro qsadd1 (x) + `(the fixnum (1+ (the fixnum ,x)))) + +@ + +\defmacro{qssub1} +<>= +(defmacro qssub1 (x) + `(the fixnum (1- (the fixnum ,x)))) + +@ + +\defmacro{qsminus} +<>= +(defmacro qsminus (x) + `(the fixnum (minus (the fixnum ,x)))) + +@ + +\defmacro{qsplus} +<>= +(defmacro qsplus (x y) + `(the fixnum (+ (the fixnum ,x) (the fixnum ,y)))) + +@ + +\defmacro{qstimes} +<>= +(defmacro qstimes (x y) + `(the fixnum (* (the fixnum ,x) (the fixnum ,y)))) + +@ + +\defmacro{qsabsval} +<>= +(defmacro qsabsval (x) + `(the fixnum (abs (the fixnum ,x)))) + +@ + +\defmacro{qsoddp} +<>= +(defmacro qsoddp (x) + `(oddp (the fixnum ,x))) + +@ + +\defmacro{qszerop} +<>= +(defmacro qszerop (x) + `(zerop (the fixnum ,x))) + +@ + +\defmacro{qsmax} +<>= +(defmacro qsmax (x y) + `(the fixnum (max (the fixnum ,x) (the fixnum ,y)))) + +@ + +\defmacro{qsmin} +<>= +(defmacro qsmin (x y) + `(the fixnum (min (the fixnum ,x) (the fixnum ,y)))) + +@ + \section{Boolean} \defun{BooleanEquality}{The Boolean = function support} <>= @@ -39363,6 +39458,19 @@ This needs to work off the internal exposure list, not the file. <> <> <> +<> +<> +<> +<> +<> +<> +<> +<> +<> +<> +<> +<> +<> ;;; above level 0 macros @@ -39424,7 +39532,6 @@ This needs to work off the internal exposure list, not the file. <> <> <> -<> <> <> <> @@ -39679,6 +39786,8 @@ This needs to work off the internal exposure list, not the file. <> <> +<> +<> <> <> diff --git a/changelog b/changelog index 40e1574..ed43a50 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,7 @@ +20101219 tpd src/axiom-website/patches.html 20101219.01.tpd.patch +20101219 tpd src/interp/vmlisp.lisp cleaning vmlisp +20101219 tpd books/bookvol5 cleaning vmlisp +20101219 tpd books/bookvol10.3 cleaning vmlisp 20101218 tpd src/axiom-website/patches.html 20101218.01.tpd.patch 20101218 tpd src/interp/vmlisp.lisp cleaning vmlisp 20101218 tpd src/interp/i-output.lisp cleaning vmlisp diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index 3cb1fbf..094018b 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -3323,5 +3323,7 @@ books/bookvol9 treeshake compiler
src/interp/vmlisp.lisp cleaning vmlisp
20101218.01.tpd.patch src/interp/vmlisp.lisp cleaning vmlisp
+20101219.01.tpd.patch +src/interp/vmlisp.lisp cleaning vmlisp
diff --git a/src/interp/vmlisp.lisp.pamphlet b/src/interp/vmlisp.lisp.pamphlet index 0bfcbe5..f976cfa 100644 --- a/src/interp/vmlisp.lisp.pamphlet +++ b/src/interp/vmlisp.lisp.pamphlet @@ -27,8 +27,8 @@ documentclass{article} (in-package "VMLISP") -(export '(MAKE-HASHTABLE HCOUNT HPUT* HREM HCLEAR HREMPROP - HASHEQ HASHUEQUAL HASHCVEC HASHID HASHTABLEP CVEC UEQUAL ID HPUTPROP +(export '(MAKE-HASHTABLE HPUT* HREM HREMPROP + CVEC UEQUAL ID HPUTPROP HASHTABLE-CLASS)) (import '(BOOT::QENUM )) (import '(BOOT::STRPOSL )) @@ -275,15 +275,9 @@ documentclass{article} `(,(rcqexp pattern) ,exp) (macro-invalidargs 'qrplq form "form must be updateable."))) -(defmacro qsadd1 (x) - `(the fixnum (1+ (the fixnum ,x)))) - (defmacro qsdec1 (x) `(the fixnum (1- (the fixnum ,x)))) -(defmacro qsdifference (x y) - `(the fixnum (- (the fixnum ,x) (the fixnum ,y)))) - (defmacro qsetq (&whole form pattern exp) (declare (ignore form)) `(,(dcqexp pattern '=) ,exp)) @@ -306,42 +300,12 @@ documentclass{article} (defmacro qsleftshift (a b) `(the fixnum (ash (the fixnum ,a) (the fixnum ,b)))) -(defmacro qslessp (a b) - `(< (the fixnum ,a) (the fixnum ,b))) - -(defmacro qsmax (x y) - `(the fixnum (max (the fixnum ,x) (the fixnum ,y)))) - -(defmacro qsmin (x y) - `(the fixnum (min (the fixnum ,x) (the fixnum ,y)))) - -(defmacro qsminus (x) - `(the fixnum (minus (the fixnum ,x)))) - (defmacro qsminusp (x) `(minusp (the fixnum ,x))) -(defmacro qsoddp (x) - `(oddp (the fixnum ,x))) - -(defmacro qsabsval (x) - `(the fixnum (abs (the fixnum ,x)))) - -(defmacro qsplus (x y) - `(the fixnum (+ (the fixnum ,x) (the fixnum ,y)))) - -(defmacro qssub1 (x) - `(the fixnum (1- (the fixnum ,x)))) - -(defmacro qstimes (x y) - `(the fixnum (* (the fixnum ,x) (the fixnum ,y)))) - (defmacro qstringlength (x) `(the fixnum (length (the simple-string ,x)))) -(defmacro qszerop (x) - `(zerop (the fixnum ,x))) - (defmacro qvelt (vec ind) `(svref ,vec (the fixnum ,ind))) @@ -615,10 +579,6 @@ documentclass{article} (multiple-value-list (truncate x y)) (list (QUOTIENT x y) (REMAINDER x y)))) -(defun QSQUOTIENT (a b) (the fixnum (truncate (the fixnum a) (the fixnum b)))) - -(defun QSREMAINDER (a b) (the fixnum (rem (the fixnum a) (the fixnum b)))) - ; 13.3 Updating @@ -1640,8 +1600,6 @@ Camm issued a fix. This used to read: (2 'EQUAL) (t "error unknown hash table class"))) -(define-function 'HCOUNT #'hash-table-count) - ;17.4 Searching and Updating (defun HPUT* (table alist) @@ -1654,22 +1612,8 @@ Camm issued a fix. This used to read: (if plist (setf (gethash key table) (delete property plist :test #'equal :key #'car))))) -;17.5 Updating - -(define-function 'HCLEAR #'clrhash) - ;17.6 Miscellaneous -(define-function 'HASHTABLEP #'hash-table-p) - -(define-function 'HASHEQ #'sxhash) - -(define-function 'HASHUEQUAL #'sxhash) - -(define-function 'HASHCVEC #'sxhash) - -(define-function 'HASHID #'sxhash) - ;;macros from file vmlisp are necessary to compile this file (DEFUN |intersection| (LIST-OF-ITEMS-1 LIST-OF-ITEMS-2)