From 7bacc11540fe33bf3530c361a59772ecd4d529d9 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Thu, 20 Sep 2007 04:13:24 +0000 Subject: remove pamphlets - part 5 --- src/interp/hash.lisp | 121 ++ src/interp/hash.lisp.pamphlet | 147 -- src/interp/hashcode.boot | 109 ++ src/interp/hashcode.boot.pamphlet | 131 -- src/interp/ht-root.boot | 289 +++ src/interp/ht-root.boot.pamphlet | 311 ---- src/interp/ht-util.boot.pamphlet | 753 -------- src/interp/htcheck.boot | 127 ++ src/interp/htcheck.boot.pamphlet | 153 -- src/interp/htsetvar.boot | 478 +++++ src/interp/htsetvar.boot.pamphlet | 500 ------ src/interp/hypertex.boot | 120 ++ src/interp/hypertex.boot.pamphlet | 142 -- src/interp/i-analy.boot | 810 +++++++++ src/interp/i-analy.boot.pamphlet | 832 --------- src/interp/i-code.boot | 142 ++ src/interp/i-code.boot.pamphlet | 164 -- src/interp/i-eval.boot | 452 +++++ src/interp/i-eval.boot.pamphlet | 474 ----- src/interp/i-map.boot | 1159 ++++++++++++ src/interp/i-map.boot.pamphlet | 1185 ------------ src/interp/interop.boot | 906 ++++++++++ src/interp/interop.boot.pamphlet | 933 ---------- src/interp/interp-fix.boot | 77 + src/interp/interp-fix.boot.pamphlet | 99 - src/interp/interp-proclaims.lisp | 3391 ----------------------------------- src/interp/intfile.boot | 61 + src/interp/intfile.boot.pamphlet | 83 - src/interp/intint.lisp | 146 ++ src/interp/intint.lisp.pamphlet | 168 -- src/interp/iterator.boot | 293 +++ src/interp/iterator.boot.pamphlet | 319 ---- 32 files changed, 5290 insertions(+), 9785 deletions(-) create mode 100644 src/interp/hash.lisp delete mode 100644 src/interp/hash.lisp.pamphlet create mode 100644 src/interp/hashcode.boot delete mode 100644 src/interp/hashcode.boot.pamphlet create mode 100644 src/interp/ht-root.boot delete mode 100644 src/interp/ht-root.boot.pamphlet delete mode 100644 src/interp/ht-util.boot.pamphlet create mode 100644 src/interp/htcheck.boot delete mode 100644 src/interp/htcheck.boot.pamphlet create mode 100644 src/interp/htsetvar.boot delete mode 100644 src/interp/htsetvar.boot.pamphlet create mode 100644 src/interp/hypertex.boot delete mode 100644 src/interp/hypertex.boot.pamphlet create mode 100644 src/interp/i-analy.boot delete mode 100644 src/interp/i-analy.boot.pamphlet create mode 100644 src/interp/i-code.boot delete mode 100644 src/interp/i-code.boot.pamphlet create mode 100644 src/interp/i-eval.boot delete mode 100644 src/interp/i-eval.boot.pamphlet create mode 100644 src/interp/i-map.boot delete mode 100644 src/interp/i-map.boot.pamphlet create mode 100644 src/interp/interop.boot delete mode 100644 src/interp/interop.boot.pamphlet create mode 100644 src/interp/interp-fix.boot delete mode 100644 src/interp/interp-fix.boot.pamphlet delete mode 100644 src/interp/interp-proclaims.lisp create mode 100644 src/interp/intfile.boot delete mode 100644 src/interp/intfile.boot.pamphlet create mode 100644 src/interp/intint.lisp delete mode 100644 src/interp/intint.lisp.pamphlet create mode 100644 src/interp/iterator.boot delete mode 100644 src/interp/iterator.boot.pamphlet (limited to 'src') diff --git a/src/interp/hash.lisp b/src/interp/hash.lisp new file mode 100644 index 00000000..5dfda6e1 --- /dev/null +++ b/src/interp/hash.lisp @@ -0,0 +1,121 @@ +;; 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. + + +(IMPORT-MODULE "vmlisp") +(in-package "BOOT") + +(export '(MAKE-HASHTABLE HGET HKEYS HCOUNT HPUT HPUT* HREM HCLEAR HREMPROP + HASHEQ HASHUEQUAL HASHCVEC HASHID HASHTABLEP CVEC UEQUAL ID HPUTPROP + HASHTABLE-CLASS)) + +;17.0 Operations on Hashtables +;17.1 Creation + +(defun MAKE-HASHTABLE (id1 &optional (id2 nil)) + (declare (ignore id2)) + (let ((test (case id1 + ((EQ ID) #'eq) + (CVEC #'equal) + (EQL #'eql) + #+Lucid ((UEQUAL EQUALP) #'EQUALP) + #-Lucid ((UEQUAL EQUAL) #'equal) + (otherwise (error "bad arg to make-hashtable"))))) + (make-hash-table :test test))) + +;17.2 Accessing + +(defmacro HGET (table key &rest default) + `(gethash ,key ,table ,@default)) + +(defun HKEYS (table) + (let (keys) + (maphash + #'(lambda (key val) (declare (ignore val)) (push key keys)) table) + keys)) + +#+Lucid +(define-function 'HASHTABLE-CLASS #'system::hash-table-test) + +#+AKCL +(clines "int mem_value(x ,i)object x;int i; { return ((short *)x)[i];}") +#+AKCL +(defentry memory-value-short(object int) (int "mem_value")) + +;(memory-value-short (make-hash-table :test 'equal) 12) is 0,1,or 2 +;depending on whether the test is eq,eql or equal. +#+AKCL +(defun HASHTABLE-CLASS (table) + (case (memory-value-short table 12) + (0 'EQ) + (1 'EQL) + (2 'EQUAL) + (t "error unknown hash table class"))) + +#+:CCL +(defun HASHTABLE-CLASS (table) + (case (hashtable-flavour table) + (0 'EQ) + (1 'EQL) + (2 'EQUAL) + (t (format nil "error unknown hash table class ~a" (hashtable-flavour table))))) + +(define-function 'HCOUNT #'hash-table-count) + +;17.4 Searching and Updating + +(defun HPUT (table key value) (setf (gethash key table) value)) + +(defun HPUT* (table alist) + (mapc #'(lambda (pair) (hput table (car pair) (cdr pair))) alist)) + +(defmacro HREM (table key) `(remhash ,key ,table)) + +(defun HREMPROP (table key property) + (let ((plist (gethash key table))) + (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) diff --git a/src/interp/hash.lisp.pamphlet b/src/interp/hash.lisp.pamphlet deleted file mode 100644 index be039807..00000000 --- a/src/interp/hash.lisp.pamphlet +++ /dev/null @@ -1,147 +0,0 @@ -\documentclass{article} -\usepackage{axiom} - -\title{\File{src/interp/hash.lisp} Pamphlet} -\author{Timothy Daly} - -\begin{document} -\maketitle -\begin{abstract} -\end{abstract} - -\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. - -@ -<<*>>= -<> - -(IMPORT-MODULE "vmlisp") -(in-package "BOOT") - -(export '(MAKE-HASHTABLE HGET HKEYS HCOUNT HPUT HPUT* HREM HCLEAR HREMPROP - HASHEQ HASHUEQUAL HASHCVEC HASHID HASHTABLEP CVEC UEQUAL ID HPUTPROP - HASHTABLE-CLASS)) - -;17.0 Operations on Hashtables -;17.1 Creation - -(defun MAKE-HASHTABLE (id1 &optional (id2 nil)) - (declare (ignore id2)) - (let ((test (case id1 - ((EQ ID) #'eq) - (CVEC #'equal) - (EQL #'eql) - #+Lucid ((UEQUAL EQUALP) #'EQUALP) - #-Lucid ((UEQUAL EQUAL) #'equal) - (otherwise (error "bad arg to make-hashtable"))))) - (make-hash-table :test test))) - -;17.2 Accessing - -(defmacro HGET (table key &rest default) - `(gethash ,key ,table ,@default)) - -(defun HKEYS (table) - (let (keys) - (maphash - #'(lambda (key val) (declare (ignore val)) (push key keys)) table) - keys)) - -#+Lucid -(define-function 'HASHTABLE-CLASS #'system::hash-table-test) - -#+AKCL -(clines "int mem_value(x ,i)object x;int i; { return ((short *)x)[i];}") -#+AKCL -(defentry memory-value-short(object int) (int "mem_value")) - -;(memory-value-short (make-hash-table :test 'equal) 12) is 0,1,or 2 -;depending on whether the test is eq,eql or equal. -#+AKCL -(defun HASHTABLE-CLASS (table) - (case (memory-value-short table 12) - (0 'EQ) - (1 'EQL) - (2 'EQUAL) - (t "error unknown hash table class"))) - -#+:CCL -(defun HASHTABLE-CLASS (table) - (case (hashtable-flavour table) - (0 'EQ) - (1 'EQL) - (2 'EQUAL) - (t (format nil "error unknown hash table class ~a" (hashtable-flavour table))))) - -(define-function 'HCOUNT #'hash-table-count) - -;17.4 Searching and Updating - -(defun HPUT (table key value) (setf (gethash key table) value)) - -(defun HPUT* (table alist) - (mapc #'(lambda (pair) (hput table (car pair) (cdr pair))) alist)) - -(defmacro HREM (table key) `(remhash ,key ,table)) - -(defun HREMPROP (table key property) - (let ((plist (gethash key table))) - (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) -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/interp/hashcode.boot b/src/interp/hashcode.boot new file mode 100644 index 00000000..53a42d04 --- /dev/null +++ b/src/interp/hashcode.boot @@ -0,0 +1,109 @@ +-- 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. + + +)package "BOOT" + +-- Type hasher for old compiler style type names which produces a hash code +-- compatible with the asharp compiler. Takes a hard error if the type +-- is parameterized, but has no constructor modemap. +getDomainHash dom == SPADCALL(CDR dom, (CAR dom).4) + +hashType(type, percentHash) == + SYMBOLP type => + type = '$ => percentHash + type = "%" => percentHash + hashString SYMBOL_-NAME type + STRINGP type => hashCombine(hashString type, + hashString('"Enumeration")) + type is ['QUOTE, val] => hashType(val, percentHash) + type is [dom] => hashString SYMBOL_-NAME dom + type is ['_:, ., type2] => hashType(type2, percentHash) + isDomain type => getDomainHash type + [op, :args] := type + hash := hashString SYMBOL_-NAME op + op = 'Mapping => + hash := hashString '"->" + [retType, :mapArgs] := args + for arg in mapArgs repeat + hash := hashCombine(hashType(arg, percentHash), hash) + retCode := hashType(retType, percentHash) + EQL(retCode, $VoidHash) => hash + hashCombine(retCode, hash) + op = 'Enumeration => + for arg in args repeat + hash := hashCombine(hashString(STRING arg), hash) + hash + op in $DomainsWithoutLisplibs => + for arg in args repeat + hash := hashCombine(hashType(arg, percentHash), hash) + hash + + cmm := CDDAR getConstructorModemap(op) + cosig := CDR GETDATABASE(op, 'COSIG) + for arg in args for c in cosig for ct in cmm repeat + if c then + hash := hashCombine(hashType(arg, percentHash), hash) + else + hash := hashCombine(7, hash) +-- !!! If/when asharp hashes values using their type, use instead +-- ctt := EQSUBSTLIST(args, $FormalMapVariableList, ct) +-- hash := hashCombine(hashType(ctt, percentHash), hash) + + + hash + +--The following are in cfuns.lisp +$hashModulus := 1073741789 -- largest 30-bit prime + +-- Produce a 30-bit hash code. This function must produce the same codes +-- as the asharp string hasher in src/strops.c +hashString str == + h := 0 + for i in 0..#str-1 repeat + j := CHAR_-CODE char str.i + h := LOGXOR(h, ASH(h, 8)) + h := h + j + 200041 + h := LOGAND(h, 1073741823) -- 0x3FFFFFFF + REM(h, $hashModulus) + +-- Combine two hash codes to make a new one. Must be the same as in +-- the hashCombine function in aslib/runtime.as in asharp. +hashCombine(hash1, hash2) == + MOD(ASH(LOGAND(hash2, 16777215), 6) + hash1, $hashModulus) + + +$VoidHash := hashString '"Void" + + +-- following two lines correct bad coSig properties due to SubsetCategory +--putConstructorProperty('LocalAlgebra,'coSig,'(NIL T T T)) +--putConstructorProperty('Localize,'coSig,'(NIL T T T)) diff --git a/src/interp/hashcode.boot.pamphlet b/src/interp/hashcode.boot.pamphlet deleted file mode 100644 index 4a0f640e..00000000 --- a/src/interp/hashcode.boot.pamphlet +++ /dev/null @@ -1,131 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/interp hashcode.boot} -\author{The Axiom Team} -\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. - -@ -<<*>>= -<> - -)package "BOOT" - --- Type hasher for old compiler style type names which produces a hash code --- compatible with the asharp compiler. Takes a hard error if the type --- is parameterized, but has no constructor modemap. -getDomainHash dom == SPADCALL(CDR dom, (CAR dom).4) - -hashType(type, percentHash) == - SYMBOLP type => - type = '$ => percentHash - type = "%" => percentHash - hashString SYMBOL_-NAME type - STRINGP type => hashCombine(hashString type, - hashString('"Enumeration")) - type is ['QUOTE, val] => hashType(val, percentHash) - type is [dom] => hashString SYMBOL_-NAME dom - type is ['_:, ., type2] => hashType(type2, percentHash) - isDomain type => getDomainHash type - [op, :args] := type - hash := hashString SYMBOL_-NAME op - op = 'Mapping => - hash := hashString '"->" - [retType, :mapArgs] := args - for arg in mapArgs repeat - hash := hashCombine(hashType(arg, percentHash), hash) - retCode := hashType(retType, percentHash) - EQL(retCode, $VoidHash) => hash - hashCombine(retCode, hash) - op = 'Enumeration => - for arg in args repeat - hash := hashCombine(hashString(STRING arg), hash) - hash - op in $DomainsWithoutLisplibs => - for arg in args repeat - hash := hashCombine(hashType(arg, percentHash), hash) - hash - - cmm := CDDAR getConstructorModemap(op) - cosig := CDR GETDATABASE(op, 'COSIG) - for arg in args for c in cosig for ct in cmm repeat - if c then - hash := hashCombine(hashType(arg, percentHash), hash) - else - hash := hashCombine(7, hash) --- !!! If/when asharp hashes values using their type, use instead --- ctt := EQSUBSTLIST(args, $FormalMapVariableList, ct) --- hash := hashCombine(hashType(ctt, percentHash), hash) - - - hash - ---The following are in cfuns.lisp -$hashModulus := 1073741789 -- largest 30-bit prime - --- Produce a 30-bit hash code. This function must produce the same codes --- as the asharp string hasher in src/strops.c -hashString str == - h := 0 - for i in 0..#str-1 repeat - j := CHAR_-CODE char str.i - h := LOGXOR(h, ASH(h, 8)) - h := h + j + 200041 - h := LOGAND(h, 1073741823) -- 0x3FFFFFFF - REM(h, $hashModulus) - --- Combine two hash codes to make a new one. Must be the same as in --- the hashCombine function in aslib/runtime.as in asharp. -hashCombine(hash1, hash2) == - MOD(ASH(LOGAND(hash2, 16777215), 6) + hash1, $hashModulus) - - -$VoidHash := hashString '"Void" - - --- following two lines correct bad coSig properties due to SubsetCategory ---putConstructorProperty('LocalAlgebra,'coSig,'(NIL T T T)) ---putConstructorProperty('Localize,'coSig,'(NIL T T T)) -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/interp/ht-root.boot b/src/interp/ht-root.boot new file mode 100644 index 00000000..7325b3b8 --- /dev/null +++ b/src/interp/ht-root.boot @@ -0,0 +1,289 @@ +-- 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. + + +$historyDisplayWidth := 120 +$newline := char 10 + +downlink page == + $saturn => downlinkSaturn page + htInitPage('"Bridge",nil) + htSay('"\replacepage{", page, '"}") + htShowPage() + +downlinkSaturn fn == + u := dbReadLines(fn) + lines := '"" + while u is [line,:u] repeat + n := MAXINDEX line + n < 1 => nil + line.0 = (char '_%) => nil + lines := STRCONC(lines,line) + issueHTSaturn lines + +dbNonEmptyPattern pattern == + null pattern => '"*" + pattern := STRINGIMAGE pattern + #pattern > 0 => pattern + '"*" + +htSystemVariables() == main where + main == + not $fullScreenSysVars => htSetVars() + classlevel := $UserLevel + $levels : local := '(compiler development interpreter) + $heading : local := nil + while classlevel ^= first $levels repeat $levels := rest $levels + table := NREVERSE fn($setOptions,nil,true) + htInitPage('"System Variables",nil) + htSay '"\beginmenu" + lastHeading := nil + for [heading,name,message,.,key,variable,options,func] in table repeat + htSay('"\newline\item ") + if heading = lastHeading then htSay '"\tab{8}" else + htSay(heading,'"\tab{8}") + lastHeading := heading + htSay('"{\em ",name,"}\tab{22}",message) + htSay('"\tab{80}") + key = 'FUNCTION => + null options => htMakePage [['bcLinks,['"reset",'"",func,nil]]] + [msg,class,var,valuesOrFunction,:.] := first options --skip first message + functionTail(name,class,var,valuesOrFunction) + for option in rest options repeat + option is ['break,:.] => 'skip + [msg,class,var,valuesOrFunction,:.] := option + htSay('"\newline\tab{22}", msg,'"\tab{80}") + functionTail(name,class,var,valuesOrFunction) + val := eval variable + displayOptions(name,key,variable,val,options) + htSay '"\endmenu" + htShowPage() + functionTail(name,class,var,valuesOrFunction) == + val := eval var + atom valuesOrFunction => + htMakePage '((domainConditions (isDomain STR (String)))) + htMakePage [['bcLinks,['"reset",'"",'htSetSystemVariableKind,[var,name,nil]]]] + htMakePage [['bcStrings,[30,STRINGIMAGE val,name,valuesOrFunction]]] + displayOptions(name,class,var,val,valuesOrFunction) + displayOptions(name,class,variable,val,options) == + class = 'INTEGER => + htMakePage [['bcLispLinks,[[['text,options.0,'"-",options.1 or '""]],'"",'htSetSystemVariableKind,[variable,name,'PARSE_-INTEGER]]]] + htMakePage '((domainConditions (isDomain INT (Integer)))) + htMakePage [['bcStrings,[5,STRINGIMAGE val,name,'INT]]] + class = 'STRING => + htSay('"{\em ",val,'"}\space{1}") + for x in options repeat + val = x or val = true and x = 'on or null val and x = 'off => + htSay('"{\em ",x,'"}\space{1}") + htMakePage [['bcLispLinks,[x,'" ",'htSetSystemVariable,[variable,x]]]] + fn(t,al,firstTime) == + atom t => al + if firstTime then $heading := opOf first t + fn(rest t,gn(first t,al),firstTime) + gn(t,al) == + [.,.,class,key,.,options,:.] := t + not MEMQ(class,$levels) => al + key = 'LITERALS or key = 'INTEGER or key = 'STRING => [[$heading,:t],:al] + key = 'TREE => fn(options,al,false) + key = 'FUNCTION => [[$heading,:t],:al] + systemError key + +htSetSystemVariableKind(htPage,[variable,name,fun]) == + value := htpLabelInputString(htPage,name) + if STRINGP value and fun then value := FUNCALL(fun,value) +--SCM::what to do??? if not FIXP value then userError ??? + SET(variable,value) + htSystemVariables () + +htSetSystemVariable(htPage,[name,value]) == + value := + value = 'on => true + value = 'off => nil + value + SET(name,value) + htSystemVariables () + +htGloss(pattern) == htGlossPage(nil,dbNonEmptyPattern pattern or '"*",true) + +htGlossPage(htPage,pattern,tryAgain?) == + $wildCard: local := char '_* + pattern = '"*" => downlink 'GlossaryPage + filter := pmTransFilter pattern + grepForm := mkGrepPattern(filter,'none) + $key: local := 'none + results := applyGrep(grepForm,'gloss) + --pathname := STRCONC('"/tmp/",PNAME resultFile,'".text.", getEnv '"SPADNUM") + --instream := MAKE_-INSTREAM pathname + defstream := MAKE_-INSTREAM STRCONC(getEnv '"AXIOM",'"/algebra/glossdef.text") + lines := gatherGlossLines(results,defstream) + -- OBEY STRCONC('"rm -f ", pathname) + --PROBE_-FILE(pathname) and DELETE_-FILE(pathname) + --SHUT instream + heading := + pattern = '"" => '"Glossary" + null lines => ['"No glossary items match {\em ",pattern,'"}"] + ['"Glossary items matching {\em ",pattern,'"}"] + null lines => + tryAgain? and #pattern > 0 => + (pattern.(k := MAXINDEX(pattern))) = char 's => + htGlossPage(htPage,SUBSTRING(pattern,0,k),true) + UPPER_-CASE_-P pattern.0 => + htGlossPage(htPage,DOWNCASE pattern,false) + errorPage(htPage,['"Sorry",nil,['"\centerline{",:heading,'"}"]]) + errorPage(htPage,['"Sorry",nil,['"\centerline{",:heading,'"}"]]) + htInitPageNoScroll(nil,heading) + htSay('"\beginscroll\beginmenu") + for line in lines repeat + tick := charPosition($tick,line,1) + htSay('"\item{\em \menuitemstyle{}}\tab{0}{\em ",escapeString SUBSTRING(line,0,tick),'"} ",SUBSTRING(line,tick + 1,nil)) + htSay '"\endmenu " + htSay '"\endscroll\newline " + htMakePage [['bcLinks,['"Search",'"",'htGlossSearch,nil]]] + htSay '" for glossary entry matching " + htMakePage [['bcStrings, [24,'"*",'filter,'EM]]] + htShowPageNoScroll() + +gatherGlossLines(results,defstream) == + acc := nil + for keyline in results repeat + --keyline := READLINE instream + n := charPosition($tick,keyline,0) + keyAndTick := SUBSTRING(keyline,0,n + 1) + byteAddress := string2Integer SUBSTRING(keyline,n + 1,nil) + FILE_-POSITION(defstream,byteAddress) + line := READLINE defstream + k := charPosition($tick,line,1) + pointer := SUBSTRING(line,0,k) + def := SUBSTRING(line,k + 1,nil) + xtralines := nil + while not EOFP defstream and (x := READLINE defstream) and + (j := charPosition($tick,x,1)) and (nextPointer := SUBSTRING(x,0,j)) + and (nextPointer = pointer) repeat + xtralines := [SUBSTRING(x,j + 1,nil),:xtralines] + acc := [STRCONC(keyAndTick,def, "STRCONC"/NREVERSE xtralines),:acc] + REVERSE acc + +htGlossSearch(htPage,junk) == htGloss htpLabelInputString(htPage,'filter) + +htGreekSearch(filter) == + ss := dbNonEmptyPattern filter + s := pmTransFilter ss + s is ['error,:.] => bcErrorPage s + not s => errorPage(nil,[['"Missing search string"],nil, + '"\vspace{2}\centerline{To select one of the greek letters:}\newline ", + '"\centerline{{\em first} enter a search key into the input area}\newline ", + '"\centerline{{\em then } move the mouse cursor to the work {\em search} and click}"]) + filter := patternCheck s + names := '(alpha beta gamma delta epsilon zeta eta theta iota kappa lambda mu nu pi) + for x in names repeat + superMatch?(filter,PNAME x) => matches := [x,:matches] + nonmatches := [x,:nonmatches] + matches := NREVERSE matches + nonmatches := NREVERSE nonmatches + htInitPage('"Greek Names",nil) + null matches => + htInitPage(['"Greek names matching search string {\em ",ss,'"}"],nil) + htSay("\vspace{2}\centerline{Sorry, but no greek letters match your search string}\centerline{{\em ",ss,"}}\centerline{Click on the up-arrow to try again}") + htShowPage() + htInitPage(['"Greek letters matching search string {\em ",ss,'"}"],nil) + if nonmatches + then htSay('"The greek letters that {\em match} your search string {\em ",ss,'"}:") + else htSay('"Your search string {\em ",ss,"} matches all of the greek letters:") + htSay('"{\em \table{") + for x in matches repeat htSay('"{",x,'"}") + htSay('"}}\vspace{1}") + if nonmatches then + htSay('"The greek letters that {\em do not match} your search string:{\em \table{") + for x in nonmatches repeat htSay('"{",x,'"}") + htSay('"}}") + htShowPage() + +htTextSearch(filter) == + s := pmTransFilter dbNonEmptyPattern filter + s is ['error,:.] => bcErrorPage s + not s => errorPage(nil,[['"Missing search string"],nil, + '"\vspace{2}\centerline{To select one of the lines of text:}\newline ", + '"\centerline{{\em first} enter a search key into the input area}\newline ", + '"\centerline{{\em then } move the mouse cursor to the work {\em search} and click}"]) + filter := s + lines := ['"{{\em Fruit flies} *like* a {\em banana and califlower ears.}}", + '"{{\em Sneak Sears Silas with Savings Snatch}}"] + for x in lines repeat + superMatch?(filter,x) => matches := [x,:matches] + nonmatches := [x,:nonmatches] + matches := NREVERSE matches + nonmatches := NREVERSE nonmatches + htInitPage('"Text Matches",nil) + null matches => + htInitPage(['"Lines matching search string {\em ",s,'"}"],nil) + htSay("\vspace{2}\centerline{Sorry, but no lines match your search string}\centerline{{\em ",s,"}}\centerline{Click on the up-arrow to try again}") + htShowPage() + htInitPage(['"Lines matching search string {\em ",s,'"}"],nil) + if nonmatches + then htSay('"The lines that {\em match} your search string {\em ",s,'"}:") + else htSay('"Your search string {\em ",s,"} matches both lines:") + htSay('"{\em \table{") + for x in matches repeat htSay('"{",x,'"}") + htSay('"}}\vspace{1}") + if nonmatches then + htSay('"The line that {\em does not match} your search string:{\em \table{") + for x in nonmatches repeat htSay('"{",x,'"}") + htSay('"}}") + htShowPage() + +htTutorialSearch pattern == + s := dbNonEmptyPattern pattern or return + errorPage(nil,['"Empty search key",nil,'"\vspace{3}\centerline{You must enter some search string"]) + s := mkUnixPattern s + source := '"$AXIOM/share/hypertex/pages/ht.db" + target :='"/tmp/temp.text.$SPADNUM" + OBEY STRCONC('"$AXIOM/lib/hthits",'" _"",s,'"_" ",source,'" > ",target) + lines := dbReadLines 'temp + htInitPageNoScroll(nil,['"Tutorial Pages mentioning {\em ",pattern,'"}"]) + htSay('"\beginscroll\table{") + for line in lines repeat + [name,title,.] := dbParts(line,3,0) + htSay ['"{\downlink{",title,'"}{",name,'"}}"] + htSay '"}" + htShowPage() + +mkUnixPattern s == + u := mkUpDownPattern s + starPositions := REVERSE [i for i in 1..(-1 + MAXINDEX u) | u.i = $wild] + for i in starPositions repeat + u := STRCONC(SUBSTRING(u,0,i),'".*",SUBSTRING(u,i + 1,nil)) + if u.0 ^= $wild then u := STRCONC('"[^a-zA-Z]",u) + else u := SUBSTRING(u,1,nil) + if u.(k := MAXINDEX u) ^= $wild then u := STRCONC(u,'"[^a-zA-Z]") + else u := SUBSTRING(u,0,k) + u + + diff --git a/src/interp/ht-root.boot.pamphlet b/src/interp/ht-root.boot.pamphlet deleted file mode 100644 index 3d8d08af..00000000 --- a/src/interp/ht-root.boot.pamphlet +++ /dev/null @@ -1,311 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/interp ht-root.boot} -\author{The Axiom Team} -\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. - -@ -<<*>>= -<> - -$historyDisplayWidth := 120 -$newline := char 10 - -downlink page == - $saturn => downlinkSaturn page - htInitPage('"Bridge",nil) - htSay('"\replacepage{", page, '"}") - htShowPage() - -downlinkSaturn fn == - u := dbReadLines(fn) - lines := '"" - while u is [line,:u] repeat - n := MAXINDEX line - n < 1 => nil - line.0 = (char '_%) => nil - lines := STRCONC(lines,line) - issueHTSaturn lines - -dbNonEmptyPattern pattern == - null pattern => '"*" - pattern := STRINGIMAGE pattern - #pattern > 0 => pattern - '"*" - -htSystemVariables() == main where - main == - not $fullScreenSysVars => htSetVars() - classlevel := $UserLevel - $levels : local := '(compiler development interpreter) - $heading : local := nil - while classlevel ^= first $levels repeat $levels := rest $levels - table := NREVERSE fn($setOptions,nil,true) - htInitPage('"System Variables",nil) - htSay '"\beginmenu" - lastHeading := nil - for [heading,name,message,.,key,variable,options,func] in table repeat - htSay('"\newline\item ") - if heading = lastHeading then htSay '"\tab{8}" else - htSay(heading,'"\tab{8}") - lastHeading := heading - htSay('"{\em ",name,"}\tab{22}",message) - htSay('"\tab{80}") - key = 'FUNCTION => - null options => htMakePage [['bcLinks,['"reset",'"",func,nil]]] - [msg,class,var,valuesOrFunction,:.] := first options --skip first message - functionTail(name,class,var,valuesOrFunction) - for option in rest options repeat - option is ['break,:.] => 'skip - [msg,class,var,valuesOrFunction,:.] := option - htSay('"\newline\tab{22}", msg,'"\tab{80}") - functionTail(name,class,var,valuesOrFunction) - val := eval variable - displayOptions(name,key,variable,val,options) - htSay '"\endmenu" - htShowPage() - functionTail(name,class,var,valuesOrFunction) == - val := eval var - atom valuesOrFunction => - htMakePage '((domainConditions (isDomain STR (String)))) - htMakePage [['bcLinks,['"reset",'"",'htSetSystemVariableKind,[var,name,nil]]]] - htMakePage [['bcStrings,[30,STRINGIMAGE val,name,valuesOrFunction]]] - displayOptions(name,class,var,val,valuesOrFunction) - displayOptions(name,class,variable,val,options) == - class = 'INTEGER => - htMakePage [['bcLispLinks,[[['text,options.0,'"-",options.1 or '""]],'"",'htSetSystemVariableKind,[variable,name,'PARSE_-INTEGER]]]] - htMakePage '((domainConditions (isDomain INT (Integer)))) - htMakePage [['bcStrings,[5,STRINGIMAGE val,name,'INT]]] - class = 'STRING => - htSay('"{\em ",val,'"}\space{1}") - for x in options repeat - val = x or val = true and x = 'on or null val and x = 'off => - htSay('"{\em ",x,'"}\space{1}") - htMakePage [['bcLispLinks,[x,'" ",'htSetSystemVariable,[variable,x]]]] - fn(t,al,firstTime) == - atom t => al - if firstTime then $heading := opOf first t - fn(rest t,gn(first t,al),firstTime) - gn(t,al) == - [.,.,class,key,.,options,:.] := t - not MEMQ(class,$levels) => al - key = 'LITERALS or key = 'INTEGER or key = 'STRING => [[$heading,:t],:al] - key = 'TREE => fn(options,al,false) - key = 'FUNCTION => [[$heading,:t],:al] - systemError key - -htSetSystemVariableKind(htPage,[variable,name,fun]) == - value := htpLabelInputString(htPage,name) - if STRINGP value and fun then value := FUNCALL(fun,value) ---SCM::what to do??? if not FIXP value then userError ??? - SET(variable,value) - htSystemVariables () - -htSetSystemVariable(htPage,[name,value]) == - value := - value = 'on => true - value = 'off => nil - value - SET(name,value) - htSystemVariables () - -htGloss(pattern) == htGlossPage(nil,dbNonEmptyPattern pattern or '"*",true) - -htGlossPage(htPage,pattern,tryAgain?) == - $wildCard: local := char '_* - pattern = '"*" => downlink 'GlossaryPage - filter := pmTransFilter pattern - grepForm := mkGrepPattern(filter,'none) - $key: local := 'none - results := applyGrep(grepForm,'gloss) - --pathname := STRCONC('"/tmp/",PNAME resultFile,'".text.", getEnv '"SPADNUM") - --instream := MAKE_-INSTREAM pathname - defstream := MAKE_-INSTREAM STRCONC(getEnv '"AXIOM",'"/algebra/glossdef.text") - lines := gatherGlossLines(results,defstream) - -- OBEY STRCONC('"rm -f ", pathname) - --PROBE_-FILE(pathname) and DELETE_-FILE(pathname) - --SHUT instream - heading := - pattern = '"" => '"Glossary" - null lines => ['"No glossary items match {\em ",pattern,'"}"] - ['"Glossary items matching {\em ",pattern,'"}"] - null lines => - tryAgain? and #pattern > 0 => - (pattern.(k := MAXINDEX(pattern))) = char 's => - htGlossPage(htPage,SUBSTRING(pattern,0,k),true) - UPPER_-CASE_-P pattern.0 => - htGlossPage(htPage,DOWNCASE pattern,false) - errorPage(htPage,['"Sorry",nil,['"\centerline{",:heading,'"}"]]) - errorPage(htPage,['"Sorry",nil,['"\centerline{",:heading,'"}"]]) - htInitPageNoScroll(nil,heading) - htSay('"\beginscroll\beginmenu") - for line in lines repeat - tick := charPosition($tick,line,1) - htSay('"\item{\em \menuitemstyle{}}\tab{0}{\em ",escapeString SUBSTRING(line,0,tick),'"} ",SUBSTRING(line,tick + 1,nil)) - htSay '"\endmenu " - htSay '"\endscroll\newline " - htMakePage [['bcLinks,['"Search",'"",'htGlossSearch,nil]]] - htSay '" for glossary entry matching " - htMakePage [['bcStrings, [24,'"*",'filter,'EM]]] - htShowPageNoScroll() - -gatherGlossLines(results,defstream) == - acc := nil - for keyline in results repeat - --keyline := READLINE instream - n := charPosition($tick,keyline,0) - keyAndTick := SUBSTRING(keyline,0,n + 1) - byteAddress := string2Integer SUBSTRING(keyline,n + 1,nil) - FILE_-POSITION(defstream,byteAddress) - line := READLINE defstream - k := charPosition($tick,line,1) - pointer := SUBSTRING(line,0,k) - def := SUBSTRING(line,k + 1,nil) - xtralines := nil - while not EOFP defstream and (x := READLINE defstream) and - (j := charPosition($tick,x,1)) and (nextPointer := SUBSTRING(x,0,j)) - and (nextPointer = pointer) repeat - xtralines := [SUBSTRING(x,j + 1,nil),:xtralines] - acc := [STRCONC(keyAndTick,def, "STRCONC"/NREVERSE xtralines),:acc] - REVERSE acc - -htGlossSearch(htPage,junk) == htGloss htpLabelInputString(htPage,'filter) - -htGreekSearch(filter) == - ss := dbNonEmptyPattern filter - s := pmTransFilter ss - s is ['error,:.] => bcErrorPage s - not s => errorPage(nil,[['"Missing search string"],nil, - '"\vspace{2}\centerline{To select one of the greek letters:}\newline ", - '"\centerline{{\em first} enter a search key into the input area}\newline ", - '"\centerline{{\em then } move the mouse cursor to the work {\em search} and click}"]) - filter := patternCheck s - names := '(alpha beta gamma delta epsilon zeta eta theta iota kappa lambda mu nu pi) - for x in names repeat - superMatch?(filter,PNAME x) => matches := [x,:matches] - nonmatches := [x,:nonmatches] - matches := NREVERSE matches - nonmatches := NREVERSE nonmatches - htInitPage('"Greek Names",nil) - null matches => - htInitPage(['"Greek names matching search string {\em ",ss,'"}"],nil) - htSay("\vspace{2}\centerline{Sorry, but no greek letters match your search string}\centerline{{\em ",ss,"}}\centerline{Click on the up-arrow to try again}") - htShowPage() - htInitPage(['"Greek letters matching search string {\em ",ss,'"}"],nil) - if nonmatches - then htSay('"The greek letters that {\em match} your search string {\em ",ss,'"}:") - else htSay('"Your search string {\em ",ss,"} matches all of the greek letters:") - htSay('"{\em \table{") - for x in matches repeat htSay('"{",x,'"}") - htSay('"}}\vspace{1}") - if nonmatches then - htSay('"The greek letters that {\em do not match} your search string:{\em \table{") - for x in nonmatches repeat htSay('"{",x,'"}") - htSay('"}}") - htShowPage() - -htTextSearch(filter) == - s := pmTransFilter dbNonEmptyPattern filter - s is ['error,:.] => bcErrorPage s - not s => errorPage(nil,[['"Missing search string"],nil, - '"\vspace{2}\centerline{To select one of the lines of text:}\newline ", - '"\centerline{{\em first} enter a search key into the input area}\newline ", - '"\centerline{{\em then } move the mouse cursor to the work {\em search} and click}"]) - filter := s - lines := ['"{{\em Fruit flies} *like* a {\em banana and califlower ears.}}", - '"{{\em Sneak Sears Silas with Savings Snatch}}"] - for x in lines repeat - superMatch?(filter,x) => matches := [x,:matches] - nonmatches := [x,:nonmatches] - matches := NREVERSE matches - nonmatches := NREVERSE nonmatches - htInitPage('"Text Matches",nil) - null matches => - htInitPage(['"Lines matching search string {\em ",s,'"}"],nil) - htSay("\vspace{2}\centerline{Sorry, but no lines match your search string}\centerline{{\em ",s,"}}\centerline{Click on the up-arrow to try again}") - htShowPage() - htInitPage(['"Lines matching search string {\em ",s,'"}"],nil) - if nonmatches - then htSay('"The lines that {\em match} your search string {\em ",s,'"}:") - else htSay('"Your search string {\em ",s,"} matches both lines:") - htSay('"{\em \table{") - for x in matches repeat htSay('"{",x,'"}") - htSay('"}}\vspace{1}") - if nonmatches then - htSay('"The line that {\em does not match} your search string:{\em \table{") - for x in nonmatches repeat htSay('"{",x,'"}") - htSay('"}}") - htShowPage() - -htTutorialSearch pattern == - s := dbNonEmptyPattern pattern or return - errorPage(nil,['"Empty search key",nil,'"\vspace{3}\centerline{You must enter some search string"]) - s := mkUnixPattern s - source := '"$AXIOM/share/hypertex/pages/ht.db" - target :='"/tmp/temp.text.$SPADNUM" - OBEY STRCONC('"$AXIOM/lib/hthits",'" _"",s,'"_" ",source,'" > ",target) - lines := dbReadLines 'temp - htInitPageNoScroll(nil,['"Tutorial Pages mentioning {\em ",pattern,'"}"]) - htSay('"\beginscroll\table{") - for line in lines repeat - [name,title,.] := dbParts(line,3,0) - htSay ['"{\downlink{",title,'"}{",name,'"}}"] - htSay '"}" - htShowPage() - -mkUnixPattern s == - u := mkUpDownPattern s - starPositions := REVERSE [i for i in 1..(-1 + MAXINDEX u) | u.i = $wild] - for i in starPositions repeat - u := STRCONC(SUBSTRING(u,0,i),'".*",SUBSTRING(u,i + 1,nil)) - if u.0 ^= $wild then u := STRCONC('"[^a-zA-Z]",u) - else u := SUBSTRING(u,1,nil) - if u.(k := MAXINDEX u) ^= $wild then u := STRCONC(u,'"[^a-zA-Z]") - else u := SUBSTRING(u,0,k) - u - - -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/interp/ht-util.boot.pamphlet b/src/interp/ht-util.boot.pamphlet deleted file mode 100644 index f875959f..00000000 --- a/src/interp/ht-util.boot.pamphlet +++ /dev/null @@ -1,753 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/interp ht-util.boot} -\author{The Axiom Team} -\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. - -@ -<<*>>= -<> - --- HyperTeX Utilities for generating basic Command pages ---)package "BOOT" - -$bcParseOnly := true - --- List of issued hypertex lines -$htLineList := nil - --- pointer to the page we are currently defining -$curPage := nil - --- List of currently active window named -$activePageList := nil - -htpDestroyPage(pageName) == - pageName in $activePageList => - SET(pageName, nil) - $activePageList := NREMOVE($activePageList, pageName) - -htpName htPage == --- GENSYM whose value is the page - ELT(htPage, 0) - -htpSetName(htPage, val) == - SETELT(htPage, 0, val) - -htpDomainConditions htPage == --- List of Domain conditions - ELT(htPage, 1) - -htpSetDomainConditions(htPage, val) == - SETELT(htPage, 1, val) - -htpDomainVariableAlist htPage == --- alist of pattern variables and conditions - ELT(htPage, 2) - -htpSetDomainVariableAlist(htPage, val) == - SETELT(htPage, 2, val) - -htpDomainPvarSubstList htPage == --- alist of user pattern variables to system vars - ELT(htPage, 3) - -htpSetDomainPvarSubstList(htPage, val) == - SETELT(htPage, 3, val) - -htpRadioButtonAlist htPage == --- alist of radio button group names and labels - ELT(htPage, 4) - -htpButtonValue(htPage, groupName) == - for buttonName in LASSOC(groupName, htpRadioButtonAlist htPage) repeat - (stripSpaces htpLabelInputString(htPage, buttonName)) = '"t" => - return buttonName - -htpSetRadioButtonAlist(htPage, val) == - SETELT(htPage, 4, val) - -htpInputAreaAlist htPage == --- Alist of input-area labels, and default values - ELT(htPage, 5) - -htpSetInputAreaAlist(htPage, val) == - SETELT(htPage, 5, val) - -htpAddInputAreaProp(htPage, label, prop) == - SETELT(htPage, 5, [[label, nil, nil, nil, :prop], :ELT(htPage, 5)]) - -htpPropertyList htPage == --- Association list of user-defined properties - ELT(htPage, 6) - -htpProperty(htPage, propName) == - LASSOC(propName, ELT(htPage, 6)) - -htpSetProperty(htPage, propName, val) == - pair := ASSOC(propName, ELT(htPage, 6)) - pair => RPLACD(pair, val) - SETELT(htPage, 6, [[propName, :val], :ELT(htPage, 6)]) - -htpLabelInputString(htPage, label) == --- value user typed as input string on page - props := LASSOC(label, htpInputAreaAlist htPage) - props and STRINGP (s := ELT(props,0)) => - s = '"" => s - trimString s - nil - -htpLabelFilteredInputString(htPage, label) == --- value user typed as input string on page - props := LASSOC(label, htpInputAreaAlist htPage) - props => - #props > 5 and ELT(props, 6) => - FUNCALL(SYMBOL_-FUNCTION ELT(props, 6), ELT(props, 0)) - replacePercentByDollar ELT(props, 0) - nil - -replacePercentByDollar s == fn(s,0,MAXINDEX s) where - fn(s,i,n) == - i > n => '"" - (m := charPosition(char "%",s,i)) > n => SUBSTRING(s,i,nil) - STRCONC(SUBSTRING(s,i,m - i),'"$",fn(s,m + 1,n)) - -htpSetLabelInputString(htPage, label, val) == -------------------> OBSELETE --- value user typed as input string on page - props := LASSOC(label, htpInputAreaAlist htPage) - props => SETELT(props, 0, STRINGIMAGE val) - nil - -htpLabelSpadValue(htPage, label) == --- Scratchpad value of parsed and evaled inputString, as (type . value) - props := LASSOC(label, htpInputAreaAlist htPage) - props => ELT(props, 1) - nil - -htpSetLabelSpadValue(htPage, label, val) == --- value user typed as input string on page - props := LASSOC(label, htpInputAreaAlist htPage) - props => SETELT(props, 1, val) - nil - -htpLabelErrorMsg(htPage, label) == --- error message associated with input area - props := LASSOC(label, htpInputAreaAlist htPage) - props => ELT(props, 2) - nil - -htpSetLabelErrorMsg(htPage, label, val) == --- error message associated with input area - props := LASSOC(label, htpInputAreaAlist htPage) - props => SETELT(props, 2, val) - nil - -htpLabelType(htPage, label) == --- either 'string or 'button - props := LASSOC(label, htpInputAreaAlist htPage) - props => ELT(props, 3) - nil - -htpLabelDefault(htPage, label) == --- default value for the input area - msg := htpLabelInputString(htPage, label) => - msg = '"t" => 1 - msg = '"nil" => 0 - msg - props := LASSOC(label, htpInputAreaAlist htPage) - props => - ELT(props, 4) - nil - - -htpLabelSpadType(htPage, label) == --- pattern variable for target domain for input area - props := LASSOC(label, htpInputAreaAlist htPage) - props => ELT(props, 5) - nil - -htpLabelFilter(htPage, label) == --- string to string mapping applied to input area strings before parsing - props := LASSOC(label, htpInputAreaAlist htPage) - props => ELT(props, 6) - nil - -htpPageDescription htPage == --- a list of all the commands issued to create the basic-command page - ELT(htPage, 7) - -htpSetPageDescription(htPage, pageDescription) == - SETELT(htPage, 7, pageDescription) - -htpAddToPageDescription(htPage, pageDescrip) == --------------> OBSELETE <----------- - SETELT(htPage, 7, nconc(nreverse COPY_-LIST pageDescrip, ELT(htPage, 7))) - -iht line == --- issue a single hyperteTeX line, or a group of lines - $newPage => nil - PAIRP line => - $htLineList := NCONC(nreverse mapStringize COPY_-LIST line, $htLineList) - $htLineList := [basicStringize line, :$htLineList] - -bcHt line == ---line = '"\##1" => harharhar() - iht line - PAIRP line => - if $newPage then htpAddToPageDescription($curPage, [['text, :line]]) - if $newPage then htpAddToPageDescription($curPage, [['text, line]]) - -bcIssueHt line == - PAIRP line => htMakePage1 line - iht line - -mapStringize l == - ATOM l => l - RPLACA(l, basicStringize CAR l) - RPLACD(l, mapStringize CDR l) - l - -basicStringize s == - STRINGP s => - s = '"\$" => '"\%" - s = '"{\em $}" => '"{\em \%}" - s - s = '_$ => '"\%" - PRINC_-TO_-STRING s - -stringize s == - STRINGP s => s - PRINC_-TO_-STRING s - -htInitPage(title, propList) == -----------------------------> OBSELETE---cannot return $curPage --- start defining a hyperTeX page - htInitPageNoScroll(propList, title) - htSayStandard '"\beginscroll " - $curPage - - ---htInitPageNoHeading(propList) == ------------------------> replaced by htInitPageNoScroll --- start defining a hyperTeX page --- $curPage := htpMakeEmptyPage(propList) --- if $saturn then $saturnPage := htpMakeEmptyPage(propList) --- $newPage := true --- $htLineList := nil --- $curPage - -htAddHeading(title) == -------------------------> OBSELETE - htNewPage title - $curPage - -htShowPage() == --- show the page which has been computed - htSayStandard '"\endscroll" - htShowPageNoScroll() - -htShowPageNoScroll() == -------------------------> OBSELETE --- show the page which has been computed - htSayStandard '"\autobuttons" - htpSetPageDescription($curPage, nreverse htpPageDescription $curPage) - $newPage := false - $htLineList := nil - htMakePage htpPageDescription $curPage - line := APPLY(function CONCAT, nreverse $htLineList) - issueHT line - endHTPage() - -htMakePage itemList == -------------------------> OBSELETE --- make a page given the description in itemList - if $newPage then htpAddToPageDescription($curPage, itemList) - htMakePage1 itemList - -htMakePage1 itemList == --- make a page given the description in itemList - for [itemType, :items] in itemList repeat - itemType = 'text => iht items - itemType = 'lispLinks => htLispLinks items - itemType = 'lispmemoLinks => htLispMemoLinks items - itemType = 'bcLinks => htBcLinks items ---> - itemType = 'bcLinksNS => htBcLinks(items,true) - itemType = 'bcLispLinks => htBcLispLinks items ---> - itemType = 'radioButtons => htRadioButtons items - itemType = 'bcRadioButtons => htBcRadioButtons items - itemType = 'inputStrings => htInputStrings items - itemType = 'domainConditions => htProcessDomainConditions items - itemType = 'bcStrings => htProcessBcStrings items - itemType = 'toggleButtons => htProcessToggleButtons items - itemType = 'bcButtons => htProcessBcButtons items - itemType = 'doneButton => htProcessDoneButton items - itemType = 'doitButton => htProcessDoitButton items - systemError ['"unknown itemType", itemType] - -htMakeErrorPage htPage == -------------------> OBSELETE - $newPage := false - $htLineList := nil - $curPage := htPage - htMakePage htpPageDescription htPage - line := APPLY(function CONCAT, nreverse $htLineList) - issueHT line - endHTPage() - -htQuote s == --- wrap quotes around a piece of hyperTeX - iht '"_"" - iht s - iht '"_"" - -htProcessToggleButtons buttons == - iht '"\newline\indent{5}\beginitems " - for [message, info, defaultValue, buttonName] in buttons repeat - if NULL LASSOC(buttonName, htpInputAreaAlist $curPage) then - setUpDefault(buttonName, ['button, defaultValue]) - iht ['"\item{\em\inputbox[", htpLabelDefault($curPage, buttonName), '"]{", - buttonName, '"}{\htbmfile{pick}}{\htbmfile{unpick}}\space{}"] - bcIssueHt message - iht '"\space{}}" - bcIssueHt info - iht '"\enditems\indent{0} " - -htProcessBcButtons buttons == - for [defaultValue, buttonName] in buttons repeat - if NULL LASSOC(buttonName, htpInputAreaAlist $curPage) then - setUpDefault(buttonName, ['button, defaultValue]) - k := htpLabelDefault($curPage,buttonName) - k = 0 => iht ['"\off{",buttonName,'"}"] - k = 1 => iht ['"\on{", buttonName,'"}"] - iht ['"\inputbox[", htpLabelDefault($curPage, buttonName), '"]{", - buttonName, '"}{\htbmfile{pick}}{\htbmfile{unpick}}"] - -htProcessBcStrings strings == ----------------------> OBSELETE <------------------------ - for [numChars, default, stringName, spadType, :filter] in strings repeat - mess2 := '"" - if NULL LASSOC(stringName, htpInputAreaAlist $curPage) then - setUpDefault(stringName, ['string, default, spadType, filter]) - if htpLabelErrorMsg($curPage, stringName) then - iht ['"\centerline{{\em ", htpLabelErrorMsg($curPage, stringName), '"}}"] - mess2 := CONCAT(mess2, bcSadFaces()) - htpSetLabelErrorMsg($curPage, stringName, nil) - iht ['"\inputstring{", stringName, '"}{", - numChars, '"}{", htpLabelDefault($curPage,stringName), '"} ", mess2] - -bcSadFaces() == - '"\space{1}{\em\htbitmap{error}\htbitmap{error}\htbitmap{error}}" - -htLispLinks(links,:option) == - [links,options] := beforeAfter('options,links) - indent := LASSOC('indent,options) or 5 - iht '"\newline\indent{" - iht stringize indent - iht '"}\beginitems" - for [message, info, func, :value] in links repeat - iht '"\item[" - call := (IFCAR option => '"\lispmemolink"; '"\lispdownlink") - htMakeButton(call,message, mkCurryFun(func, value)) - iht ['"]\space{}"] - bcIssueHt info - iht '"\enditems\indent{0} " - -htLispMemoLinks(links) == htLispLinks(links,true) - -htBcLinks(links,:options) == --------------------------> OBSELETE - skipStateInfo? := IFCAR options - [links,options] := beforeAfter('options,links) - for [message, info, func, :value] in links repeat - htMakeButton('"\lispdownlink",message, - mkCurryFun(func, value),skipStateInfo?) - bcIssueHt info - -htBcLispLinks links == --------------------------> OBSELETE - [links,options] := beforeAfter('options,links) - for [message, info, func, :value] in links repeat - htMakeButton('"\lisplink",message, mkCurryFun(func, value)) - bcIssueHt info - -beforeAfter(x,u) == [[y for [y,:r] in tails u while x ^= y],r] - -mkCurryFun(fun, val) == - name := GENTEMP() - code := - ['DEFUN, name, '(arg), ['APPLY, MKQ fun, ['CONS, 'arg, MKQ val]]] - EVAL code - name - -htRadioButtons [groupName, :buttons] == - htpSetRadioButtonAlist($curPage, [[groupName, :buttonNames buttons], - : htpRadioButtonAlist $curPage]) - boxesName := GENTEMP() - iht ['"\newline\indent{5}\radioboxes{", boxesName, - '"}{\htbmfile{pick}}{\htbmfile{unpick}}\beginitems "] - defaultValue := '"1" - for [message, info, buttonName] in buttons repeat - if NULL LASSOC(buttonName, htpInputAreaAlist $curPage) then - setUpDefault(buttonName, ['button, defaultValue]) - defaultValue := '"0" - iht ['"\item{\em\radiobox[", htpLabelDefault($curPage, buttonName), '"]{", - buttonName, '"}{",boxesName, '"}\space{}"] - bcIssueHt message - iht '"\space{}}" - bcIssueHt info - iht '"\enditems\indent{0} " - -htBcRadioButtons [groupName, :buttons] == - htpSetRadioButtonAlist($curPage, [[groupName, :buttonNames buttons], - : htpRadioButtonAlist $curPage]) - boxesName := GENTEMP() - iht ['"\radioboxes{", boxesName, - '"}{\htbmfile{pick}}{\htbmfile{unpick}} "] - defaultValue := '"1" - for [message, info, buttonName] in buttons repeat - if NULL LASSOC(buttonName, htpInputAreaAlist $curPage) then - setUpDefault(buttonName, ['button, defaultValue]) - defaultValue := '"0" - iht ['"{\em\radiobox[", htpLabelDefault($curPage, buttonName), '"]{", - buttonName, '"}{",boxesName, '"}"] - bcIssueHt message - iht '"\space{}}" - bcIssueHt info - -setUpDefault(name, props) == ----------------> OBSELETE <---------------- - htpAddInputAreaProp($curPage, name, props) - -buttonNames buttons == - [buttonName for [.,., buttonName] in buttons] - -htInputStrings strings == - iht '"\newline\indent{5}\beginitems " - for [mess1, mess2, numChars, default, stringName, spadType, :filter] - in strings repeat - if NULL LASSOC(stringName, htpInputAreaAlist $curPage) then - setUpDefault(stringName, ['string, default, spadType, filter]) - if htpLabelErrorMsg($curPage, stringName) then - iht ['"\centerline{{\em ", htpLabelErrorMsg($curPage, stringName), '"}}"] - - mess2 := CONCAT(mess2, bcSadFaces()) - htpSetLabelErrorMsg($curPage, stringName, nil) - iht '"\item " - bcIssueHt mess1 - iht ['"\inputstring{", stringName, '"}{", - numChars, '"}{", htpLabelDefault($curPage,stringName), '"} "] - bcIssueHt mess2 - iht '"\enditems\indent{0}\newline " - -htProcessDomainConditions condList == - htpSetDomainConditions($curPage, renamePatternVariables condList) - htpSetDomainVariableAlist($curPage, computeDomainVariableAlist()) - -renamePatternVariables condList == - htpSetDomainPvarSubstList($curPage, - renamePatternVariables1(condList, nil, $PatternVariableList)) - substFromAlist(condList, htpDomainPvarSubstList $curPage) - -renamePatternVariables1(condList, substList, patVars) == - null condList => substList - [cond, :restConds] := condList - cond is ['isDomain, pv, pattern] or cond is ['ofCategory, pv, pattern] - or cond is ['Satisfies, pv, cond] => - if pv = $EmptyMode then nsubst := substList - else nsubst := [[pv, :car patVars], :substList] - renamePatternVariables1(restConds, nsubst, rest patVars) - substList - -substFromAlist(l, substAlist) == - for [pvar, :replace] in substAlist repeat - l := SUBST(replace, pvar, l) - l - -computeDomainVariableAlist() == - [[pvar, :pvarCondList pvar] for [., :pvar] in - htpDomainPvarSubstList $curPage] - -pvarCondList pvar == - nreverse pvarCondList1([pvar], nil, htpDomainConditions $curPage) - -pvarCondList1(pvarList, activeConds, condList) == - null condList => activeConds - [cond, : restConds] := condList - cond is [., pv, pattern] and pv in pvarList => - pvarCondList1(nconc(pvarList, pvarsOfPattern pattern), - [cond, :activeConds], restConds) - pvarCondList1(pvarList, activeConds, restConds) - -pvarsOfPattern pattern == - NULL LISTP pattern => nil - [pvar for pvar in rest pattern | pvar in $PatternVariableList] - -htMakeTemplates(templateList, numLabels) == - templateList := [templateParts template for template in templateList] - [[substLabel(i, template) for template in templateList] - for i in 1..numLabels] where substLabel(i, template) == - PAIRP template => - INTERN CONCAT(first template, PRINC_-TO_-STRING i, rest template) - template - -templateParts template == - NULL STRINGP template => template - i := SEARCH('"%l", template) - null i => template - [SUBSEQ(template, 0, i), : SUBSEQ(template, i+2)] - -htMakeDoneButton(message, func) == - bcHt '"\newline\vspace{1}\centerline{" - if message = '"Continue" then - bchtMakeButton('"\lispdownlink", "\ContinueBitmap", func) - else - bchtMakeButton('"\lispdownlink",CONCAT('"\box{", message, '"}"), func) - bcHt '"} " - -htProcessDoneButton [label , func] == - iht '"\newline\vspace{1}\centerline{" - - if label = '"Continue" then - htMakeButton('"\lispdownlink", "\ContinueBitmap", func) - else if label = '"Push to enter names" then - htMakeButton('"\lispdownlink",'"\ControlBitmap{ClickToSet}", func) - else - htMakeButton('"\lispdownlink", CONCAT('"\box{", label, '"}"), func) - - iht '"} " - -htMakeButton(htCommand, message, func,:options) == -----------> OBSELETE <---------------------------------- - skipStateInfo? := IFCAR options - iht [htCommand, '"{"] - bcIssueHt message - skipStateInfo? => - iht ['"}{(|htDoneButton| '|", func, '"| ",htpName $curPage, '")}"] - iht ['"}{(|htDoneButton| '|", func, '"| (PROGN "] - for [id, ., ., ., type, :.] in htpInputAreaAlist $curPage repeat - iht ['"(|htpSetLabelInputString| ", htpName $curPage, '"'|", id, '"| "] - if type = 'string then - iht ['"_"\stringvalue{", id, '"}_""] - else - iht ['"_"\boxvalue{", id, '"}_""] - iht '") " - iht [htpName $curPage, '"))}"] - -bchtMakeButton(htCommand, message, func) == - bcHt [htCommand, '"{", message, - '"}{(|htDoneButton| '|", func, '"| (PROGN "] - for [id, ., ., ., type, :.] in htpInputAreaAlist $curPage repeat - bcHt ['"(|htpSetLabelInputString| ", htpName $curPage, '"'|", id, '"| "] - if type = 'string then - bcHt ['"_"\stringvalue{", id, '"}_""] - else - bcHt ['"_"\boxvalue{", id, '"}_""] - bcHt '") " - bcHt [htpName $curPage, '"))} "] - -htProcessDoitButton [label, command, func] == - fun := mkCurryFun(func, [command]) - iht '"\newline\vspace{1}\centerline{" - htMakeButton('"\lispcommand", CONCAT('"\box{", label, '"}"), fun) - iht '"} " - iht '"\vspace{2}{Select \ \UpButton{} \ to go back one page.}" - iht '"\newline{Select \ \ExitButton{QuitPage} \ to remove this window.}" - -htMakeDoitButton(label, command) == - -- use bitmap button if just plain old "Do It" - if label = '"Do It" then - bcHt '"\newline\vspace{1}\centerline{\lispcommand{\DoItBitmap}{(|doDoitButton| " - else - bcHt ['"\newline\vspace{1}\centerline{\lispcommand{\box{", label, - '"}}{(|doDoitButton| "] - bcHt htpName $curPage - bcHt ['" _"", htEscapeString command, '"_""] - bcHt '")}}" - - bcHt '"\vspace{2}{Select \ \UpButton{} \ to go back one page.}" - bcHt '"\newline{Select \ \ExitButton{QuitPage} \ to remove this window.}" - -doDoitButton(htPage, command) == - executeInterpreterCommand command - -executeInterpreterCommand command == - PRINC command - TERPRI() - ncSetCurrentLine(command) - CATCH('SPAD__READER, parseAndInterpret command) - PRINC MKPROMPT() - FINISH_-OUTPUT() - -htDoneButton(func, htPage) == - typeCheckInputAreas htPage => - htMakeErrorPage htPage - NULL FBOUNDP func => - systemError ['"unknown function", func] - FUNCALL(SYMBOL_-FUNCTION func, htPage) - -typeCheckInputAreas htPage == - -- This needs to be severly beefed up - inputAlist := nil - errorCondition := false - for entry in htpInputAreaAlist htPage - | entry is [stringName, ., ., ., 'string, ., spadType, filter] repeat - condList := - LASSOC(LASSOC(spadType,htpDomainPvarSubstList htPage), - htpDomainVariableAlist htPage) - string := htpLabelFilteredInputString(htPage, stringName) - $bcParseOnly => - null ncParseFromString string => - htpSetLabelErrorMsg(htPage, '"Syntax Error", '"Syntax Error") - nil - val := checkCondition(htpLabelInputString(htPage, stringName), - string, condList) - STRINGP val => - errorCondition := true - htpSetLabelErrorMsg(htPage, stringName, val) - htpSetLabelSpadValue(htPage, stringName, val) - errorCondition - -checkCondition(s1, string, condList) == - condList is [['Satisfies, pvar, pred]] => - val := FUNCALL(pred, string) - STRINGP val => val - ['(String), :wrap s1] - condList isnt [['isDomain, pvar, pattern]] => - systemError '"currently invalid domain condition" - pattern is '(String) => ['(String), :wrap s1] - val := parseAndEval string - STRINGP val => - val = '"Syntax Error " => '"Error: Syntax Error " - condErrorMsg pattern - [type, : data] := val - newType := CATCH('SPAD__READER, resolveTM(type, pattern)) - null newType => - condErrorMsg pattern - coerceInt(val, newType) - -condErrorMsg type == - typeString := form2String type - if PAIRP typeString then typeString := APPLY(function CONCAT, typeString) - CONCAT('"Error: Could not make your input into a ", typeString) - -parseAndEval string == - $InteractiveMode :fluid := true - $BOOT: fluid := NIL - $SPAD: fluid := true - $e:fluid := $InteractiveFrame - $QuietCommand:local := true - parseAndEval1 string - -parseAndEval1 string == - syntaxError := false - pform := - $useNewParser => - v := applyWithOutputToString('ncParseFromString, [string]) - CAR v => CAR v - syntaxError := true - CDR v - oldParseString string - syntaxError => - '"Syntax Error " - pform => - val := applyWithOutputToString('processInteractive, [pform, nil]) - CAR val => CAR val - '"Type Analysis Error" - nil - -oldParseString string == - tree := applyWithOutputToString('string2SpadTree, [string]) - CAR tree => parseTransform postTransform CAR tree - CDR tree - -makeSpadCommand(:l) == - opForm := CONCAT(first l, '"(") - lastArg := last l - l := rest l - argList := nil - for arg in l while arg ^= lastArg repeat - argList := [CONCAT(arg, '", "), :argList] - argList := nreverse [lastArg, :argList] - CONCAT(opForm, APPLY(function CONCAT, argList), '")") - -htMakeInputList stringList == --- makes an input form for constructing a list - lastArg := last stringList - argList := nil - for arg in stringList while arg ^= lastArg repeat - argList := [CONCAT(arg, '", "), :argList] - argList := nreverse [lastArg, :argList] - bracketString APPLY(function CONCAT, argList) - - --- predefined filter strings -bracketString string == CONCAT('"[",string,'"]") - -quoteString string == CONCAT('"_"", string, '"_"") - -$funnyQuote := char 127 -$funnyBacks := char 128 - -htEscapeString str == - str := SUBSTITUTE($funnyQuote, char '_", str) - SUBSTITUTE($funnyBacks, char '_\, str) - -unescapeStringsInForm form == - STRINGP form => - str := NSUBSTITUTE(char '_", $funnyQuote, form) - NSUBSTITUTE(char '_\, $funnyBacks, str) - CONSP form => - unescapeStringsInForm CAR form - unescapeStringsInForm CDR form - form - form - - - - - -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/interp/htcheck.boot b/src/interp/htcheck.boot new file mode 100644 index 00000000..b1cdb2dd --- /dev/null +++ b/src/interp/htcheck.boot @@ -0,0 +1,127 @@ +-- 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. + + +$primitiveHtCommands := '( + ("\ContinueButton" . 1) + ("\andexample" . 1) + ("\autobutt" . 0) + ("\autobuttons". 0) + ("\begin" . 1) + ("\beginscroll". 0) + ("\bound" . 1) + ("\fbox" . 1) + ("\centerline" . 1) + ("\downlink" . 2) + ("\em" . 0) + ("\end" . 1) + ("\endscroll" . 0) + ("\example" . 1) + ("\free" . 1) + ("\graphpaste" . 1) + ("\helppage" . 1) + ("\htbmdir" . 0) + ("\htbmfile" . 1) + ("\indent" . 1) + ("\inputbitmap" . 1) + ("\inputstring" . 3) + ("\item" . 0) + ("\keyword" . 1) + ("\link" . 2) + ("\lispdownlink" . 2) + ("\lispmemolink" . 2) + ("\lispwindowlink" . 2) + ("\menudownlink" . 2) + ("\menuitemstyle" . 1) + ("\menulink" . 2) + ("\menulispdownlink" . 2) + ("\menulispmemolink" . 2) + ("\menulispwindowlink" . 2) + ("\menumemolink" . 2) + ("\menuwindowlink" . 2) + ("\newline" . 0) + ("\radioboxes" . 3) + ("\space" . 1) + ("\spadcommand" . 1) + ("\stringvalue" . 1) + ("\tab" . 1) + ("\table" . 1) + ("\vspace" . 1) + ("\windowlink" . 2)) + +buildHtMacroTable() == + $htMacroTable := MAKE_-HASHTABLE 'UEQUAL + fn := CONCAT(getEnv '"AXIOM", '"/share/hypertex/pages/util.ht") + if PROBE_-FILE(fn) then + instream := MAKE_-INSTREAM fn + while not EOFP instream repeat + line := READLINE instream + getHtMacroItem line is [string,:numOfArgs] => + HPUT($htMacroTable,string,numOfArgs) + for [s,:n] in $primitiveHtCommands repeat HPUT($htMacroTable,s,n) + else + sayBrightly '"Warning: macro table not found" + $htMacroTable + +getHtMacroItem line == + null stringPrefix?('"\newcommand{",line) => nil + k := charPosition(char '_},line,11) + command := SUBSTRING(line,12,k - 12) + numOfArgs := + m := #line + i := charPosition(char '_[,line,k) + i = m => 0 + j := charPosition(char '_],line,i + 1) + digitString := SUBSTRING(line,i + 1,j - i - 1) + and/[DIGITP digitString.i for i in 0..MAXINDEX digitString] + => PARSE_-INTEGER digitString + return nil + [command,:numOfArgs] + +spadSysChoose(tree,form) == --tree is ((word . tree) ..) + null form => true + null tree => false + lookupOn := + form is [key,arg] => key + form + newTree := LASSOC(lookupOn,tree) => spadSysBranch(newTree,IFCAR IFCDR form) + false + +spadSysBranch(tree,arg) == --tree is (msg kind TREEorSomethingElse ...) + null arg => true + kind := tree.2 + kind = 'TREE => spadSysChoose(tree.4,arg) + kind = 'LITERALS => member(arg,tree.4) + kind = 'INTEGER => INTEGERP arg + kind = 'FUNCTION => atom arg + systemError '"unknown tree branch" + +buildHtMacroTable() diff --git a/src/interp/htcheck.boot.pamphlet b/src/interp/htcheck.boot.pamphlet deleted file mode 100644 index d2dd018c..00000000 --- a/src/interp/htcheck.boot.pamphlet +++ /dev/null @@ -1,153 +0,0 @@ -\documentclass{article} -\usepackage{axiom} - -\title{\File{src/interp/htcheck.boot} Pamphlet} -\author{The Axiom Team} - -\begin{document} -\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. - -@ -<<*>>= -<> - -$primitiveHtCommands := '( - ("\ContinueButton" . 1) - ("\andexample" . 1) - ("\autobutt" . 0) - ("\autobuttons". 0) - ("\begin" . 1) - ("\beginscroll". 0) - ("\bound" . 1) - ("\fbox" . 1) - ("\centerline" . 1) - ("\downlink" . 2) - ("\em" . 0) - ("\end" . 1) - ("\endscroll" . 0) - ("\example" . 1) - ("\free" . 1) - ("\graphpaste" . 1) - ("\helppage" . 1) - ("\htbmdir" . 0) - ("\htbmfile" . 1) - ("\indent" . 1) - ("\inputbitmap" . 1) - ("\inputstring" . 3) - ("\item" . 0) - ("\keyword" . 1) - ("\link" . 2) - ("\lispdownlink" . 2) - ("\lispmemolink" . 2) - ("\lispwindowlink" . 2) - ("\menudownlink" . 2) - ("\menuitemstyle" . 1) - ("\menulink" . 2) - ("\menulispdownlink" . 2) - ("\menulispmemolink" . 2) - ("\menulispwindowlink" . 2) - ("\menumemolink" . 2) - ("\menuwindowlink" . 2) - ("\newline" . 0) - ("\radioboxes" . 3) - ("\space" . 1) - ("\spadcommand" . 1) - ("\stringvalue" . 1) - ("\tab" . 1) - ("\table" . 1) - ("\vspace" . 1) - ("\windowlink" . 2)) - -buildHtMacroTable() == - $htMacroTable := MAKE_-HASHTABLE 'UEQUAL - fn := CONCAT(getEnv '"AXIOM", '"/share/hypertex/pages/util.ht") - if PROBE_-FILE(fn) then - instream := MAKE_-INSTREAM fn - while not EOFP instream repeat - line := READLINE instream - getHtMacroItem line is [string,:numOfArgs] => - HPUT($htMacroTable,string,numOfArgs) - for [s,:n] in $primitiveHtCommands repeat HPUT($htMacroTable,s,n) - else - sayBrightly '"Warning: macro table not found" - $htMacroTable - -getHtMacroItem line == - null stringPrefix?('"\newcommand{",line) => nil - k := charPosition(char '_},line,11) - command := SUBSTRING(line,12,k - 12) - numOfArgs := - m := #line - i := charPosition(char '_[,line,k) - i = m => 0 - j := charPosition(char '_],line,i + 1) - digitString := SUBSTRING(line,i + 1,j - i - 1) - and/[DIGITP digitString.i for i in 0..MAXINDEX digitString] - => PARSE_-INTEGER digitString - return nil - [command,:numOfArgs] - -spadSysChoose(tree,form) == --tree is ((word . tree) ..) - null form => true - null tree => false - lookupOn := - form is [key,arg] => key - form - newTree := LASSOC(lookupOn,tree) => spadSysBranch(newTree,IFCAR IFCDR form) - false - -spadSysBranch(tree,arg) == --tree is (msg kind TREEorSomethingElse ...) - null arg => true - kind := tree.2 - kind = 'TREE => spadSysChoose(tree.4,arg) - kind = 'LITERALS => member(arg,tree.4) - kind = 'INTEGER => INTEGERP arg - kind = 'FUNCTION => atom arg - systemError '"unknown tree branch" - -buildHtMacroTable() -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/interp/htsetvar.boot b/src/interp/htsetvar.boot new file mode 100644 index 00000000..0698ec1d --- /dev/null +++ b/src/interp/htsetvar.boot @@ -0,0 +1,478 @@ +-- 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. + + +htsv() == + startHTPage(50) + htSetVars() + +htSetVars() == + $path := nil + $lastTree := nil + if 0 ^= LASTATOM $setOptions then htMarkTree($setOptions,0) + htShowSetTree($setOptions) + +htShowSetTree(setTree) == + $path := TAKE(- LASTATOM setTree,$path) + page := htInitPage(mkSetTitle(),nil) + htpSetProperty(page, 'setTree, setTree) + links := nil + maxWidth1 := maxWidth2 := 0 + for setData in setTree repeat + satisfiesUserLevel setData.setLevel => + okList := [setData,:okList] + maxWidth1 := MAX(# PNAME setData.setName,maxWidth1) + maxWidth2 := MAX(htShowCount STRINGIMAGE setData.setLabel,maxWidth2) + maxWidth1 := MAX(9,maxWidth1) + maxWidth2 := MAX(41,maxWidth2) + tabset1 := STRINGIMAGE (maxWidth1) + tabset2 := STRINGIMAGE (maxWidth2 + maxWidth1 - 1) + htSay('"\tab{2}\newline Variable\tab{",STRINGIMAGE (maxWidth1 + (maxWidth2/3)),'"}Description\tab{",STRINGIMAGE(maxWidth2 + maxWidth1 + 2),'"}Value\newline\beginitems ") + for setData in REVERSE okList repeat + htSay '"\item" + label := STRCONC('"\menuitemstyle{",setData.setName,'"}") + links := [label,[['text,'"\tab{",tabset1,'"}",setData.setLabel,'"\tab{",tabset2,'"}{\em ",htShowSetTreeValue setData,'"}"]], + 'htShowSetPage, setData.setName] + htMakePage [['bcLispLinks, links,'options,'(indent . 0)]] + htSay '"\enditems" + htShowPage() + +htShowCount s == --# discounting {\em .. } + m := #s + m < 8 => m - 1 + i := 0 + count := 0 + while i < m - 7 repeat + s.i = char '_{ and s.(i+1) = char '_\ and s.(i+2) = char 'e + and s.(i+3) = char 'm => i := i + 6 --discount {\em } + i := i + 1 + count := count + 1 + count + (m - i) + +htShowSetTreeValue(setData) == + st := setData.setType + st = 'FUNCTION => object2String FUNCALL(setData.setVar,"%display%") + st = 'INTEGER => object2String eval setData.setVar + st = 'STRING => object2String eval setData.setVar + st = 'LITERALS => + object2String translateTrueFalse2YesNo eval setData.setVar + st = 'TREE => '"..." + systemError() + +mkSetTitle() == STRCONC('"Command {\em )set ",listOfStrings2String $path,'"}") + +listOfStrings2String u == + null u => '"" + STRCONC(listOfStrings2String rest u,'" ",stringize first u) + +htShowSetPage(htPage, branch) == + setTree := htpProperty(htPage, 'setTree) + $path := [branch,:TAKE(- LASTATOM setTree,$path)] + setData := ASSOC(branch, setTree) + null setData => + systemError('"No Set Data") + st := setData.setType + st = 'FUNCTION => htShowFunctionPage(htPage, setData) + st = 'INTEGER => htShowIntegerPage(htPage,setData) + st = 'LITERALS => htShowLiteralsPage(htPage, setData) + st = 'TREE => htShowSetTree(setData.setLeaf) + + st = 'STRING => -- have to add this + htSetNotAvailable(htPage,'")set compiler") + + systemError '"Unknown data type" + +htShowLiteralsPage(htPage, setData) == + htSetLiterals(htPage,setData.setName,setData.setLabel, + setData.setVar,setData.setLeaf,'htSetLiteral) + +htSetLiterals(htPage,name,message,variable,values,functionToCall) == + page := htInitPage('"Set Command", htpPropertyList htPage) + htpSetProperty(page, 'variable, variable) + bcHt ['"\centerline{Set {\em ", name, '"}}\newline"] + bcHt ['"{\em Description: } ", message, '"\newline\vspace{1} "] + bcHt '"Select one of the following: \newline\tab{3} " + links := [[STRCONC('"",STRINGIMAGE opt), '"\newline\tab{3}", functionToCall, opt] for opt in values] + htMakePage [['bcLispLinks, :links]] + bcHt ["\indent{0}\newline\vspace{1} The current setting is: {\em ", + translateTrueFalse2YesNo EVAL variable, '"} "] + htShowPage() + +htSetLiteral(htPage, val) == + htInitPage('"Set Command", nil) + SET(htpProperty(htPage, 'variable), translateYesNo2TrueFalse val) + htKill(htPage,val) + +htShowIntegerPage(htPage, setData) == + page := htInitPage(mkSetTitle(), htpPropertyList htPage) + htpSetProperty(page, 'variable, setData.setVar) + bcHt ['"\centerline{Set {\em ", setData.setName, '"}}\newline"] +-- message := isKeyedMsgInDb($path,'(setvar text A)) or setData.setLabel + message := setData.setLabel + bcHt ['"{\em Description: } ", message, '"\newline\vspace{1} "] + [$htInitial,$htFinal] := setData.setLeaf + if $htFinal = $htInitial + 1 + then + bcHt '"Enter the integer {\em " + bcHt stringize $htInitial + bcHt '"} or {\em " + bcHt stringize $htFinal + bcHt '"}:" + else if null $htFinal then + bcHt '"Enter an integer greater than {\em " + bcHt stringize ($htInitial - 1) + bcHt '"}:" + else + bcHt '"Enter an integer between {\em " + bcHt stringize $htInitial + bcHt '"} and {\em " + bcHt stringize $htFinal + bcHt '"}:" + htMakePage [ + '(domainConditions (Satisfies S chkRange)), + ['bcStrings,[5,eval setData.setVar,'value,'S]]] + htSetvarDoneButton('"Select to Set Value",'htSetInteger) + htShowPage() + +htSetInteger(htPage) == + htInitPage(mkSetTitle(), nil) + val := chkRange htpLabelInputString(htPage,'value) + not INTEGERP val => + errorPage(htPage,['"Value Error",nil,'"\vspace{3}\centerline{{\em ",val,'"}}\vspace{2}\newline\centerline{Click on \UpBitmap{} to re-enter value}"]) + SET(htpProperty(htPage, 'variable), val) + htKill(htPage,val) + +htShowFunctionPage(htPage,setData) == + fn := setData.setDef => FUNCALL(fn,htPage) + htpSetProperty(htPage,'setData,setData) + htpSetProperty(htPage,'parts, setData.setLeaf) + htShowFunctionPageContinued(htPage) + +htShowFunctionPageContinued(htPage) == + parts := htpProperty(htPage,'parts) + setData := htpProperty(htPage,'setData) + [[phrase,kind,variable,checker,initValue,:.],:restParts] := parts + htpSetProperty(htPage, 'variable, variable) + htpSetProperty(htPage, 'checker, checker) + htpSetProperty(htPage, 'parts, restParts) + kind = 'LITERALS => htSetLiterals(htPage,setData.setName, + phrase,variable,checker,'htFunctionSetLiteral) + page := htInitPage(mkSetTitle(), htpPropertyList htPage) + bcHt ['"\centerline{Set {\em ", setData.setName, '"}}\newline"] + bcHt ['"{\em Description: } ", setData.setLabel, '"\newline\vspace{1} "] + currentValue := EVAL variable + htMakePage + [ ['domainConditions, ['Satisfies,'S,checker]], + ['text,:phrase], + ['inputStrings, + [ '"", '"", 60, currentValue, 'value, 'S]]] + htSetvarDoneButton('"Select To Set Value",'htSetFunCommand) + htShowPage() + +htSetvarDoneButton(message, func) == + bcHt '"\newline\vspace{1}\centerline{" + + if message = '"Select to Set Value" or message = '"Select to Set Values" then + bchtMakeButton('"\lisplink",'"\ControlBitmap{ClickToSet}", func) + else + bchtMakeButton('"\lisplink",CONCAT('"\fbox{", message, '"}"), func) + + bcHt '"} " + + +htFunctionSetLiteral(htPage, val) == + htInitPage('"Set Command", nil) + SET(htpProperty(htPage, 'variable), translateYesNo2TrueFalse val) + htSetFunCommandContinue(htPage,val) + +htSetFunCommand(htPage) == + variable := htpProperty(htPage,'variable) + checker := htpProperty(htPage,'checker) + value := htCheck(checker,htpLabelInputString(htPage,'value)) + SET(variable,value) --kill this later + htSetFunCommandContinue(htPage,value) + +htSetFunCommandContinue(htPage,value) == + parts := htpProperty(htPage,'parts) + continue := + null parts => false + parts is [['break,predicate],:restParts] => eval predicate + true + continue => + htpSetProperty(htPage,'parts,restParts) + htShowFunctionPageContinued(htPage) + htKill(htPage,value) + +htKill(htPage,value) == + htInitPage('"System Command", nil) + string := STRCONC('"{\em )set ",listOfStrings2String [value,:$path],'"}") + htMakePage [ + '(text + "{Here is the AXIOM system command you could have issued:}" + "\vspace{2}\newline\centerline{\tt"), + ['text,:string]] + htMakePage '((text . "}\vspace{1}\newline\rm")) + htSay '"\vspace{2}{Select \ \UpButton{} \ to go back.}" + htSay '"\newline{Select \ \ExitButton{QuitPage} \ to remove this window.}" + htProcessDoitButton ['"Press to Remove Page",'"",'htDoNothing] + htShowPage() + +htSetNotAvailable(htPage,whatToType) == + page := htInitPage('"Unavailable Set Command", htpPropertyList htPage) + htInitPage('"Unavailable System Command", nil) + string := STRCONC('"{\em ",whatToType,'"}") + htMakePage [ + '(text "\vspace{1}\newline" + "{Sorry, but this system command is not available through HyperDoc. Please directly issue this command in an AXIOM window for more information:}" + "\vspace{2}\newline\centerline{\tt"), + ['text,:string]] + htMakePage '((text . "}\vspace{1}\newline")) + htProcessDoitButton ['"Press to Remove Page",'"",'htDoNothing] + htShowPage() + +htDoNothing(htPage,command) == nil + +htCheck(checker,value) == + PAIRP checker => htCheckList(checker,parseWord value) + FUNCALL(checker,value) + +parseWord x == + STRINGP x => + and/[DIGITP x.i for i in 0..MAXINDEX x] => PARSE_-INTEGER x + INTERN x + x + +htCheckList(checker,value) == + if value in '(y ye yes Y YE YES) then value := 'yes + if value in '(n no N NO) then value := 'no + checker is [n,m] and INTEGERP n => + m = n + 1 => + value in checker => value + n + null m => + INTEGERP value and value >= n => value + n + INTEGERP m => + INTEGERP value and value >= n and value <= m => value + n + value in checker => value + first checker +-- emlist := "STRCONC"/[STRCONC('" {\em ",PNAME x,'"} ") for x in checker] +-- STRCONC('"Please enter one of: ",emlist) + +translateYesNoToTrueFalse x == + x = 'yes => true + x = 'no => false + x + +chkNameList x == + u := bcString2ListWords x + parsedNames := [ncParseFromString x for x in u] + and/[IDENTP x for x in parsedNames] => parsedNames + '"Please enter a list of identifiers separated by blanks" + +chkPosInteger s == + (u := parseOnly s) and INTEGERP u and u > 0 => u + '"Please enter a positive integer" + +chkOutputFileName s == + bcString2WordList s in '(CONSOLE console) => 'console + chkDirectory s + +chkDirectory s == s + +chkNonNegativeInteger s == + (u := ncParseFromString s) and INTEGERP u and u >= 0 => u + '"Please enter a non-negative integer" + +chkRange s == + (u := ncParseFromString s) and INTEGERP u + and u >= $htInitial and (NULL $htFinal or u <= $htFinal) + => u + null $htFinal => + STRCONC('"Please enter an integer greater than ",stringize ($htInitial - 1)) + STRCONC('"Please enter an integer between ",stringize $htInitial,'" and ", + stringize $htFinal) + +chkAllNonNegativeInteger s == + (u := ncParseFromString s) and u in '(a al all A AL ALL) and 'ALL + or chkNonNegativeInteger s + or '"Please enter {\em all} or a non-negative integer" + +htMakePathKey path == + null path => systemError '"path is not set" + INTERN fn(PNAME first path,rest path) where + fn(a,b) == + null b => a + fn(STRCONC(a,'".",PNAME first b),rest b) + +htMarkTree(tree,n) == + RPLACD(LASTTAIL tree,n) + for branch in tree repeat + branch.3 = 'TREE => htMarkTree(branch.5,n + 1) + +htSetHistory htPage == + msg := "when the history facility is on (yes), results of computations are saved in memory" + data := ['history,msg,'history,'LITERALS,'$HiFiAccess,'(on off yes no)] + htShowLiteralsPage(htPage,data) + +htSetOutputLibrary htPage == + htSetNotAvailable(htPage,'")set compiler output") + +htSetInputLibrary htPage == + htSetNotAvailable(htPage,'")set compiler input") + +htSetExpose htPage == + htSetNotAvailable(htPage,'")set expose") + +htSetKernelProtect htPage == + htSetNotAvailable(htPage,'")set kernel protect") + +htSetKernelWarn htPage == + htSetNotAvailable(htPage,'")set kernel warn") + +htSetOutputCharacters htPage == + htSetNotAvailable(htPage,'")set output characters") + +htSetLinkerArgs htPage == + htSetNotAvailable(htPage,'")set fortran calling linker") + +htSetCache(htPage,:options) == + $path := '(functions cache) + htPage := htInitPage(mkSetTitle(),nil) + $valueList := nil + htMakePage '( + (text + "Use this system command to cause the AXIOM interpreter to `remember' " + "past values of interpreter functions. " + "To remember a past value of a function, the interpreter " + "sets up a {\em cache} for that function based on argument values. " + "When a value is cached for a given argument value, its value is gotten " + "from the cache and not recomputed. Caching can often save much " + "computing time, particularly with recursive functions or functions that " + "are expensive to compute and that are called repeatedly " + "with the same argument." + "\vspace{1}\newline ") + (domainConditions (Satisfies S chkNameList)) + (text + "Enter below a list of interpreter functions you would like specially cached. " + "Use the name {\em all} to give a default setting for all " + "interpreter functions. " + "\vspace{1}\newline " + "Enter {\em all} or a list of names (separate names by blanks):") + (inputStrings ("" "" 60 "all" names S)) + (doneButton "Push to enter names" htCacheAddChoice)) + htShowPage() + +htCacheAddChoice htPage == + names := bcString2WordList htpLabelInputString(htPage,'names) + $valueList := [listOfStrings2String names,:$valueList] + null names => htCacheAddQuery() + null rest names => htCacheOne names + page := htInitPage(mkSetTitle(),nil) + htpSetProperty(page,'names,names) + htMakePage '( + (domainConditions (Satisfies ALLPI chkAllPositiveInteger)) + (text + "For each function, enter below a {\em cache length}, a positive integer. " + "This number tells how many past values will " + "be cached. " + "A cache length of {\em 0} means the function won't be cached. " + "To cache all past values, " + "enter {\em all}." + "\vspace{1}\newline " + "For each function name, enter {\em all} or a positive integer:")) + for i in 1.. for name in names repeat htMakePage [ + ['inputStrings, + [STRCONC('"Function {\em ",name,'"} will cache"), + '"values",5,10,htMakeLabel('"c",i),'ALLPI]]] + htSetvarDoneButton('"Select to Set Values",'htCacheSet) + htShowPage() + +htMakeLabel(prefix,i) == INTERN STRCONC(prefix,stringize i) + +htCacheSet htPage == + names := htpProperty(htPage,'names) + for i in 1.. for name in names repeat + num := chkAllNonNegativeInteger + htpLabelInputString(htPage,htMakeLabel('"c",i)) + $cacheAlist := ADDASSOC(INTERN name,num,$cacheAlist) + if (n := LASSOC('all,$cacheAlist)) then + $cacheCount := n + $cacheAlist := deleteAssoc('all,$cacheAlist) + htInitPage('"Cache Summary",nil) + bcHt '"In general, interpreter functions " + bcHt + $cacheCount = 0 => "will {\em not} be cached." + bcHt '"cache " + htAllOrNum $cacheCount + '"} values." + bcHt '"\vspace{1}\newline " + if $cacheAlist then +-- bcHt '" However, \indent{3}" + for [name,:val] in $cacheAlist | val ^= $cacheCount repeat + bcHt '"\newline function {\em " + bcHt stringize name + bcHt '"} will cache " + htAllOrNum val + bcHt '"} values" + htProcessDoitButton ['"Press to Remove Page",'"",'htDoNothing] + htShowPage() + +htAllOrNum val == bcHt + val = 'all => '"{\em all" + val = 0 => '"{\em no" + STRCONC('"the last {\em ",stringize val) + +htCacheOne names == + page := htInitPage(mkSetTitle(),nil) + htpSetProperty(page,'names,names) + htMakePage '( + (domainConditions (Satisfies ALLPI chkAllPositiveInteger)) + (text + "Enter below a {\em cache length}, a positive integer. " + "This number tells how many past values will " + "be cached. To cache all past values, " + "enter {\em all}." + "\vspace{1}\newline ") + (inputStrings + ("Enter {\em all} or a positive integer:" + "" 5 10 c1 ALLPI))) + htSetvarDoneButton('"Select to Set Value",'htCacheSet) + htShowPage() + + + + + + + + diff --git a/src/interp/htsetvar.boot.pamphlet b/src/interp/htsetvar.boot.pamphlet deleted file mode 100644 index 0d664ff9..00000000 --- a/src/interp/htsetvar.boot.pamphlet +++ /dev/null @@ -1,500 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/interp htsetvar.boot} -\author{The Axiom Team} -\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. - -@ -<<*>>= -<> - -htsv() == - startHTPage(50) - htSetVars() - -htSetVars() == - $path := nil - $lastTree := nil - if 0 ^= LASTATOM $setOptions then htMarkTree($setOptions,0) - htShowSetTree($setOptions) - -htShowSetTree(setTree) == - $path := TAKE(- LASTATOM setTree,$path) - page := htInitPage(mkSetTitle(),nil) - htpSetProperty(page, 'setTree, setTree) - links := nil - maxWidth1 := maxWidth2 := 0 - for setData in setTree repeat - satisfiesUserLevel setData.setLevel => - okList := [setData,:okList] - maxWidth1 := MAX(# PNAME setData.setName,maxWidth1) - maxWidth2 := MAX(htShowCount STRINGIMAGE setData.setLabel,maxWidth2) - maxWidth1 := MAX(9,maxWidth1) - maxWidth2 := MAX(41,maxWidth2) - tabset1 := STRINGIMAGE (maxWidth1) - tabset2 := STRINGIMAGE (maxWidth2 + maxWidth1 - 1) - htSay('"\tab{2}\newline Variable\tab{",STRINGIMAGE (maxWidth1 + (maxWidth2/3)),'"}Description\tab{",STRINGIMAGE(maxWidth2 + maxWidth1 + 2),'"}Value\newline\beginitems ") - for setData in REVERSE okList repeat - htSay '"\item" - label := STRCONC('"\menuitemstyle{",setData.setName,'"}") - links := [label,[['text,'"\tab{",tabset1,'"}",setData.setLabel,'"\tab{",tabset2,'"}{\em ",htShowSetTreeValue setData,'"}"]], - 'htShowSetPage, setData.setName] - htMakePage [['bcLispLinks, links,'options,'(indent . 0)]] - htSay '"\enditems" - htShowPage() - -htShowCount s == --# discounting {\em .. } - m := #s - m < 8 => m - 1 - i := 0 - count := 0 - while i < m - 7 repeat - s.i = char '_{ and s.(i+1) = char '_\ and s.(i+2) = char 'e - and s.(i+3) = char 'm => i := i + 6 --discount {\em } - i := i + 1 - count := count + 1 - count + (m - i) - -htShowSetTreeValue(setData) == - st := setData.setType - st = 'FUNCTION => object2String FUNCALL(setData.setVar,"%display%") - st = 'INTEGER => object2String eval setData.setVar - st = 'STRING => object2String eval setData.setVar - st = 'LITERALS => - object2String translateTrueFalse2YesNo eval setData.setVar - st = 'TREE => '"..." - systemError() - -mkSetTitle() == STRCONC('"Command {\em )set ",listOfStrings2String $path,'"}") - -listOfStrings2String u == - null u => '"" - STRCONC(listOfStrings2String rest u,'" ",stringize first u) - -htShowSetPage(htPage, branch) == - setTree := htpProperty(htPage, 'setTree) - $path := [branch,:TAKE(- LASTATOM setTree,$path)] - setData := ASSOC(branch, setTree) - null setData => - systemError('"No Set Data") - st := setData.setType - st = 'FUNCTION => htShowFunctionPage(htPage, setData) - st = 'INTEGER => htShowIntegerPage(htPage,setData) - st = 'LITERALS => htShowLiteralsPage(htPage, setData) - st = 'TREE => htShowSetTree(setData.setLeaf) - - st = 'STRING => -- have to add this - htSetNotAvailable(htPage,'")set compiler") - - systemError '"Unknown data type" - -htShowLiteralsPage(htPage, setData) == - htSetLiterals(htPage,setData.setName,setData.setLabel, - setData.setVar,setData.setLeaf,'htSetLiteral) - -htSetLiterals(htPage,name,message,variable,values,functionToCall) == - page := htInitPage('"Set Command", htpPropertyList htPage) - htpSetProperty(page, 'variable, variable) - bcHt ['"\centerline{Set {\em ", name, '"}}\newline"] - bcHt ['"{\em Description: } ", message, '"\newline\vspace{1} "] - bcHt '"Select one of the following: \newline\tab{3} " - links := [[STRCONC('"",STRINGIMAGE opt), '"\newline\tab{3}", functionToCall, opt] for opt in values] - htMakePage [['bcLispLinks, :links]] - bcHt ["\indent{0}\newline\vspace{1} The current setting is: {\em ", - translateTrueFalse2YesNo EVAL variable, '"} "] - htShowPage() - -htSetLiteral(htPage, val) == - htInitPage('"Set Command", nil) - SET(htpProperty(htPage, 'variable), translateYesNo2TrueFalse val) - htKill(htPage,val) - -htShowIntegerPage(htPage, setData) == - page := htInitPage(mkSetTitle(), htpPropertyList htPage) - htpSetProperty(page, 'variable, setData.setVar) - bcHt ['"\centerline{Set {\em ", setData.setName, '"}}\newline"] --- message := isKeyedMsgInDb($path,'(setvar text A)) or setData.setLabel - message := setData.setLabel - bcHt ['"{\em Description: } ", message, '"\newline\vspace{1} "] - [$htInitial,$htFinal] := setData.setLeaf - if $htFinal = $htInitial + 1 - then - bcHt '"Enter the integer {\em " - bcHt stringize $htInitial - bcHt '"} or {\em " - bcHt stringize $htFinal - bcHt '"}:" - else if null $htFinal then - bcHt '"Enter an integer greater than {\em " - bcHt stringize ($htInitial - 1) - bcHt '"}:" - else - bcHt '"Enter an integer between {\em " - bcHt stringize $htInitial - bcHt '"} and {\em " - bcHt stringize $htFinal - bcHt '"}:" - htMakePage [ - '(domainConditions (Satisfies S chkRange)), - ['bcStrings,[5,eval setData.setVar,'value,'S]]] - htSetvarDoneButton('"Select to Set Value",'htSetInteger) - htShowPage() - -htSetInteger(htPage) == - htInitPage(mkSetTitle(), nil) - val := chkRange htpLabelInputString(htPage,'value) - not INTEGERP val => - errorPage(htPage,['"Value Error",nil,'"\vspace{3}\centerline{{\em ",val,'"}}\vspace{2}\newline\centerline{Click on \UpBitmap{} to re-enter value}"]) - SET(htpProperty(htPage, 'variable), val) - htKill(htPage,val) - -htShowFunctionPage(htPage,setData) == - fn := setData.setDef => FUNCALL(fn,htPage) - htpSetProperty(htPage,'setData,setData) - htpSetProperty(htPage,'parts, setData.setLeaf) - htShowFunctionPageContinued(htPage) - -htShowFunctionPageContinued(htPage) == - parts := htpProperty(htPage,'parts) - setData := htpProperty(htPage,'setData) - [[phrase,kind,variable,checker,initValue,:.],:restParts] := parts - htpSetProperty(htPage, 'variable, variable) - htpSetProperty(htPage, 'checker, checker) - htpSetProperty(htPage, 'parts, restParts) - kind = 'LITERALS => htSetLiterals(htPage,setData.setName, - phrase,variable,checker,'htFunctionSetLiteral) - page := htInitPage(mkSetTitle(), htpPropertyList htPage) - bcHt ['"\centerline{Set {\em ", setData.setName, '"}}\newline"] - bcHt ['"{\em Description: } ", setData.setLabel, '"\newline\vspace{1} "] - currentValue := EVAL variable - htMakePage - [ ['domainConditions, ['Satisfies,'S,checker]], - ['text,:phrase], - ['inputStrings, - [ '"", '"", 60, currentValue, 'value, 'S]]] - htSetvarDoneButton('"Select To Set Value",'htSetFunCommand) - htShowPage() - -htSetvarDoneButton(message, func) == - bcHt '"\newline\vspace{1}\centerline{" - - if message = '"Select to Set Value" or message = '"Select to Set Values" then - bchtMakeButton('"\lisplink",'"\ControlBitmap{ClickToSet}", func) - else - bchtMakeButton('"\lisplink",CONCAT('"\fbox{", message, '"}"), func) - - bcHt '"} " - - -htFunctionSetLiteral(htPage, val) == - htInitPage('"Set Command", nil) - SET(htpProperty(htPage, 'variable), translateYesNo2TrueFalse val) - htSetFunCommandContinue(htPage,val) - -htSetFunCommand(htPage) == - variable := htpProperty(htPage,'variable) - checker := htpProperty(htPage,'checker) - value := htCheck(checker,htpLabelInputString(htPage,'value)) - SET(variable,value) --kill this later - htSetFunCommandContinue(htPage,value) - -htSetFunCommandContinue(htPage,value) == - parts := htpProperty(htPage,'parts) - continue := - null parts => false - parts is [['break,predicate],:restParts] => eval predicate - true - continue => - htpSetProperty(htPage,'parts,restParts) - htShowFunctionPageContinued(htPage) - htKill(htPage,value) - -htKill(htPage,value) == - htInitPage('"System Command", nil) - string := STRCONC('"{\em )set ",listOfStrings2String [value,:$path],'"}") - htMakePage [ - '(text - "{Here is the AXIOM system command you could have issued:}" - "\vspace{2}\newline\centerline{\tt"), - ['text,:string]] - htMakePage '((text . "}\vspace{1}\newline\rm")) - htSay '"\vspace{2}{Select \ \UpButton{} \ to go back.}" - htSay '"\newline{Select \ \ExitButton{QuitPage} \ to remove this window.}" - htProcessDoitButton ['"Press to Remove Page",'"",'htDoNothing] - htShowPage() - -htSetNotAvailable(htPage,whatToType) == - page := htInitPage('"Unavailable Set Command", htpPropertyList htPage) - htInitPage('"Unavailable System Command", nil) - string := STRCONC('"{\em ",whatToType,'"}") - htMakePage [ - '(text "\vspace{1}\newline" - "{Sorry, but this system command is not available through HyperDoc. Please directly issue this command in an AXIOM window for more information:}" - "\vspace{2}\newline\centerline{\tt"), - ['text,:string]] - htMakePage '((text . "}\vspace{1}\newline")) - htProcessDoitButton ['"Press to Remove Page",'"",'htDoNothing] - htShowPage() - -htDoNothing(htPage,command) == nil - -htCheck(checker,value) == - PAIRP checker => htCheckList(checker,parseWord value) - FUNCALL(checker,value) - -parseWord x == - STRINGP x => - and/[DIGITP x.i for i in 0..MAXINDEX x] => PARSE_-INTEGER x - INTERN x - x - -htCheckList(checker,value) == - if value in '(y ye yes Y YE YES) then value := 'yes - if value in '(n no N NO) then value := 'no - checker is [n,m] and INTEGERP n => - m = n + 1 => - value in checker => value - n - null m => - INTEGERP value and value >= n => value - n - INTEGERP m => - INTEGERP value and value >= n and value <= m => value - n - value in checker => value - first checker --- emlist := "STRCONC"/[STRCONC('" {\em ",PNAME x,'"} ") for x in checker] --- STRCONC('"Please enter one of: ",emlist) - -translateYesNoToTrueFalse x == - x = 'yes => true - x = 'no => false - x - -chkNameList x == - u := bcString2ListWords x - parsedNames := [ncParseFromString x for x in u] - and/[IDENTP x for x in parsedNames] => parsedNames - '"Please enter a list of identifiers separated by blanks" - -chkPosInteger s == - (u := parseOnly s) and INTEGERP u and u > 0 => u - '"Please enter a positive integer" - -chkOutputFileName s == - bcString2WordList s in '(CONSOLE console) => 'console - chkDirectory s - -chkDirectory s == s - -chkNonNegativeInteger s == - (u := ncParseFromString s) and INTEGERP u and u >= 0 => u - '"Please enter a non-negative integer" - -chkRange s == - (u := ncParseFromString s) and INTEGERP u - and u >= $htInitial and (NULL $htFinal or u <= $htFinal) - => u - null $htFinal => - STRCONC('"Please enter an integer greater than ",stringize ($htInitial - 1)) - STRCONC('"Please enter an integer between ",stringize $htInitial,'" and ", - stringize $htFinal) - -chkAllNonNegativeInteger s == - (u := ncParseFromString s) and u in '(a al all A AL ALL) and 'ALL - or chkNonNegativeInteger s - or '"Please enter {\em all} or a non-negative integer" - -htMakePathKey path == - null path => systemError '"path is not set" - INTERN fn(PNAME first path,rest path) where - fn(a,b) == - null b => a - fn(STRCONC(a,'".",PNAME first b),rest b) - -htMarkTree(tree,n) == - RPLACD(LASTTAIL tree,n) - for branch in tree repeat - branch.3 = 'TREE => htMarkTree(branch.5,n + 1) - -htSetHistory htPage == - msg := "when the history facility is on (yes), results of computations are saved in memory" - data := ['history,msg,'history,'LITERALS,'$HiFiAccess,'(on off yes no)] - htShowLiteralsPage(htPage,data) - -htSetOutputLibrary htPage == - htSetNotAvailable(htPage,'")set compiler output") - -htSetInputLibrary htPage == - htSetNotAvailable(htPage,'")set compiler input") - -htSetExpose htPage == - htSetNotAvailable(htPage,'")set expose") - -htSetKernelProtect htPage == - htSetNotAvailable(htPage,'")set kernel protect") - -htSetKernelWarn htPage == - htSetNotAvailable(htPage,'")set kernel warn") - -htSetOutputCharacters htPage == - htSetNotAvailable(htPage,'")set output characters") - -htSetLinkerArgs htPage == - htSetNotAvailable(htPage,'")set fortran calling linker") - -htSetCache(htPage,:options) == - $path := '(functions cache) - htPage := htInitPage(mkSetTitle(),nil) - $valueList := nil - htMakePage '( - (text - "Use this system command to cause the AXIOM interpreter to `remember' " - "past values of interpreter functions. " - "To remember a past value of a function, the interpreter " - "sets up a {\em cache} for that function based on argument values. " - "When a value is cached for a given argument value, its value is gotten " - "from the cache and not recomputed. Caching can often save much " - "computing time, particularly with recursive functions or functions that " - "are expensive to compute and that are called repeatedly " - "with the same argument." - "\vspace{1}\newline ") - (domainConditions (Satisfies S chkNameList)) - (text - "Enter below a list of interpreter functions you would like specially cached. " - "Use the name {\em all} to give a default setting for all " - "interpreter functions. " - "\vspace{1}\newline " - "Enter {\em all} or a list of names (separate names by blanks):") - (inputStrings ("" "" 60 "all" names S)) - (doneButton "Push to enter names" htCacheAddChoice)) - htShowPage() - -htCacheAddChoice htPage == - names := bcString2WordList htpLabelInputString(htPage,'names) - $valueList := [listOfStrings2String names,:$valueList] - null names => htCacheAddQuery() - null rest names => htCacheOne names - page := htInitPage(mkSetTitle(),nil) - htpSetProperty(page,'names,names) - htMakePage '( - (domainConditions (Satisfies ALLPI chkAllPositiveInteger)) - (text - "For each function, enter below a {\em cache length}, a positive integer. " - "This number tells how many past values will " - "be cached. " - "A cache length of {\em 0} means the function won't be cached. " - "To cache all past values, " - "enter {\em all}." - "\vspace{1}\newline " - "For each function name, enter {\em all} or a positive integer:")) - for i in 1.. for name in names repeat htMakePage [ - ['inputStrings, - [STRCONC('"Function {\em ",name,'"} will cache"), - '"values",5,10,htMakeLabel('"c",i),'ALLPI]]] - htSetvarDoneButton('"Select to Set Values",'htCacheSet) - htShowPage() - -htMakeLabel(prefix,i) == INTERN STRCONC(prefix,stringize i) - -htCacheSet htPage == - names := htpProperty(htPage,'names) - for i in 1.. for name in names repeat - num := chkAllNonNegativeInteger - htpLabelInputString(htPage,htMakeLabel('"c",i)) - $cacheAlist := ADDASSOC(INTERN name,num,$cacheAlist) - if (n := LASSOC('all,$cacheAlist)) then - $cacheCount := n - $cacheAlist := deleteAssoc('all,$cacheAlist) - htInitPage('"Cache Summary",nil) - bcHt '"In general, interpreter functions " - bcHt - $cacheCount = 0 => "will {\em not} be cached." - bcHt '"cache " - htAllOrNum $cacheCount - '"} values." - bcHt '"\vspace{1}\newline " - if $cacheAlist then --- bcHt '" However, \indent{3}" - for [name,:val] in $cacheAlist | val ^= $cacheCount repeat - bcHt '"\newline function {\em " - bcHt stringize name - bcHt '"} will cache " - htAllOrNum val - bcHt '"} values" - htProcessDoitButton ['"Press to Remove Page",'"",'htDoNothing] - htShowPage() - -htAllOrNum val == bcHt - val = 'all => '"{\em all" - val = 0 => '"{\em no" - STRCONC('"the last {\em ",stringize val) - -htCacheOne names == - page := htInitPage(mkSetTitle(),nil) - htpSetProperty(page,'names,names) - htMakePage '( - (domainConditions (Satisfies ALLPI chkAllPositiveInteger)) - (text - "Enter below a {\em cache length}, a positive integer. " - "This number tells how many past values will " - "be cached. To cache all past values, " - "enter {\em all}." - "\vspace{1}\newline ") - (inputStrings - ("Enter {\em all} or a positive integer:" - "" 5 10 c1 ALLPI))) - htSetvarDoneButton('"Select to Set Value",'htCacheSet) - htShowPage() - - - - - - - - -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/interp/hypertex.boot b/src/interp/hypertex.boot new file mode 100644 index 00000000..00a513aa --- /dev/null +++ b/src/interp/hypertex.boot @@ -0,0 +1,120 @@ +-- 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. + + +-- HyperTex Spad interface + +-- SETANDFILEQ($SendXEventToHyperTeX, 8) +SETANDFILEQ($LinkToPage, 96) +SETANDFILEQ($StartPage, 97) +SETANDFILEQ($SendLine, 98) +SETANDFILEQ($EndOfPage, 99) +SETANDFILEQ($PopUpPage, 95) +SETANDFILEQ($PopUpNamedPage, 94) +SETANDFILEQ($KillPage, 93) +SETANDFILEQ($ReplacePage, 92) +SETANDFILEQ($ReplaceNamedPage, 91) +SETANDFILEQ($SpadError, 90) +SETANDFILEQ($PageStuff, 100) + + + +-- Issue a line of HyperTex +issueHT line == +-- unescapeStringsInForm line + sockSendInt($MenuServer, $SendLine) + sockSendString($MenuServer, line) + +endHTPage() == + sockSendInt($MenuServer, $EndOfPage) + +testPage() == + startHTPage(50) + issueHT '"\page{TestPage}{Test Page generated from Lisp} " + issueHT '"\horizontalline\beginscroll\beginitems " + issueHT '"\item \downlink{Quayle Jokes}{ChickenPage} \space{2} " + issueHT '"The misadventures of the White House bellboy. " + issueHT '"\enditems\endscroll\autobuttons " + endHTPage() + +-- Replace a current hypertex page +replaceNamedHTPage(window, name) == + sockSendInt($MenuServer, $PageStuff) + sockSendInt($MenuServer, $currentFrameNum) + sockSendInt($MenuServer, $ReplaceNamedPage) + sockSendInt($MenuServer, window) + sockSendString($MenuServer, name) + +-- Start up a form page from spad +startHTPopUpPage cols == + sockSendInt($MenuServer, $PageStuff) + sockSendInt($MenuServer, $currentFrameNum) + sockSendInt($MenuServer, $PopUpPage) + sockSendInt($MenuServer, cols) + sockGetInt($MenuServer) + +-- Start a page from spad. Using the spcified number of columns +startHTPage cols == + sockSendInt($MenuServer, $PageStuff) + sockSendInt($MenuServer, $currentFrameNum) + sockSendInt($MenuServer, $StartPage) + sockSendInt($MenuServer, cols) + +-- Start a replace page sequence +startReplaceHTPage w == + sockSendInt($MenuServer, $PageStuff) + sockSendInt($MenuServer, $currentFrameNum) + sockSendInt($MenuServer, $ReplacePage) + sockSendInt($MenuServer, w) + +-- Kill a page feom scratchpad +killHTPage w == + sockSendInt($MenuServer, $PageStuff) + sockSendInt($MenuServer, $currentFrameNum) + sockSendInt($MenuServer, $KillPage) + sockSendInt($MenuServer, w) + +linkToHTPage name == + sockSendInt($MenuServer, $PageStuff) + sockSendInt($MenuServer, $currentFrameNum) + sockSendInt($MenuServer, $LinkToPage) + sockSendString($MenuServer, name) + +popUpNamedHTPage(name,cols) == + sockSendInt($MenuServer, $PageStuff) + sockSendInt($MenuServer, $currentFrameNum) + sockSendInt($MenuServer, $PopUpNamedPage) + sockSendInt($MenuServer, cols) + sockSendString($MenuServer, name) + sockGetInt($MenuServer) + +sendHTErrorSignal() == + sockSendInt($MenuServer, $SpadError) diff --git a/src/interp/hypertex.boot.pamphlet b/src/interp/hypertex.boot.pamphlet deleted file mode 100644 index 430abc4e..00000000 --- a/src/interp/hypertex.boot.pamphlet +++ /dev/null @@ -1,142 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/interp hypertex.boot} -\author{The Axiom Team} -\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. - -@ -<<*>>= -<> - --- HyperTex Spad interface - --- SETANDFILEQ($SendXEventToHyperTeX, 8) -SETANDFILEQ($LinkToPage, 96) -SETANDFILEQ($StartPage, 97) -SETANDFILEQ($SendLine, 98) -SETANDFILEQ($EndOfPage, 99) -SETANDFILEQ($PopUpPage, 95) -SETANDFILEQ($PopUpNamedPage, 94) -SETANDFILEQ($KillPage, 93) -SETANDFILEQ($ReplacePage, 92) -SETANDFILEQ($ReplaceNamedPage, 91) -SETANDFILEQ($SpadError, 90) -SETANDFILEQ($PageStuff, 100) - - - --- Issue a line of HyperTex -issueHT line == --- unescapeStringsInForm line - sockSendInt($MenuServer, $SendLine) - sockSendString($MenuServer, line) - -endHTPage() == - sockSendInt($MenuServer, $EndOfPage) - -testPage() == - startHTPage(50) - issueHT '"\page{TestPage}{Test Page generated from Lisp} " - issueHT '"\horizontalline\beginscroll\beginitems " - issueHT '"\item \downlink{Quayle Jokes}{ChickenPage} \space{2} " - issueHT '"The misadventures of the White House bellboy. " - issueHT '"\enditems\endscroll\autobuttons " - endHTPage() - --- Replace a current hypertex page -replaceNamedHTPage(window, name) == - sockSendInt($MenuServer, $PageStuff) - sockSendInt($MenuServer, $currentFrameNum) - sockSendInt($MenuServer, $ReplaceNamedPage) - sockSendInt($MenuServer, window) - sockSendString($MenuServer, name) - --- Start up a form page from spad -startHTPopUpPage cols == - sockSendInt($MenuServer, $PageStuff) - sockSendInt($MenuServer, $currentFrameNum) - sockSendInt($MenuServer, $PopUpPage) - sockSendInt($MenuServer, cols) - sockGetInt($MenuServer) - --- Start a page from spad. Using the spcified number of columns -startHTPage cols == - sockSendInt($MenuServer, $PageStuff) - sockSendInt($MenuServer, $currentFrameNum) - sockSendInt($MenuServer, $StartPage) - sockSendInt($MenuServer, cols) - --- Start a replace page sequence -startReplaceHTPage w == - sockSendInt($MenuServer, $PageStuff) - sockSendInt($MenuServer, $currentFrameNum) - sockSendInt($MenuServer, $ReplacePage) - sockSendInt($MenuServer, w) - --- Kill a page feom scratchpad -killHTPage w == - sockSendInt($MenuServer, $PageStuff) - sockSendInt($MenuServer, $currentFrameNum) - sockSendInt($MenuServer, $KillPage) - sockSendInt($MenuServer, w) - -linkToHTPage name == - sockSendInt($MenuServer, $PageStuff) - sockSendInt($MenuServer, $currentFrameNum) - sockSendInt($MenuServer, $LinkToPage) - sockSendString($MenuServer, name) - -popUpNamedHTPage(name,cols) == - sockSendInt($MenuServer, $PageStuff) - sockSendInt($MenuServer, $currentFrameNum) - sockSendInt($MenuServer, $PopUpNamedPage) - sockSendInt($MenuServer, cols) - sockSendString($MenuServer, name) - sockGetInt($MenuServer) - -sendHTErrorSignal() == - sockSendInt($MenuServer, $SpadError) -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/interp/i-analy.boot b/src/interp/i-analy.boot new file mode 100644 index 00000000..00e62a44 --- /dev/null +++ b/src/interp/i-analy.boot @@ -0,0 +1,810 @@ +-- 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. + + +--% Interpreter Analysis Functions + +--% Basic Object Type Identification + +getBasicMode x == getBasicMode0(x,$useIntegerSubdomain) + +getBasicMode0(x,useIntegerSubdomain) == + -- if x is one of the basic types (Integer String Float Boolean) then + -- this function returns its type, and nil otherwise + x is nil => $EmptyMode + STRINGP x => $String + INTEGERP x => + useIntegerSubdomain => + x > 0 => $PositiveInteger + x = 0 => $NonNegativeInteger + $Integer + $Integer + FLOATP x => $DoubleFloat + (x='noBranch) or (x='noValue) => $NoValueMode + nil + +getBasicObject x == + INTEGERP x => + t := + not $useIntegerSubdomain => $Integer + x > 0 => $PositiveInteger + x = 0 => $NonNegativeInteger + $Integer + objNewWrap(x,t) + STRINGP x => objNewWrap(x,$String) + FLOATP x => objNewWrap(x,$DoubleFloat) + NIL + +getMinimalVariableTower(var,t) == + -- gets the minimal polynomial subtower of t that contains the + -- given variable. Returns NIL if none. + STRINGP(t) or IDENTP(t) => NIL + t = $Symbol => t + t is ['Variable,u] => + (u = var) => t + NIL + t is ['Polynomial,.] => t + t is ['RationalFunction,D] => ['Polynomial,D] + t is [up,t',u,.] and MEMQ(up,$univariateDomains) => + -- power series have one more arg and different ordering + u = var => t + getMinimalVariableTower(var,t') + t is [up,u,t'] and MEMQ(up,$univariateDomains) => + u = var => t + getMinimalVariableTower(var,t') + t is [mp,u,t'] and MEMQ(mp,$multivariateDomains) => + var in u => t + getMinimalVariableTower(var,t') + null (t' := underDomainOf t) => NIL + getMinimalVariableTower(var,t') + +getMinimalVarMode(id,m) == + -- This function finds the minimum polynomial subtower type of the + -- polynomial domain tower m which id to which can be coerced + -- It includes all polys above the found level if they are + -- contiguous. + -- E.g.: x and G P[y] P[x] I ---> P[y] P[x] I + -- x and P[y] G P[x] I ---> P[x] I + m is ['Mapping, :.] => m + defaultMode := + $Symbol + null m => defaultMode + (vl := polyVarlist m) and ((id in vl) or 'all in vl) => + SUBSTQ('(Integer),$EmptyMode,m) + (um := underDomainOf m) => getMinimalVarMode(id,um) + defaultMode + +polyVarlist m == + -- If m is a polynomial type this function returns a list of its + -- top level variables, and nil otherwise + -- ignore any QuotientFields that may separate poly types + m is [=$QuotientField,op] => polyVarlist op + m is [op,a,:.] => + op in '(UnivariateTaylorSeries UnivariateLaurentSeries + UnivariatePuiseuxSeries) => + [., ., a, :.] := m + a := removeQuote a + [a] + op in '(Polynomial RationalFunction Expression) => + '(all) + a := removeQuote a + op in '(UnivariatePolynomial) => + [a] + op in $multivariateDomains => + a + nil + +--% Pushing Down Target Information + +pushDownTargetInfo(op,target,arglist) == + -- put target info on args for certain operations + target = $OutputForm => NIL + target = $Any => NIL + n := LENGTH arglist + pushDownOnArithmeticVariables(op,target,arglist) + (pdArgs := pushDownOp?(op,n)) => + for i in pdArgs repeat + x := arglist.i + if not getTarget(x) then putTarget(x,target) + nargs := #arglist + 1 = nargs => + (op = 'SEGMENT) and (target is ['UniversalSegment,S]) => + for x in arglist repeat + if not getTarget(x) then putTarget(x,S) + 2 = nargs => + op = "*" => -- only push down on 1st arg if not immed + if not getTarget CADR arglist then putTarget(CADR arglist,target) + getTarget(x := CAR arglist) => NIL + if getUnname(x) ^= $immediateDataSymbol then putTarget(x,target) + op = "**" or op = "^" => -- push down on base + if not getTarget CAR arglist then putTarget(CAR arglist,target) + (op = 'equation) and (target is ['Equation,S]) => + for x in arglist repeat + if not getTarget(x) then putTarget(x,S) + (op = 'gauss) and (target is ['Gaussian,S]) => + for x in arglist repeat + if not getTarget(x) then putTarget(x,S) + (op = '_/) => + targ := + target is ['Fraction,S] => S + target + for x in arglist repeat + if not getTarget(x) then putTarget(x,targ) + (op = 'SEGMENT) and (target is ['Segment,S]) => + for x in arglist repeat + if not getTarget(x) then putTarget(x,S) + (op = 'SEGMENT) and (target is ['UniversalSegment,S]) => + for x in arglist repeat + if not getTarget(x) then putTarget(x,S) + NIL + NIL + +pushDownOnArithmeticVariables(op,target,arglist) == + -- tries to push appropriate target information onto variable + -- occurring in arithmetic expressions + PAIRP(target) and CAR(target) = 'Variable => NIL + not MEMQ(op,'(_+ _- _* _*_* _/)) => NIL + not containsPolynomial(target) => NIL + for x in arglist for i in 1.. repeat + VECP(x) => -- leaf + transferPropsToNode(xn := getUnname(x),x) + getValue(x) or (xn = $immediateDataSymbol) => NIL + t := getMinimalVariableTower(xn,target) or target + if not getTarget(x) then putTarget(x,t) + PAIRP(x) => -- node + [op',:arglist'] := x + pushDownOnArithmeticVariables(getUnname op',target,arglist') + arglist + +pushDownOp?(op,n) == + -- determine if for op with n arguments whether for all modemaps + -- the target type is equal to one or more arguments. If so, a list + -- of the appropriate arguments is returned. + ops := [sig for [sig,:.] in getModemapsFromDatabase(op,n)] + null ops => NIL + op in '(_+ _* _- _exquo) => [i for i in 0..(n-1)] + -- each signature has form + -- [domain of implementation, target, arg1, arg2, ...] + -- sameAsTarg is a vector that counts the number of modemaps that + -- have the corresponding argument equal to the target type + sameAsTarg := GETZEROVEC n + numMms := LENGTH ops + for [.,targ,:argl] in ops repeat + for arg in argl for i in 0.. repeat + targ = arg => SETELT(sameAsTarg,i,1 + sameAsTarg.i) + -- now see which args have their count = numMms + ok := NIL + for i in 0..(n-1) repeat + if numMms = sameAsTarg.i then ok := cons(i,ok) + reverse ok + +--% Bottom Up Processing + +-- Also see I-SPEC BOOT for special handlers and I-MAP BOOT for +-- user function processing. + +bottomUp t == + -- bottomUp takes an attributed tree, and returns the modeSet for it. + -- As a side-effect it also evaluates the tree. + t is [op,:argl] => + tar := getTarget op + getUnname(op) ^= $immediateDataSymbol and (v := getValue op) => + om := objMode(v) + null tar => [om] + (r := resolveTM(om,tar)) => [r] + [om] + if atom op then + opName:= getUnname op + if opName in $localVars then + putModeSet(op,bottomUpIdentifier(op,opName)) + else + transferPropsToNode(opName,op) + else + opName := NIL + bottomUp op + + opVal := getValue op + + -- call a special handler if we are not being package called + dol := getAtree(op,'dollar) and (opName ^= 'construct) + + (null dol) and (fn:= GETL(opName,"up")) and (u:= FUNCALL(fn, t)) => u + nargs := #argl + if opName then for x in argl for i in 1.. repeat + putAtree(x,'callingFunction,opName) + putAtree(x,'argumentNumber,i) + putAtree(x,'totalArgs,nargs) + + if tar then pushDownTargetInfo(opName,tar,argl) + + -- see if we are calling a declared user map + -- if so, push down the declared types as targets on the args + if opVal and (objVal opVal is ['MAP,:.]) and + (getMode op is ['Mapping,:ms]) and (nargs + 1= #ms) then + for m in rest ms for x in argl repeat putTarget(x,m) + + argModeSetList:= [bottomUp x for x in argl] + + if ^tar and opName = "*" and nargs = 2 then + [[t1],[t2]] := argModeSetList + tar := computeTypeWithVariablesTarget(t1, t2) + tar => + pushDownTargetInfo(opName,tar,argl) + argModeSetList:= [bottomUp x for x in argl] + + ms := bottomUpForm(t,op,opName,argl,argModeSetList) + + -- given no target or package calling, force integer constants to + -- belong to tightest possible subdomain + + op := CAR t -- may have changed in bottomUpElt + $useIntegerSubdomain and null tar and null dol and + isEqualOrSubDomain(first ms,$Integer) => + val := objVal getValue op + isWrapped val => -- constant if wrapped + val := unwrap val + bm := getBasicMode val + putValue(op,objNewWrap(val,bm)) + putModeSet(op,[bm]) + ms + ms + m := getBasicMode t => [m] + IDENTP (id := getUnname t) => + putModeSet(t,bottomUpIdentifier(t,id)) + keyedSystemError("S2GE0016",['"bottomUp",'"unknown object form"]) + +computeTypeWithVariablesTarget(p, q) == + polyVarlist(p) or polyVarlist(q) => + t := resolveTT(p, q) + polyVarlist(t) => t + NIL + NIL + +bottomUpCompile t == + $genValue:local := false + ms := bottomUp t + COMP_-TRAN_-1 objVal getValue t + ms + +bottomUpUseSubdomain t == + $useIntegerSubdomain : local := true + ms := bottomUp t + ($immediateDataSymbol ^= getUnname(t)) or ($Integer ^= CAR(ms)) => ms + null INTEGERP(num := objValUnwrap getValue t) => ms + o := getBasicObject(num) + putValue(t,o) + ms := [objMode o] + putModeSet(t,ms) + ms + +bottomUpPredicate(pred, name) == + putTarget(pred,$Boolean) + ms := bottomUp pred + $Boolean ^= first ms => throwKeyedMsg('"S2IB0001",[name]) + ms + +bottomUpCompilePredicate(pred, name) == + $genValue:local := false + bottomUpPredicate(pred,name) + +bottomUpIdentifier(t,id) == + m := isType t => bottomUpType(t, m) + EQ(id,'noMapVal) => throwKeyedMsg('"S2IB0002",NIL) + EQ(id,'noBranch) => + keyedSystemError("S2GE0016", + ['"bottomUpIdentifier",'"trying to evaluate noBranch"]) + transferPropsToNode(id,t) + defaultType := ['Variable,id] + -- This was meant to stop building silly symbols but had some unfortunate + -- side effects, like not being able to say e:=foo in the interpreter. MCD +-- defaultType := +-- getModemapsFromDatabase(id,1) => +-- userError ['"Cannot use operation name as a variable: ", id] +-- ['Variable, id] + u := getValue t => --non-cached values MAY be re-evaluated + tar := getTarget t + expr:= objVal u + om := objMode(u) + (om ^= $EmptyMode) and (om isnt ['RuleCalled,.]) => + $genValue or GENSYMP(id) => + null tar => [om] + (r := resolveTM(om,tar)) => [r] + [om] + bottomUpDefault(t,id,defaultType,getTarget t) + interpRewriteRule(t,id,expr) or + (isMapExpr expr and [objMode(u)]) or + keyedSystemError("S2GE0016", + ['"bottomUpIdentifier",'"cannot evaluate identifier"]) + bottomUpDefault(t,id,defaultType,getTarget t) + +bottomUpDefault(t,id,defaultMode,target) == + if $genValue + then bottomUpDefaultEval(t,id,defaultMode,target,nil) + else bottomUpDefaultCompile(t,id,defaultMode,target,nil) + +bottomUpDefaultEval(t,id,defaultMode,target,isSub) == + -- try to get value case. + + -- 1. declared mode but no value case + (m := getMode t) => + m is ['Mapping,:.] => throwKeyedMsg('"S2IB0003",[getUnname t]) + + -- hmm, try to treat it like target mode or declared mode + if isPartialMode(m) then m := resolveTM(['Variable,id],m) + -- if there is a target, probably want it to be that way and not + -- declared mode. Like "x" in second line: + -- x : P[x] I + -- y : P[x] I + target and not isSub and + (val := coerceInteractive(objNewWrap(id,['Variable,id]),target))=> + putValue(t,val) + [target] + -- Ok, see if we can make it into declared mode from symbolic form + -- For example, (x : P[x] I; x + 1) + not target and not isSub and m and + (val := coerceInteractive(objNewWrap(id,['Variable,id]),m)) => + putValue(t,val) + [m] + -- give up + throwKeyedMsg('"S2IB0004",[id,m]) + + -- 2. no value and no mode case + val := objNewWrap(id,defaultMode) + (null target) or (defaultMode = target) => + putValue(t,val) + [defaultMode] + if isPartialMode target then + -- this hackery will go away when Symbol is not the default type + if defaultMode = $Symbol and (target is [D,x,.]) then + (D in $univariateDomains and (x = id)) or + (D in $multivariateDomains and (id in x)) => + dmode := [D,x,$Integer] + (val' := coerceInteractive(objNewWrap(id, + ['Variable,id]),dmode)) => + defaultMode := dmode + val := val' + NIL + target := resolveTM(defaultMode,target) + -- The following is experimental. SCM 10/11/90 + if target and (tm := getMinimalVarMode(id, target)) then + target := tm + (null target) or null (val' := coerceInteractive(val,target)) => + putValue(t,val) + [defaultMode] + putValue(t,val') + [target] + +bottomUpDefaultCompile(t,id,defaultMode,target,isSub) == + tmode := getMode t + tval := getValue t + expr:= + id in $localVars => id + tmode or tval => + envMode := tmode or objMode tval + envMode is ['Variable, :.] => objVal tval + id = $immediateDataSymbol => objVal tval + ['getValueFromEnvironment,MKQ id,MKQ envMode] + wrap id + tmode and tval and (mdv := objMode tval) => + if isPartialMode tmode then + null (tmode := resolveTM(mdv,tmode)) => + keyedMsgCompFailure("S2IB0010",NIL) + putValue(t,objNew(expr,tmode)) + [tmode] + tmode or (tval and (tmode := objMode tval)) => + putValue(t,objNew(expr,tmode)) + [tmode] + obj := objNew(expr,defaultMode) + canCoerceFrom(defaultMode, target) and + (obj' := coerceInteractive(obj, target)) => + putValue(t, obj') + [target] + putValue(t,obj) + [defaultMode] + +interpRewriteRule(t,id,expr) == + null get(id,'isInterpreterRule,$e) => NIL + (ms:= selectLocalMms(t,id,nil,nil)) and (ms:=evalForm(t,id,nil,ms)) => + ms + nil + +bottomUpForm(t,op,opName,argl,argModeSetList) == + not($inRetract) => + bottomUpForm3(t,op,opName,argl,argModeSetList) + bottomUpForm2(t,op,opName,argl,argModeSetList) + +bottomUpForm3(t,op,opName,argl,argModeSetList) == + $origArgModeSetList:local := COPY argModeSetList + bottomUpForm2(t,op,opName,argl,argModeSetList) + +bottomUpForm2(t,op,opName,argl,argModeSetList) == + not atom t and EQ(opName,"%%") => bottomUpPercent t + opVal := getValue op + + -- for things with objects in operator position, be careful before + -- we enter general modemap selection + + lookForIt := + getAtree(op,'dollar) => true + not opVal => true + opMode := objMode opVal + not (opModeTop := IFCAR opMode) => true + opModeTop in '(Record Union) => false + opModeTop in '(Variable Mapping FunctionCalled RuleCalled AnonymousFunction) => true + false + + -- get rid of Union($, "failed") except when op is "=" and all + -- modesets are the same + + $genValue and + ^(opName = "=" and argModeSetList is [[m],[=m]] and m is ['Union,:.]) and + (u := bottomUpFormUntaggedUnionRetract(t,op,opName,argl,argModeSetList)) => u + + lookForIt and (u := bottomUpFormTuple(t, op, opName, argl, argModeSetList)) => u + + -- opName can change in the call to selectMms + + (lookForIt and (mmS := selectMms(op,argl,getTarget op))) and + (mS := evalForm(op,opName := getUnname op,argl,mmS)) => + putModeSet(op,mS) + bottomUpForm0(t,op,opName,argl,argModeSetList) + +bottomUpFormTuple(t, op, opName, args, argModeSetList) == + getAtree(op,'dollar) => NIL + null (singles := getModemapsFromDatabase(opName, 1)) => NIL + + -- see if any of the modemaps have Tuple arguments + haveTuple := false + for mm in singles while not haveTuple repeat + if getFirstArgTypeFromMm(mm) is ["Tuple",.] then haveTuple := true + not haveTuple => nil + nargs := #args + nargs = 1 and getUnname first args = "Tuple" => NIL + nargs = 1 and (ms := bottomUp first args) and + (ms is [["Tuple",.]] or ms is [["List",.]]) => NIL + + -- now make the args into a tuple + + newArg := [mkAtreeNode "Tuple",:args] + bottomUp [op, newArg] + +removeUnionsAtStart(argl,modeSets) == + null $genValue => modeSets + for arg in argl for ms in modeSets repeat + null (v := getValue arg) => nil + m := objMode(v) + m isnt ['Union,:.] => nil + val := objVal(v) + null isWrapped val => nil + val' := retract v + m' := objMode val' + putValue(arg,val') + putModeSet(arg,[m']) + RPLACA(ms,m') + modeSets + +printableArgModeSetList() == + amsl := nil + for a in reverse $origArgModeSetList repeat + b := prefix2String first a + if ATOM b then b := [b] + amsl := ['%l,:b,:amsl] + if amsl then amsl := rest amsl + amsl + +bottomUpForm0(t,op,opName,argl,argModeSetList) == + op0 := op + opName0 := opName + + m := isType t => + bottomUpType(t, m) + + opName = 'copy and argModeSetList is [[['Record,:rargs]]] => + -- this is a hack until Records go through the normal + -- modemap selection process + rtype := ['Record,:rargs] + code := optRECORDCOPY(['RECORDCOPY,getArgValue(CAR argl, rtype),#rargs]) + + if $genValue then code := wrap timedEVALFUN code + val := objNew(code,rtype) + putValue(t,val) + putModeSet(t,[rtype]) + + m := getModeOrFirstModeSetIfThere op + m is ['Record,:.] and argModeSetList is [[['Variable,x]]] and + member(x,getUnionOrRecordTags m) and (u := bottomUpElt t) => u + m is ['Union,:.] and argModeSetList is [[['Variable,x]]] => + member(x,getUnionOrRecordTags m) and (u := bottomUpElt t) => u + not $genValue => + amsl := printableArgModeSetList() + throwKeyedMsgSP("S2IB0008",['"the union object",amsl], op) + object := retract getValue op + object = 'failed => + throwKeyedMsgSP("S2IB0008",['"the union object",amsl], op) + putModeSet(op,[objMode(object)]) + putValue(op,object) + (u := bottomUpElt t) => u + bottomUpForm0(t,op,opName,argl,argModeSetList) + + (opName ^= "elt") and (opName ^= "apply") and + #argl = 1 and first first argModeSetList is ['Variable, var] + and var in '(first last rest) and + isEltable(op, argl, #argl) and (u := bottomUpElt t) => u + + $genValue and + ( u:= bottomUpFormRetract(t,op,opName,argl,argModeSetList) ) => u + + (opName ^= "elt") and (opName ^= "apply") and + isEltable(op, argl, #argl) and (u := bottomUpElt t) => u + + if FIXP $HTCompanionWindowID then + mkCompanionPage('operationError, t) + + amsl := printableArgModeSetList() + opName1 := + opName0 = $immediateDataSymbol => + (o := coerceInteractive(getValue op0,$OutputForm)) => + outputTran objValUnwrap o + NIL + opName0 + + if null(opName1) then + opName1 := + (o := getValue op0) => prefix2String objMode o + '"" + msgKey := + null amsl => "S2IB0013" + "S2IB0012" + else + msgKey := + null amsl => "S2IB0011" + (n := isSharpVarWithNum opName1) => + opName1 := n + "S2IB0008g" + "S2IB0008" + + sayIntelligentMessageAboutOpAvailability(opName1, #argl) + + not $genValue => + keyedMsgCompFailureSP(msgKey,[opName1, amsl], op0) + throwKeyedMsgSP(msgKey,[opName1, amsl], op0) + +sayIntelligentMessageAboutOpAvailability(opName, nArgs) == + -- see if we can give some decent messages about the availability if + -- library messages + + NUMBERP opName => NIL + + oo := object2Identifier opOf opName + if ( oo = "%" ) or ( oo = "Domain" ) or ( domainForm? opName ) then + opName := "elt" + + nAllExposedMmsWithName := #getModemapsFromDatabase(opName, NIL) + nAllMmsWithName := #getAllModemapsFromDatabase(opName, NIL) + + -- first see if there are ANY ops with this name + + if nAllMmsWithName = 0 then + sayKeyedMsg("S2IB0008a", [opName]) + else if nAllExposedMmsWithName = 0 then + nAllMmsWithName = 1 => sayKeyedMsg("S2IB0008b", [opName]) + sayKeyedMsg("S2IB0008c", [opName, nAllMmsWithName]) + else + -- now talk about specific arguments + nAllExposedMmsWithNameAndArgs := #getModemapsFromDatabase(opName, nArgs) + nAllMmsWithNameAndArgs := #getAllModemapsFromDatabase(opName, nArgs) + nAllMmsWithNameAndArgs = 0 => + sayKeyedMsg("S2IB0008d", [opName, nArgs, nAllExposedMmsWithName, nAllMmsWithName - nAllExposedMmsWithName]) + nAllExposedMmsWithNameAndArgs = 0 => + sayKeyedMsg("S2IB0008e", [opName, nArgs, nAllMmsWithNameAndArgs - nAllExposedMmsWithNameAndArgs]) + sayKeyedMsg("S2IB0008f", [opName, nArgs, nAllExposedMmsWithNameAndArgs, nAllMmsWithNameAndArgs - nAllExposedMmsWithNameAndArgs]) + nil + +bottomUpType(t, type) == + mode := + if isPartialMode type then '(Mode) + else if categoryForm?(type) then '(SubDomain (Domain)) + else '(Domain) + val:= objNew(type,mode) + putValue(t,val) + -- have to fix the following + putModeSet(t,[mode]) + +bottomUpPercent(tree is [op,:argl]) == + -- handles a call %%(5), which means the output of step 5 + -- %%() is the same as %%(-1) + null argl => + val:= fetchOutput(-1) + putValue(op,val) + putModeSet(op,[objMode(val)]) + argl is [t] => + i:= getArgValue(t,$Integer) => + val:= fetchOutput i + putValue(op,val) + putModeSet(op,[objMode(val)]) + throwKeyedMsgSP('"S2IB0006",NIL,t) + throwKeyedMsgSP('"S2IB0006",NIL,op) + +bottomUpFormRetract(t,op,opName,argl,amsl) == + -- tries to find one argument, which can be pulled back, and calls + -- bottomUpForm again. We do not retract the first argument to a + -- setelt, because this is presumably a destructive operation and + -- the retract can create a new object. + + -- if no such operation exists in the database, don't bother + $inRetract: local := true + null getAllModemapsFromDatabase(getUnname op,#argl) => NIL + + u := bottomUpFormAnyUnionRetract(t,op,opName,argl,amsl) => u + + a := NIL + b := NIL + ms := NIL + for x in argl for m in amsl for i in 1.. repeat + -- do not retract first arg of a setelt + (i = 1) and (opName = "setelt") => + a := [x,:a] + ms := [m,:ms] + (i = 1) and (opName = "set!") => + a := [x,:a] + ms := [m,:ms] + if PAIRP(m) and CAR(m) = $EmptyMode then return NIL + object:= retract getValue x + a:= [x,:a] + EQ(object,'failed) => + putAtree(x,'retracted,nil) + ms := [m, :ms] + b:= true + RPLACA(m,objMode(object)) + ms := [COPY_-TREE m, :ms] + putAtree(x,'retracted,true) + putValue(x,object) + putModeSet(x,[objMode(object)]) + --insert pulled-back items + a := nreverse a + ms := nreverse ms + + -- check that we haven't seen these types before + typesHad := getAtree(t, 'typesHad) + if member(ms, typesHad) then b := nil + else putAtree(t, 'typesHad, cons(ms, typesHad)) + + b and bottomUpForm(t,op,opName,a,amsl) + +retractAtree atr == + object:= retract getValue atr + EQ(object,'failed) => + putAtree(atr,'retracted,nil) + nil + putAtree(atr,'retracted,true) + putValue(atr,object) + putModeSet(atr,[objMode(object)]) + true + +bottomUpFormAnyUnionRetract(t,op,opName,argl,amsl) == + -- see if we have a Union + + ok := NIL + for m in amsl while not ok repeat + if atom first(m) then return NIL + first m = $Any => ok := true + (first first m = 'Union) => ok := true + not ok => NIL + + a:= NIL + b:= NIL + + for x in argl for m in amsl for i in 0.. repeat + m0 := first m + if ( (m0 = $Any) or (first m0 = 'Union) ) and + ('failed^=(object:=retract getValue x)) then + b := true + RPLACA(m,objMode(object)) + putModeSet(x,[objMode(object)]) + putValue(x,object) + a := cons(x,a) + b and bottomUpForm(t,op,opName,nreverse a,amsl) + +bottomUpFormUntaggedUnionRetract(t,op,opName,argl,amsl) == + -- see if we have a Union with no tags, if so retract all such guys + + ok := NIL + for [m] in amsl while not ok repeat + if atom m then return NIL + if m is ['Union, :.] and null getUnionOrRecordTags m then ok := true + not ok => NIL + + a:= NIL + b:= NIL + + for x in argl for m in amsl for i in 0.. repeat + m0 := first m + if (m0 is ['Union, :.] and null getUnionOrRecordTags m0) and + ('failed ^= (object:=retract getValue x)) then + b := true + RPLACA(m,objMode(object)) + putModeSet(x,[objMode(object)]) + putValue(x,object) + a := cons(x,a) + b and bottomUpForm(t,op,opName,nreverse a,amsl) + +bottomUpElt (form:=[op,:argl]) == + -- this transfers expressions that look like function calls into + -- forms with elt or apply. + + ms := bottomUp op + ms and (ms is [['Union,:.]] or ms is [['Record,:.]]) => + RPLAC(CDR form, [op,:argl]) + RPLAC(CAR form, mkAtreeNode "elt") + bottomUp form + + target := getTarget form + + newOps := [mkAtreeNode "elt", mkAtreeNode "apply"] + u := nil + + while ^u for newOp in newOps repeat + newArgs := [op,:argl] + if selectMms(newOp, newArgs, target) then + RPLAC(CDR form, newArgs) + RPLAC(CAR form, newOp) + u := bottomUp form + + while ^u and ( "and"/[retractAtree(a) for a in newArgs] ) repeat + while ^u for newOp in newOps repeat + newArgs := [op,:argl] + if selectMms(newOp, newArgs, target) then + RPLAC(CDR form, newArgs) + RPLAC(CAR form, newOp) + u := bottomUp form + u + +isEltable(op,argl,numArgs) == + -- determines if the object might possible have an elt function + -- we exclude Mapping and Variable types explicitly + v := getValue op => + ZEROP numArgs => true + not(m := objMode(v)) => nil + m is ['Mapping, :.] => nil + objVal(v) is ['MAP, :mapDef] and numMapArgs(mapDef) > 0 => nil + true + m := getMode op => + ZEROP numArgs => true + m is ['Mapping, :.] => nil + true + numArgs ^= 1 => nil + name := getUnname op + name = 'SEQ => nil +--not (name in '(a e h s)) and getAllModemapsFromDatabase(name, nil) => nil + arg := first argl + (getUnname arg) ^= 'construct => nil + true + diff --git a/src/interp/i-analy.boot.pamphlet b/src/interp/i-analy.boot.pamphlet deleted file mode 100644 index ff2d62fa..00000000 --- a/src/interp/i-analy.boot.pamphlet +++ /dev/null @@ -1,832 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/interp i-analy.boot} -\author{The Axiom Team} -\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. - -@ -<<*>>= -<> - ---% Interpreter Analysis Functions - ---% Basic Object Type Identification - -getBasicMode x == getBasicMode0(x,$useIntegerSubdomain) - -getBasicMode0(x,useIntegerSubdomain) == - -- if x is one of the basic types (Integer String Float Boolean) then - -- this function returns its type, and nil otherwise - x is nil => $EmptyMode - STRINGP x => $String - INTEGERP x => - useIntegerSubdomain => - x > 0 => $PositiveInteger - x = 0 => $NonNegativeInteger - $Integer - $Integer - FLOATP x => $DoubleFloat - (x='noBranch) or (x='noValue) => $NoValueMode - nil - -getBasicObject x == - INTEGERP x => - t := - not $useIntegerSubdomain => $Integer - x > 0 => $PositiveInteger - x = 0 => $NonNegativeInteger - $Integer - objNewWrap(x,t) - STRINGP x => objNewWrap(x,$String) - FLOATP x => objNewWrap(x,$DoubleFloat) - NIL - -getMinimalVariableTower(var,t) == - -- gets the minimal polynomial subtower of t that contains the - -- given variable. Returns NIL if none. - STRINGP(t) or IDENTP(t) => NIL - t = $Symbol => t - t is ['Variable,u] => - (u = var) => t - NIL - t is ['Polynomial,.] => t - t is ['RationalFunction,D] => ['Polynomial,D] - t is [up,t',u,.] and MEMQ(up,$univariateDomains) => - -- power series have one more arg and different ordering - u = var => t - getMinimalVariableTower(var,t') - t is [up,u,t'] and MEMQ(up,$univariateDomains) => - u = var => t - getMinimalVariableTower(var,t') - t is [mp,u,t'] and MEMQ(mp,$multivariateDomains) => - var in u => t - getMinimalVariableTower(var,t') - null (t' := underDomainOf t) => NIL - getMinimalVariableTower(var,t') - -getMinimalVarMode(id,m) == - -- This function finds the minimum polynomial subtower type of the - -- polynomial domain tower m which id to which can be coerced - -- It includes all polys above the found level if they are - -- contiguous. - -- E.g.: x and G P[y] P[x] I ---> P[y] P[x] I - -- x and P[y] G P[x] I ---> P[x] I - m is ['Mapping, :.] => m - defaultMode := - $Symbol - null m => defaultMode - (vl := polyVarlist m) and ((id in vl) or 'all in vl) => - SUBSTQ('(Integer),$EmptyMode,m) - (um := underDomainOf m) => getMinimalVarMode(id,um) - defaultMode - -polyVarlist m == - -- If m is a polynomial type this function returns a list of its - -- top level variables, and nil otherwise - -- ignore any QuotientFields that may separate poly types - m is [=$QuotientField,op] => polyVarlist op - m is [op,a,:.] => - op in '(UnivariateTaylorSeries UnivariateLaurentSeries - UnivariatePuiseuxSeries) => - [., ., a, :.] := m - a := removeQuote a - [a] - op in '(Polynomial RationalFunction Expression) => - '(all) - a := removeQuote a - op in '(UnivariatePolynomial) => - [a] - op in $multivariateDomains => - a - nil - ---% Pushing Down Target Information - -pushDownTargetInfo(op,target,arglist) == - -- put target info on args for certain operations - target = $OutputForm => NIL - target = $Any => NIL - n := LENGTH arglist - pushDownOnArithmeticVariables(op,target,arglist) - (pdArgs := pushDownOp?(op,n)) => - for i in pdArgs repeat - x := arglist.i - if not getTarget(x) then putTarget(x,target) - nargs := #arglist - 1 = nargs => - (op = 'SEGMENT) and (target is ['UniversalSegment,S]) => - for x in arglist repeat - if not getTarget(x) then putTarget(x,S) - 2 = nargs => - op = "*" => -- only push down on 1st arg if not immed - if not getTarget CADR arglist then putTarget(CADR arglist,target) - getTarget(x := CAR arglist) => NIL - if getUnname(x) ^= $immediateDataSymbol then putTarget(x,target) - op = "**" or op = "^" => -- push down on base - if not getTarget CAR arglist then putTarget(CAR arglist,target) - (op = 'equation) and (target is ['Equation,S]) => - for x in arglist repeat - if not getTarget(x) then putTarget(x,S) - (op = 'gauss) and (target is ['Gaussian,S]) => - for x in arglist repeat - if not getTarget(x) then putTarget(x,S) - (op = '_/) => - targ := - target is ['Fraction,S] => S - target - for x in arglist repeat - if not getTarget(x) then putTarget(x,targ) - (op = 'SEGMENT) and (target is ['Segment,S]) => - for x in arglist repeat - if not getTarget(x) then putTarget(x,S) - (op = 'SEGMENT) and (target is ['UniversalSegment,S]) => - for x in arglist repeat - if not getTarget(x) then putTarget(x,S) - NIL - NIL - -pushDownOnArithmeticVariables(op,target,arglist) == - -- tries to push appropriate target information onto variable - -- occurring in arithmetic expressions - PAIRP(target) and CAR(target) = 'Variable => NIL - not MEMQ(op,'(_+ _- _* _*_* _/)) => NIL - not containsPolynomial(target) => NIL - for x in arglist for i in 1.. repeat - VECP(x) => -- leaf - transferPropsToNode(xn := getUnname(x),x) - getValue(x) or (xn = $immediateDataSymbol) => NIL - t := getMinimalVariableTower(xn,target) or target - if not getTarget(x) then putTarget(x,t) - PAIRP(x) => -- node - [op',:arglist'] := x - pushDownOnArithmeticVariables(getUnname op',target,arglist') - arglist - -pushDownOp?(op,n) == - -- determine if for op with n arguments whether for all modemaps - -- the target type is equal to one or more arguments. If so, a list - -- of the appropriate arguments is returned. - ops := [sig for [sig,:.] in getModemapsFromDatabase(op,n)] - null ops => NIL - op in '(_+ _* _- _exquo) => [i for i in 0..(n-1)] - -- each signature has form - -- [domain of implementation, target, arg1, arg2, ...] - -- sameAsTarg is a vector that counts the number of modemaps that - -- have the corresponding argument equal to the target type - sameAsTarg := GETZEROVEC n - numMms := LENGTH ops - for [.,targ,:argl] in ops repeat - for arg in argl for i in 0.. repeat - targ = arg => SETELT(sameAsTarg,i,1 + sameAsTarg.i) - -- now see which args have their count = numMms - ok := NIL - for i in 0..(n-1) repeat - if numMms = sameAsTarg.i then ok := cons(i,ok) - reverse ok - ---% Bottom Up Processing - --- Also see I-SPEC BOOT for special handlers and I-MAP BOOT for --- user function processing. - -bottomUp t == - -- bottomUp takes an attributed tree, and returns the modeSet for it. - -- As a side-effect it also evaluates the tree. - t is [op,:argl] => - tar := getTarget op - getUnname(op) ^= $immediateDataSymbol and (v := getValue op) => - om := objMode(v) - null tar => [om] - (r := resolveTM(om,tar)) => [r] - [om] - if atom op then - opName:= getUnname op - if opName in $localVars then - putModeSet(op,bottomUpIdentifier(op,opName)) - else - transferPropsToNode(opName,op) - else - opName := NIL - bottomUp op - - opVal := getValue op - - -- call a special handler if we are not being package called - dol := getAtree(op,'dollar) and (opName ^= 'construct) - - (null dol) and (fn:= GETL(opName,"up")) and (u:= FUNCALL(fn, t)) => u - nargs := #argl - if opName then for x in argl for i in 1.. repeat - putAtree(x,'callingFunction,opName) - putAtree(x,'argumentNumber,i) - putAtree(x,'totalArgs,nargs) - - if tar then pushDownTargetInfo(opName,tar,argl) - - -- see if we are calling a declared user map - -- if so, push down the declared types as targets on the args - if opVal and (objVal opVal is ['MAP,:.]) and - (getMode op is ['Mapping,:ms]) and (nargs + 1= #ms) then - for m in rest ms for x in argl repeat putTarget(x,m) - - argModeSetList:= [bottomUp x for x in argl] - - if ^tar and opName = "*" and nargs = 2 then - [[t1],[t2]] := argModeSetList - tar := computeTypeWithVariablesTarget(t1, t2) - tar => - pushDownTargetInfo(opName,tar,argl) - argModeSetList:= [bottomUp x for x in argl] - - ms := bottomUpForm(t,op,opName,argl,argModeSetList) - - -- given no target or package calling, force integer constants to - -- belong to tightest possible subdomain - - op := CAR t -- may have changed in bottomUpElt - $useIntegerSubdomain and null tar and null dol and - isEqualOrSubDomain(first ms,$Integer) => - val := objVal getValue op - isWrapped val => -- constant if wrapped - val := unwrap val - bm := getBasicMode val - putValue(op,objNewWrap(val,bm)) - putModeSet(op,[bm]) - ms - ms - m := getBasicMode t => [m] - IDENTP (id := getUnname t) => - putModeSet(t,bottomUpIdentifier(t,id)) - keyedSystemError("S2GE0016",['"bottomUp",'"unknown object form"]) - -computeTypeWithVariablesTarget(p, q) == - polyVarlist(p) or polyVarlist(q) => - t := resolveTT(p, q) - polyVarlist(t) => t - NIL - NIL - -bottomUpCompile t == - $genValue:local := false - ms := bottomUp t - COMP_-TRAN_-1 objVal getValue t - ms - -bottomUpUseSubdomain t == - $useIntegerSubdomain : local := true - ms := bottomUp t - ($immediateDataSymbol ^= getUnname(t)) or ($Integer ^= CAR(ms)) => ms - null INTEGERP(num := objValUnwrap getValue t) => ms - o := getBasicObject(num) - putValue(t,o) - ms := [objMode o] - putModeSet(t,ms) - ms - -bottomUpPredicate(pred, name) == - putTarget(pred,$Boolean) - ms := bottomUp pred - $Boolean ^= first ms => throwKeyedMsg('"S2IB0001",[name]) - ms - -bottomUpCompilePredicate(pred, name) == - $genValue:local := false - bottomUpPredicate(pred,name) - -bottomUpIdentifier(t,id) == - m := isType t => bottomUpType(t, m) - EQ(id,'noMapVal) => throwKeyedMsg('"S2IB0002",NIL) - EQ(id,'noBranch) => - keyedSystemError("S2GE0016", - ['"bottomUpIdentifier",'"trying to evaluate noBranch"]) - transferPropsToNode(id,t) - defaultType := ['Variable,id] - -- This was meant to stop building silly symbols but had some unfortunate - -- side effects, like not being able to say e:=foo in the interpreter. MCD --- defaultType := --- getModemapsFromDatabase(id,1) => --- userError ['"Cannot use operation name as a variable: ", id] --- ['Variable, id] - u := getValue t => --non-cached values MAY be re-evaluated - tar := getTarget t - expr:= objVal u - om := objMode(u) - (om ^= $EmptyMode) and (om isnt ['RuleCalled,.]) => - $genValue or GENSYMP(id) => - null tar => [om] - (r := resolveTM(om,tar)) => [r] - [om] - bottomUpDefault(t,id,defaultType,getTarget t) - interpRewriteRule(t,id,expr) or - (isMapExpr expr and [objMode(u)]) or - keyedSystemError("S2GE0016", - ['"bottomUpIdentifier",'"cannot evaluate identifier"]) - bottomUpDefault(t,id,defaultType,getTarget t) - -bottomUpDefault(t,id,defaultMode,target) == - if $genValue - then bottomUpDefaultEval(t,id,defaultMode,target,nil) - else bottomUpDefaultCompile(t,id,defaultMode,target,nil) - -bottomUpDefaultEval(t,id,defaultMode,target,isSub) == - -- try to get value case. - - -- 1. declared mode but no value case - (m := getMode t) => - m is ['Mapping,:.] => throwKeyedMsg('"S2IB0003",[getUnname t]) - - -- hmm, try to treat it like target mode or declared mode - if isPartialMode(m) then m := resolveTM(['Variable,id],m) - -- if there is a target, probably want it to be that way and not - -- declared mode. Like "x" in second line: - -- x : P[x] I - -- y : P[x] I - target and not isSub and - (val := coerceInteractive(objNewWrap(id,['Variable,id]),target))=> - putValue(t,val) - [target] - -- Ok, see if we can make it into declared mode from symbolic form - -- For example, (x : P[x] I; x + 1) - not target and not isSub and m and - (val := coerceInteractive(objNewWrap(id,['Variable,id]),m)) => - putValue(t,val) - [m] - -- give up - throwKeyedMsg('"S2IB0004",[id,m]) - - -- 2. no value and no mode case - val := objNewWrap(id,defaultMode) - (null target) or (defaultMode = target) => - putValue(t,val) - [defaultMode] - if isPartialMode target then - -- this hackery will go away when Symbol is not the default type - if defaultMode = $Symbol and (target is [D,x,.]) then - (D in $univariateDomains and (x = id)) or - (D in $multivariateDomains and (id in x)) => - dmode := [D,x,$Integer] - (val' := coerceInteractive(objNewWrap(id, - ['Variable,id]),dmode)) => - defaultMode := dmode - val := val' - NIL - target := resolveTM(defaultMode,target) - -- The following is experimental. SCM 10/11/90 - if target and (tm := getMinimalVarMode(id, target)) then - target := tm - (null target) or null (val' := coerceInteractive(val,target)) => - putValue(t,val) - [defaultMode] - putValue(t,val') - [target] - -bottomUpDefaultCompile(t,id,defaultMode,target,isSub) == - tmode := getMode t - tval := getValue t - expr:= - id in $localVars => id - tmode or tval => - envMode := tmode or objMode tval - envMode is ['Variable, :.] => objVal tval - id = $immediateDataSymbol => objVal tval - ['getValueFromEnvironment,MKQ id,MKQ envMode] - wrap id - tmode and tval and (mdv := objMode tval) => - if isPartialMode tmode then - null (tmode := resolveTM(mdv,tmode)) => - keyedMsgCompFailure("S2IB0010",NIL) - putValue(t,objNew(expr,tmode)) - [tmode] - tmode or (tval and (tmode := objMode tval)) => - putValue(t,objNew(expr,tmode)) - [tmode] - obj := objNew(expr,defaultMode) - canCoerceFrom(defaultMode, target) and - (obj' := coerceInteractive(obj, target)) => - putValue(t, obj') - [target] - putValue(t,obj) - [defaultMode] - -interpRewriteRule(t,id,expr) == - null get(id,'isInterpreterRule,$e) => NIL - (ms:= selectLocalMms(t,id,nil,nil)) and (ms:=evalForm(t,id,nil,ms)) => - ms - nil - -bottomUpForm(t,op,opName,argl,argModeSetList) == - not($inRetract) => - bottomUpForm3(t,op,opName,argl,argModeSetList) - bottomUpForm2(t,op,opName,argl,argModeSetList) - -bottomUpForm3(t,op,opName,argl,argModeSetList) == - $origArgModeSetList:local := COPY argModeSetList - bottomUpForm2(t,op,opName,argl,argModeSetList) - -bottomUpForm2(t,op,opName,argl,argModeSetList) == - not atom t and EQ(opName,"%%") => bottomUpPercent t - opVal := getValue op - - -- for things with objects in operator position, be careful before - -- we enter general modemap selection - - lookForIt := - getAtree(op,'dollar) => true - not opVal => true - opMode := objMode opVal - not (opModeTop := IFCAR opMode) => true - opModeTop in '(Record Union) => false - opModeTop in '(Variable Mapping FunctionCalled RuleCalled AnonymousFunction) => true - false - - -- get rid of Union($, "failed") except when op is "=" and all - -- modesets are the same - - $genValue and - ^(opName = "=" and argModeSetList is [[m],[=m]] and m is ['Union,:.]) and - (u := bottomUpFormUntaggedUnionRetract(t,op,opName,argl,argModeSetList)) => u - - lookForIt and (u := bottomUpFormTuple(t, op, opName, argl, argModeSetList)) => u - - -- opName can change in the call to selectMms - - (lookForIt and (mmS := selectMms(op,argl,getTarget op))) and - (mS := evalForm(op,opName := getUnname op,argl,mmS)) => - putModeSet(op,mS) - bottomUpForm0(t,op,opName,argl,argModeSetList) - -bottomUpFormTuple(t, op, opName, args, argModeSetList) == - getAtree(op,'dollar) => NIL - null (singles := getModemapsFromDatabase(opName, 1)) => NIL - - -- see if any of the modemaps have Tuple arguments - haveTuple := false - for mm in singles while not haveTuple repeat - if getFirstArgTypeFromMm(mm) is ["Tuple",.] then haveTuple := true - not haveTuple => nil - nargs := #args - nargs = 1 and getUnname first args = "Tuple" => NIL - nargs = 1 and (ms := bottomUp first args) and - (ms is [["Tuple",.]] or ms is [["List",.]]) => NIL - - -- now make the args into a tuple - - newArg := [mkAtreeNode "Tuple",:args] - bottomUp [op, newArg] - -removeUnionsAtStart(argl,modeSets) == - null $genValue => modeSets - for arg in argl for ms in modeSets repeat - null (v := getValue arg) => nil - m := objMode(v) - m isnt ['Union,:.] => nil - val := objVal(v) - null isWrapped val => nil - val' := retract v - m' := objMode val' - putValue(arg,val') - putModeSet(arg,[m']) - RPLACA(ms,m') - modeSets - -printableArgModeSetList() == - amsl := nil - for a in reverse $origArgModeSetList repeat - b := prefix2String first a - if ATOM b then b := [b] - amsl := ['%l,:b,:amsl] - if amsl then amsl := rest amsl - amsl - -bottomUpForm0(t,op,opName,argl,argModeSetList) == - op0 := op - opName0 := opName - - m := isType t => - bottomUpType(t, m) - - opName = 'copy and argModeSetList is [[['Record,:rargs]]] => - -- this is a hack until Records go through the normal - -- modemap selection process - rtype := ['Record,:rargs] - code := optRECORDCOPY(['RECORDCOPY,getArgValue(CAR argl, rtype),#rargs]) - - if $genValue then code := wrap timedEVALFUN code - val := objNew(code,rtype) - putValue(t,val) - putModeSet(t,[rtype]) - - m := getModeOrFirstModeSetIfThere op - m is ['Record,:.] and argModeSetList is [[['Variable,x]]] and - member(x,getUnionOrRecordTags m) and (u := bottomUpElt t) => u - m is ['Union,:.] and argModeSetList is [[['Variable,x]]] => - member(x,getUnionOrRecordTags m) and (u := bottomUpElt t) => u - not $genValue => - amsl := printableArgModeSetList() - throwKeyedMsgSP("S2IB0008",['"the union object",amsl], op) - object := retract getValue op - object = 'failed => - throwKeyedMsgSP("S2IB0008",['"the union object",amsl], op) - putModeSet(op,[objMode(object)]) - putValue(op,object) - (u := bottomUpElt t) => u - bottomUpForm0(t,op,opName,argl,argModeSetList) - - (opName ^= "elt") and (opName ^= "apply") and - #argl = 1 and first first argModeSetList is ['Variable, var] - and var in '(first last rest) and - isEltable(op, argl, #argl) and (u := bottomUpElt t) => u - - $genValue and - ( u:= bottomUpFormRetract(t,op,opName,argl,argModeSetList) ) => u - - (opName ^= "elt") and (opName ^= "apply") and - isEltable(op, argl, #argl) and (u := bottomUpElt t) => u - - if FIXP $HTCompanionWindowID then - mkCompanionPage('operationError, t) - - amsl := printableArgModeSetList() - opName1 := - opName0 = $immediateDataSymbol => - (o := coerceInteractive(getValue op0,$OutputForm)) => - outputTran objValUnwrap o - NIL - opName0 - - if null(opName1) then - opName1 := - (o := getValue op0) => prefix2String objMode o - '"" - msgKey := - null amsl => "S2IB0013" - "S2IB0012" - else - msgKey := - null amsl => "S2IB0011" - (n := isSharpVarWithNum opName1) => - opName1 := n - "S2IB0008g" - "S2IB0008" - - sayIntelligentMessageAboutOpAvailability(opName1, #argl) - - not $genValue => - keyedMsgCompFailureSP(msgKey,[opName1, amsl], op0) - throwKeyedMsgSP(msgKey,[opName1, amsl], op0) - -sayIntelligentMessageAboutOpAvailability(opName, nArgs) == - -- see if we can give some decent messages about the availability if - -- library messages - - NUMBERP opName => NIL - - oo := object2Identifier opOf opName - if ( oo = "%" ) or ( oo = "Domain" ) or ( domainForm? opName ) then - opName := "elt" - - nAllExposedMmsWithName := #getModemapsFromDatabase(opName, NIL) - nAllMmsWithName := #getAllModemapsFromDatabase(opName, NIL) - - -- first see if there are ANY ops with this name - - if nAllMmsWithName = 0 then - sayKeyedMsg("S2IB0008a", [opName]) - else if nAllExposedMmsWithName = 0 then - nAllMmsWithName = 1 => sayKeyedMsg("S2IB0008b", [opName]) - sayKeyedMsg("S2IB0008c", [opName, nAllMmsWithName]) - else - -- now talk about specific arguments - nAllExposedMmsWithNameAndArgs := #getModemapsFromDatabase(opName, nArgs) - nAllMmsWithNameAndArgs := #getAllModemapsFromDatabase(opName, nArgs) - nAllMmsWithNameAndArgs = 0 => - sayKeyedMsg("S2IB0008d", [opName, nArgs, nAllExposedMmsWithName, nAllMmsWithName - nAllExposedMmsWithName]) - nAllExposedMmsWithNameAndArgs = 0 => - sayKeyedMsg("S2IB0008e", [opName, nArgs, nAllMmsWithNameAndArgs - nAllExposedMmsWithNameAndArgs]) - sayKeyedMsg("S2IB0008f", [opName, nArgs, nAllExposedMmsWithNameAndArgs, nAllMmsWithNameAndArgs - nAllExposedMmsWithNameAndArgs]) - nil - -bottomUpType(t, type) == - mode := - if isPartialMode type then '(Mode) - else if categoryForm?(type) then '(SubDomain (Domain)) - else '(Domain) - val:= objNew(type,mode) - putValue(t,val) - -- have to fix the following - putModeSet(t,[mode]) - -bottomUpPercent(tree is [op,:argl]) == - -- handles a call %%(5), which means the output of step 5 - -- %%() is the same as %%(-1) - null argl => - val:= fetchOutput(-1) - putValue(op,val) - putModeSet(op,[objMode(val)]) - argl is [t] => - i:= getArgValue(t,$Integer) => - val:= fetchOutput i - putValue(op,val) - putModeSet(op,[objMode(val)]) - throwKeyedMsgSP('"S2IB0006",NIL,t) - throwKeyedMsgSP('"S2IB0006",NIL,op) - -bottomUpFormRetract(t,op,opName,argl,amsl) == - -- tries to find one argument, which can be pulled back, and calls - -- bottomUpForm again. We do not retract the first argument to a - -- setelt, because this is presumably a destructive operation and - -- the retract can create a new object. - - -- if no such operation exists in the database, don't bother - $inRetract: local := true - null getAllModemapsFromDatabase(getUnname op,#argl) => NIL - - u := bottomUpFormAnyUnionRetract(t,op,opName,argl,amsl) => u - - a := NIL - b := NIL - ms := NIL - for x in argl for m in amsl for i in 1.. repeat - -- do not retract first arg of a setelt - (i = 1) and (opName = "setelt") => - a := [x,:a] - ms := [m,:ms] - (i = 1) and (opName = "set!") => - a := [x,:a] - ms := [m,:ms] - if PAIRP(m) and CAR(m) = $EmptyMode then return NIL - object:= retract getValue x - a:= [x,:a] - EQ(object,'failed) => - putAtree(x,'retracted,nil) - ms := [m, :ms] - b:= true - RPLACA(m,objMode(object)) - ms := [COPY_-TREE m, :ms] - putAtree(x,'retracted,true) - putValue(x,object) - putModeSet(x,[objMode(object)]) - --insert pulled-back items - a := nreverse a - ms := nreverse ms - - -- check that we haven't seen these types before - typesHad := getAtree(t, 'typesHad) - if member(ms, typesHad) then b := nil - else putAtree(t, 'typesHad, cons(ms, typesHad)) - - b and bottomUpForm(t,op,opName,a,amsl) - -retractAtree atr == - object:= retract getValue atr - EQ(object,'failed) => - putAtree(atr,'retracted,nil) - nil - putAtree(atr,'retracted,true) - putValue(atr,object) - putModeSet(atr,[objMode(object)]) - true - -bottomUpFormAnyUnionRetract(t,op,opName,argl,amsl) == - -- see if we have a Union - - ok := NIL - for m in amsl while not ok repeat - if atom first(m) then return NIL - first m = $Any => ok := true - (first first m = 'Union) => ok := true - not ok => NIL - - a:= NIL - b:= NIL - - for x in argl for m in amsl for i in 0.. repeat - m0 := first m - if ( (m0 = $Any) or (first m0 = 'Union) ) and - ('failed^=(object:=retract getValue x)) then - b := true - RPLACA(m,objMode(object)) - putModeSet(x,[objMode(object)]) - putValue(x,object) - a := cons(x,a) - b and bottomUpForm(t,op,opName,nreverse a,amsl) - -bottomUpFormUntaggedUnionRetract(t,op,opName,argl,amsl) == - -- see if we have a Union with no tags, if so retract all such guys - - ok := NIL - for [m] in amsl while not ok repeat - if atom m then return NIL - if m is ['Union, :.] and null getUnionOrRecordTags m then ok := true - not ok => NIL - - a:= NIL - b:= NIL - - for x in argl for m in amsl for i in 0.. repeat - m0 := first m - if (m0 is ['Union, :.] and null getUnionOrRecordTags m0) and - ('failed ^= (object:=retract getValue x)) then - b := true - RPLACA(m,objMode(object)) - putModeSet(x,[objMode(object)]) - putValue(x,object) - a := cons(x,a) - b and bottomUpForm(t,op,opName,nreverse a,amsl) - -bottomUpElt (form:=[op,:argl]) == - -- this transfers expressions that look like function calls into - -- forms with elt or apply. - - ms := bottomUp op - ms and (ms is [['Union,:.]] or ms is [['Record,:.]]) => - RPLAC(CDR form, [op,:argl]) - RPLAC(CAR form, mkAtreeNode "elt") - bottomUp form - - target := getTarget form - - newOps := [mkAtreeNode "elt", mkAtreeNode "apply"] - u := nil - - while ^u for newOp in newOps repeat - newArgs := [op,:argl] - if selectMms(newOp, newArgs, target) then - RPLAC(CDR form, newArgs) - RPLAC(CAR form, newOp) - u := bottomUp form - - while ^u and ( "and"/[retractAtree(a) for a in newArgs] ) repeat - while ^u for newOp in newOps repeat - newArgs := [op,:argl] - if selectMms(newOp, newArgs, target) then - RPLAC(CDR form, newArgs) - RPLAC(CAR form, newOp) - u := bottomUp form - u - -isEltable(op,argl,numArgs) == - -- determines if the object might possible have an elt function - -- we exclude Mapping and Variable types explicitly - v := getValue op => - ZEROP numArgs => true - not(m := objMode(v)) => nil - m is ['Mapping, :.] => nil - objVal(v) is ['MAP, :mapDef] and numMapArgs(mapDef) > 0 => nil - true - m := getMode op => - ZEROP numArgs => true - m is ['Mapping, :.] => nil - true - numArgs ^= 1 => nil - name := getUnname op - name = 'SEQ => nil ---not (name in '(a e h s)) and getAllModemapsFromDatabase(name, nil) => nil - arg := first argl - (getUnname arg) ^= 'construct => nil - true - -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/interp/i-code.boot b/src/interp/i-code.boot new file mode 100644 index 00000000..667186ce --- /dev/null +++ b/src/interp/i-code.boot @@ -0,0 +1,142 @@ +-- 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. + + +--% Interpreter Code Generation Routines + +--Modified by JHD 9/9/93 to fix a problem with coerces inside +--interpreter functions being used as mappings. They were being +--handled with $useCoerceOrCroak being NIL, and therefore internal +--coercions were not correctly handled. Fix: remove dependence +--on $useCoerceOrCroak, and test explicitly for Mapping types. + +--% COERCE + +intCodeGenCOERCE(triple,t2) == + -- NOTE: returns a triple + t1 := objMode triple + t1 = $EmptyMode => NIL + t1 = t2 => triple + val := objVal triple + + -- if request is for a coerce to t2 from a coerce from + -- to to t1, and t1 = Void or canCoerce(t0,t2), then optimize + + (val is ['coerceOrCroak,trip,t1', .]) and + (t0 := objCodeMode trip) and ([.,val0] := objCodeVal trip) and + ( (t1 = $Void) or canCoerceFrom(removeQuote t0,t2) ) => + -- just generate code for coercion, don't coerce constants + -- might be too big + intCodeGenCOERCE(objNew(val0, removeQuote t0), t2) + + val is ['THROW,label,code] => + if label is ['QUOTE, l] then label := l + null($compilingMap) or (label ^= mapCatchName($mapName)) => + objNew(['THROW,label,wrapped2Quote objVal + intCodeGenCOERCE(objNew(code,t1),t2)],t2) + -- we have a return statement. just send it back as is + objNew(val,t2) + + val is ['PROGN,:code,lastCode] => + objNew(['PROGN,:code,wrapped2Quote objVal + intCodeGenCOERCE(objNew(lastCode,t1),t2)],t2) + + val is ['COND,:conds] => + objNew(['COND, + :[[p,wrapped2Quote objVal intCodeGenCOERCE(objNew(v,t1),t2)] + for [p,v] in conds]],t2) + + -- specially handle subdomain + absolutelyCanCoerceByCheating(t1,t2) => objNew(val,t2) + + -- specially handle coerce to Any + t2 = '(Any) => objNew(['CONS,MKQ t1,val],t2) + + -- optimize coerces from Any + (t1 = '(Any)) and (val is [ ='CONS,t1',val']) => + intCodeGenCOERCE(objNew(val',removeQuote t1'),t2) + + -- specially handle coerce from Equation to Boolean + (t1 is ['Equation,:.]) and (t2 = $Boolean) => + coerceByFunction(triple,t2) + + -- next is hack for if-then-elses + (t1 = '$NoValueMode) and (val is ['COND,pred]) => + code := + ['COND,pred, + [MKQ true,['throwKeyedMsg,MKQ "S2IM0016",MKQ $mapName]]] + objNew(code,t2) + + -- optimize coerces to Expression + t2 = $OutputForm => + coerceByFunction(triple,t2) + + isSubDomain(t1, $Integer) => + intCodeGenCOERCE(objNew(val, $Integer), t2) + + -- generate code + -- 1. See if the coercion will go through (absolutely) + -- Must be careful about variables or else things like + -- P I --> P[x] P I might not have the x in the original polynomial + -- put in the correct place + + (not containsVariables(t2)) and canCoerceByFunction(t1,t2) => + -- try coerceByFunction + (not canCoerceByMap(t1,t2)) and + (code := coerceByFunction(triple,t2)) => code + intCodeGenCoerce1(val,t1,t2) + + -- 2. Set up a failure point otherwise + + intCodeGenCoerce1(val,t1,t2) + +intCodeGenCoerce1(val,t1,t2) == + -- Internal function to previous one + -- designed to ensure that we don't use coerceOrCroak on mappings +--(t2 is ['Mapping,:.]) => THROW('coerceOrCroaker, 'croaked) + objNew(['coerceOrCroak,mkObjCode(['wrap,val],t1), + MKQ t2, MKQ $mapName],t2) + +--% Map components + +wrapMapBodyWithCatch body == + -- places a CATCH around the map body + -- note that we will someday have to fix up the catch identifier + -- to use the generated internal map name + $mapThrowCount = 0 => body + if body is ['failCheck,['coerceOrFail,trip,targ,mapn]] + then + trip is ['LIST,v,m,e] => + ['failCheck,['coerceOrFail, + ['LIST,['CATCH,MKQ mapCatchName $mapName, v],m,e],targ,mapn]] + keyedSystemError("S2GE0016",['"wrapMapBodyWithCatch", + '"bad CATCH for in function form"]) + else ['CATCH,MKQ mapCatchName $mapName,body] diff --git a/src/interp/i-code.boot.pamphlet b/src/interp/i-code.boot.pamphlet deleted file mode 100644 index c58ff15e..00000000 --- a/src/interp/i-code.boot.pamphlet +++ /dev/null @@ -1,164 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/interp i-code.boot} -\author{The Axiom Team} -\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. - -@ -<<*>>= -<> - ---% Interpreter Code Generation Routines - ---Modified by JHD 9/9/93 to fix a problem with coerces inside ---interpreter functions being used as mappings. They were being ---handled with $useCoerceOrCroak being NIL, and therefore internal ---coercions were not correctly handled. Fix: remove dependence ---on $useCoerceOrCroak, and test explicitly for Mapping types. - ---% COERCE - -intCodeGenCOERCE(triple,t2) == - -- NOTE: returns a triple - t1 := objMode triple - t1 = $EmptyMode => NIL - t1 = t2 => triple - val := objVal triple - - -- if request is for a coerce to t2 from a coerce from - -- to to t1, and t1 = Void or canCoerce(t0,t2), then optimize - - (val is ['coerceOrCroak,trip,t1', .]) and - (t0 := objCodeMode trip) and ([.,val0] := objCodeVal trip) and - ( (t1 = $Void) or canCoerceFrom(removeQuote t0,t2) ) => - -- just generate code for coercion, don't coerce constants - -- might be too big - intCodeGenCOERCE(objNew(val0, removeQuote t0), t2) - - val is ['THROW,label,code] => - if label is ['QUOTE, l] then label := l - null($compilingMap) or (label ^= mapCatchName($mapName)) => - objNew(['THROW,label,wrapped2Quote objVal - intCodeGenCOERCE(objNew(code,t1),t2)],t2) - -- we have a return statement. just send it back as is - objNew(val,t2) - - val is ['PROGN,:code,lastCode] => - objNew(['PROGN,:code,wrapped2Quote objVal - intCodeGenCOERCE(objNew(lastCode,t1),t2)],t2) - - val is ['COND,:conds] => - objNew(['COND, - :[[p,wrapped2Quote objVal intCodeGenCOERCE(objNew(v,t1),t2)] - for [p,v] in conds]],t2) - - -- specially handle subdomain - absolutelyCanCoerceByCheating(t1,t2) => objNew(val,t2) - - -- specially handle coerce to Any - t2 = '(Any) => objNew(['CONS,MKQ t1,val],t2) - - -- optimize coerces from Any - (t1 = '(Any)) and (val is [ ='CONS,t1',val']) => - intCodeGenCOERCE(objNew(val',removeQuote t1'),t2) - - -- specially handle coerce from Equation to Boolean - (t1 is ['Equation,:.]) and (t2 = $Boolean) => - coerceByFunction(triple,t2) - - -- next is hack for if-then-elses - (t1 = '$NoValueMode) and (val is ['COND,pred]) => - code := - ['COND,pred, - [MKQ true,['throwKeyedMsg,MKQ "S2IM0016",MKQ $mapName]]] - objNew(code,t2) - - -- optimize coerces to Expression - t2 = $OutputForm => - coerceByFunction(triple,t2) - - isSubDomain(t1, $Integer) => - intCodeGenCOERCE(objNew(val, $Integer), t2) - - -- generate code - -- 1. See if the coercion will go through (absolutely) - -- Must be careful about variables or else things like - -- P I --> P[x] P I might not have the x in the original polynomial - -- put in the correct place - - (not containsVariables(t2)) and canCoerceByFunction(t1,t2) => - -- try coerceByFunction - (not canCoerceByMap(t1,t2)) and - (code := coerceByFunction(triple,t2)) => code - intCodeGenCoerce1(val,t1,t2) - - -- 2. Set up a failure point otherwise - - intCodeGenCoerce1(val,t1,t2) - -intCodeGenCoerce1(val,t1,t2) == - -- Internal function to previous one - -- designed to ensure that we don't use coerceOrCroak on mappings ---(t2 is ['Mapping,:.]) => THROW('coerceOrCroaker, 'croaked) - objNew(['coerceOrCroak,mkObjCode(['wrap,val],t1), - MKQ t2, MKQ $mapName],t2) - ---% Map components - -wrapMapBodyWithCatch body == - -- places a CATCH around the map body - -- note that we will someday have to fix up the catch identifier - -- to use the generated internal map name - $mapThrowCount = 0 => body - if body is ['failCheck,['coerceOrFail,trip,targ,mapn]] - then - trip is ['LIST,v,m,e] => - ['failCheck,['coerceOrFail, - ['LIST,['CATCH,MKQ mapCatchName $mapName, v],m,e],targ,mapn]] - keyedSystemError("S2GE0016",['"wrapMapBodyWithCatch", - '"bad CATCH for in function form"]) - else ['CATCH,MKQ mapCatchName $mapName,body] -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/interp/i-eval.boot b/src/interp/i-eval.boot new file mode 100644 index 00000000..673ff85d --- /dev/null +++ b/src/interp/i-eval.boot @@ -0,0 +1,452 @@ +-- 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. + + +--% Constructor Evaluation + +$noEvalTypeMsg := nil + +evalDomain form == + if $evalDomain then + sayMSG concat('" instantiating","%b",prefix2String form,"%d") + startTimingProcess 'instantiation + newType? form => form + result := eval mkEvalable form + stopTimingProcess 'instantiation + result + +mkEvalable form == + form is [op,:argl] => + op="QUOTE" => form + op="WRAPPED" => mkEvalable devaluate argl + op="Record" => mkEvalableRecord form + op="Union" => mkEvalableUnion form + op="Mapping"=> mkEvalableMapping form + op="Enumeration" => form + loadIfNecessary op + kind:= GETDATABASE(op,'CONSTRUCTORKIND) + cosig := GETDATABASE(op, 'COSIG) => + [op,:[val for x in argl for typeFlag in rest cosig]] where val == + typeFlag => + kind = 'category => MKQ x + VECP x => MKQ x + loadIfNecessary x + mkEvalable x + x is ['QUOTE,:.] => x + x is ['_#,y] => ['SIZE,MKQ y] + MKQ x + [op,:[mkEvalable x for x in argl]] + form=$EmptyMode => $Integer + IDENTP form and constructor?(form) => [form] + FBPIP form => BPINAME form + form + +mkEvalableMapping form == + [first form,:[mkEvalable d for d in rest form]] + +mkEvalableRecord form == + [first form,:[[":",n,mkEvalable d] for [":",n,d] in rest form]] + +mkEvalableUnion form == + isTaggedUnion form => + [first form,:[[":",n,mkEvalable d] for [":",n,d] in rest form]] + [first form,:[mkEvalable d for d in rest form]] + +evaluateType0 form == + -- Takes a parsed, unabbreviated type and evaluates it, replacing + -- type valued variables with their values, and calling bottomUp + -- on non-type valued arguemnts to the constructor + -- and finally checking to see whether the type satisfies the + -- conditions of its modemap + -- However, the input might be an attribute, not a type + -- $noEvalTypeMsg: fluid := true + domain:= isDomainValuedVariable form => domain + form = $EmptyMode => form + form = "?" => $EmptyMode + STRINGP form => form + form = "$" => form + $expandSegments : local := nil + form is ['typeOf,.] => + form' := mkAtree form + bottomUp form' + objVal getValue(form') + form is [op,:argl] => + op='CATEGORY => + argl is [x,:sigs] => [op,x,:[evaluateSignature(s) for s in sigs]] + form + op in '(Join Mapping) => + [op,:[evaluateType arg for arg in argl]] + op='Union => + argl and first argl is [x,.,.] and member(x,'(_: Declare)) => + [op,:[['_:,sel,evaluateType type] for ['_:,sel,type] in argl]] + [op,:[evaluateType arg for arg in argl]] + op='Record => + [op,:[['_:,sel,evaluateType type] for ['_:,sel,type] in argl]] + op='Enumeration => form + constructor? op => evaluateType1 form + NIL + constructor? form => + ATOM form => evaluateType [form] + throwEvalTypeMsg("S2IE0003",[form,form]) + +evaluateType form == + -- Takes a parsed, unabbreviated type and evaluates it, replacing + -- type valued variables with their values, and calling bottomUp + -- on non-type valued arguemnts to the constructor + -- and finally checking to see whether the type satisfies the + -- conditions of its modemap + domain:= isDomainValuedVariable form => domain + form = $EmptyMode => form + form = "?" => $EmptyMode + STRINGP form => form + form = "$" => form + $expandSegments : local := nil + form is ['typeOf,.] => + form' := mkAtree form + bottomUp form' + objVal getValue(form') + form is [op,:argl] => + op='CATEGORY => + argl is [x,:sigs] => [op,x,:[evaluateSignature(s) for s in sigs]] + form + op in '(Join Mapping) => + [op,:[evaluateType arg for arg in argl]] + op='Union => + argl and first argl is [x,.,.] and member(x,'(_: Declare)) => + [op,:[['_:,sel,evaluateType type] for ['_:,sel,type] in argl]] + [op,:[evaluateType arg for arg in argl]] + op='Record => + [op,:[['_:,sel,evaluateType type] for ['_:,sel,type] in argl]] + op='Enumeration => form + evaluateType1 form + constructor? form => + ATOM form => evaluateType [form] + throwEvalTypeMsg("S2IE0003",[form,form]) + throwEvalTypeMsg("S2IE0004",[form]) + +evaluateType1 form == + --evaluates the arguments passed to a constructor + [op,:argl]:= form + constructor? op => + null (sig := getConstructorSignature form) => + throwEvalTypeMsg("S2IE0005",[form]) + [.,:ml] := sig + ml := replaceSharps(ml,form) + # argl ^= #ml => throwEvalTypeMsg("S2IE0003",[form,form]) + for x in argl for m in ml for argnum in 1.. repeat + typeList := [v,:typeList] where v == + categoryForm?(m) => + m := evaluateType MSUBSTQ(x,'_$,m) + evalCategory(x' := (evaluateType x), m) => x' + throwEvalTypeMsg("S2IE0004",[form]) + m := evaluateType m + GETDATABASE(opOf m,'CONSTRUCTORKIND) = 'domain and + (tree := mkAtree x) and putTarget(tree,m) and ((bottomUp tree) is [m1]) => + [zt,:zv]:= z1:= getAndEvalConstructorArgument tree + (v:= coerceOrRetract(z1,m)) => objValUnwrap v + throwKeyedMsgCannotCoerceWithValue(zv,zt,m) + if x = $EmptyMode then x := $quadSymbol + throwEvalTypeMsg("S2IE0006",[makeOrdinal argnum,m,form]) + [op,:NREVERSE typeList] + throwEvalTypeMsg("S2IE0007",[op]) + +throwEvalTypeMsg(msg, args) == + $noEvalTypeMsg => spadThrow() + throwKeyedMsg(msg, args) + +makeOrdinal i == + ('(first second third fourth fifth sixth seventh eighth ninth tenth)).(i-1) + +evaluateSignature sig == + -- calls evaluateType on a signature + sig is [ ='SIGNATURE,fun,sigl] => + ['SIGNATURE,fun, + [(t = '_$ => t; evaluateType(t)) for t in sigl]] + sig + +--% Code Evaluation + +-- This code generates, then evaluates code during the bottom up phase +-- of interpretation + +splitIntoBlocksOf200 a == + null a => nil + [[first (r:=x) for x in tails a for i in 1..200], + :splitIntoBlocksOf200 rest r] + +--------------------> NEW DEFINITION (override in xrun.boot.pamphlet) +evalForm(op,opName,argl,mmS) == + -- applies the first applicable function + + for mm in mmS until form repeat + [sig,fun,cond]:= mm + (CAR sig) = 'interpOnly => form := CAR sig + #argl ^= #CDDR sig => 'skip ---> RDJ 6/95 + form:= + $genValue or null cond => + [getArgValue2(x,t,sideEffectedArg?(t,sig,opName),opName) or return NIL + for x in argl for t in CDDR sig] + [getArgValueComp2(x,t,c,sideEffectedArg?(t,sig,opName),opName) or return NIL + for x in argl for t in CDDR sig for c in cond] + form or null argl => + dc:= CAR sig + form := + dc='local => --[fun,:form] + atom fun => + fun in $localVars => ['SPADCALL,:form,fun] + [fun,:form,NIL] + ['SPADCALL,:form,fun] + dc is ["__FreeFunction__",:freeFun] => + ['SPADCALL,:form,freeFun] + fun is ['XLAM,xargs,:xbody] => + rec := first form + xbody is [['RECORDELT,.,ind,len]] => + optRECORDELT([CAAR xbody,rec,ind,len]) + xbody is [['SETRECORDELT,.,ind,len,.]] => + optSETRECORDELT([CAAR xbody,rec,ind,len,CADDR form]) + xbody is [['RECORDCOPY,.,len]] => + optRECORDCOPY([CAAR xbody,rec,len]) + ['FUNCALL,['function , ['LAMBDA,xargs,:xbody]],:TAKE(#xargs, form)] + dcVector := evalDomain dc + fun0 := + newType? CAAR mm => + mm' := first ncSigTransform mm + ncGetFunction(opName, first mm', rest mm') + NRTcompileEvalForm(opName,rest sig,dcVector) + null fun0 => throwKeyedMsg("S2IE0008",[opName]) + [bpi,:domain] := fun0 + EQ(bpi,function Undef) => + sayKeyedMsg("S2IE0009",[opName,formatSignature CDR sig,CAR sig]) + NIL + if $NRTmonitorIfTrue = true then + sayBrightlyNT ['"Applying ",first fun0,'" to:"] + pp [devaluateDeeply x for x in form] + _$:fluid := domain + ['SPADCALL, :form, fun0] + not form => nil +-- not form => throwKeyedMsg("S2IE0008",[opName]) + form='interpOnly => rewriteMap(op,opName,argl) + targetType := CADR sig + if CONTAINED('_#,targetType) then targetType := NRTtypeHack targetType + evalFormMkValue(op,form,targetType) + +sideEffectedArg?(t,sig,opName) == + opString := SYMBOL_-NAME opName + (opName ^= 'setelt) and (ELT(opString, #opString-1) ^= char '_!) => nil + dc := first sig + t = dc + +getArgValue(a, t) == + atom a and not VECP a => + t' := coerceOrRetract(getBasicObject a,t) + t' and wrapped2Quote objVal t' + v := getArgValue1(a, t) => v + alt := altTypeOf(objMode getValue a, a, nil) => + t' := coerceInt(getValue a, alt) + t' := coerceOrRetract(t',t) + t' and wrapped2Quote objVal t' + nil + +getArgValue1(a,t) == + -- creates a value for a, coercing to t + t' := getValue(a) => + (m := getMode a) and (m is ['Mapping,:ml]) and (m = t) and + objValUnwrap(t') is ['MAP,:.] => + getMappingArgValue(a,t,m) + t' := coerceOrRetract(t',t) + t' and wrapped2Quote objVal t' + systemErrorHere '"getArgValue" + +getArgValue2(a,t,se?,opName) == + se? and (objMode(getValue a) ^= t) => + throwKeyedMsg("S2IE0013", [opName, objMode(getValue a), t]) + getArgValue(a,t) + +getArgValueOrThrow(x, type) == + getArgValue(x,type) or throwKeyedMsg("S2IC0007",[type]) + +getMappingArgValue(a,t,m is ['Mapping,:ml]) == + (una := getUnname a) in $localVars => + $genValue => + name := get(una,'name,$env) + a.0 := name + mmS := selectLocalMms(a,name,rest ml, nil) + or/[mm for mm in mmS | + (mm is [[., :ml1],oldName,:.] and ml=ml1)] => MKQ [oldName] + NIL + una + mmS := selectLocalMms(a,una,rest ml, nil) + or/[mm for mm in mmS | + (mm is [[., :ml1],oldName,:.] and ml=ml1)] => MKQ [oldName] + NIL + +getArgValueComp2(arg, type, cond, se?, opName) == + se? and (objMode(getValue arg) ^= type) => + throwKeyedMsg("S2IE0013", [opName, objMode(getValue arg), type]) + getArgValueComp(arg, type, cond) + +getArgValueComp(arg,type,cond) == + -- getArgValue for compiled case. if there is a condition then + -- v must be data to verify that coerceInteractive succeeds. + v:= getArgValue(arg,type) + null v => nil + null cond => v + v is ['QUOTE,:.] or getBasicMode v => v + n := getUnnameIfCan arg + if num := isSharpVarWithNum n then + not $compilingMap => n := 'unknownVar + alias := get($mapName,'alias,$e) + n := alias.(num - 1) + keyedMsgCompFailure("S2IE0010",[n]) + +evalFormMkValue(op,form,tm) == + val:= + u:= + $genValue => wrap timedEVALFUN form + form + objNew(u,tm) +--+ + if $NRTmonitorIfTrue = true then + sayBrightlyNT ['"Value of ",op.0,'" ===> "] + pp unwrap u + putValue(op,val) + [tm] + +failCheck x == + x = '"failed" => + stopTimingProcess peekTimedName() + THROW('interpreter,objNewWrap('"failed",$String)) + x = $coerceFailure => + NIL + x + +--% Some Antique Comments About the Interpreter + +--EVAL BOOT contains the top level interface to the Scratchhpad-II +--interpreter. The Entry point into the interpreter from the parser is +--processInteractive. +--The type analysis algorithm is contained in the file BOTMUP BOOT, +--and MODSEL boot, +--the map handling routines are in MAP BOOT and NEWMAP BOOT, and +--the interactive coerce routines are in COERCE BOOT and COERCEFN BOOT. +-- +--Conventions: +-- All spad values in the interpreter are passed around in triples. +-- These are lists of three items: [value,mode,environment]. The value +-- may be wrapped (this is a pair whose CAR is the atom WRAPPED and +-- whose CDR is the value), which indicates that it is a real value, +-- or unwrapped in which case it needs to be EVALed to produce the +-- proper value. The mode is the type of value, and should always be +-- completely specified (not contain $EmptyMode). The environment +-- is always empty, and is included for historical reasons. +-- +--Modemaps: +-- Modemaps are descriptions of compiled Spad function which the +-- interpreter uses to perform type analysis. They consist of patterns +-- of types for the arguments, and conditions the types must satisfy +-- for the function to apply. For each function name there is a list +-- of modemaps in file MODEMAP DATABASE for each distinct function with +-- that name. The following is the list of the modemaps for "*" +-- (multiplication. The first modemap (the one with the labels) is for +-- module mltiplication which is multiplication of an element of a +-- module by a member of its scalar domain. +-- +-- This is the signature pattern for the modemap, it is of the form: +-- (DomainOfComputation TargetType ) +-- | +-- | This is the predicate that needs to be +-- | satisfied for the modemap to apply +-- | | +-- V | +-- /-----------/ | +-- ( ( (*1 *1 *2 *1) V +-- /-----------------------------------------------------------/ +-- ( (AND (ofCategory *1 (Module *2)) (ofCategory *2 (SimpleRing))) ) +-- . CATDEF) <-- This is the file where the function was defined +-- ( (*1 *1 *2 *1) +-- ( (AND (isDomain *2 (Integer)) (ofCategory *1 (AbelianGroup))) ) +-- . CATDEF) +-- ( (*1 *1 *2 *1) +-- ( (AND +-- (isDomain *2 (NonNegativeInteger)) +-- (ofCategory *1 (AbelianMonoid))) ) +-- . CATDEF) +-- ((*1 *1 *1 *1) ((ofCategory *1 (SemiGroup)) ) . CATDEF) +-- ) +-- +--Environments: +-- Environments associate properties with atoms. +-- (see CUTIL BOOT for the exact structure of environments). +-- Some common properties are: +-- modeSet: +-- During interpretation we build a modeSet property for each node in +-- the expression. This is (in theory) a list of all the types +-- possible for the node. In the current implementation these +-- modeSets always contain a single type. +-- value: +-- Value properties are always triples. This is where the values of +-- variables are stored. We also build value properties for internal +-- nodes during the bottom up phase. +-- mode: +-- This is the declared type of an identifier. +-- +-- There are several different environments used in the interpreter: +-- $InteractiveFrame : this is the environment where the user +-- values are stored. Any side effects of evaluation of a top-level +-- expression are stored in this environment. It is always used as +-- the starting environment for interpretation. +-- $e : This is the name used for $InteractiveFrame while interpreting. +-- $env : This is local environment used by the interpreter. +-- Only temporary information (such as types of local variables is +-- stored in $env. +-- It is thrown away after evaluation of each expression. +-- +--Frequently used global variables: +-- $genValue : if true then evaluate generated code, otherwise leave +-- code unevaluated. If $genValue is false then we are compiling. +-- $op: name of the top level operator (unused except in map printing) +-- $mapList: list of maps being type analyzed, used in recursive +-- map type anlysis. +-- $compilingMap: true when compiling a map, used to detect where to +-- THROW when interpret-only is invoked +-- $compilingLoop: true when compiling a loop body, used to control +-- nesting level of interp-only loop CATCH points +-- $interpOnly: true when in interpret only mode, used to call +-- alternate forms of COLLECT and REPEAT. +-- $inCOLLECT: true when compiling a COLLECT, used only for hacked +-- stream compiler. +-- $StreamFrame: used in printing streams, it is the environment +-- where local stream variables are stored +-- $declaredMode: Weak type propagation for symbols, set in upCOERCE +-- and upLET. This variable is used to determine +-- the alternate polynomial types of Symbols. +-- $localVars: list of local variables in a map body +-- $MapArgumentTypeList: hack for stream compilation diff --git a/src/interp/i-eval.boot.pamphlet b/src/interp/i-eval.boot.pamphlet deleted file mode 100644 index 0803bae7..00000000 --- a/src/interp/i-eval.boot.pamphlet +++ /dev/null @@ -1,474 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/interp i-eval.boot} -\author{The Axiom Team} -\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. - -@ -<<*>>= -<> - ---% Constructor Evaluation - -$noEvalTypeMsg := nil - -evalDomain form == - if $evalDomain then - sayMSG concat('" instantiating","%b",prefix2String form,"%d") - startTimingProcess 'instantiation - newType? form => form - result := eval mkEvalable form - stopTimingProcess 'instantiation - result - -mkEvalable form == - form is [op,:argl] => - op="QUOTE" => form - op="WRAPPED" => mkEvalable devaluate argl - op="Record" => mkEvalableRecord form - op="Union" => mkEvalableUnion form - op="Mapping"=> mkEvalableMapping form - op="Enumeration" => form - loadIfNecessary op - kind:= GETDATABASE(op,'CONSTRUCTORKIND) - cosig := GETDATABASE(op, 'COSIG) => - [op,:[val for x in argl for typeFlag in rest cosig]] where val == - typeFlag => - kind = 'category => MKQ x - VECP x => MKQ x - loadIfNecessary x - mkEvalable x - x is ['QUOTE,:.] => x - x is ['_#,y] => ['SIZE,MKQ y] - MKQ x - [op,:[mkEvalable x for x in argl]] - form=$EmptyMode => $Integer - IDENTP form and constructor?(form) => [form] - FBPIP form => BPINAME form - form - -mkEvalableMapping form == - [first form,:[mkEvalable d for d in rest form]] - -mkEvalableRecord form == - [first form,:[[":",n,mkEvalable d] for [":",n,d] in rest form]] - -mkEvalableUnion form == - isTaggedUnion form => - [first form,:[[":",n,mkEvalable d] for [":",n,d] in rest form]] - [first form,:[mkEvalable d for d in rest form]] - -evaluateType0 form == - -- Takes a parsed, unabbreviated type and evaluates it, replacing - -- type valued variables with their values, and calling bottomUp - -- on non-type valued arguemnts to the constructor - -- and finally checking to see whether the type satisfies the - -- conditions of its modemap - -- However, the input might be an attribute, not a type - -- $noEvalTypeMsg: fluid := true - domain:= isDomainValuedVariable form => domain - form = $EmptyMode => form - form = "?" => $EmptyMode - STRINGP form => form - form = "$" => form - $expandSegments : local := nil - form is ['typeOf,.] => - form' := mkAtree form - bottomUp form' - objVal getValue(form') - form is [op,:argl] => - op='CATEGORY => - argl is [x,:sigs] => [op,x,:[evaluateSignature(s) for s in sigs]] - form - op in '(Join Mapping) => - [op,:[evaluateType arg for arg in argl]] - op='Union => - argl and first argl is [x,.,.] and member(x,'(_: Declare)) => - [op,:[['_:,sel,evaluateType type] for ['_:,sel,type] in argl]] - [op,:[evaluateType arg for arg in argl]] - op='Record => - [op,:[['_:,sel,evaluateType type] for ['_:,sel,type] in argl]] - op='Enumeration => form - constructor? op => evaluateType1 form - NIL - constructor? form => - ATOM form => evaluateType [form] - throwEvalTypeMsg("S2IE0003",[form,form]) - -evaluateType form == - -- Takes a parsed, unabbreviated type and evaluates it, replacing - -- type valued variables with their values, and calling bottomUp - -- on non-type valued arguemnts to the constructor - -- and finally checking to see whether the type satisfies the - -- conditions of its modemap - domain:= isDomainValuedVariable form => domain - form = $EmptyMode => form - form = "?" => $EmptyMode - STRINGP form => form - form = "$" => form - $expandSegments : local := nil - form is ['typeOf,.] => - form' := mkAtree form - bottomUp form' - objVal getValue(form') - form is [op,:argl] => - op='CATEGORY => - argl is [x,:sigs] => [op,x,:[evaluateSignature(s) for s in sigs]] - form - op in '(Join Mapping) => - [op,:[evaluateType arg for arg in argl]] - op='Union => - argl and first argl is [x,.,.] and member(x,'(_: Declare)) => - [op,:[['_:,sel,evaluateType type] for ['_:,sel,type] in argl]] - [op,:[evaluateType arg for arg in argl]] - op='Record => - [op,:[['_:,sel,evaluateType type] for ['_:,sel,type] in argl]] - op='Enumeration => form - evaluateType1 form - constructor? form => - ATOM form => evaluateType [form] - throwEvalTypeMsg("S2IE0003",[form,form]) - throwEvalTypeMsg("S2IE0004",[form]) - -evaluateType1 form == - --evaluates the arguments passed to a constructor - [op,:argl]:= form - constructor? op => - null (sig := getConstructorSignature form) => - throwEvalTypeMsg("S2IE0005",[form]) - [.,:ml] := sig - ml := replaceSharps(ml,form) - # argl ^= #ml => throwEvalTypeMsg("S2IE0003",[form,form]) - for x in argl for m in ml for argnum in 1.. repeat - typeList := [v,:typeList] where v == - categoryForm?(m) => - m := evaluateType MSUBSTQ(x,'_$,m) - evalCategory(x' := (evaluateType x), m) => x' - throwEvalTypeMsg("S2IE0004",[form]) - m := evaluateType m - GETDATABASE(opOf m,'CONSTRUCTORKIND) = 'domain and - (tree := mkAtree x) and putTarget(tree,m) and ((bottomUp tree) is [m1]) => - [zt,:zv]:= z1:= getAndEvalConstructorArgument tree - (v:= coerceOrRetract(z1,m)) => objValUnwrap v - throwKeyedMsgCannotCoerceWithValue(zv,zt,m) - if x = $EmptyMode then x := $quadSymbol - throwEvalTypeMsg("S2IE0006",[makeOrdinal argnum,m,form]) - [op,:NREVERSE typeList] - throwEvalTypeMsg("S2IE0007",[op]) - -throwEvalTypeMsg(msg, args) == - $noEvalTypeMsg => spadThrow() - throwKeyedMsg(msg, args) - -makeOrdinal i == - ('(first second third fourth fifth sixth seventh eighth ninth tenth)).(i-1) - -evaluateSignature sig == - -- calls evaluateType on a signature - sig is [ ='SIGNATURE,fun,sigl] => - ['SIGNATURE,fun, - [(t = '_$ => t; evaluateType(t)) for t in sigl]] - sig - ---% Code Evaluation - --- This code generates, then evaluates code during the bottom up phase --- of interpretation - -splitIntoBlocksOf200 a == - null a => nil - [[first (r:=x) for x in tails a for i in 1..200], - :splitIntoBlocksOf200 rest r] - ---------------------> NEW DEFINITION (override in xrun.boot.pamphlet) -evalForm(op,opName,argl,mmS) == - -- applies the first applicable function - - for mm in mmS until form repeat - [sig,fun,cond]:= mm - (CAR sig) = 'interpOnly => form := CAR sig - #argl ^= #CDDR sig => 'skip ---> RDJ 6/95 - form:= - $genValue or null cond => - [getArgValue2(x,t,sideEffectedArg?(t,sig,opName),opName) or return NIL - for x in argl for t in CDDR sig] - [getArgValueComp2(x,t,c,sideEffectedArg?(t,sig,opName),opName) or return NIL - for x in argl for t in CDDR sig for c in cond] - form or null argl => - dc:= CAR sig - form := - dc='local => --[fun,:form] - atom fun => - fun in $localVars => ['SPADCALL,:form,fun] - [fun,:form,NIL] - ['SPADCALL,:form,fun] - dc is ["__FreeFunction__",:freeFun] => - ['SPADCALL,:form,freeFun] - fun is ['XLAM,xargs,:xbody] => - rec := first form - xbody is [['RECORDELT,.,ind,len]] => - optRECORDELT([CAAR xbody,rec,ind,len]) - xbody is [['SETRECORDELT,.,ind,len,.]] => - optSETRECORDELT([CAAR xbody,rec,ind,len,CADDR form]) - xbody is [['RECORDCOPY,.,len]] => - optRECORDCOPY([CAAR xbody,rec,len]) - ['FUNCALL,['function , ['LAMBDA,xargs,:xbody]],:TAKE(#xargs, form)] - dcVector := evalDomain dc - fun0 := - newType? CAAR mm => - mm' := first ncSigTransform mm - ncGetFunction(opName, first mm', rest mm') - NRTcompileEvalForm(opName,rest sig,dcVector) - null fun0 => throwKeyedMsg("S2IE0008",[opName]) - [bpi,:domain] := fun0 - EQ(bpi,function Undef) => - sayKeyedMsg("S2IE0009",[opName,formatSignature CDR sig,CAR sig]) - NIL - if $NRTmonitorIfTrue = true then - sayBrightlyNT ['"Applying ",first fun0,'" to:"] - pp [devaluateDeeply x for x in form] - _$:fluid := domain - ['SPADCALL, :form, fun0] - not form => nil --- not form => throwKeyedMsg("S2IE0008",[opName]) - form='interpOnly => rewriteMap(op,opName,argl) - targetType := CADR sig - if CONTAINED('_#,targetType) then targetType := NRTtypeHack targetType - evalFormMkValue(op,form,targetType) - -sideEffectedArg?(t,sig,opName) == - opString := SYMBOL_-NAME opName - (opName ^= 'setelt) and (ELT(opString, #opString-1) ^= char '_!) => nil - dc := first sig - t = dc - -getArgValue(a, t) == - atom a and not VECP a => - t' := coerceOrRetract(getBasicObject a,t) - t' and wrapped2Quote objVal t' - v := getArgValue1(a, t) => v - alt := altTypeOf(objMode getValue a, a, nil) => - t' := coerceInt(getValue a, alt) - t' := coerceOrRetract(t',t) - t' and wrapped2Quote objVal t' - nil - -getArgValue1(a,t) == - -- creates a value for a, coercing to t - t' := getValue(a) => - (m := getMode a) and (m is ['Mapping,:ml]) and (m = t) and - objValUnwrap(t') is ['MAP,:.] => - getMappingArgValue(a,t,m) - t' := coerceOrRetract(t',t) - t' and wrapped2Quote objVal t' - systemErrorHere '"getArgValue" - -getArgValue2(a,t,se?,opName) == - se? and (objMode(getValue a) ^= t) => - throwKeyedMsg("S2IE0013", [opName, objMode(getValue a), t]) - getArgValue(a,t) - -getArgValueOrThrow(x, type) == - getArgValue(x,type) or throwKeyedMsg("S2IC0007",[type]) - -getMappingArgValue(a,t,m is ['Mapping,:ml]) == - (una := getUnname a) in $localVars => - $genValue => - name := get(una,'name,$env) - a.0 := name - mmS := selectLocalMms(a,name,rest ml, nil) - or/[mm for mm in mmS | - (mm is [[., :ml1],oldName,:.] and ml=ml1)] => MKQ [oldName] - NIL - una - mmS := selectLocalMms(a,una,rest ml, nil) - or/[mm for mm in mmS | - (mm is [[., :ml1],oldName,:.] and ml=ml1)] => MKQ [oldName] - NIL - -getArgValueComp2(arg, type, cond, se?, opName) == - se? and (objMode(getValue arg) ^= type) => - throwKeyedMsg("S2IE0013", [opName, objMode(getValue arg), type]) - getArgValueComp(arg, type, cond) - -getArgValueComp(arg,type,cond) == - -- getArgValue for compiled case. if there is a condition then - -- v must be data to verify that coerceInteractive succeeds. - v:= getArgValue(arg,type) - null v => nil - null cond => v - v is ['QUOTE,:.] or getBasicMode v => v - n := getUnnameIfCan arg - if num := isSharpVarWithNum n then - not $compilingMap => n := 'unknownVar - alias := get($mapName,'alias,$e) - n := alias.(num - 1) - keyedMsgCompFailure("S2IE0010",[n]) - -evalFormMkValue(op,form,tm) == - val:= - u:= - $genValue => wrap timedEVALFUN form - form - objNew(u,tm) ---+ - if $NRTmonitorIfTrue = true then - sayBrightlyNT ['"Value of ",op.0,'" ===> "] - pp unwrap u - putValue(op,val) - [tm] - -failCheck x == - x = '"failed" => - stopTimingProcess peekTimedName() - THROW('interpreter,objNewWrap('"failed",$String)) - x = $coerceFailure => - NIL - x - ---% Some Antique Comments About the Interpreter - ---EVAL BOOT contains the top level interface to the Scratchhpad-II ---interpreter. The Entry point into the interpreter from the parser is ---processInteractive. ---The type analysis algorithm is contained in the file BOTMUP BOOT, ---and MODSEL boot, ---the map handling routines are in MAP BOOT and NEWMAP BOOT, and ---the interactive coerce routines are in COERCE BOOT and COERCEFN BOOT. --- ---Conventions: --- All spad values in the interpreter are passed around in triples. --- These are lists of three items: [value,mode,environment]. The value --- may be wrapped (this is a pair whose CAR is the atom WRAPPED and --- whose CDR is the value), which indicates that it is a real value, --- or unwrapped in which case it needs to be EVALed to produce the --- proper value. The mode is the type of value, and should always be --- completely specified (not contain $EmptyMode). The environment --- is always empty, and is included for historical reasons. --- ---Modemaps: --- Modemaps are descriptions of compiled Spad function which the --- interpreter uses to perform type analysis. They consist of patterns --- of types for the arguments, and conditions the types must satisfy --- for the function to apply. For each function name there is a list --- of modemaps in file MODEMAP DATABASE for each distinct function with --- that name. The following is the list of the modemaps for "*" --- (multiplication. The first modemap (the one with the labels) is for --- module mltiplication which is multiplication of an element of a --- module by a member of its scalar domain. --- --- This is the signature pattern for the modemap, it is of the form: --- (DomainOfComputation TargetType ) --- | --- | This is the predicate that needs to be --- | satisfied for the modemap to apply --- | | --- V | --- /-----------/ | --- ( ( (*1 *1 *2 *1) V --- /-----------------------------------------------------------/ --- ( (AND (ofCategory *1 (Module *2)) (ofCategory *2 (SimpleRing))) ) --- . CATDEF) <-- This is the file where the function was defined --- ( (*1 *1 *2 *1) --- ( (AND (isDomain *2 (Integer)) (ofCategory *1 (AbelianGroup))) ) --- . CATDEF) --- ( (*1 *1 *2 *1) --- ( (AND --- (isDomain *2 (NonNegativeInteger)) --- (ofCategory *1 (AbelianMonoid))) ) --- . CATDEF) --- ((*1 *1 *1 *1) ((ofCategory *1 (SemiGroup)) ) . CATDEF) --- ) --- ---Environments: --- Environments associate properties with atoms. --- (see CUTIL BOOT for the exact structure of environments). --- Some common properties are: --- modeSet: --- During interpretation we build a modeSet property for each node in --- the expression. This is (in theory) a list of all the types --- possible for the node. In the current implementation these --- modeSets always contain a single type. --- value: --- Value properties are always triples. This is where the values of --- variables are stored. We also build value properties for internal --- nodes during the bottom up phase. --- mode: --- This is the declared type of an identifier. --- --- There are several different environments used in the interpreter: --- $InteractiveFrame : this is the environment where the user --- values are stored. Any side effects of evaluation of a top-level --- expression are stored in this environment. It is always used as --- the starting environment for interpretation. --- $e : This is the name used for $InteractiveFrame while interpreting. --- $env : This is local environment used by the interpreter. --- Only temporary information (such as types of local variables is --- stored in $env. --- It is thrown away after evaluation of each expression. --- ---Frequently used global variables: --- $genValue : if true then evaluate generated code, otherwise leave --- code unevaluated. If $genValue is false then we are compiling. --- $op: name of the top level operator (unused except in map printing) --- $mapList: list of maps being type analyzed, used in recursive --- map type anlysis. --- $compilingMap: true when compiling a map, used to detect where to --- THROW when interpret-only is invoked --- $compilingLoop: true when compiling a loop body, used to control --- nesting level of interp-only loop CATCH points --- $interpOnly: true when in interpret only mode, used to call --- alternate forms of COLLECT and REPEAT. --- $inCOLLECT: true when compiling a COLLECT, used only for hacked --- stream compiler. --- $StreamFrame: used in printing streams, it is the environment --- where local stream variables are stored --- $declaredMode: Weak type propagation for symbols, set in upCOERCE --- and upLET. This variable is used to determine --- the alternate polynomial types of Symbols. --- $localVars: list of local variables in a map body --- $MapArgumentTypeList: hack for stream compilation -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/interp/i-map.boot b/src/interp/i-map.boot new file mode 100644 index 00000000..429123a5 --- /dev/null +++ b/src/interp/i-map.boot @@ -0,0 +1,1159 @@ +-- 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. + + +--% User Function Creation and Analysis Code + +SETANDFILEQ($mapTarget,nil) +SETANDFILEQ($mapReturnTypes,nil) +SETANDFILEQ($mapName,'noMapName) +SETANDFILEQ($mapThrowCount, 0) -- times a "return" occurs in map +SETANDFILEQ($compilingMap, NIL) +SETANDFILEQ($definingMap, NIL) + +--% Generating internal names for functions + +SETANDFILEQ($specialMapNameSuffix, NIL) + +makeInternalMapName(userName,numArgs,numMms,extraPart) == + name := CONCAT('"*",STRINGIMAGE numArgs,'";", + object2String userName,'";",STRINGIMAGE numMms,'";", + object2String frameName first $interpreterFrameRing ) + if extraPart then name := CONCAT(name,'";",extraPart) + if $specialMapNameSuffix then + name := CONCAT(name,'";",$specialMapNameSuffix) + INTERN name + +isInternalMapName name == + -- this only returns true or false as a "best guess" + (not IDENTP(name)) or (name = "*") or (name = "**") => false + sz := SIZE (name' := PNAME name) + (sz < 7) or (char("*") ^= name'.0) => false + null DIGITP name'.1 => false + null STRPOS('"_;",name',1,NIL) => false + -- good enough + true + +makeInternalMapMinivectorName(name) == + STRINGP name => + INTERN STRCONC(name,'";MV") + INTERN STRCONC(PNAME name,'";MV") + +mkCacheName(name) == INTERNL(STRINGIMAGE name,'";AL") + +mkAuxiliaryName(name) == INTERNL(STRINGIMAGE name,'";AUX") + +--% Adding a function definition + +isMapExpr x == x is ['MAP,:.] + +isMap x == + y := get(x,'value,$InteractiveFrame) => + objVal y is ['MAP,:.] => x + +addDefMap(['DEF,lhs,mapsig,.,rhs],pred) == + -- Create a new map, add to an existing one, or define a variable + -- compute the dependencies for a map + + -- next check is for bad forms on the lhs of the ==, such as + -- numbers, constants. + if not PAIRP lhs then + op := lhs + putHist(op,'isInterpreterRule,true,$e) + putHist(op,'isInterpreterFunction,false,$e) + lhs := [lhs] + else + -- this is a function definition. If it has been declared + -- previously, make sure it is Mapping. + op := first lhs + (oldMode := get(op,'mode,$e)) and oldMode isnt ['Mapping,:.] => + throwKeyedMsg("S2IM0001",[op,oldMode]) + putHist(op,'isInterpreterRule,false,$e) + putHist(op,'isInterpreterFunction,true,$e) + + (NUMBERP(op) or op in '(true false nil % %%)) => + throwKeyedMsg("S2IM0002",[lhs]) + + -- verify a constructor abbreviation is not used on the lhs + op ^= (op' := unabbrev op) => throwKeyedMsg("S2IM0003",[op,op']) + + -- get the formal parameters. These should only be atomic symbols + -- that are not numbers. + parameters := [p for p in rest lhs | IDENTP(p)] + + -- see if a signature has been given. if anything in mapsig is NIL, + -- then declaration was omitted. + someDecs := nil + allDecs := true + mapmode := ['Mapping] + $env:local := [[NIL]] + $eval:local := true --generate code-- don't just type analyze + $genValue:local := true --evaluate all generated code + for d in mapsig repeat + if d then + someDecs := true + d' := evaluateType unabbrev d + isPartialMode d' => throwKeyedMsg("S2IM0004",NIL) +-- tree := mkAtree d' +-- null (d' := isType tree) => throwKeyedMsg("S2IM0005",[d]) + mapmode := [d',:mapmode] + else allDecs := false + if allDecs then + mapmode := nreverse mapmode + putHist(op,'mode,mapmode,$e) + sayKeyedMsg("S2IM0006",[formatOpSignature(op,rest mapmode)]) + else if someDecs then throwKeyedMsg("S2IM0007",[op]) + + -- if map is declared, check that signature arg count is the + -- same as what is given. + if get(op,'mode,$e) is ['Mapping,.,:mapargs] then + EQCAR(rhs,'rules) => + 0 ^= (numargs := # rest lhs) => + throwKeyedMsg("S2IM0027",[numargs,op]) + # rest lhs ^= # mapargs => throwKeyedMsg("S2IM0008",[op]) + --get all the user variables in the map definition. This is a multi + --step process as this should not include recursive calls to the map + --itself, or the formal parameters + userVariables1 := getUserIdentifiersIn rhs + $freeVars: local := NIL + $localVars: local := NIL + for parm in parameters repeat mkLocalVar($mapName,parm) + userVariables2 := setDifference(userVariables1,findLocalVars(op,rhs)) + userVariables3 := setDifference(userVariables2, parameters) + userVariables4 := REMDUP setDifference (userVariables3, [op]) + + --figure out the new dependencies for the new map (what it depends on) + newDependencies := makeNewDependencies (op, userVariables4) + putDependencies (op, newDependencies) + clearDependencies(op,'T) + addMap(lhs,rhs,pred) + +addMap(lhs,rhs,pred) == + [op,:argl] := lhs + $sl: local:= nil + formalArgList:= [mkFormalArg(makeArgumentIntoNumber x,s) + for x in argl for s in $FormalMapVariableList] + argList:= + [fn for x in formalArgList] where + fn == + if x is ["SUCHTHAT",s,p] then (predList:= [p,:predList]; x:= s) + x + mkMapAlias(op,argl) + argPredList:= NREVERSE predList + finalPred := +-- handle g(a,T)==a+T confusion between pred=T and T variable + MKPF((pred and (pred ^= 'T) => [:argPredList,SUBLISNQ($sl,pred)]; argPredList),"and") + body:= SUBLISNQ($sl,rhs) + oldMap := + (obj := get(op,'value,$InteractiveFrame)) => objVal obj + NIL + newMap := augmentMap(op,argList,finalPred,body,oldMap) + null newMap => + sayRemoveFunctionOrValue op + putHist(op,'alias,nil,$e) + " " -- clears value--- see return from addDefMap in tree2Atree1 + if get(op,'isInterpreterRule,$e) then type := ['RuleCalled,op] + else type := ['FunctionCalled,op] + recursive := + depthOfRecursion(op,newMap) = 0 => false + true + putHist(op,'recursive,recursive,$e) + objNew(newMap,type) + +augmentMap(op,args,pred,body,oldMap) == + pattern:= makePattern(args,pred) + newMap:=deleteMap(op,pattern,oldMap) + body=" " => + if newMap=oldMap then + sayMSG ['" Cannot find part of",:bright op,'"to delete."] + newMap --just delete rule if body is + entry:= [pattern,:body] + resultMap:= + newMap is ["MAP",:tail] => ["MAP",:tail,entry] + ["MAP",entry] + resultMap + +deleteMap(op,pattern,map) == + map is ["MAP",:tail] => + newMap:= ['MAP,:[x for x in tail | w]] where w == + x is [=pattern,:replacement] => sayDroppingFunctions(op,[x]) + true + null rest newMap => nil + newMap + NIL + +getUserIdentifiersIn body == + null body => nil + IDENTP body => + isSharpVarWithNum body => nil + body=" " => nil + [body] + body is ["WRAPPED",:.] => nil + (body is ["COLLECT",:itl,body1]) or (body is ['REPEAT,:itl,body1]) => + userIds := + S_+(getUserIdentifiersInIterators itl,getUserIdentifiersIn body1) + S_-(userIds,getIteratorIds itl) + body is [op,:l] => + argIdList:= "append"/[getUserIdentifiersIn y for y in l] + bodyIdList := + CONSP op or not (GET(op,'Nud) or GET(op,'Led) or GET(op,'up))=> + NCONC(getUserIdentifiersIn op, argIdList) + argIdList + REMDUP bodyIdList + +getUserIdentifiersInIterators itl == + for x in itl repeat + x is ["STEP",i,:l] => + varList:= [:"append"/[getUserIdentifiersIn y for y in l],:varList] + x is ["IN",.,y] => varList:= [:getUserIdentifiersIn y,:varList] + x is ["ON",.,y] => varList:= [:getUserIdentifiersIn y,:varList] + x is [op,a] and op in '(_| WHILE UNTIL) => + varList:= [:getUserIdentifiersIn a,:varList] + keyedSystemError("S2GE0016",['"getUserIdentifiersInIterators", + '"unknown iterator construct"]) + REMDUP varList + +getIteratorIds itl == + for x in itl repeat + x is ["STEP",i,:.] => varList:= [i,:varList] + x is ["IN",y,:.] => varList:= [y,:varList] + x is ["ON",y,:.] => varList:= [y,:varList] + nil + varList + +makeArgumentIntoNumber x == + x=$Zero => 0 + x=$One => 1 + atom x => x + x is ["-",n] and NUMBERP n => -n + [removeZeroOne first x,:removeZeroOne rest x] + +mkMapAlias(op,argl) == + u:= mkAliasList argl + newAlias := + alias:= get(op,"alias",$e) => [(y => y; x) for x in alias for y in u] + u + $e:= putHist(op,"alias",newAlias,$e) + +mkAliasList l == fn(l,nil) where fn(l,acc) == + null l => NREVERSE acc + not IDENTP first l or first l in acc => fn(rest l,[nil,:acc]) + fn(rest l,[first l,:acc]) + +args2Tuple args == + args is [first,:rest] => + null rest => first + ["Tuple",:args] + nil + +makePattern(args,pred) == + nargs:= #args + nargs = 1 => + pred is ["=","#1",n] => n + addPatternPred("#1",pred) + u:= canMakeTuple(nargs,pred) => u + addPatternPred(["Tuple",:TAKE(nargs,$FormalMapVariableList)],pred) + +addPatternPred(arg,pred) == + pred=true => arg + ["|",arg,pred] + +canMakeTuple(nargs,pred) == + pred is ["and",:l] and nargs=#l and + (u:= [(x is ["=",=y,a] => a; return nil) + for y in $FormalMapVariableList for x in orderList l]) => + ["Tuple",:u] + +sayRemoveFunctionOrValue x == + (obj := getValue x) and (md := objMode obj) => + md = $EmptyMode => + sayMessage ['" ",:bright x,'"now has no function parts."] + sayMessage ['" value for",:bright x,'"has been removed."] + sayMessage ['" ",:bright x,'"has no value so this does nothing."] + +sayDroppingFunctions(op,l) == + sayKeyedMsg("S2IM0017",[#l,op]) + if $displayDroppedMap then + for [pattern,:replacement] in l repeat + displaySingleRule(op,pattern,replacement) + nil + +makeRuleForm(op,pattern)== + pattern is ["Tuple",:l] => [op,:l] + [op,:pattern] + +mkFormalArg(x,s) == + isConstantArgument x => ["SUCHTHAT",s,["=",s,x]] + isPatternArgument x => ["SUCHTHAT",s,["is",s,x]] + IDENTP x => + y:= LASSOC(x,$sl) => ["SUCHTHAT",s,["=",s,y]] + $sl:= [[x,:s],:$sl] + s + ['SUCHTHAT,s,["=",s,x]] + +isConstantArgument x == + NUMBERP x => x + x is ["QUOTE",.] => x + +isPatternArgument x == x is ["construct",:.] + +--% Map dependencies + +makeNewDependencies (op, userVariables) == + null userVariables => nil + --add the new dependencies + [[(first userVariables),op], + :makeNewDependencies (op, rest userVariables)] + +putDependencies (op, dependencies) == + oldDependencies := getFlag "$dependencies" + --remove the obsolete dependencies: all those that applied to the + --old definition, but may not apply here. If they do, they'll be + --in the list of new dependencies anyway + oldDependencies := removeObsoleteDependencies (op, oldDependencies) where + removeObsoleteDependencies (op, oldDep) == + null oldDep => nil + op = rest first oldDep => + removeObsoleteDependencies (op, rest oldDep) + [first oldDep,:removeObsoleteDependencies (op, rest oldDep)] + --Create the list of dependencies to output. This will be all the + --old dependencies that are still applicable, and all the new ones + --that have just been generated. Remember that the list of + --dependencies does not just include those for the map just being + --defined, but includes those for all maps and variables that exist + newDependencies := union (dependencies, oldDependencies) + putFlag ("$dependencies", newDependencies) + +clearDependencies(x,clearLocalModemapsIfTrue) == + $dependencies: local:= COPY getFlag "$dependencies" + clearDep1(x,nil,nil,$dependencies) + +clearDep1(x,toDoList,doneList,depList) == + x in doneList => nil + clearCache x + newDone:= [x,:doneList] + until null a repeat + a:= ASSQ(x,depList) + a => + depList:= delete(a,depList) + toDoList:= setUnion(toDoList, + setDifference(CDR a,doneList)) + toDoList is [a,:res] => clearDep1(a,res,newDone,depList) + 'done + +--% Formatting and displaying maps + +displayRule(op,rule) == + null rule => nil + mathprint ["CONCAT","Definition: ", rule] + nil + +outputFormat(x,m) == + -- this is largely junk and is being phased out + IDENTP m => x + m=$OutputForm or m=$EmptyMode => x + categoryForm?(m) => x + isMapExpr x => x + containsVars x => x + atom(x) and CAR(m) = 'List => x + (x is ['construct,:.]) and m = '(List (Expression)) => x + T:= coerceInteractive(objNewWrap(x,maximalSuperType(m)), + $OutputForm) or return x + objValUnwrap T + +displaySingleRule($op,pattern,replacement) == + mathprint ['MAP,[pattern,:replacement]] + +displayMap(headingIfTrue,$op,map) == + mathprint + headingIfTrue => ['CONCAT,PNAME "value: ",map] + map + +simplifyMapPattern (x,alias) == + for a in alias + for m in $FormalMapVariableList | a and ^CONTAINED(a,x) repeat + x:= substitute(a,m,x) + [lhs,:rhs]:= x + rhs := simplifyMapConstructorRefs rhs + x := [lhs,:rhs] + lhs is ["|",y,pred] => + pred:= predTran pred + sl:= getEqualSublis pred => + y':= SUBLIS(sl,y) + pred:= unTrivialize SUBLIS(sl,pred) where unTrivialize x == + x is [op,:l] and op in '(_and _or) => + MKPF([unTrivialize y for y in l],op) + x is [op,a,=a] and op in '(_= is)=> true + x + rhs':= SUBLIS(sl,rhs) + pred=true => [y',:rhs'] + [["PAREN",["|",y',pred]],:rhs'] + pred=true => [y,:rhs] + [["PAREN",["|",y,pred]],:rhs] + lhs=true => ["true",:rhs] + x + +simplifyMapConstructorRefs form == + -- try to linear format constructor names + ATOM form => form + [op,:args] := form + op in '(exit SEQ) => + [op,:[simplifyMapConstructorRefs a for a in args]] + op in '(REPEAT) => + [op,first args,:[simplifyMapConstructorRefs a for a in rest args]] + op in '(_: _:_: _@) => + args is [obj,dom] => + dom' := prefix2String dom + --if ATOM dom' then dom' := [dom'] + --[op,obj,APPLY('CONCAT,dom')] + dom'' := + ATOM dom' => dom' + NULL CDR dom' => CAR dom' + APPLY('CONCAT, dom') + [op,obj, dom''] + form + form + +predTran x == + x is ["IF",a,b,c] => + c = "false" => MKPF([predTran a,predTran b],"and") + b = "true" => MKPF([predTran a,predTran c],"or") + b = "false" and c = "true" => ["not",predTran a] + x + x + +getEqualSublis pred == fn(pred,nil) where fn(x,sl) == + (x:= SUBLIS(sl,x)) is [op,:l] and op in '(_and _or) => + for y in l repeat sl:= fn(y,sl) + sl + x is ["is",a,b] => [[a,:b],:sl] + x is ["=",a,b] => + IDENTP a and not CONTAINED(a,b) => [[a,:b],:sl] + IDENTP b and not CONTAINED(b,a) => [[b,:a],:sl] + sl + sl + +--% User function analysis + +mapCatchName mapname == + INTERN STRCONC('"$",STRINGIMAGE mapname,'"CatchMapIdentifier$") + +analyzeMap(op,argTypes,mapDef, tar) == + -- Top level enty point for map type analysis. Sets up catch point + -- for interpret-code mode. + $compilingMap:local := true + $definingMap:local := true + $minivector : local := nil -- later becomes value of $minivectorName + $mapThrowCount : local := 0 -- number of "return"s encountered + $mapReturnTypes : local := nil -- list of types from returns + $repeatLabel : local := nil -- for loops; see upREPEAT + $breakCount : local := 0 -- breaks from loops; ditto + $mapTarget : local := tar + $interpOnly: local := NIL + $mapName : local := op.0 + if get($mapName,'recursive,$e) then + argTypes := [f t for t in argTypes] where + f x == + isEqualOrSubDomain(x,$Integer) => $Integer + x + mapAndArgTypes := [$mapName,:argTypes] + member(mapAndArgTypes,$analyzingMapList) => + -- if the map is declared, return the target type + (getMode op) is ['Mapping,target,:.] => target + throwKeyedMsg("S2IM0009", + [$mapName,['" ", map for [map,:.] in $analyzingMapList]]) + PUSH(mapAndArgTypes,$analyzingMapList) + mapDef := mapDefsWithCorrectArgCount(#argTypes, mapDef) + null mapDef => (POP $analyzingMapList; nil) + + UNWIND_-PROTECT(x:=CATCH('mapCompiler,analyzeMap0(op,argTypes,mapDef)), + POP $analyzingMapList) + x='tryInterpOnly => + opName:=getUnname op + fun := mkInterpFun(op,opName,argTypes) + if getMode op isnt ['Mapping,:sig] then + sig := [nil,:[nil for type in argTypes]] + $e:=putHist(opName,'localModemap, + [[['interpOnly,:sig],fun,NIL]],$e) + x + +analyzeMap0(op,argTypes,mapDef) == + -- Type analyze and compile a map. Returns the target type of the map. + -- only called if there is no applicable compiled map + $MapArgumentTypeList:local:= argTypes + numMapArgs mapDef ^= #argTypes => nil + ((m:=getMode op) is ['Mapping,:sig]) or (m and (sig:=[m])) => + -- op has mapping property only if user has declared the signature + analyzeDeclaredMap(op,argTypes,sig,mapDef,$mapList) + analyzeUndeclaredMap(getUnname op,argTypes,mapDef,$mapList) + +compFailure msg == + -- Called when compilation fails in such a way that interpret-code + -- mode might be of some use. + not $useCoerceOrCroak => THROW('coerceOrCroaker, 'croaked) + if $reportInterpOnly then + sayMSG msg + sayMSG '" We will attempt to interpret the code." + null $compilingMap => THROW('loopCompiler,'tryInterpOnly) + THROW('mapCompiler,'tryInterpOnly) + +mkInterpFun(op,opName,argTypes) == + -- creates a function form to put in fun slot of interp-only + -- local modemaps + getMode op isnt ['Mapping,:sig] => nil + parms := [var for type in argTypes for var in $FormalMapVariableList] + arglCode := ['LIST,:[argCode for type in argTypes + for argName in parms]] where argCode == + ['putValueValue,['mkAtreeNode,MKQ argName], + objNewCode(['wrap,argName],type)] + funName := GENSYM() + body:=['rewriteMap1,MKQ opName,arglCode,MKQ sig] + putMapCode(opName,body,sig,funName,parms,false) + genMapCode(opName,body,sig,funName,parms,false) + funName + +rewriteMap(op,opName,argl) == + -- interpret-code handler for maps. Recursively calls the interpreter + -- on the body of the map. + not $genValue => + get(opName,'mode,$e) isnt ['Mapping,:sig] => + compFailure ['" Cannot compile map:",:bright opName] + arglCode := ['LIST,:[argCode for arg in argl for argName in + $FormalMapVariableList]] where argCode == + ['putValueValue,['mkAtreeNode,MKQ argName], + objNewCode(['wrap,wrapped2Quote(objVal getValue arg)], + getMode arg)] + putValue(op,objNew(['rewriteMap1,MKQ opName,arglCode,MKQ sig], + CAR sig)) + putModeSet(op,[CAR sig]) + rewriteMap0(op,opName,argl) + +putBodyInEnv(opName, numArgs) == + val := get(opName, 'value, $e) + val is [.,'MAP, :bod] => + $e := putHist(opName, 'mapBody, combineMapParts + mapDefsWithCorrectArgCount(numArgs, bod), $e) + 'failed + +removeBodyFromEnv(opName) == + $e := putHist(opName, 'mapBody, nil, $e) + + +rewriteMap0(op,opName,argl) == + -- $genValue case of map rewriting + putBodyInEnv(opName, #argl) + if (s := get(opName,'mode,$e)) then + tar := CADR s + argTypes := CDDR s + else + tar:= nil + argTypes:= nil + get(opName,'mode,$e) is ['Mapping,tar,:argTypes] + $env: local := [[NIL]] + for arg in argl + for var in $FormalMapVariableList repeat + if argTypes then + t := CAR argTypes + argTypes:= CDR argTypes + val := + t is ['Mapping,:.] => getValue arg + coerceInteractive(getValue arg,t) + else + val:= getValue arg + $env:=put(var,'value,val,$env) + if VECP arg then $env := put(var,'name,getUnname arg,$env) + (m := getMode arg) => $env := put(var,'mode,m,$env) + null (val:= interpMap(opName,tar)) => + throwKeyedMsg("S2IM0010",[opName]) + putValue(op,val) + removeBodyFromEnv(opName) + ms := putModeSet(op,[objMode val]) + +rewriteMap1(opName,argl,sig) == + -- compiled case of map rewriting + putBodyInEnv(opName, #argl) + if sig then + tar:= CAR sig + argTypes:= CDR sig + else + tar:= nil + argTypes:= nil + evArgl := NIL + for arg in reverse argl repeat + v := getValue arg + evArgl := [objNew(objVal v, objMode v),:evArgl] + $env : local := [[NIL]] + for arg in argl for evArg in evArgl + for var in $FormalMapVariableList repeat + if argTypes then + t:=CAR argTypes + argTypes:= CDR argTypes + val := + t is ['Mapping,:.] => evArg + coerceInteractive(evArg,t) + else + val:= evArg + $env:=put(var,'value,val,$env) + if VECP arg then $env := put(var,'name,getUnname arg,$env) + (m := getMode arg) => $env := put(var,'mode,m,$env) + val:= interpMap(opName,tar) + removeBodyFromEnv(opName) + objValUnwrap(val) + +interpMap(opName,tar) == + -- call the interpreter recursively on map body + $genValue : local:= true + $interpMapTag : local := nil + $interpOnly : local := true + $localVars : local := NIL + for lvar in get(opName,'localVars,$e) repeat mkLocalVar(opName,lvar) + $mapName : local := opName + $mapTarget : local := tar + body:= get(opName,'mapBody,$e) + savedTimerStack := COPY $timedNameStack + catchName := mapCatchName $mapName + c := CATCH(catchName, interpret1(body,tar,nil)) +-- $interpMapTag and $interpMapTag ^= mapCatchName $mapName => +-- THROW($interpMapTag,c) + while savedTimerStack ^= $timedNameStack repeat + stopTimingProcess peekTimedName() + c -- better be a triple + +analyzeDeclaredMap(op,argTypes,sig,mapDef,$mapList) == + -- analyzes and compiles maps with declared signatures. argTypes + -- is a list of types of the arguments, sig is the declared signature + -- mapDef is the stored form of the map body. + opName := getUnname op + $mapList:=[opName,:$mapList] + $mapTarget := CAR sig + (mmS:= get(opName,'localModemap,$e)) and + (mm:= or/[mm for (mm:=[[.,:mmSig],:.]) in mmS | mmSig=sig]) => + compileCoerceMap(opName,argTypes,mm) + -- The declared map needs to be compiled + compileDeclaredMap(opName,sig,mapDef) + argTypes ^= CDR sig => + analyzeDeclaredMap(op,argTypes,sig,mapDef,$mapList) + CAR sig + +compileDeclaredMap(op,sig,mapDef) == + -- Type analyzes and compiles a map with a declared signature. + -- creates a local modemap and puts it into the environment + $localVars: local := nil + $freeVars: local := nil + $env:local:= [[NIL]] + parms:=[var for var in $FormalMapVariableList for m in CDR sig] + for m in CDR sig for var in parms repeat + $env:= put(var,'mode,m,$env) + body:= getMapBody(op,mapDef) + for lvar in parms repeat mkLocalVar($mapName,lvar) + for lvar in getLocalVars(op,body) repeat mkLocalVar($mapName,lvar) + name := makeLocalModemap(op,sig) + val := compileBody(body,CAR sig) + isRecursive := (depthOfRecursion(op,body) > 0) + putMapCode(op,objVal val,sig,name,parms,isRecursive) + genMapCode(op,objVal val,sig,name,parms,isRecursive) + CAR sig + +putMapCode(op,code,sig,name,parms,isRecursive) == + -- saves the generated code and some other information about the + -- function + codeInfo := VECTOR(op,code,sig,name,parms,isRecursive) + allCode := [codeInfo,:get(op,'generatedCode,$e)] + $e := putHist(op,'generatedCode,allCode,$e) + op + +makeLocalModemap(op,sig) == + -- create a local modemap for op with sig, and put it into $e + if (currentMms := get(op,'localModemap,$e)) then + untraceMapSubNames [CADAR currentMms] + newName := makeInternalMapName(op,#sig-1,1+#currentMms,NIL) + newMm := [['local,:sig],newName,nil] + mms := [newMm,:currentMms] + $e := putHist(op,'localModemap,mms,$e) + newName + +genMapCode(op,body,sig,fnName,parms,isRecursive) == + -- calls the lisp compiler on the body of a map + if lmm:= get(op,'localModemap,$InteractiveFrame) then + untraceMapSubNames [CADAR lmm] + op0 := + ( n := isSharpVarWithNum op ) => STRCONC('"") + op + if get(op,'isInterpreterRule,$e) then + sayKeyedMsg("S2IM0014",[op0,(PAIRP sig =>prefix2String CAR sig;'"?")]) + else sayKeyedMsg("S2IM0015",[op0,formatSignature sig]) + $whereCacheList := [op,:$whereCacheList] + + -- RSS: 6-21-94 + -- The following code ensures that local variables really are local + -- to a function. We will unnecessarily generate preliminary LETs for + -- loop variables and variables that do have LET expressions, but that + -- can be finessed later. + + locals := SETDIFFERENCE(COPY $localVars, parms) + if locals then + lets := [['LET, l, ''UNINITIALIZED__VARIABLE, op] for l in locals] + body := ['PROGN, :lets, body] + + reportFunctionCompilation(op,fnName,parms, + wrapMapBodyWithCatch flattenCOND body,isRecursive) + +compileBody(body,target) == + -- recursively calls the interpreter on the map body + -- returns a triple with the LISP code for body in the value cell + $insideCompileBodyIfTrue: local := true + $genValue: local := false + $declaredMode:local := target + $eval:local:= true + r := interpret1(body,target,nil) + +compileCoerceMap(op,argTypes,mm) == + -- compiles call to user-declared map where the arguments need + -- to be coerced. mm is the modemap for the declared map. + $insideCompileBodyIfTrue: local := true + $genValue: local := false + [[.,:sig],imp,.]:= mm + parms:= [var for var in $FormalMapVariableList for t in CDR sig] + name:= makeLocalModemap(op,[CAR sig,:argTypes]) + argCode := [objVal(coerceInteractive(objNew(arg,t1),t2) or + throwKeyedMsg("S2IC0001",[arg,$mapName,t1,t2])) + for t1 in argTypes for t2 in CDR sig for arg in parms] + $insideCompileBodyIfTrue := false + parms:= [:parms,'envArg] + body := ['SPADCALL,:argCode,['LIST,['function,imp]]] + minivectorName := makeInternalMapMinivectorName(name) + $minivectorNames := [[op,:minivectorName],:$minivectorNames] + body := SUBST(minivectorName,"$$$",body) + if $compilingInputFile then + $minivectorCode := [:$minivectorCode,minivectorName] + SET(minivectorName,LIST2REFVEC $minivector) + compileInteractive [name,['LAMBDA,parms,body]] + CAR sig + +depthOfRecursion(opName,body) == + -- returns the "depth" of recursive calls of opName in body + mapRecurDepth(opName,nil,body) + +mapRecurDepth(opName,opList,body) == + -- walks over the map body counting depth of recursive calls + -- expanding the bodies of maps called in body + atom body => 0 + body is [op,:argl] => + argc:= + atom argl => 0 + argl => "MAX"/[mapRecurDepth(opName,opList,x) for x in argl] + 0 + op in opList => argc + op=opName => 1 + argc + (obj := get(op,'value,$e)) and objVal obj is ['MAP,:mapDef] => + mapRecurDepth(opName,[op,:opList],getMapBody(op,mapDef)) + + argc + argc + keyedSystemError("S2GE0016",['"mapRecurDepth", + '"unknown function form"]) + +analyzeUndeclaredMap(op,argTypes,mapDef,$mapList) == + -- Computes the signature of the map named op, and compiles the body + $freeVars:local := NIL + $localVars: local := NIL + $env:local:= [[NIL]] + $mapList := [op,:$mapList] + parms:=[var for var in $FormalMapVariableList for m in argTypes] + for m in argTypes for var in parms repeat + put(var,'autoDeclare,'T,$env) + put(var,'mode,m,$env) + body:= getMapBody(op,mapDef) + for lvar in parms repeat mkLocalVar($mapName,lvar) + for lvar in getLocalVars(op,body) repeat mkLocalVar($mapName,lvar) + (n:= depthOfRecursion(op,body)) = 0 => + analyzeNonRecursiveMap(op,argTypes,body,parms) + analyzeRecursiveMap(op,argTypes,body,parms,n) + +analyzeNonRecursiveMap(op,argTypes,body,parms) == + -- analyze and compile a non-recursive map definition + T := compileBody(body,$mapTarget) + if $mapThrowCount > 0 then + t := objMode T + b := and/[(t = rt) for rt in $mapReturnTypes] + not b => + t := resolveTypeListAny [t,:$mapReturnTypes] + if not $mapTarget then $mapTarget := t + T := compileBody(body,$mapTarget) + sig := [objMode T,:argTypes] + name:= makeLocalModemap(op,sig) + putMapCode(op,objVal T,sig,name,parms,false) + genMapCode(op,objVal T,sig,name,parms,false) + objMode(T) + +analyzeRecursiveMap(op,argTypes,body,parms,n) == + -- analyze and compile a non-recursive map definition + -- makes guess at signature by analyzing non-recursive part of body + -- then re-analyzes the entire body until the signature doesn't change + localMapInfo := saveDependentMapInfo(op, CDR $mapList) + tar := CATCH('interpreter,analyzeNonRecur(op,body,$localVars)) + for i in 0..n until not sigChanged repeat + sigChanged:= false + name := makeLocalModemap(op,sig:=[tar,:argTypes]) + code := compileBody(body,$mapTarget) + objMode(code) ^= tar => + sigChanged:= true + tar := objMode(code) + restoreDependentMapInfo(op, CDR $mapList, localMapInfo) + sigChanged => throwKeyedMsg("S2IM0011",[op]) + putMapCode(op,objVal code,sig,name,parms,true) + genMapCode(op,objVal code,sig,name,parms,true) + tar + +saveDependentMapInfo(op,opList) == + not (op in opList) => + lmml := [[op, :get(op, 'localModemap, $e)]] + gcl := [[op, :get(op, 'generatedCode, $e)]] + for [dep1,dep2] in getFlag("$dependencies") | dep1=op repeat + [lmml', :gcl'] := saveDependentMapInfo(dep2, [op, :opList]) + lmms := nconc(lmml', lmml) + gcl := nconc(gcl', gcl) + [lmms, :gcl] + nil + +restoreDependentMapInfo(op, opList, [lmml,:gcl]) == + not (op in opList) => + clearDependentMaps(op,opList) + for [op, :lmm] in lmml repeat + $e := putHist(op,'localModemap,lmm,$e) + for [op, :gc] in gcl repeat + $e := putHist(op,'generatedCode,gc,$e) + +clearDependentMaps(op,opList) == + -- clears the local modemaps of all the maps that depend on op + not (op in opList) => + $e := putHist(op,'localModemap,nil,$e) + $e := putHist(op,'generatedCode,nil,$e) + for [dep1,dep2] in getFlag("$dependencies") | dep1=op repeat + clearDependentMaps(dep2,[op,:opList]) + +analyzeNonRecur(op,body,$localVars) == + -- type analyze the non-recursive part of a map body + nrp := nonRecursivePart(op,body) + for lvar in findLocalVars(op,nrp) repeat mkLocalVar($mapName,lvar) + objMode(compileBody(nrp,$mapTarget)) + +nonRecursivePart(opName, funBody) == + -- takes funBody, which is the parse tree of the definition of + -- a function, and returns a list of the parts + -- of the function which are not recursive in the name opName + body:= expandRecursiveBody([opName], funBody) + ((nrp:=nonRecursivePart1(opName, body)) ^= 'noMapVal) => nrp + throwKeyedMsg("S2IM0012",[opName]) + +expandRecursiveBody(alreadyExpanded, body) == + -- replaces calls to other maps with their bodies + atom body => + (obj := get(body,'value,$e)) and objVal obj is ['MAP,:mapDef] and + ((numMapArgs mapDef) = 0) => getMapBody(body,mapDef) + body + body is [op,:argl] => + not (op in alreadyExpanded) => + (obj := get(op,'value,$e)) and objVal obj is ['MAP,:mapDef] => + newBody:= getMapBody(op,mapDef) + for arg in argl for var in $FormalMapVariableList repeat + newBody:=MSUBST(arg,var,newBody) + expandRecursiveBody([op,:alreadyExpanded],newBody) + [op,:[expandRecursiveBody(alreadyExpanded,arg) for arg in argl]] + [op,:[expandRecursiveBody(alreadyExpanded,arg) for arg in argl]] + keyedSystemError("S2GE0016",['"expandRecursiveBody", + '"unknown form of function body"]) + +nonRecursivePart1(opName, funBody) == + -- returns a function body which contains only the parts of funBody + -- which do not call the function opName + funBody is ['IF,a,b,c] => + nra:=nonRecursivePart1(opName,a) + nra = 'noMapVal => 'noMapVal + nrb:=nonRecursivePart1(opName,b) + nrc:=nonRecursivePart1(opName,c) + not (nrb in '(noMapVal noBranch)) => ['IF,nra,nrb,nrc] + not (nrc in '(noMapVal noBranch)) => ['IF,['not,nra],nrc,nrb] + 'noMapVal + not containsOp(funBody,'IF) => + notCalled(opName,funBody) => funBody + 'noMapVal + funBody is [op,:argl] => + op=opName => 'noMapVal + args:= [nonRecursivePart1(opName,arg) for arg in argl] + MEMQ('noMapVal,args) => 'noMapVal + [op,:args] + funBody + +containsOp(body,op) == + -- true IFF body contains an op statement + body is [ =op,:.] => true + body is [.,:argl] => or/[containsOp(arg,op) for arg in argl] + false + +notCalled(opName,form) == + -- returns true if opName is not called in the form + atom form => true + form is [op,:argl] => + op=opName => false + and/[notCalled(opName,x) for x in argl] + keyedSystemError("S2GE0016",['"notCalled", + '"unknown form of function body"]) + +mapDefsWithCorrectArgCount(n, mapDef) == + [def for def in mapDef | (numArgs CAR def) = n] + +numMapArgs(mapDef is [[args,:.],:.]) == + -- returns the number of arguemnts to the map whose body is mapDef + numArgs args + +numArgs args == + args is ['_|,a,:.] => numArgs a + args is ['Tuple,:argl] => #argl + null args => 0 + 1 + +combineMapParts(mapTail) == + -- transforms a piece-wise function definition into an if-then-else + -- statement. Uses noBranch to indicate undefined branch + null mapTail => 'noMapVal + mapTail is [[cond,:part],:restMap] => + isSharpVarWithNum cond or (cond is ['Tuple,:args] and + and/[isSharpVarWithNum arg for arg in args]) or (null cond) => part + ['IF,mkMapPred cond,part,combineMapParts restMap] + keyedSystemError("S2GE0016",['"combineMapParts", + '"unknown function form"]) + +mkMapPred cond == + -- create the predicate on map arguments, derived from "when" clauses + cond is ['_|,args,pred] => mapPredTran pred + cond is ['Tuple,:vals] => + mkValueCheck(vals,1) + mkValCheck(cond,1) + +mkValueCheck(vals,i) == + -- creates predicate for specific value check (i.e f 1 == 1) + vals is [val] => mkValCheck(val,i) + ['and,mkValCheck(first vals,i),mkValueCheck(rest vals,i+1)] + +mkValCheck(val,i) == + -- create equality check for map predicates + isSharpVarWithNum val => 'true + ['_=,mkSharpVar i,val] + +mkSharpVar i == + -- create #i + INTERN CONCAT('"#",STRINGIMAGE i) + +mapPredTran pred == + -- transforms "x in i..j" to "x>=i and x<=j" + pred is ['in,var,['SEGMENT,lb]] => mkLessOrEqual(lb,var) + pred is ['in,var,['SEGMENT,lb,ub]] => + null ub => mkLessOrEqual(lb,var) + ['and,mkLessOrEqual(lb,var),mkLessOrEqual(var,ub)] + pred + +findLocalVars(op,form) == + -- analyzes form for local and free variables, and returns the list + -- of locals + findLocalVars1(op,form) + $localVars + +findLocalVars1(op,form) == + -- sets the two lists $localVars and $freeVars + atom form => + not IDENTP form or isSharpVarWithNum form => nil + isLocalVar(form) or isFreeVar(form) => nil + mkFreeVar($mapName,form) + form is ['local, :vars] => + for x in vars repeat + ATOM x => mkLocalVar(op, x) + form is ['free, :vars] => + for x in vars repeat + ATOM x => mkFreeVar(op, x) + form is ['LET,a,b] => + (a is ['Tuple,:vars]) and (b is ['Tuple,:vals]) => + for var in vars for val in vals repeat + findLocalVars1(op,['LET,var,val]) + a is ['construct,:pat] => + for var in listOfVariables pat repeat mkLocalVar(op,var) + findLocalVars1(op,b) + (atom a) or (a is ['_:,a,.]) => + mkLocalVar(op,a) + findLocalVars1(op,b) + findLocalVars(op,b) + for x in a repeat findLocalVars1(op,x) + form is ['_:,a,.] => + mkLocalVar(op,a) + form is ['is,l,pattern] => + findLocalVars1(op,l) + for var in listOfVariables CDR pattern repeat mkLocalVar(op,var) + form is [oper,:itrl,body] and MEMQ(oper,'(REPEAT COLLECT)) => + findLocalsInLoop(op,itrl,body) + form is [y,:argl] => + y is 'Record => nil + for x in argl repeat findLocalVars1(op,x) + keyedSystemError("S2IM0020",[op]) + +findLocalsInLoop(op,itrl,body) == + for it in itrl repeat + it is ['STEP,index,lower,step,:upperList] => + mkLocalVar(op,index) + findLocalVars1(op,lower) + for up in upperList repeat findLocalVars1(op,up) + it is ['IN,index,s] => + mkLocalVar(op,index) ; findLocalVars1(op,s) + it is ['WHILE,b] => + findLocalVars1(op,b) + it is ['_|,pred] => + findLocalVars1(op,pred) + findLocalVars1(op,body) + for it in itrl repeat + it is [op,b] and (op in '(UNTIL)) => + findLocalVars1(op,b) + +isLocalVar(var) == member(var,$localVars) + +mkLocalVar(op,var) == + -- add var to the local variable list + isFreeVar(var) => $localVars + $localVars:= insert(var,$localVars) + +isFreeVar(var) == member(var,$freeVars) + +mkFreeVar(op,var) == + -- op here for symmetry with mkLocalVar + $freeVars:= insert(var,$freeVars) + +listOfVariables pat == + -- return a list of the variables in pat, which is an "is" pattern + IDENTP pat => (pat='_. => nil ; [pat]) + pat is ['_:,var] or pat is ['_=,var] => + (var='_. => NIL ; [var]) + PAIRP pat => REMDUP [:listOfVariables p for p in pat] + nil + +getMapBody(op,mapDef) == + -- looks in $e for a map body; if not found it computes then stores it + get(op,'mapBody,$e) or + combineMapParts mapDef +-- $e:= putHist(op,'mapBody,body:= combineMapParts mapDef,$e) +-- body + +getLocalVars(op,body) == + -- looks in $e for local vars; if not found, computes then stores them + get(op,'localVars,$e) or + $e:= putHist(op,'localVars,lv:=findLocalVars(op,body),$e) + lv + +-- DO NOT BELIEVE ALL OF THE FOLLOWING (IT IS OLD) + +-- VARIABLES. Variables may or may not have a mode property. If +-- present, any value which is assigned or generated by that variable +-- is first coerced to that mode before being assigned or returned. +-- +-- +-- Variables are given a triple [val,m,e] as a "value" property on +-- its property list in the environment. The expression val has the +-- forms: +-- +-- (WRAPPED . y) --value of x is y (don't re-evaluate) +-- y --anything else --value of x is obtained by evaluating y +-- +-- A wrapped expression is created by an assignment. In the second +-- case, y can never contain embedded wrapped expressions. The mode +-- part m of the triple is the type of y in the wrapped case and is +-- consistent with the declared mode if given. The mode part of an +-- unwrapped value is always $EmptyMode. The e part is usually NIL +-- but may be used to hold a partial closure. +-- +-- Effect of changes. A rule can be built up for a variable by +-- successive rules involving conditional expressions. However, once +-- a value is assigned to the variable or an unconditional definition +-- is given, any existing value is replaced by the new entry. When +-- the mode of a variable is declared, an wrapped value is coerced to +-- the new mode; if this is not possible, the user is notified that +-- the current value is discarded and why. When the mode is +-- redeclared and an upwrapped value is present, the value is +-- retained; the only other effect is to coerce any cached values +-- from the old mode to the new one. +-- +-- Caches. When a variable x is evaluated and re-evaluation occurs, +-- the triple produced by that evaluation is stored under "cache" on +-- the property list of x. This cached triple is cleared whenever any +-- of the variables which x's value depend upon change. Dependencies +-- are stored on $dependencies whose value has the form [[a b ..] ..] +-- to indicate that when a is changed, b .. must have all cached +-- values destroyed. In the case of parameterized forms which are +-- represented by maps, we currently can cache values only when the +-- compiler option is turned on by )on c s meaning "on compiler with +-- the save option". When f is compiled as f;1, it then has an alist +-- f;1;AL which records these values. If f depends globally on a's +-- value, all cached values of all local functions defined for f have +-- to be declared. If a's mode should change, then all compilations +-- of f must be thrown away. +-- +-- PARAMETERIZED FORMS. These always have values [val,m,e] where val +-- are "maps". +-- +-- The structure of maps: +-- (MAP (pattern . rewrite) ...) where +-- pattern has forms: arg-pattern +-- (Tuple arg-pattern ...) +-- rewrite has forms: (WRAPPED . value) --don't re-evaluate +-- computational object --don't (bother to) +-- re-evaluate +-- anything else --yes, re-evaluate +-- +-- When assigning values to a map, each new value must have a type +-- which is consistent with those already assigned. Initially, type +-- of MAP is $EmptyMode. When the map is first assigned a value, the +-- type of the MAP is RPLACDed to be (Mapping target source ..). +-- When the map is next assigned, the type of both source and target +-- is upgraded to be consistent with those values already computed. +-- Of course, if new and old source and target are identical, nothing +-- need happen to existing entries. However, if the new and old are +-- different, all existing entries of the map are coerce to the new +-- data type. +-- +-- Mode analysis. This is done on the bottomUp phase of the process. +-- If a function has been given a mapping declaration, this map is +-- placed in as the mode of the map under the "value" property of the +-- variable. Of course, these modes may be partial types in case a +-- mode analysis is still necessary. If no mapping declaration, a +-- total mode analysis of the function, given its input arguments, is +-- done. This will result a signature involving types only. +-- +-- If the compiler is on, the function is then compiled given this +-- signature involving types. If the map is value of a variable f, a +-- function is given name f;1, f is given a "localModemap" property +-- with modemap ((dummy target source ..) (T f;1)) so that the next +-- time f is applied to arguments which coerce to the source +-- arguments of this local modemap, f;1 will be invoked. diff --git a/src/interp/i-map.boot.pamphlet b/src/interp/i-map.boot.pamphlet deleted file mode 100644 index b66f02b9..00000000 --- a/src/interp/i-map.boot.pamphlet +++ /dev/null @@ -1,1185 +0,0 @@ -\documentclass{article} -\usepackage{axiom} - -\title{\File{src/interp/i-map.boot} Pamphlet} -\author{The Axiom Team} - -\begin{document} -\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. - -@ -<<*>>= -<> - ---% User Function Creation and Analysis Code - -SETANDFILEQ($mapTarget,nil) -SETANDFILEQ($mapReturnTypes,nil) -SETANDFILEQ($mapName,'noMapName) -SETANDFILEQ($mapThrowCount, 0) -- times a "return" occurs in map -SETANDFILEQ($compilingMap, NIL) -SETANDFILEQ($definingMap, NIL) - ---% Generating internal names for functions - -SETANDFILEQ($specialMapNameSuffix, NIL) - -makeInternalMapName(userName,numArgs,numMms,extraPart) == - name := CONCAT('"*",STRINGIMAGE numArgs,'";", - object2String userName,'";",STRINGIMAGE numMms,'";", - object2String frameName first $interpreterFrameRing ) - if extraPart then name := CONCAT(name,'";",extraPart) - if $specialMapNameSuffix then - name := CONCAT(name,'";",$specialMapNameSuffix) - INTERN name - -isInternalMapName name == - -- this only returns true or false as a "best guess" - (not IDENTP(name)) or (name = "*") or (name = "**") => false - sz := SIZE (name' := PNAME name) - (sz < 7) or (char("*") ^= name'.0) => false - null DIGITP name'.1 => false - null STRPOS('"_;",name',1,NIL) => false - -- good enough - true - -makeInternalMapMinivectorName(name) == - STRINGP name => - INTERN STRCONC(name,'";MV") - INTERN STRCONC(PNAME name,'";MV") - -mkCacheName(name) == INTERNL(STRINGIMAGE name,'";AL") - -mkAuxiliaryName(name) == INTERNL(STRINGIMAGE name,'";AUX") - ---% Adding a function definition - -isMapExpr x == x is ['MAP,:.] - -isMap x == - y := get(x,'value,$InteractiveFrame) => - objVal y is ['MAP,:.] => x - -addDefMap(['DEF,lhs,mapsig,.,rhs],pred) == - -- Create a new map, add to an existing one, or define a variable - -- compute the dependencies for a map - - -- next check is for bad forms on the lhs of the ==, such as - -- numbers, constants. - if not PAIRP lhs then - op := lhs - putHist(op,'isInterpreterRule,true,$e) - putHist(op,'isInterpreterFunction,false,$e) - lhs := [lhs] - else - -- this is a function definition. If it has been declared - -- previously, make sure it is Mapping. - op := first lhs - (oldMode := get(op,'mode,$e)) and oldMode isnt ['Mapping,:.] => - throwKeyedMsg("S2IM0001",[op,oldMode]) - putHist(op,'isInterpreterRule,false,$e) - putHist(op,'isInterpreterFunction,true,$e) - - (NUMBERP(op) or op in '(true false nil % %%)) => - throwKeyedMsg("S2IM0002",[lhs]) - - -- verify a constructor abbreviation is not used on the lhs - op ^= (op' := unabbrev op) => throwKeyedMsg("S2IM0003",[op,op']) - - -- get the formal parameters. These should only be atomic symbols - -- that are not numbers. - parameters := [p for p in rest lhs | IDENTP(p)] - - -- see if a signature has been given. if anything in mapsig is NIL, - -- then declaration was omitted. - someDecs := nil - allDecs := true - mapmode := ['Mapping] - $env:local := [[NIL]] - $eval:local := true --generate code-- don't just type analyze - $genValue:local := true --evaluate all generated code - for d in mapsig repeat - if d then - someDecs := true - d' := evaluateType unabbrev d - isPartialMode d' => throwKeyedMsg("S2IM0004",NIL) --- tree := mkAtree d' --- null (d' := isType tree) => throwKeyedMsg("S2IM0005",[d]) - mapmode := [d',:mapmode] - else allDecs := false - if allDecs then - mapmode := nreverse mapmode - putHist(op,'mode,mapmode,$e) - sayKeyedMsg("S2IM0006",[formatOpSignature(op,rest mapmode)]) - else if someDecs then throwKeyedMsg("S2IM0007",[op]) - - -- if map is declared, check that signature arg count is the - -- same as what is given. - if get(op,'mode,$e) is ['Mapping,.,:mapargs] then - EQCAR(rhs,'rules) => - 0 ^= (numargs := # rest lhs) => - throwKeyedMsg("S2IM0027",[numargs,op]) - # rest lhs ^= # mapargs => throwKeyedMsg("S2IM0008",[op]) - --get all the user variables in the map definition. This is a multi - --step process as this should not include recursive calls to the map - --itself, or the formal parameters - userVariables1 := getUserIdentifiersIn rhs - $freeVars: local := NIL - $localVars: local := NIL - for parm in parameters repeat mkLocalVar($mapName,parm) - userVariables2 := setDifference(userVariables1,findLocalVars(op,rhs)) - userVariables3 := setDifference(userVariables2, parameters) - userVariables4 := REMDUP setDifference (userVariables3, [op]) - - --figure out the new dependencies for the new map (what it depends on) - newDependencies := makeNewDependencies (op, userVariables4) - putDependencies (op, newDependencies) - clearDependencies(op,'T) - addMap(lhs,rhs,pred) - -addMap(lhs,rhs,pred) == - [op,:argl] := lhs - $sl: local:= nil - formalArgList:= [mkFormalArg(makeArgumentIntoNumber x,s) - for x in argl for s in $FormalMapVariableList] - argList:= - [fn for x in formalArgList] where - fn == - if x is ["SUCHTHAT",s,p] then (predList:= [p,:predList]; x:= s) - x - mkMapAlias(op,argl) - argPredList:= NREVERSE predList - finalPred := --- handle g(a,T)==a+T confusion between pred=T and T variable - MKPF((pred and (pred ^= 'T) => [:argPredList,SUBLISNQ($sl,pred)]; argPredList),"and") - body:= SUBLISNQ($sl,rhs) - oldMap := - (obj := get(op,'value,$InteractiveFrame)) => objVal obj - NIL - newMap := augmentMap(op,argList,finalPred,body,oldMap) - null newMap => - sayRemoveFunctionOrValue op - putHist(op,'alias,nil,$e) - " " -- clears value--- see return from addDefMap in tree2Atree1 - if get(op,'isInterpreterRule,$e) then type := ['RuleCalled,op] - else type := ['FunctionCalled,op] - recursive := - depthOfRecursion(op,newMap) = 0 => false - true - putHist(op,'recursive,recursive,$e) - objNew(newMap,type) - -augmentMap(op,args,pred,body,oldMap) == - pattern:= makePattern(args,pred) - newMap:=deleteMap(op,pattern,oldMap) - body=" " => - if newMap=oldMap then - sayMSG ['" Cannot find part of",:bright op,'"to delete."] - newMap --just delete rule if body is - entry:= [pattern,:body] - resultMap:= - newMap is ["MAP",:tail] => ["MAP",:tail,entry] - ["MAP",entry] - resultMap - -deleteMap(op,pattern,map) == - map is ["MAP",:tail] => - newMap:= ['MAP,:[x for x in tail | w]] where w == - x is [=pattern,:replacement] => sayDroppingFunctions(op,[x]) - true - null rest newMap => nil - newMap - NIL - -getUserIdentifiersIn body == - null body => nil - IDENTP body => - isSharpVarWithNum body => nil - body=" " => nil - [body] - body is ["WRAPPED",:.] => nil - (body is ["COLLECT",:itl,body1]) or (body is ['REPEAT,:itl,body1]) => - userIds := - S_+(getUserIdentifiersInIterators itl,getUserIdentifiersIn body1) - S_-(userIds,getIteratorIds itl) - body is [op,:l] => - argIdList:= "append"/[getUserIdentifiersIn y for y in l] - bodyIdList := - CONSP op or not (GET(op,'Nud) or GET(op,'Led) or GET(op,'up))=> - NCONC(getUserIdentifiersIn op, argIdList) - argIdList - REMDUP bodyIdList - -getUserIdentifiersInIterators itl == - for x in itl repeat - x is ["STEP",i,:l] => - varList:= [:"append"/[getUserIdentifiersIn y for y in l],:varList] - x is ["IN",.,y] => varList:= [:getUserIdentifiersIn y,:varList] - x is ["ON",.,y] => varList:= [:getUserIdentifiersIn y,:varList] - x is [op,a] and op in '(_| WHILE UNTIL) => - varList:= [:getUserIdentifiersIn a,:varList] - keyedSystemError("S2GE0016",['"getUserIdentifiersInIterators", - '"unknown iterator construct"]) - REMDUP varList - -getIteratorIds itl == - for x in itl repeat - x is ["STEP",i,:.] => varList:= [i,:varList] - x is ["IN",y,:.] => varList:= [y,:varList] - x is ["ON",y,:.] => varList:= [y,:varList] - nil - varList - -makeArgumentIntoNumber x == - x=$Zero => 0 - x=$One => 1 - atom x => x - x is ["-",n] and NUMBERP n => -n - [removeZeroOne first x,:removeZeroOne rest x] - -mkMapAlias(op,argl) == - u:= mkAliasList argl - newAlias := - alias:= get(op,"alias",$e) => [(y => y; x) for x in alias for y in u] - u - $e:= putHist(op,"alias",newAlias,$e) - -mkAliasList l == fn(l,nil) where fn(l,acc) == - null l => NREVERSE acc - not IDENTP first l or first l in acc => fn(rest l,[nil,:acc]) - fn(rest l,[first l,:acc]) - -args2Tuple args == - args is [first,:rest] => - null rest => first - ["Tuple",:args] - nil - -makePattern(args,pred) == - nargs:= #args - nargs = 1 => - pred is ["=","#1",n] => n - addPatternPred("#1",pred) - u:= canMakeTuple(nargs,pred) => u - addPatternPred(["Tuple",:TAKE(nargs,$FormalMapVariableList)],pred) - -addPatternPred(arg,pred) == - pred=true => arg - ["|",arg,pred] - -canMakeTuple(nargs,pred) == - pred is ["and",:l] and nargs=#l and - (u:= [(x is ["=",=y,a] => a; return nil) - for y in $FormalMapVariableList for x in orderList l]) => - ["Tuple",:u] - -sayRemoveFunctionOrValue x == - (obj := getValue x) and (md := objMode obj) => - md = $EmptyMode => - sayMessage ['" ",:bright x,'"now has no function parts."] - sayMessage ['" value for",:bright x,'"has been removed."] - sayMessage ['" ",:bright x,'"has no value so this does nothing."] - -sayDroppingFunctions(op,l) == - sayKeyedMsg("S2IM0017",[#l,op]) - if $displayDroppedMap then - for [pattern,:replacement] in l repeat - displaySingleRule(op,pattern,replacement) - nil - -makeRuleForm(op,pattern)== - pattern is ["Tuple",:l] => [op,:l] - [op,:pattern] - -mkFormalArg(x,s) == - isConstantArgument x => ["SUCHTHAT",s,["=",s,x]] - isPatternArgument x => ["SUCHTHAT",s,["is",s,x]] - IDENTP x => - y:= LASSOC(x,$sl) => ["SUCHTHAT",s,["=",s,y]] - $sl:= [[x,:s],:$sl] - s - ['SUCHTHAT,s,["=",s,x]] - -isConstantArgument x == - NUMBERP x => x - x is ["QUOTE",.] => x - -isPatternArgument x == x is ["construct",:.] - ---% Map dependencies - -makeNewDependencies (op, userVariables) == - null userVariables => nil - --add the new dependencies - [[(first userVariables),op], - :makeNewDependencies (op, rest userVariables)] - -putDependencies (op, dependencies) == - oldDependencies := getFlag "$dependencies" - --remove the obsolete dependencies: all those that applied to the - --old definition, but may not apply here. If they do, they'll be - --in the list of new dependencies anyway - oldDependencies := removeObsoleteDependencies (op, oldDependencies) where - removeObsoleteDependencies (op, oldDep) == - null oldDep => nil - op = rest first oldDep => - removeObsoleteDependencies (op, rest oldDep) - [first oldDep,:removeObsoleteDependencies (op, rest oldDep)] - --Create the list of dependencies to output. This will be all the - --old dependencies that are still applicable, and all the new ones - --that have just been generated. Remember that the list of - --dependencies does not just include those for the map just being - --defined, but includes those for all maps and variables that exist - newDependencies := union (dependencies, oldDependencies) - putFlag ("$dependencies", newDependencies) - -clearDependencies(x,clearLocalModemapsIfTrue) == - $dependencies: local:= COPY getFlag "$dependencies" - clearDep1(x,nil,nil,$dependencies) - -clearDep1(x,toDoList,doneList,depList) == - x in doneList => nil - clearCache x - newDone:= [x,:doneList] - until null a repeat - a:= ASSQ(x,depList) - a => - depList:= delete(a,depList) - toDoList:= setUnion(toDoList, - setDifference(CDR a,doneList)) - toDoList is [a,:res] => clearDep1(a,res,newDone,depList) - 'done - ---% Formatting and displaying maps - -displayRule(op,rule) == - null rule => nil - mathprint ["CONCAT","Definition: ", rule] - nil - -outputFormat(x,m) == - -- this is largely junk and is being phased out - IDENTP m => x - m=$OutputForm or m=$EmptyMode => x - categoryForm?(m) => x - isMapExpr x => x - containsVars x => x - atom(x) and CAR(m) = 'List => x - (x is ['construct,:.]) and m = '(List (Expression)) => x - T:= coerceInteractive(objNewWrap(x,maximalSuperType(m)), - $OutputForm) or return x - objValUnwrap T - -displaySingleRule($op,pattern,replacement) == - mathprint ['MAP,[pattern,:replacement]] - -displayMap(headingIfTrue,$op,map) == - mathprint - headingIfTrue => ['CONCAT,PNAME "value: ",map] - map - -simplifyMapPattern (x,alias) == - for a in alias - for m in $FormalMapVariableList | a and ^CONTAINED(a,x) repeat - x:= substitute(a,m,x) - [lhs,:rhs]:= x - rhs := simplifyMapConstructorRefs rhs - x := [lhs,:rhs] - lhs is ["|",y,pred] => - pred:= predTran pred - sl:= getEqualSublis pred => - y':= SUBLIS(sl,y) - pred:= unTrivialize SUBLIS(sl,pred) where unTrivialize x == - x is [op,:l] and op in '(_and _or) => - MKPF([unTrivialize y for y in l],op) - x is [op,a,=a] and op in '(_= is)=> true - x - rhs':= SUBLIS(sl,rhs) - pred=true => [y',:rhs'] - [["PAREN",["|",y',pred]],:rhs'] - pred=true => [y,:rhs] - [["PAREN",["|",y,pred]],:rhs] - lhs=true => ["true",:rhs] - x - -simplifyMapConstructorRefs form == - -- try to linear format constructor names - ATOM form => form - [op,:args] := form - op in '(exit SEQ) => - [op,:[simplifyMapConstructorRefs a for a in args]] - op in '(REPEAT) => - [op,first args,:[simplifyMapConstructorRefs a for a in rest args]] - op in '(_: _:_: _@) => - args is [obj,dom] => - dom' := prefix2String dom - --if ATOM dom' then dom' := [dom'] - --[op,obj,APPLY('CONCAT,dom')] - dom'' := - ATOM dom' => dom' - NULL CDR dom' => CAR dom' - APPLY('CONCAT, dom') - [op,obj, dom''] - form - form - -predTran x == - x is ["IF",a,b,c] => - c = "false" => MKPF([predTran a,predTran b],"and") - b = "true" => MKPF([predTran a,predTran c],"or") - b = "false" and c = "true" => ["not",predTran a] - x - x - -getEqualSublis pred == fn(pred,nil) where fn(x,sl) == - (x:= SUBLIS(sl,x)) is [op,:l] and op in '(_and _or) => - for y in l repeat sl:= fn(y,sl) - sl - x is ["is",a,b] => [[a,:b],:sl] - x is ["=",a,b] => - IDENTP a and not CONTAINED(a,b) => [[a,:b],:sl] - IDENTP b and not CONTAINED(b,a) => [[b,:a],:sl] - sl - sl - ---% User function analysis - -mapCatchName mapname == - INTERN STRCONC('"$",STRINGIMAGE mapname,'"CatchMapIdentifier$") - -analyzeMap(op,argTypes,mapDef, tar) == - -- Top level enty point for map type analysis. Sets up catch point - -- for interpret-code mode. - $compilingMap:local := true - $definingMap:local := true - $minivector : local := nil -- later becomes value of $minivectorName - $mapThrowCount : local := 0 -- number of "return"s encountered - $mapReturnTypes : local := nil -- list of types from returns - $repeatLabel : local := nil -- for loops; see upREPEAT - $breakCount : local := 0 -- breaks from loops; ditto - $mapTarget : local := tar - $interpOnly: local := NIL - $mapName : local := op.0 - if get($mapName,'recursive,$e) then - argTypes := [f t for t in argTypes] where - f x == - isEqualOrSubDomain(x,$Integer) => $Integer - x - mapAndArgTypes := [$mapName,:argTypes] - member(mapAndArgTypes,$analyzingMapList) => - -- if the map is declared, return the target type - (getMode op) is ['Mapping,target,:.] => target - throwKeyedMsg("S2IM0009", - [$mapName,['" ", map for [map,:.] in $analyzingMapList]]) - PUSH(mapAndArgTypes,$analyzingMapList) - mapDef := mapDefsWithCorrectArgCount(#argTypes, mapDef) - null mapDef => (POP $analyzingMapList; nil) - - UNWIND_-PROTECT(x:=CATCH('mapCompiler,analyzeMap0(op,argTypes,mapDef)), - POP $analyzingMapList) - x='tryInterpOnly => - opName:=getUnname op - fun := mkInterpFun(op,opName,argTypes) - if getMode op isnt ['Mapping,:sig] then - sig := [nil,:[nil for type in argTypes]] - $e:=putHist(opName,'localModemap, - [[['interpOnly,:sig],fun,NIL]],$e) - x - -analyzeMap0(op,argTypes,mapDef) == - -- Type analyze and compile a map. Returns the target type of the map. - -- only called if there is no applicable compiled map - $MapArgumentTypeList:local:= argTypes - numMapArgs mapDef ^= #argTypes => nil - ((m:=getMode op) is ['Mapping,:sig]) or (m and (sig:=[m])) => - -- op has mapping property only if user has declared the signature - analyzeDeclaredMap(op,argTypes,sig,mapDef,$mapList) - analyzeUndeclaredMap(getUnname op,argTypes,mapDef,$mapList) - -compFailure msg == - -- Called when compilation fails in such a way that interpret-code - -- mode might be of some use. - not $useCoerceOrCroak => THROW('coerceOrCroaker, 'croaked) - if $reportInterpOnly then - sayMSG msg - sayMSG '" We will attempt to interpret the code." - null $compilingMap => THROW('loopCompiler,'tryInterpOnly) - THROW('mapCompiler,'tryInterpOnly) - -mkInterpFun(op,opName,argTypes) == - -- creates a function form to put in fun slot of interp-only - -- local modemaps - getMode op isnt ['Mapping,:sig] => nil - parms := [var for type in argTypes for var in $FormalMapVariableList] - arglCode := ['LIST,:[argCode for type in argTypes - for argName in parms]] where argCode == - ['putValueValue,['mkAtreeNode,MKQ argName], - objNewCode(['wrap,argName],type)] - funName := GENSYM() - body:=['rewriteMap1,MKQ opName,arglCode,MKQ sig] - putMapCode(opName,body,sig,funName,parms,false) - genMapCode(opName,body,sig,funName,parms,false) - funName - -rewriteMap(op,opName,argl) == - -- interpret-code handler for maps. Recursively calls the interpreter - -- on the body of the map. - not $genValue => - get(opName,'mode,$e) isnt ['Mapping,:sig] => - compFailure ['" Cannot compile map:",:bright opName] - arglCode := ['LIST,:[argCode for arg in argl for argName in - $FormalMapVariableList]] where argCode == - ['putValueValue,['mkAtreeNode,MKQ argName], - objNewCode(['wrap,wrapped2Quote(objVal getValue arg)], - getMode arg)] - putValue(op,objNew(['rewriteMap1,MKQ opName,arglCode,MKQ sig], - CAR sig)) - putModeSet(op,[CAR sig]) - rewriteMap0(op,opName,argl) - -putBodyInEnv(opName, numArgs) == - val := get(opName, 'value, $e) - val is [.,'MAP, :bod] => - $e := putHist(opName, 'mapBody, combineMapParts - mapDefsWithCorrectArgCount(numArgs, bod), $e) - 'failed - -removeBodyFromEnv(opName) == - $e := putHist(opName, 'mapBody, nil, $e) - - -rewriteMap0(op,opName,argl) == - -- $genValue case of map rewriting - putBodyInEnv(opName, #argl) - if (s := get(opName,'mode,$e)) then - tar := CADR s - argTypes := CDDR s - else - tar:= nil - argTypes:= nil - get(opName,'mode,$e) is ['Mapping,tar,:argTypes] - $env: local := [[NIL]] - for arg in argl - for var in $FormalMapVariableList repeat - if argTypes then - t := CAR argTypes - argTypes:= CDR argTypes - val := - t is ['Mapping,:.] => getValue arg - coerceInteractive(getValue arg,t) - else - val:= getValue arg - $env:=put(var,'value,val,$env) - if VECP arg then $env := put(var,'name,getUnname arg,$env) - (m := getMode arg) => $env := put(var,'mode,m,$env) - null (val:= interpMap(opName,tar)) => - throwKeyedMsg("S2IM0010",[opName]) - putValue(op,val) - removeBodyFromEnv(opName) - ms := putModeSet(op,[objMode val]) - -rewriteMap1(opName,argl,sig) == - -- compiled case of map rewriting - putBodyInEnv(opName, #argl) - if sig then - tar:= CAR sig - argTypes:= CDR sig - else - tar:= nil - argTypes:= nil - evArgl := NIL - for arg in reverse argl repeat - v := getValue arg - evArgl := [objNew(objVal v, objMode v),:evArgl] - $env : local := [[NIL]] - for arg in argl for evArg in evArgl - for var in $FormalMapVariableList repeat - if argTypes then - t:=CAR argTypes - argTypes:= CDR argTypes - val := - t is ['Mapping,:.] => evArg - coerceInteractive(evArg,t) - else - val:= evArg - $env:=put(var,'value,val,$env) - if VECP arg then $env := put(var,'name,getUnname arg,$env) - (m := getMode arg) => $env := put(var,'mode,m,$env) - val:= interpMap(opName,tar) - removeBodyFromEnv(opName) - objValUnwrap(val) - -interpMap(opName,tar) == - -- call the interpreter recursively on map body - $genValue : local:= true - $interpMapTag : local := nil - $interpOnly : local := true - $localVars : local := NIL - for lvar in get(opName,'localVars,$e) repeat mkLocalVar(opName,lvar) - $mapName : local := opName - $mapTarget : local := tar - body:= get(opName,'mapBody,$e) - savedTimerStack := COPY $timedNameStack - catchName := mapCatchName $mapName - c := CATCH(catchName, interpret1(body,tar,nil)) --- $interpMapTag and $interpMapTag ^= mapCatchName $mapName => --- THROW($interpMapTag,c) - while savedTimerStack ^= $timedNameStack repeat - stopTimingProcess peekTimedName() - c -- better be a triple - -analyzeDeclaredMap(op,argTypes,sig,mapDef,$mapList) == - -- analyzes and compiles maps with declared signatures. argTypes - -- is a list of types of the arguments, sig is the declared signature - -- mapDef is the stored form of the map body. - opName := getUnname op - $mapList:=[opName,:$mapList] - $mapTarget := CAR sig - (mmS:= get(opName,'localModemap,$e)) and - (mm:= or/[mm for (mm:=[[.,:mmSig],:.]) in mmS | mmSig=sig]) => - compileCoerceMap(opName,argTypes,mm) - -- The declared map needs to be compiled - compileDeclaredMap(opName,sig,mapDef) - argTypes ^= CDR sig => - analyzeDeclaredMap(op,argTypes,sig,mapDef,$mapList) - CAR sig - -compileDeclaredMap(op,sig,mapDef) == - -- Type analyzes and compiles a map with a declared signature. - -- creates a local modemap and puts it into the environment - $localVars: local := nil - $freeVars: local := nil - $env:local:= [[NIL]] - parms:=[var for var in $FormalMapVariableList for m in CDR sig] - for m in CDR sig for var in parms repeat - $env:= put(var,'mode,m,$env) - body:= getMapBody(op,mapDef) - for lvar in parms repeat mkLocalVar($mapName,lvar) - for lvar in getLocalVars(op,body) repeat mkLocalVar($mapName,lvar) - name := makeLocalModemap(op,sig) - val := compileBody(body,CAR sig) - isRecursive := (depthOfRecursion(op,body) > 0) - putMapCode(op,objVal val,sig,name,parms,isRecursive) - genMapCode(op,objVal val,sig,name,parms,isRecursive) - CAR sig - -putMapCode(op,code,sig,name,parms,isRecursive) == - -- saves the generated code and some other information about the - -- function - codeInfo := VECTOR(op,code,sig,name,parms,isRecursive) - allCode := [codeInfo,:get(op,'generatedCode,$e)] - $e := putHist(op,'generatedCode,allCode,$e) - op - -makeLocalModemap(op,sig) == - -- create a local modemap for op with sig, and put it into $e - if (currentMms := get(op,'localModemap,$e)) then - untraceMapSubNames [CADAR currentMms] - newName := makeInternalMapName(op,#sig-1,1+#currentMms,NIL) - newMm := [['local,:sig],newName,nil] - mms := [newMm,:currentMms] - $e := putHist(op,'localModemap,mms,$e) - newName - -genMapCode(op,body,sig,fnName,parms,isRecursive) == - -- calls the lisp compiler on the body of a map - if lmm:= get(op,'localModemap,$InteractiveFrame) then - untraceMapSubNames [CADAR lmm] - op0 := - ( n := isSharpVarWithNum op ) => STRCONC('"") - op - if get(op,'isInterpreterRule,$e) then - sayKeyedMsg("S2IM0014",[op0,(PAIRP sig =>prefix2String CAR sig;'"?")]) - else sayKeyedMsg("S2IM0015",[op0,formatSignature sig]) - $whereCacheList := [op,:$whereCacheList] - - -- RSS: 6-21-94 - -- The following code ensures that local variables really are local - -- to a function. We will unnecessarily generate preliminary LETs for - -- loop variables and variables that do have LET expressions, but that - -- can be finessed later. - - locals := SETDIFFERENCE(COPY $localVars, parms) - if locals then - lets := [['LET, l, ''UNINITIALIZED__VARIABLE, op] for l in locals] - body := ['PROGN, :lets, body] - - reportFunctionCompilation(op,fnName,parms, - wrapMapBodyWithCatch flattenCOND body,isRecursive) - -compileBody(body,target) == - -- recursively calls the interpreter on the map body - -- returns a triple with the LISP code for body in the value cell - $insideCompileBodyIfTrue: local := true - $genValue: local := false - $declaredMode:local := target - $eval:local:= true - r := interpret1(body,target,nil) - -compileCoerceMap(op,argTypes,mm) == - -- compiles call to user-declared map where the arguments need - -- to be coerced. mm is the modemap for the declared map. - $insideCompileBodyIfTrue: local := true - $genValue: local := false - [[.,:sig],imp,.]:= mm - parms:= [var for var in $FormalMapVariableList for t in CDR sig] - name:= makeLocalModemap(op,[CAR sig,:argTypes]) - argCode := [objVal(coerceInteractive(objNew(arg,t1),t2) or - throwKeyedMsg("S2IC0001",[arg,$mapName,t1,t2])) - for t1 in argTypes for t2 in CDR sig for arg in parms] - $insideCompileBodyIfTrue := false - parms:= [:parms,'envArg] - body := ['SPADCALL,:argCode,['LIST,['function,imp]]] - minivectorName := makeInternalMapMinivectorName(name) - $minivectorNames := [[op,:minivectorName],:$minivectorNames] - body := SUBST(minivectorName,"$$$",body) - if $compilingInputFile then - $minivectorCode := [:$minivectorCode,minivectorName] - SET(minivectorName,LIST2REFVEC $minivector) - compileInteractive [name,['LAMBDA,parms,body]] - CAR sig - -depthOfRecursion(opName,body) == - -- returns the "depth" of recursive calls of opName in body - mapRecurDepth(opName,nil,body) - -mapRecurDepth(opName,opList,body) == - -- walks over the map body counting depth of recursive calls - -- expanding the bodies of maps called in body - atom body => 0 - body is [op,:argl] => - argc:= - atom argl => 0 - argl => "MAX"/[mapRecurDepth(opName,opList,x) for x in argl] - 0 - op in opList => argc - op=opName => 1 + argc - (obj := get(op,'value,$e)) and objVal obj is ['MAP,:mapDef] => - mapRecurDepth(opName,[op,:opList],getMapBody(op,mapDef)) - + argc - argc - keyedSystemError("S2GE0016",['"mapRecurDepth", - '"unknown function form"]) - -analyzeUndeclaredMap(op,argTypes,mapDef,$mapList) == - -- Computes the signature of the map named op, and compiles the body - $freeVars:local := NIL - $localVars: local := NIL - $env:local:= [[NIL]] - $mapList := [op,:$mapList] - parms:=[var for var in $FormalMapVariableList for m in argTypes] - for m in argTypes for var in parms repeat - put(var,'autoDeclare,'T,$env) - put(var,'mode,m,$env) - body:= getMapBody(op,mapDef) - for lvar in parms repeat mkLocalVar($mapName,lvar) - for lvar in getLocalVars(op,body) repeat mkLocalVar($mapName,lvar) - (n:= depthOfRecursion(op,body)) = 0 => - analyzeNonRecursiveMap(op,argTypes,body,parms) - analyzeRecursiveMap(op,argTypes,body,parms,n) - -analyzeNonRecursiveMap(op,argTypes,body,parms) == - -- analyze and compile a non-recursive map definition - T := compileBody(body,$mapTarget) - if $mapThrowCount > 0 then - t := objMode T - b := and/[(t = rt) for rt in $mapReturnTypes] - not b => - t := resolveTypeListAny [t,:$mapReturnTypes] - if not $mapTarget then $mapTarget := t - T := compileBody(body,$mapTarget) - sig := [objMode T,:argTypes] - name:= makeLocalModemap(op,sig) - putMapCode(op,objVal T,sig,name,parms,false) - genMapCode(op,objVal T,sig,name,parms,false) - objMode(T) - -analyzeRecursiveMap(op,argTypes,body,parms,n) == - -- analyze and compile a non-recursive map definition - -- makes guess at signature by analyzing non-recursive part of body - -- then re-analyzes the entire body until the signature doesn't change - localMapInfo := saveDependentMapInfo(op, CDR $mapList) - tar := CATCH('interpreter,analyzeNonRecur(op,body,$localVars)) - for i in 0..n until not sigChanged repeat - sigChanged:= false - name := makeLocalModemap(op,sig:=[tar,:argTypes]) - code := compileBody(body,$mapTarget) - objMode(code) ^= tar => - sigChanged:= true - tar := objMode(code) - restoreDependentMapInfo(op, CDR $mapList, localMapInfo) - sigChanged => throwKeyedMsg("S2IM0011",[op]) - putMapCode(op,objVal code,sig,name,parms,true) - genMapCode(op,objVal code,sig,name,parms,true) - tar - -saveDependentMapInfo(op,opList) == - not (op in opList) => - lmml := [[op, :get(op, 'localModemap, $e)]] - gcl := [[op, :get(op, 'generatedCode, $e)]] - for [dep1,dep2] in getFlag("$dependencies") | dep1=op repeat - [lmml', :gcl'] := saveDependentMapInfo(dep2, [op, :opList]) - lmms := nconc(lmml', lmml) - gcl := nconc(gcl', gcl) - [lmms, :gcl] - nil - -restoreDependentMapInfo(op, opList, [lmml,:gcl]) == - not (op in opList) => - clearDependentMaps(op,opList) - for [op, :lmm] in lmml repeat - $e := putHist(op,'localModemap,lmm,$e) - for [op, :gc] in gcl repeat - $e := putHist(op,'generatedCode,gc,$e) - -clearDependentMaps(op,opList) == - -- clears the local modemaps of all the maps that depend on op - not (op in opList) => - $e := putHist(op,'localModemap,nil,$e) - $e := putHist(op,'generatedCode,nil,$e) - for [dep1,dep2] in getFlag("$dependencies") | dep1=op repeat - clearDependentMaps(dep2,[op,:opList]) - -analyzeNonRecur(op,body,$localVars) == - -- type analyze the non-recursive part of a map body - nrp := nonRecursivePart(op,body) - for lvar in findLocalVars(op,nrp) repeat mkLocalVar($mapName,lvar) - objMode(compileBody(nrp,$mapTarget)) - -nonRecursivePart(opName, funBody) == - -- takes funBody, which is the parse tree of the definition of - -- a function, and returns a list of the parts - -- of the function which are not recursive in the name opName - body:= expandRecursiveBody([opName], funBody) - ((nrp:=nonRecursivePart1(opName, body)) ^= 'noMapVal) => nrp - throwKeyedMsg("S2IM0012",[opName]) - -expandRecursiveBody(alreadyExpanded, body) == - -- replaces calls to other maps with their bodies - atom body => - (obj := get(body,'value,$e)) and objVal obj is ['MAP,:mapDef] and - ((numMapArgs mapDef) = 0) => getMapBody(body,mapDef) - body - body is [op,:argl] => - not (op in alreadyExpanded) => - (obj := get(op,'value,$e)) and objVal obj is ['MAP,:mapDef] => - newBody:= getMapBody(op,mapDef) - for arg in argl for var in $FormalMapVariableList repeat - newBody:=MSUBST(arg,var,newBody) - expandRecursiveBody([op,:alreadyExpanded],newBody) - [op,:[expandRecursiveBody(alreadyExpanded,arg) for arg in argl]] - [op,:[expandRecursiveBody(alreadyExpanded,arg) for arg in argl]] - keyedSystemError("S2GE0016",['"expandRecursiveBody", - '"unknown form of function body"]) - -nonRecursivePart1(opName, funBody) == - -- returns a function body which contains only the parts of funBody - -- which do not call the function opName - funBody is ['IF,a,b,c] => - nra:=nonRecursivePart1(opName,a) - nra = 'noMapVal => 'noMapVal - nrb:=nonRecursivePart1(opName,b) - nrc:=nonRecursivePart1(opName,c) - not (nrb in '(noMapVal noBranch)) => ['IF,nra,nrb,nrc] - not (nrc in '(noMapVal noBranch)) => ['IF,['not,nra],nrc,nrb] - 'noMapVal - not containsOp(funBody,'IF) => - notCalled(opName,funBody) => funBody - 'noMapVal - funBody is [op,:argl] => - op=opName => 'noMapVal - args:= [nonRecursivePart1(opName,arg) for arg in argl] - MEMQ('noMapVal,args) => 'noMapVal - [op,:args] - funBody - -containsOp(body,op) == - -- true IFF body contains an op statement - body is [ =op,:.] => true - body is [.,:argl] => or/[containsOp(arg,op) for arg in argl] - false - -notCalled(opName,form) == - -- returns true if opName is not called in the form - atom form => true - form is [op,:argl] => - op=opName => false - and/[notCalled(opName,x) for x in argl] - keyedSystemError("S2GE0016",['"notCalled", - '"unknown form of function body"]) - -mapDefsWithCorrectArgCount(n, mapDef) == - [def for def in mapDef | (numArgs CAR def) = n] - -numMapArgs(mapDef is [[args,:.],:.]) == - -- returns the number of arguemnts to the map whose body is mapDef - numArgs args - -numArgs args == - args is ['_|,a,:.] => numArgs a - args is ['Tuple,:argl] => #argl - null args => 0 - 1 - -combineMapParts(mapTail) == - -- transforms a piece-wise function definition into an if-then-else - -- statement. Uses noBranch to indicate undefined branch - null mapTail => 'noMapVal - mapTail is [[cond,:part],:restMap] => - isSharpVarWithNum cond or (cond is ['Tuple,:args] and - and/[isSharpVarWithNum arg for arg in args]) or (null cond) => part - ['IF,mkMapPred cond,part,combineMapParts restMap] - keyedSystemError("S2GE0016",['"combineMapParts", - '"unknown function form"]) - -mkMapPred cond == - -- create the predicate on map arguments, derived from "when" clauses - cond is ['_|,args,pred] => mapPredTran pred - cond is ['Tuple,:vals] => - mkValueCheck(vals,1) - mkValCheck(cond,1) - -mkValueCheck(vals,i) == - -- creates predicate for specific value check (i.e f 1 == 1) - vals is [val] => mkValCheck(val,i) - ['and,mkValCheck(first vals,i),mkValueCheck(rest vals,i+1)] - -mkValCheck(val,i) == - -- create equality check for map predicates - isSharpVarWithNum val => 'true - ['_=,mkSharpVar i,val] - -mkSharpVar i == - -- create #i - INTERN CONCAT('"#",STRINGIMAGE i) - -mapPredTran pred == - -- transforms "x in i..j" to "x>=i and x<=j" - pred is ['in,var,['SEGMENT,lb]] => mkLessOrEqual(lb,var) - pred is ['in,var,['SEGMENT,lb,ub]] => - null ub => mkLessOrEqual(lb,var) - ['and,mkLessOrEqual(lb,var),mkLessOrEqual(var,ub)] - pred - -findLocalVars(op,form) == - -- analyzes form for local and free variables, and returns the list - -- of locals - findLocalVars1(op,form) - $localVars - -findLocalVars1(op,form) == - -- sets the two lists $localVars and $freeVars - atom form => - not IDENTP form or isSharpVarWithNum form => nil - isLocalVar(form) or isFreeVar(form) => nil - mkFreeVar($mapName,form) - form is ['local, :vars] => - for x in vars repeat - ATOM x => mkLocalVar(op, x) - form is ['free, :vars] => - for x in vars repeat - ATOM x => mkFreeVar(op, x) - form is ['LET,a,b] => - (a is ['Tuple,:vars]) and (b is ['Tuple,:vals]) => - for var in vars for val in vals repeat - findLocalVars1(op,['LET,var,val]) - a is ['construct,:pat] => - for var in listOfVariables pat repeat mkLocalVar(op,var) - findLocalVars1(op,b) - (atom a) or (a is ['_:,a,.]) => - mkLocalVar(op,a) - findLocalVars1(op,b) - findLocalVars(op,b) - for x in a repeat findLocalVars1(op,x) - form is ['_:,a,.] => - mkLocalVar(op,a) - form is ['is,l,pattern] => - findLocalVars1(op,l) - for var in listOfVariables CDR pattern repeat mkLocalVar(op,var) - form is [oper,:itrl,body] and MEMQ(oper,'(REPEAT COLLECT)) => - findLocalsInLoop(op,itrl,body) - form is [y,:argl] => - y is 'Record => nil - for x in argl repeat findLocalVars1(op,x) - keyedSystemError("S2IM0020",[op]) - -findLocalsInLoop(op,itrl,body) == - for it in itrl repeat - it is ['STEP,index,lower,step,:upperList] => - mkLocalVar(op,index) - findLocalVars1(op,lower) - for up in upperList repeat findLocalVars1(op,up) - it is ['IN,index,s] => - mkLocalVar(op,index) ; findLocalVars1(op,s) - it is ['WHILE,b] => - findLocalVars1(op,b) - it is ['_|,pred] => - findLocalVars1(op,pred) - findLocalVars1(op,body) - for it in itrl repeat - it is [op,b] and (op in '(UNTIL)) => - findLocalVars1(op,b) - -isLocalVar(var) == member(var,$localVars) - -mkLocalVar(op,var) == - -- add var to the local variable list - isFreeVar(var) => $localVars - $localVars:= insert(var,$localVars) - -isFreeVar(var) == member(var,$freeVars) - -mkFreeVar(op,var) == - -- op here for symmetry with mkLocalVar - $freeVars:= insert(var,$freeVars) - -listOfVariables pat == - -- return a list of the variables in pat, which is an "is" pattern - IDENTP pat => (pat='_. => nil ; [pat]) - pat is ['_:,var] or pat is ['_=,var] => - (var='_. => NIL ; [var]) - PAIRP pat => REMDUP [:listOfVariables p for p in pat] - nil - -getMapBody(op,mapDef) == - -- looks in $e for a map body; if not found it computes then stores it - get(op,'mapBody,$e) or - combineMapParts mapDef --- $e:= putHist(op,'mapBody,body:= combineMapParts mapDef,$e) --- body - -getLocalVars(op,body) == - -- looks in $e for local vars; if not found, computes then stores them - get(op,'localVars,$e) or - $e:= putHist(op,'localVars,lv:=findLocalVars(op,body),$e) - lv - --- DO NOT BELIEVE ALL OF THE FOLLOWING (IT IS OLD) - --- VARIABLES. Variables may or may not have a mode property. If --- present, any value which is assigned or generated by that variable --- is first coerced to that mode before being assigned or returned. --- --- --- Variables are given a triple [val,m,e] as a "value" property on --- its property list in the environment. The expression val has the --- forms: --- --- (WRAPPED . y) --value of x is y (don't re-evaluate) --- y --anything else --value of x is obtained by evaluating y --- --- A wrapped expression is created by an assignment. In the second --- case, y can never contain embedded wrapped expressions. The mode --- part m of the triple is the type of y in the wrapped case and is --- consistent with the declared mode if given. The mode part of an --- unwrapped value is always $EmptyMode. The e part is usually NIL --- but may be used to hold a partial closure. --- --- Effect of changes. A rule can be built up for a variable by --- successive rules involving conditional expressions. However, once --- a value is assigned to the variable or an unconditional definition --- is given, any existing value is replaced by the new entry. When --- the mode of a variable is declared, an wrapped value is coerced to --- the new mode; if this is not possible, the user is notified that --- the current value is discarded and why. When the mode is --- redeclared and an upwrapped value is present, the value is --- retained; the only other effect is to coerce any cached values --- from the old mode to the new one. --- --- Caches. When a variable x is evaluated and re-evaluation occurs, --- the triple produced by that evaluation is stored under "cache" on --- the property list of x. This cached triple is cleared whenever any --- of the variables which x's value depend upon change. Dependencies --- are stored on $dependencies whose value has the form [[a b ..] ..] --- to indicate that when a is changed, b .. must have all cached --- values destroyed. In the case of parameterized forms which are --- represented by maps, we currently can cache values only when the --- compiler option is turned on by )on c s meaning "on compiler with --- the save option". When f is compiled as f;1, it then has an alist --- f;1;AL which records these values. If f depends globally on a's --- value, all cached values of all local functions defined for f have --- to be declared. If a's mode should change, then all compilations --- of f must be thrown away. --- --- PARAMETERIZED FORMS. These always have values [val,m,e] where val --- are "maps". --- --- The structure of maps: --- (MAP (pattern . rewrite) ...) where --- pattern has forms: arg-pattern --- (Tuple arg-pattern ...) --- rewrite has forms: (WRAPPED . value) --don't re-evaluate --- computational object --don't (bother to) --- re-evaluate --- anything else --yes, re-evaluate --- --- When assigning values to a map, each new value must have a type --- which is consistent with those already assigned. Initially, type --- of MAP is $EmptyMode. When the map is first assigned a value, the --- type of the MAP is RPLACDed to be (Mapping target source ..). --- When the map is next assigned, the type of both source and target --- is upgraded to be consistent with those values already computed. --- Of course, if new and old source and target are identical, nothing --- need happen to existing entries. However, if the new and old are --- different, all existing entries of the map are coerce to the new --- data type. --- --- Mode analysis. This is done on the bottomUp phase of the process. --- If a function has been given a mapping declaration, this map is --- placed in as the mode of the map under the "value" property of the --- variable. Of course, these modes may be partial types in case a --- mode analysis is still necessary. If no mapping declaration, a --- total mode analysis of the function, given its input arguments, is --- done. This will result a signature involving types only. --- --- If the compiler is on, the function is then compiled given this --- signature involving types. If the map is value of a variable f, a --- function is given name f;1, f is given a "localModemap" property --- with modemap ((dummy target source ..) (T f;1)) so that the next --- time f is applied to arguments which coerce to the source --- arguments of this local modemap, f;1 will be invoked. -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/interp/interop.boot b/src/interp/interop.boot new file mode 100644 index 00000000..87958dfc --- /dev/null +++ b/src/interp/interop.boot @@ -0,0 +1,906 @@ +-- 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. + + +)package "BOOT" + +-- note domainObjects are now (dispatchVector hashCode . domainVector) +-- lazy oldAxiomDomainObjects are (dispatchVector hashCode (Call form) . backptr), +-- pre oldAxiomCategory is (dispatchVector . (cat form)) +-- oldAxiomCategory objects are (dispatchVector . ( (cat form) hash defaultpack parentlist)) + +hashCode? x == INTEGERP x + +$domainTypeTokens := ['lazyOldAxiomDomain, 'oldAxiomDomain, 'oldAxiomPreCategory, + 'oldAxiomCategory, 0] + +-- The name game. +-- The compiler produces names that are of the form: +-- a) cons(0, ) +-- b) cons(1, type-name, arg-names...) +-- c) cons(2, arg-names...) +-- d) cons(3, value) +-- NB: (c) is for tuple-ish constructors, +-- and (d) is for dependent types. + +DNameStringID := 0 +DNameApplyID := 1 +DNameTupleID := 2 +DNameOtherID := 3 + +DNameToSExpr1 dname == + NULL dname => error "unexpected domain name" + CAR dname = DNameStringID => + INTERN(CompStrToString CDR dname) + name0 := DNameToSExpr1 CAR CDR dname + args := CDR CDR dname + name0 = '_-_> => + froms := CAR args + froms := MAPCAR(function DNameToSExpr, CDR froms) + ret := CAR CDR args -- a tuple + ret := DNameToSExpr CAR CDR ret -- contents + CONS('Mapping, CONS(ret, froms)) + name0 = 'Union or name0 = 'Record => + sxs := MAPCAR(function DNameToSExpr, CDR CAR args) + CONS(name0, sxs) + name0 = 'Enumeration => + CONS(name0, MAPCAR(function DNameFixEnum, CDR CAR args)) + CONS(name0, MAPCAR(function DNameToSExpr, args)) + +DNameToSExpr dname == + CAR dname = DNameOtherID => + CDR dname + sx := DNameToSExpr1 dname + CONSP sx => sx + LIST sx + +DNameFixEnum arg == CompStrToString CDR arg + +SExprToDName(sexpr, cosigVal) == + -- is it a non-type valued object? + NOT cosigVal => [DNameOtherID, :sexpr] + if CAR sexpr = '_: then sexpr := CAR CDR CDR sexpr + CAR sexpr = 'Mapping => + args := [ SExprToDName(sx, 'T) for sx in CDR sexpr] + [DNameApplyID, + [DNameStringID,: StringToCompStr '"->"], + [DNameTupleID, : CDR args], + [DNameTupleID, CAR args]] + name0 := [DNameStringID, : StringToCompStr SYMBOL_-NAME CAR sexpr] + CAR sexpr = 'Union or CAR sexpr = 'Record => + [DNameApplyID, name0, + [DNameTupleID,: [ SExprToDName(sx, 'T) for sx in CDR sexpr]]] + newCosig := CDR GETDATABASE(CAR sexpr, QUOTE COSIG) + [DNameApplyID, name0, + : MAPCAR(function SExprToDName, CDR sexpr, newCosig)] + +-- local garbage because Compiler strings are null terminated +StringToCompStr(str) == + CONCATENATE(QUOTE STRING, str, STRING (CODE_-CHAR 0)) + +CompStrToString(str) == + SUBSTRING(str, 0, (LENGTH str - 1)) +-- local garbage ends + +runOldAxiomFunctor(:allArgs) == + [:args,env] := allArgs + GETDATABASE(env, 'CONSTRUCTORKIND) = 'category => + [$oldAxiomPreCategoryDispatch,: [env, :args]] + dom:=APPLY(env, args) + makeOldAxiomDispatchDomain dom + +makeLazyOldAxiomDispatchDomain domform == + attribute? domform => + [$attributeDispatch, domform, hashString(SYMBOL_-NAME domform)] + GETDATABASE(opOf domform, 'CONSTRUCTORKIND) = 'category => + [$oldAxiomPreCategoryDispatch,: domform] + dd := [$lazyOldAxiomDomainDispatch, hashTypeForm(domform,0), domform] + NCONC(dd,dd) -- installs back pointer to head of domain. + dd + +makeOldAxiomDispatchDomain dom == + PAIRP dom => dom + [$oldAxiomDomainDispatch,hashTypeForm(dom.0,0),:dom] + +closeOldAxiomFunctor(name) == + [function runOldAxiomFunctor,:SYMBOL_-FUNCTION name] + +lazyOldAxiomDomainLookupExport(domenv, self, op, sig, box, skipdefaults, env) == + dom := instantiate domenv + SPADCALL(CDR dom, self, op, sig, box, skipdefaults, CAR(dom).3) + +lazyOldAxiomDomainHashCode(domenv, env) == CAR domenv + +lazyOldAxiomDomainDevaluate(domenv, env) == + dom := instantiate domenv + SPADCALL(CDR dom, CAR(dom).1) + +lazyOldAxiomAddChild(domenv, kid, env) == + CONS($lazyOldAxiomDomainDispatch,domenv) + +$lazyOldAxiomDomainDispatch := + VECTOR('lazyOldAxiomDomain, + [function lazyOldAxiomDomainDevaluate], + [nil], + [function lazyOldAxiomDomainLookupExport], + [function lazyOldAxiomDomainHashCode], + [function lazyOldAxiomAddChild]) + +-- old Axiom pre category objects are just (dispatch . catform) +-- where catform is ('categoryname,: evaluated args) +-- old Axiom category objects are (dispatch . [catform, hashcode, defaulting package, parent vector, dom]) +oldAxiomPreCategoryBuild(catform, dom, env) == + pack := oldAxiomCategoryDefaultPackage(catform, dom) + CONS($oldAxiomCategoryDispatch, + [catform, hashTypeForm(catform,0), pack, oldAxiomPreCategoryParents(catform,dom), dom]) +oldAxiomPreCategoryHashCode(catform, env) == hashTypeForm(catform,0) +oldAxiomCategoryDefaultPackage(catform, dom) == + hasDefaultPackage opOf catform + +oldAxiomPreCategoryDevaluate([op,:args], env) == + SExprToDName([op,:devaluateList args], T) + +$oldAxiomPreCategoryDispatch := + VECTOR('oldAxiomPreCategory, + [function oldAxiomPreCategoryDevaluate], + [nil], + [nil], + [function oldAxiomPreCategoryHashCode], + [function oldAxiomPreCategoryBuild], + [nil]) + +oldAxiomCategoryDevaluate([[op,:args],:.], env) == + SExprToDName([op,:devaluateList args], T) + +oldAxiomPreCategoryParents(catform,dom) == + vars := ["$",:rest GETDATABASE(opOf catform, 'CONSTRUCTORFORM)] + vals := [dom,:rest catform] + -- parents := GETDATABASE(opOf catform, 'PARENTS) + parents := parentsOf opOf catform + PROGV(vars, vals, + LIST2VEC + [EVAL quoteCatOp cat for [cat,:pred] in parents | EVAL pred]) + +quoteCatOp cat == + atom cat => MKQ cat + ['LIST, MKQ CAR cat,: CDR cat] + + +oldAxiomCategoryLookupExport(catenv, self, op, sig, box, env) == + [catform,hash, pack,:.] := catenv + opIsHasCat op => if EQL(sig, hash) then [self] else nil + NULL(pack) => nil + if not VECP pack then + pack:=apply(pack, CONS(self, rest catform)) + RPLACA(CDDR catenv, pack) + fun := basicLookup(op, sig, pack, self) => [fun] + nil + +oldAxiomCategoryParentCount([.,.,.,parents,.], env) == LENGTH parents +oldAxiomCategoryNthParent([.,.,.,parvec,dom], n, env) == + catform := ELT(parvec, n-1) + VECTORP KAR catform => catform + newcat := oldAxiomPreCategoryBuild(catform,dom,nil) + SETELT(parvec, n-1, newcat) + newcat + +oldAxiomCategoryBuild([catform,:.], dom, env) == + oldAxiomPreCategoryBuild(catform,dom, env) +oldAxiomCategoryHashCode([.,hash,:.], env) == hash + +$oldAxiomCategoryDispatch := + VECTOR('oldAxiomCategory, + [function oldAxiomCategoryDevaluate], + [nil], + [function oldAxiomCategoryLookupExport], + [function oldAxiomCategoryHashCode], + [function oldAxiomCategoryBuild], -- builder ?? + [function oldAxiomCategoryParentCount], + [function oldAxiomCategoryNthParent]) -- 1 indexed + +attributeDevaluate(attrObj, env) == + [name, hash] := attrObj + StringToCompStr SYMBOL_-NAME name + +attributeLookupExport(attrObj, self, op, sig, box, env) == + [name, hash] := attrObj + opIsHasCat op => if EQL(hash, sig) then [self] else nil + +attributeHashCode(attrObj, env) == + [name, hash] := attrObj + hash + +attributeCategoryBuild(attrObj, dom, env) == + [name, hash] := attrObj + [$attributeDispatch, name, hash] + +attributeCategoryParentCount(attrObj, env) == 0 + +attributeNthParent(attrObj, env) == nil + +$attributeDispatch := + VECTOR('attribute, + [function attributeDevaluate], + [nil], + [function attributeLookupExport], + [function attributeHashCode], + [function attributeCategoryBuild], -- builder ?? + [function attributeCategoryParentCount], + [function attributeNthParent]) -- 1 indexed + + +orderedDefaults(conform,domform) == + $depthAssocCache : local := MAKE_-HASHTABLE 'ID + conList := [x for x in orderCatAnc (op := opOf conform) | hasDefaultPackage op] + acc := nil + ancestors := ancestorsOf(conform,domform) + for x in conList repeat + for y in ancestors | x = CAAR y repeat acc := [y,:acc] + NREVERSE acc + +instantiate domenv == + -- following is a patch for a bug in runtime.as + -- has a lazy dispatch vector with an instantiated domenv + VECTORP CDR domenv => [$oldAxiomDomainDispatch ,: domenv] + callForm := CADR domenv + oldDom := CDDR domenv + [functor,:args] := callForm +-- if null(fn := GETL(functor,'instantiate)) then +-- ofn := SYMBOL_-FUNCTION functor +-- loadFunctor functor +-- fn := SYMBOL_-FUNCTION functor +-- SETF(SYMBOL_-FUNCTION functor, ofn) +-- PUT(functor, 'instantiate, fn) +-- domvec := APPLY(fn, args) + domvec := APPLY(functor, args) + RPLACA(oldDom, $oldAxiomDomainDispatch) + RPLACD(oldDom, [CADR oldDom,: domvec]) + oldDom + +hashTypeForm([fn,: args], percentHash) == + hashType([fn,:devaluateList args], percentHash) + +--------------------> NEW DEFINITION (override in i-util.boot.pamphlet) +devaluate(d) == + isDomain d => + -- ?need a shortcut for old domains + -- ELT(CAR d, 0) = 'oldAxiomDomain => ... + -- FIXP(ELT(CAR d,0)) => d + DNameToSExpr(SPADCALL(CDR d,CAR(d).1)) + not REFVECP d => d + QSGREATERP(QVSIZE d,5) and QREFELT(d,3) is ['Category] => QREFELT(d,0) + QSGREATERP(QVSIZE d,0) => + d':=QREFELT(d,0) + isFunctor d' => d' + d + d + +$hashOp1 := hashString '"1" +$hashOp0 := hashString '"0" +$hashOpApply := hashString '"apply" +$hashOpSet := hashString '"set!" +$hashSeg := hashString '".." +$hashPercent := hashString '"%" + +oldAxiomDomainLookupExport _ + (domenv, self, op, sig, box, skipdefaults, env) == + domainVec := CDR domenv + if hashCode? op then + EQL(op, $hashOp1) => op := 'One + EQL(op, $hashOp0) => op := 'Zero + EQL(op, $hashOpApply) => op := 'elt + EQL(op, $hashOpSet) => op := 'setelt + EQL(op, $hashSeg) => op := 'SEGMENT + constant := nil + if hashCode? sig and self and EQL(sig, getDomainHash self) then + sig := '($) + constant := true + val := + skipdefaults => + oldCompLookupNoDefaults(op, sig, domainVec, self) + oldCompLookup(op, sig, domainVec, self) + null val => val + if constant then val := SPADCALL val + RPLACA(box, val) + box + +oldAxiomDomainHashCode(domenv, env) == CAR domenv + +oldAxiomDomainHasCategory(domenv, cat, env) == + HasAttribute(domvec := CDR domenv, cat) or + HasCategory(domvec, devaluate cat) + +oldAxiomDomainDevaluate(domenv, env) == + SExprToDName(CDR(domenv).0, 'T) + +oldAxiomAddChild(domenv, child, env) == CONS($oldAxiomDomainDispatch, domenv) + +$oldAxiomDomainDispatch := + VECTOR('oldAxiomDomain, + [function oldAxiomDomainDevaluate], + [nil], + [function oldAxiomDomainLookupExport], + [function oldAxiomDomainHashCode], + [function oldAxiomAddChild]) + +--------------------> NEW DEFINITION (see g-util.boot.pamphlet) +isDomain a == + PAIRP a and VECP(CAR a) and + member(CAR(a).0, $domainTypeTokens) + +-- following is interpreter interfact to function lookup +-- perhaps it should always work with hashcodes for signature? +--------------------> NEW DEFINITION (override in nrungo.boot.pamphlet) +NRTcompiledLookup(op,sig,dom) == + if CONTAINED('_#,sig) then + sig := [NRTtypeHack t for t in sig] + hashCode? sig => compiledLookupCheck(op,sig,dom) + (fn := compiledLookup(op,sig,dom)) => fn + percentHash := + VECP dom => hashType(dom.0, 0) + getDomainHash dom + compiledLookupCheck(op, hashType(['Mapping,:sig], percentHash), dom) + +--------------------> NEW DEFINITION (override in nrungo.boot.pamphlet) +compiledLookup(op, sig, dollar) == + if not isDomain dollar then dollar := NRTevalDomain dollar + basicLookup(op, sig, dollar, dollar) + +--------------------> NEW DEFINITION (override in nrungo.boot.pamphlet) +basicLookup(op,sig,domain,dollar) == + -- following case is for old domains like Record and Union + -- or for getting operations out of yourself + VECP domain => + isNewWorldDomain domain => -- getting ops from yourself (or for defaults) + oldCompLookup(op, sig, domain, dollar) + -- getting ops from Record or Union + lookupInDomainVector(op,sig,domain,dollar) + hashPercent := + VECP dollar => hashType(dollar.0,0) + hashType(dollar,0) + box := [nil] + not VECP(dispatch := CAR domain) => error "bad domain format" + lookupFun := dispatch.3 + dispatch.0 = 0 => -- new compiler domain object + hashSig := + hashCode? sig => sig + opIsHasCat op => hashType(sig, hashPercent) + hashType(['Mapping,:sig], hashPercent) + + if SYMBOLP op then + op = 'Zero => op := $hashOp0 + op = 'One => op := $hashOp1 + op = 'elt => op := $hashOpApply + op = 'setelt => op := $hashOpSet + op := hashString SYMBOL_-NAME op + val:=CAR SPADCALL(CDR domain, dollar, op, hashSig, box, false, + lookupFun) => val + hashCode? sig => nil + #sig>1 or opIsHasCat op => nil + boxval := SPADCALL(CDR dollar, dollar, op, hashType(first sig, hashPercent), + box, false, lookupFun) => + [FUNCTION IDENTITY,: CAR boxval] + nil + opIsHasCat op => + HasCategory(domain, sig) + if hashCode? op then + EQL(op, $hashOp1) => op := 'One + EQL(op, $hashOp0) => op := 'Zero + EQL(op, $hashOpApply) => op := 'elt + EQL(op, $hashOpSet) => op := 'setelt + EQL(op, $hashSeg) => op := 'SEGMENT + hashCode? sig and EQL(sig, hashPercent) => + SPADCALL CAR SPADCALL(CDR dollar, dollar, op, '($), box, false, lookupFun) + CAR SPADCALL(CDR dollar, dollar, op, sig, box, false, lookupFun) + +basicLookupCheckDefaults(op,sig,domain,dollar) == + box := [nil] + not VECP(dispatch := CAR dollar) => error "bad domain format" + lookupFun := dispatch.3 + dispatch.0 = 0 => -- new compiler domain object + hashPercent := + VECP dollar => hashType(dollar.0,0) + hashType(dollar,0) + + hashSig := + hashCode? sig => sig + hashType( ['Mapping,:sig], hashPercent) + + if SYMBOLP op then op := hashString SYMBOL_-NAME op + CAR SPADCALL(CDR dollar, dollar, op, hashSig, box, not $lookupDefaults, lookupFun) + CAR SPADCALL(CDR dollar, dollar, op, sig, box, not $lookupDefaults, lookupFun) + +$hasCatOpHash := hashString '"%%" +opIsHasCat op == + hashCode? op => EQL(op, $hasCatOpHash) + EQ(op, "%%") + +-- has cat questions lookup up twice if false +-- replace with following ? +-- not(opIsHasCat op) and +-- (u := lookupInDomainVector(op,sig,domvec,domvec)) => u + +oldCompLookup(op, sig, domvec, dollar) == + $lookupDefaults:local := nil + u := lookupInDomainVector(op,sig,domvec,dollar) => u + $lookupDefaults := true + lookupInDomainVector(op,sig,domvec,dollar) + +oldCompLookupNoDefaults(op, sig, domvec, dollar) == + $lookupDefaults:local := nil + lookupInDomainVector(op,sig,domvec,dollar) + +--------------------> NEW DEFINITION (override in nrungo.boot.pamphlet) +lookupInDomainVector(op,sig,domain,dollar) == + PAIRP domain => basicLookupCheckDefaults(op,sig,domain,domain) + slot1 := domain.1 + SPADCALL(op,sig,dollar,slot1) + +--------------------> NEW DEFINITION (override in nrunfast.boot.pamphlet) +lookupComplete(op,sig,dollar,env) == + hashCode? sig => hashNewLookupInTable(op,sig,dollar,env,nil) + newLookupInTable(op,sig,dollar,env,nil) + +--------------------> NEW DEFINITION (override in nrunfast.boot.pamphlet) +lookupIncomplete(op,sig,dollar,env) == + hashCode? sig => hashNewLookupInTable(op,sig,dollar,env,true) + newLookupInTable(op,sig,dollar,env,true) + +--------------------> NEW DEFINITION (override in nrunfast.boot.pamphlet) +lookupInCompactTable(op,sig,dollar,env) == + hashCode? sig => hashNewLookupInTable(op,sig,dollar,env,true) + newLookupInTable(op,sig,dollar,env,true) + +--------------------> NEW DEFINITION (override in nrunfast.boot.pamphlet) +lazyMatchArg2(s,a,dollar,domain,typeFlag) == + if s = '$ then +-- a = 0 => return true --needed only if extra call in newGoGet to basicLookup + s := devaluate dollar -- calls from HasCategory can have $s + INTEGERP a => + not typeFlag => s = domain.a + a = 6 and $isDefaultingPackage => s = devaluate dollar + VECP (d := domainVal(dollar,domain,a)) => + s = d.0 => true + domainArg := ($isDefaultingPackage => domain.6.0; domain.0) + KAR s = QCAR d.0 and lazyMatchArgDollarCheck(s,d.0,dollar.0,domainArg) + --VECP CAR d => lazyMatch(s,CDDR d,dollar,domain) --old style (erase) + isDomain d => + dhash:=getDomainHash d + dhash = + (if hashCode? s then s else hashType(s, dhash)) +-- s = devaluate d + lazyMatch(s,d,dollar,domain) --new style + a = '$ => s = devaluate dollar + a = "$$" => s = devaluate domain + STRINGP a => + STRINGP s => a = s + s is ['QUOTE,y] and PNAME y = a + IDENTP s and PNAME s = a + atom a => a = s + op := opOf a + op = 'NRTEVAL => s = nrtEval(CADR a,domain) + op = 'QUOTE => s = CADR a + lazyMatch(s,a,dollar,domain) + --above line is temporarily necessary until system is compiled 8/15/90 +--s = a + +--------------------> NEW DEFINITION (override in nrunfast.boot.pamphlet) +getOpCode(op,vec,max) == +--search Op vector for "op" returning code if found, nil otherwise + res := nil + hashCode? op => + for i in 0..max by 2 repeat + EQL(hashString PNAME QVELT(vec,i),op) => return (res := QSADD1 i) + res + for i in 0..max by 2 repeat + EQ(QVELT(vec,i),op) => return (res := QSADD1 i) + res + +hashNewLookupInTable(op,sig,dollar,[domain,opvec],flag) == + opIsHasCat op => + HasCategory(domain, sig) + if hashCode? op and EQL(op, $hashOp1) then op := 'One + if hashCode? op and EQL(op, $hashOp0) then op := 'Zero + hashPercent := + VECP dollar => hashType(dollar.0,0) + hashType(dollar,0) + if hashCode? sig and EQL(sig, hashPercent) then + sig := hashType('(Mapping $), hashPercent) + dollar = nil => systemError() + $lookupDefaults = true => + hashNewLookupInCategories(op,sig,domain,dollar) --lookup first in my cats + or newLookupInAddChain(op,sig,domain,dollar) + --fast path when called from newGoGet + success := false + if $monitorNewWorld then + sayLooking(concat('"---->",form2String devaluate domain, + '"----> searching op table for:","%l"," "),op,sig,dollar) + someMatch := false + numvec := getDomainByteVector domain + predvec := domain.3 + max := MAXINDEX opvec + k := getOpCode(op,opvec,max) or return + flag => newLookupInAddChain(op,sig,domain,dollar) + nil + maxIndex := MAXINDEX numvec + start := ELT(opvec,k) + finish := + QSGREATERP(max,k) => opvec.(QSPLUS(k,2)) + maxIndex + if QSGREATERP(finish,maxIndex) then systemError '"limit too large" + numArgs := if hashCode? sig then -1 else (#sig)-1 + success := nil + $isDefaultingPackage: local := + -- use special defaulting handler when dollar non-trivial + dollar ^= domain and isDefaultPackageForm? devaluate domain + while finish > start repeat + PROGN + i := start + numTableArgs :=numvec.i + predIndex := numvec.(i := QSADD1 i) + (predIndex ^= 0) and null testBitVector(predvec,predIndex) => nil + exportSig := + [newExpandTypeSlot(numvec.(i + j + 1), + dollar,domain) for j in 0..numTableArgs] + sig ^= hashType(['Mapping,: exportSig],hashPercent) => nil --signifies no match + loc := numvec.(i + numTableArgs + 2) + loc = 1 => (someMatch := true) + loc = 0 => + start := QSPLUS(start,QSPLUS(numTableArgs,4)) + i := start + 2 + someMatch := true --mark so that if subsumption fails, look for original + subsumptionSig := + [newExpandTypeSlot(numvec.(QSPLUS(i,j)), + dollar,domain) for j in 0..numTableArgs] + if $monitorNewWorld then + sayBrightly [formatOpSignature(op,sig),'"--?-->", + formatOpSignature(op,subsumptionSig)] + nil + slot := domain.loc + null atom slot => + EQ(QCAR slot,'newGoGet) => someMatch:=true + --treat as if operation were not there + --if EQ(QCAR slot,'newGoGet) then + -- UNWIND_-PROTECT --break infinite recursion + -- ((SETELT(domain,loc,'skip); slot := replaceGoGetSlot QCDR slot), + -- if domain.loc = 'skip then domain.loc := slot) + return (success := slot) + slot = 'skip => --recursive call from above 'replaceGoGetSlot + return (success := newLookupInAddChain(op,sig,domain,dollar)) + systemError '"unexpected format" + start := QSPLUS(start,QSPLUS(numTableArgs,4)) + (success ^= 'failed) and success => + if $monitorNewWorld then + sayLooking1('"<----",uu) where uu() == + PAIRP success => [first success,:devaluate rest success] + success + success + subsumptionSig and (u:= basicLookup(op,subsumptionSig,domain,dollar)) => u + flag or someMatch => newLookupInAddChain(op,sig,domain,dollar) + nil + +--------------------> NEW DEFINITION (override in nrunfast.boot.pamphlet) +newExpandLocalType(lazyt,dollar,domain) == + VECP lazyt => lazyt.0 + isDomain lazyt => devaluate lazyt + ATOM lazyt => lazyt + lazyt is [vec,.,:lazyForm] and VECP vec => --old style + newExpandLocalTypeForm(lazyForm,dollar,domain) + newExpandLocalTypeForm(lazyt,dollar,domain) --new style + +hashNewLookupInCategories(op,sig,dom,dollar) == + slot4 := dom.4 + catVec := CADR slot4 + SIZE catVec = 0 => nil --early exit if no categories + INTEGERP KDR catVec.0 => + newLookupInCategories1(op,sig,dom,dollar) --old style + $lookupDefaults : local := nil + if $monitorNewWorld = true then sayBrightly concat('"----->", + form2String devaluate dom,'"-----> searching default packages for ",op) + predvec := dom.3 + packageVec := QCAR slot4 +--the next three lines can go away with new category world + varList := ['$,:$FormalMapVariableList] + valueList := [dom,:[dom.(5+i) for i in 1..(# rest dom.0)]] + valueList := [MKQ val for val in valueList] + nsig := MSUBST(dom.0,dollar.0,sig) + for i in 0..MAXINDEX packageVec | + (entry := packageVec.i) and entry ^= 'T repeat + package := + VECP entry => + if $monitorNewWorld then + sayLooking1('"already instantiated cat package",entry) + entry + IDENTP entry => + cat := catVec.i + packageForm := nil + if not GETL(entry,'LOADED) then loadLib entry + infovec := GETL(entry,'infovec) + success := + --VECP infovec => ----new world + true => ----new world + opvec := infovec.1 + max := MAXINDEX opvec + code := getOpCode(op,opvec,max) + null code => nil + byteVector := CDDDR infovec.3 + endPos := + code+2 > max => SIZE byteVector + opvec.(code+2) + --not nrunNumArgCheck(#(QCDR sig),byteVector,opvec.code,endPos) => nil + --numOfArgs := byteVector.(opvec.code) + --numOfArgs ^= #(QCDR sig) => nil + packageForm := [entry,'$,:CDR cat] + package := evalSlotDomain(packageForm,dom) + packageVec.i := package + package + ----old world + table := HGET($Slot1DataBase,entry) or systemError nil + (u := LASSQ(op,table)) + and (v := or/[rest x for x in u]) => + packageForm := [entry,'$,:CDR cat] + package := evalSlotDomain(packageForm,dom) + packageVec.i := package + package + nil + null success => + if $monitorNewWorld = true then + sayBrightlyNT '" not in: " + pp (packageForm and devaluate package or entry) + nil + if $monitorNewWorld then + sayLooking1('"candidate default package instantiated: ",success) + success + entry + null package => nil + if $monitorNewWorld then + sayLooking1('"Looking at instantiated package ",package) + res := basicLookup(op,sig,package,dollar) => + if $monitorNewWorld = true then + sayBrightly '"candidate default package succeeds" + return res + if $monitorNewWorld = true then + sayBrightly '"candidate fails -- continuing to search categories" + nil + +--------------------> NEW DEFINITION (override in nrunfast.boot.pamphlet) +replaceGoGetSlot env == + [thisDomain,index,:op] := env + thisDomainForm := devaluate thisDomain + bytevec := getDomainByteVector thisDomain + numOfArgs := bytevec.index + goGetDomainSlotIndex := bytevec.(index := QSADD1 index) + goGetDomain := + goGetDomainSlotIndex = 0 => thisDomain + thisDomain.goGetDomainSlotIndex + if PAIRP goGetDomain and SYMBOLP CAR goGetDomain then + goGetDomain := lazyDomainSet(goGetDomain,thisDomain,goGetDomainSlotIndex) + sig := + [newExpandTypeSlot(bytevec.(index := QSADD1 index),thisDomain,thisDomain) + for i in 0..numOfArgs] + thisSlot := bytevec.(QSADD1 index) + if $monitorNewWorld then + sayLooking(concat('"%l","..",form2String thisDomainForm, + '" wants",'"%l",'" "),op,sig,goGetDomain) + slot := basicLookup(op,sig,goGetDomain,goGetDomain) + slot = nil => + $returnNowhereFromGoGet = true => + ['nowhere,:goGetDomain] --see newGetDomainOpTable + sayBrightly concat('"Function: ",formatOpSignature(op,sig), + '" is missing from domain: ",form2String goGetDomain.0) + keyedSystemError("S2NR0001",[op,sig,goGetDomain.0]) + if $monitorNewWorld then + sayLooking1(['"goget stuffing slot",:bright thisSlot,'"of "],thisDomain) + SETELT(thisDomain,thisSlot,slot) + if $monitorNewWorld then + sayLooking1('"<------",[CAR slot,:devaluate CDR slot]) + slot + +HasAttribute(domain,attrib) == + hashPercent := + VECP domain => hashType(domain.0,0) + hashType(domain,0) + isDomain domain => + FIXP((first domain).0) => + -- following call to hashType was missing 2nd arg. + -- getDomainHash domain added on 4/01/94 by RSS + basicLookup("%%",hashType(attrib, hashPercent),domain,domain) + HasAttribute(CDDR domain, attrib) +--> + isNewWorldDomain domain => newHasAttribute(domain,attrib) +--+ + (u := LASSOC(attrib,domain.2)) and lookupPred(first u,domain,domain) + +newHasAttribute(domain,attrib) == + hashPercent := + VECP domain => hashType(domain.0,0) + hashType(domain,0) + predIndex := + hashCode? attrib => + -- following call to hashType was missing 2nd arg. + -- hashPercent added by PAB 15/4/94 + or/[x for x in domain.2 | attrib = hashType(first x, hashPercent)] + LASSOC(attrib,domain.2) + predIndex => + EQ(predIndex,0) => true + predvec := domain.3 + testBitVector(predvec,predIndex) + false + +newHasCategory(domain,catform) == + catform = '(Type) => true + slot4 := domain.4 + auxvec := CAR slot4 + catvec := CADR slot4 + $isDefaultingPackage: local := isDefaultPackageForm? devaluate domain + #catvec > 0 and INTEGERP KDR catvec.0 => --old style + predIndex := lazyMatchAssocV1(catform,catvec,domain) + null predIndex => false + EQ(predIndex,0) => true + predvec := QVELT(domain,3) + testBitVector(predvec,predIndex) + lazyMatchAssocV(catform,auxvec,catvec,domain) --new style + +--------------------> NEW DEFINITION (override in nrunfast.boot.pamphlet) +lazyMatchAssocV(x,auxvec,catvec,domain) == --new style slot4 + n : FIXNUM := MAXINDEX catvec + -- following call to hashType was missing 2nd arg. 0 added on 3/31/94 by RSS + hashCode? x => + percentHash := + VECP domain => hashType(domain.0, 0) + getDomainHash domain + or/[ELT(auxvec,i) for i in 0..n | + x = hashType(newExpandLocalType(QVELT(catvec,i),domain,domain), percentHash)] + xop := CAR x + or/[ELT(auxvec,i) for i in 0..n | + --xop = CAR (lazyt := QVELT(catvec,i)) and lazyMatch(x,lazyt,domain,domain)] + xop = CAR (lazyt := getCatForm(catvec,i,domain)) and lazyMatch(x,lazyt,domain,domain)] + +getCatForm(catvec, index, domain) == + NUMBERP(form := QVELT(catvec,index)) => domain.form + form + +has(domain,catform') == HasCategory(domain,catform') + +HasCategory(domain,catform') == + catform' is ['SIGNATURE,:f] => HasSignature(domain,f) + catform' is ['ATTRIBUTE,f] => HasAttribute(domain,f) + isDomain domain => + FIXP((first domain).0) => + catform' := devaluate catform' + basicLookup("%%",catform',domain,domain) + HasCategory(CDDR domain, catform') + catform:= devaluate catform' + isNewWorldDomain domain => newHasCategory(domain,catform) + domain0:=domain.0 -- handles old style domains, Record, Union etc. + slot4 := domain.4 + catlist := slot4.1 + member(catform,catlist) or + MEMQ(opOf(catform),'(Object Type)) or --temporary hack + or/[compareSigEqual(catform,cat,domain0,domain) for cat in catlist] + +--systemDependentMkAutoload(fn,cnam) == +-- FBOUNDP(cnam) => "next" +-- SETF(SYMBOL_-FUNCTION cnam,mkAutoLoad(fn, cnam)) + +--------------------> NEW DEFINITION (override in nrunfast.boot.pamphlet) +lazyDomainSet(lazyForm,thisDomain,slot) == + form := + --lazyForm is [vec,.,:u] and VECP vec => u --old style + lazyForm --new style + slotDomain := evalSlotDomain(form,thisDomain) + if $monitorNewWorld then + sayLooking1(concat(form2String devaluate thisDomain, + '" activating lazy slot ",slot,'": "),slotDomain) +-- name := CAR form +--getInfovec name + SETELT(thisDomain,slot,slotDomain) + + +--------------------> NEW DEFINITION (override in template.boot.pamphlet) +evalSlotDomain(u,dollar) == + $returnNowhereFromGoGet: local := false + $ : fluid := dollar + $lookupDefaults : local := nil -- new world + isDomain u => u + u = '$ => dollar + u = "$$" => dollar + FIXP u => + VECP (y := dollar.u) => y + isDomain y => y + y is ['SETELT,:.] => eval y--lazy domains need to marked; this is dangerous? + y is [v,:.] => + VECP v => lazyDomainSet(y,dollar,u) --old style has [$,code,:lazyt] + constructor? v or MEMQ(v,'(Record Union Mapping)) => + lazyDomainSet(y,dollar,u) --new style has lazyt + y + y + u is ['NRTEVAL,y] => + y is ['ELT,:.] => evalSlotDomain(y,dollar) + eval y + u is ['QUOTE,y] => y + u is ['Record,:argl] => + FUNCALL('Record0,[[tag,:evalSlotDomain(dom,dollar)] + for [.,tag,dom] in argl]) + u is ['Union,:argl] and first argl is ['_:,.,.] => + APPLY('Union,[['_:,tag,evalSlotDomain(dom,dollar)] + for [.,tag,dom] in argl]) + u is ['spadConstant,d,n] => + dom := evalSlotDomain(d,dollar) + SPADCALL(dom . n) + u is ['ELT,d,n] => + dom := evalSlotDomain(d,dollar) + slot := dom . n + slot is ['newGoGet,:env] => replaceGoGetSlot env + slot + u is [op,:argl] => APPLY(op,[evalSlotDomain(x,dollar) for x in argl]) + systemErrorHere '"evalSlotDomain" + +--------------------> NEW DEFINITION (override in i-util.boot.pamphlet) +domainEqual(a,b) == + devaluate(a) = devaluate(b) + +--makeConstructorsAutoLoad() + +-- following changes should go back into xrun.boot +-- patched version from xrun.boot +--------------------> NEW DEFINITION (override in clammed.boot.pamphlet) +--------------------> NEW DEFINITION (override in xrun.boot.pamphlet) +coerceConvertMmSelection(funName,m1,m2) == + -- calls selectMms with $Coerce=NIL and tests for required + -- target type. funName is either 'coerce or 'convert. + $declaredMode : local:= NIL + $reportBottomUpFlag : local:= NIL + l := selectMms1(funName,m2,[m1],[m1],NIL) +-- mmS := [[sig,[targ,arg],:pred] for x in l | x is [sig,[.,arg],:pred] and + mmS := [x for x in l | x is [sig,:.] and hasCorrectTarget(m2,sig) and + sig is [dc,targ,oarg] and isEqualOrSubDomain(m1,oarg)] + mmS and CAR mmS + +--------------------> NEW DEFINITION (see i-funsel.boot.pamphlet) +getFunctionFromDomain(op,dc,args) == + -- finds the function op with argument types args in dc + -- complains, if no function or ambiguous + $reportBottomUpFlag:local:= NIL + member(CAR dc,$nonLisplibDomains) => + throwKeyedMsg("S2IF0002",[CAR dc]) + not constructor? CAR dc => + throwKeyedMsg("S2IF0003",[CAR dc]) + p:= findFunctionInDomain(op,dc,NIL,args,args,NIL,NIL) => +--+ + --sig := [NIL,:args] + domain := evalDomain dc + for mm in nreverse p until b repeat + [[.,:osig],nsig,:.] := mm + b := compiledLookup(op,nsig,domain) + b or throwKeyedMsg("S2IS0023",[op,dc]) + throwKeyedMsg("S2IF0004",[op,dc]) + diff --git a/src/interp/interop.boot.pamphlet b/src/interp/interop.boot.pamphlet deleted file mode 100644 index 88d4e560..00000000 --- a/src/interp/interop.boot.pamphlet +++ /dev/null @@ -1,933 +0,0 @@ -\documentclass{article} -\usepackage{axiom} - -\title{\File{src/interp/interop.boot} Pamphlet} -\author{The Axiom Team} - -\begin{document} -\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. - -@ -<<*>>= -<> - -)package "BOOT" - --- note domainObjects are now (dispatchVector hashCode . domainVector) --- lazy oldAxiomDomainObjects are (dispatchVector hashCode (Call form) . backptr), --- pre oldAxiomCategory is (dispatchVector . (cat form)) --- oldAxiomCategory objects are (dispatchVector . ( (cat form) hash defaultpack parentlist)) - -hashCode? x == INTEGERP x - -$domainTypeTokens := ['lazyOldAxiomDomain, 'oldAxiomDomain, 'oldAxiomPreCategory, - 'oldAxiomCategory, 0] - --- The name game. --- The compiler produces names that are of the form: --- a) cons(0, ) --- b) cons(1, type-name, arg-names...) --- c) cons(2, arg-names...) --- d) cons(3, value) --- NB: (c) is for tuple-ish constructors, --- and (d) is for dependent types. - -DNameStringID := 0 -DNameApplyID := 1 -DNameTupleID := 2 -DNameOtherID := 3 - -DNameToSExpr1 dname == - NULL dname => error "unexpected domain name" - CAR dname = DNameStringID => - INTERN(CompStrToString CDR dname) - name0 := DNameToSExpr1 CAR CDR dname - args := CDR CDR dname - name0 = '_-_> => - froms := CAR args - froms := MAPCAR(function DNameToSExpr, CDR froms) - ret := CAR CDR args -- a tuple - ret := DNameToSExpr CAR CDR ret -- contents - CONS('Mapping, CONS(ret, froms)) - name0 = 'Union or name0 = 'Record => - sxs := MAPCAR(function DNameToSExpr, CDR CAR args) - CONS(name0, sxs) - name0 = 'Enumeration => - CONS(name0, MAPCAR(function DNameFixEnum, CDR CAR args)) - CONS(name0, MAPCAR(function DNameToSExpr, args)) - -DNameToSExpr dname == - CAR dname = DNameOtherID => - CDR dname - sx := DNameToSExpr1 dname - CONSP sx => sx - LIST sx - -DNameFixEnum arg == CompStrToString CDR arg - -SExprToDName(sexpr, cosigVal) == - -- is it a non-type valued object? - NOT cosigVal => [DNameOtherID, :sexpr] - if CAR sexpr = '_: then sexpr := CAR CDR CDR sexpr - CAR sexpr = 'Mapping => - args := [ SExprToDName(sx, 'T) for sx in CDR sexpr] - [DNameApplyID, - [DNameStringID,: StringToCompStr '"->"], - [DNameTupleID, : CDR args], - [DNameTupleID, CAR args]] - name0 := [DNameStringID, : StringToCompStr SYMBOL_-NAME CAR sexpr] - CAR sexpr = 'Union or CAR sexpr = 'Record => - [DNameApplyID, name0, - [DNameTupleID,: [ SExprToDName(sx, 'T) for sx in CDR sexpr]]] - newCosig := CDR GETDATABASE(CAR sexpr, QUOTE COSIG) - [DNameApplyID, name0, - : MAPCAR(function SExprToDName, CDR sexpr, newCosig)] - --- local garbage because Compiler strings are null terminated -StringToCompStr(str) == - CONCATENATE(QUOTE STRING, str, STRING (CODE_-CHAR 0)) - -CompStrToString(str) == - SUBSTRING(str, 0, (LENGTH str - 1)) --- local garbage ends - -runOldAxiomFunctor(:allArgs) == - [:args,env] := allArgs - GETDATABASE(env, 'CONSTRUCTORKIND) = 'category => - [$oldAxiomPreCategoryDispatch,: [env, :args]] - dom:=APPLY(env, args) - makeOldAxiomDispatchDomain dom - -makeLazyOldAxiomDispatchDomain domform == - attribute? domform => - [$attributeDispatch, domform, hashString(SYMBOL_-NAME domform)] - GETDATABASE(opOf domform, 'CONSTRUCTORKIND) = 'category => - [$oldAxiomPreCategoryDispatch,: domform] - dd := [$lazyOldAxiomDomainDispatch, hashTypeForm(domform,0), domform] - NCONC(dd,dd) -- installs back pointer to head of domain. - dd - -makeOldAxiomDispatchDomain dom == - PAIRP dom => dom - [$oldAxiomDomainDispatch,hashTypeForm(dom.0,0),:dom] - -closeOldAxiomFunctor(name) == - [function runOldAxiomFunctor,:SYMBOL_-FUNCTION name] - -lazyOldAxiomDomainLookupExport(domenv, self, op, sig, box, skipdefaults, env) == - dom := instantiate domenv - SPADCALL(CDR dom, self, op, sig, box, skipdefaults, CAR(dom).3) - -lazyOldAxiomDomainHashCode(domenv, env) == CAR domenv - -lazyOldAxiomDomainDevaluate(domenv, env) == - dom := instantiate domenv - SPADCALL(CDR dom, CAR(dom).1) - -lazyOldAxiomAddChild(domenv, kid, env) == - CONS($lazyOldAxiomDomainDispatch,domenv) - -$lazyOldAxiomDomainDispatch := - VECTOR('lazyOldAxiomDomain, - [function lazyOldAxiomDomainDevaluate], - [nil], - [function lazyOldAxiomDomainLookupExport], - [function lazyOldAxiomDomainHashCode], - [function lazyOldAxiomAddChild]) - --- old Axiom pre category objects are just (dispatch . catform) --- where catform is ('categoryname,: evaluated args) --- old Axiom category objects are (dispatch . [catform, hashcode, defaulting package, parent vector, dom]) -oldAxiomPreCategoryBuild(catform, dom, env) == - pack := oldAxiomCategoryDefaultPackage(catform, dom) - CONS($oldAxiomCategoryDispatch, - [catform, hashTypeForm(catform,0), pack, oldAxiomPreCategoryParents(catform,dom), dom]) -oldAxiomPreCategoryHashCode(catform, env) == hashTypeForm(catform,0) -oldAxiomCategoryDefaultPackage(catform, dom) == - hasDefaultPackage opOf catform - -oldAxiomPreCategoryDevaluate([op,:args], env) == - SExprToDName([op,:devaluateList args], T) - -$oldAxiomPreCategoryDispatch := - VECTOR('oldAxiomPreCategory, - [function oldAxiomPreCategoryDevaluate], - [nil], - [nil], - [function oldAxiomPreCategoryHashCode], - [function oldAxiomPreCategoryBuild], - [nil]) - -oldAxiomCategoryDevaluate([[op,:args],:.], env) == - SExprToDName([op,:devaluateList args], T) - -oldAxiomPreCategoryParents(catform,dom) == - vars := ["$",:rest GETDATABASE(opOf catform, 'CONSTRUCTORFORM)] - vals := [dom,:rest catform] - -- parents := GETDATABASE(opOf catform, 'PARENTS) - parents := parentsOf opOf catform - PROGV(vars, vals, - LIST2VEC - [EVAL quoteCatOp cat for [cat,:pred] in parents | EVAL pred]) - -quoteCatOp cat == - atom cat => MKQ cat - ['LIST, MKQ CAR cat,: CDR cat] - - -oldAxiomCategoryLookupExport(catenv, self, op, sig, box, env) == - [catform,hash, pack,:.] := catenv - opIsHasCat op => if EQL(sig, hash) then [self] else nil - NULL(pack) => nil - if not VECP pack then - pack:=apply(pack, CONS(self, rest catform)) - RPLACA(CDDR catenv, pack) - fun := basicLookup(op, sig, pack, self) => [fun] - nil - -oldAxiomCategoryParentCount([.,.,.,parents,.], env) == LENGTH parents -oldAxiomCategoryNthParent([.,.,.,parvec,dom], n, env) == - catform := ELT(parvec, n-1) - VECTORP KAR catform => catform - newcat := oldAxiomPreCategoryBuild(catform,dom,nil) - SETELT(parvec, n-1, newcat) - newcat - -oldAxiomCategoryBuild([catform,:.], dom, env) == - oldAxiomPreCategoryBuild(catform,dom, env) -oldAxiomCategoryHashCode([.,hash,:.], env) == hash - -$oldAxiomCategoryDispatch := - VECTOR('oldAxiomCategory, - [function oldAxiomCategoryDevaluate], - [nil], - [function oldAxiomCategoryLookupExport], - [function oldAxiomCategoryHashCode], - [function oldAxiomCategoryBuild], -- builder ?? - [function oldAxiomCategoryParentCount], - [function oldAxiomCategoryNthParent]) -- 1 indexed - -attributeDevaluate(attrObj, env) == - [name, hash] := attrObj - StringToCompStr SYMBOL_-NAME name - -attributeLookupExport(attrObj, self, op, sig, box, env) == - [name, hash] := attrObj - opIsHasCat op => if EQL(hash, sig) then [self] else nil - -attributeHashCode(attrObj, env) == - [name, hash] := attrObj - hash - -attributeCategoryBuild(attrObj, dom, env) == - [name, hash] := attrObj - [$attributeDispatch, name, hash] - -attributeCategoryParentCount(attrObj, env) == 0 - -attributeNthParent(attrObj, env) == nil - -$attributeDispatch := - VECTOR('attribute, - [function attributeDevaluate], - [nil], - [function attributeLookupExport], - [function attributeHashCode], - [function attributeCategoryBuild], -- builder ?? - [function attributeCategoryParentCount], - [function attributeNthParent]) -- 1 indexed - - -orderedDefaults(conform,domform) == - $depthAssocCache : local := MAKE_-HASHTABLE 'ID - conList := [x for x in orderCatAnc (op := opOf conform) | hasDefaultPackage op] - acc := nil - ancestors := ancestorsOf(conform,domform) - for x in conList repeat - for y in ancestors | x = CAAR y repeat acc := [y,:acc] - NREVERSE acc - -instantiate domenv == - -- following is a patch for a bug in runtime.as - -- has a lazy dispatch vector with an instantiated domenv - VECTORP CDR domenv => [$oldAxiomDomainDispatch ,: domenv] - callForm := CADR domenv - oldDom := CDDR domenv - [functor,:args] := callForm --- if null(fn := GETL(functor,'instantiate)) then --- ofn := SYMBOL_-FUNCTION functor --- loadFunctor functor --- fn := SYMBOL_-FUNCTION functor --- SETF(SYMBOL_-FUNCTION functor, ofn) --- PUT(functor, 'instantiate, fn) --- domvec := APPLY(fn, args) - domvec := APPLY(functor, args) - RPLACA(oldDom, $oldAxiomDomainDispatch) - RPLACD(oldDom, [CADR oldDom,: domvec]) - oldDom - -hashTypeForm([fn,: args], percentHash) == - hashType([fn,:devaluateList args], percentHash) - ---------------------> NEW DEFINITION (override in i-util.boot.pamphlet) -devaluate(d) == - isDomain d => - -- ?need a shortcut for old domains - -- ELT(CAR d, 0) = 'oldAxiomDomain => ... - -- FIXP(ELT(CAR d,0)) => d - DNameToSExpr(SPADCALL(CDR d,CAR(d).1)) - not REFVECP d => d - QSGREATERP(QVSIZE d,5) and QREFELT(d,3) is ['Category] => QREFELT(d,0) - QSGREATERP(QVSIZE d,0) => - d':=QREFELT(d,0) - isFunctor d' => d' - d - d - -$hashOp1 := hashString '"1" -$hashOp0 := hashString '"0" -$hashOpApply := hashString '"apply" -$hashOpSet := hashString '"set!" -$hashSeg := hashString '".." -$hashPercent := hashString '"%" - -oldAxiomDomainLookupExport _ - (domenv, self, op, sig, box, skipdefaults, env) == - domainVec := CDR domenv - if hashCode? op then - EQL(op, $hashOp1) => op := 'One - EQL(op, $hashOp0) => op := 'Zero - EQL(op, $hashOpApply) => op := 'elt - EQL(op, $hashOpSet) => op := 'setelt - EQL(op, $hashSeg) => op := 'SEGMENT - constant := nil - if hashCode? sig and self and EQL(sig, getDomainHash self) then - sig := '($) - constant := true - val := - skipdefaults => - oldCompLookupNoDefaults(op, sig, domainVec, self) - oldCompLookup(op, sig, domainVec, self) - null val => val - if constant then val := SPADCALL val - RPLACA(box, val) - box - -oldAxiomDomainHashCode(domenv, env) == CAR domenv - -oldAxiomDomainHasCategory(domenv, cat, env) == - HasAttribute(domvec := CDR domenv, cat) or - HasCategory(domvec, devaluate cat) - -oldAxiomDomainDevaluate(domenv, env) == - SExprToDName(CDR(domenv).0, 'T) - -oldAxiomAddChild(domenv, child, env) == CONS($oldAxiomDomainDispatch, domenv) - -$oldAxiomDomainDispatch := - VECTOR('oldAxiomDomain, - [function oldAxiomDomainDevaluate], - [nil], - [function oldAxiomDomainLookupExport], - [function oldAxiomDomainHashCode], - [function oldAxiomAddChild]) - ---------------------> NEW DEFINITION (see g-util.boot.pamphlet) -isDomain a == - PAIRP a and VECP(CAR a) and - member(CAR(a).0, $domainTypeTokens) - --- following is interpreter interfact to function lookup --- perhaps it should always work with hashcodes for signature? ---------------------> NEW DEFINITION (override in nrungo.boot.pamphlet) -NRTcompiledLookup(op,sig,dom) == - if CONTAINED('_#,sig) then - sig := [NRTtypeHack t for t in sig] - hashCode? sig => compiledLookupCheck(op,sig,dom) - (fn := compiledLookup(op,sig,dom)) => fn - percentHash := - VECP dom => hashType(dom.0, 0) - getDomainHash dom - compiledLookupCheck(op, hashType(['Mapping,:sig], percentHash), dom) - ---------------------> NEW DEFINITION (override in nrungo.boot.pamphlet) -compiledLookup(op, sig, dollar) == - if not isDomain dollar then dollar := NRTevalDomain dollar - basicLookup(op, sig, dollar, dollar) - ---------------------> NEW DEFINITION (override in nrungo.boot.pamphlet) -basicLookup(op,sig,domain,dollar) == - -- following case is for old domains like Record and Union - -- or for getting operations out of yourself - VECP domain => - isNewWorldDomain domain => -- getting ops from yourself (or for defaults) - oldCompLookup(op, sig, domain, dollar) - -- getting ops from Record or Union - lookupInDomainVector(op,sig,domain,dollar) - hashPercent := - VECP dollar => hashType(dollar.0,0) - hashType(dollar,0) - box := [nil] - not VECP(dispatch := CAR domain) => error "bad domain format" - lookupFun := dispatch.3 - dispatch.0 = 0 => -- new compiler domain object - hashSig := - hashCode? sig => sig - opIsHasCat op => hashType(sig, hashPercent) - hashType(['Mapping,:sig], hashPercent) - - if SYMBOLP op then - op = 'Zero => op := $hashOp0 - op = 'One => op := $hashOp1 - op = 'elt => op := $hashOpApply - op = 'setelt => op := $hashOpSet - op := hashString SYMBOL_-NAME op - val:=CAR SPADCALL(CDR domain, dollar, op, hashSig, box, false, - lookupFun) => val - hashCode? sig => nil - #sig>1 or opIsHasCat op => nil - boxval := SPADCALL(CDR dollar, dollar, op, hashType(first sig, hashPercent), - box, false, lookupFun) => - [FUNCTION IDENTITY,: CAR boxval] - nil - opIsHasCat op => - HasCategory(domain, sig) - if hashCode? op then - EQL(op, $hashOp1) => op := 'One - EQL(op, $hashOp0) => op := 'Zero - EQL(op, $hashOpApply) => op := 'elt - EQL(op, $hashOpSet) => op := 'setelt - EQL(op, $hashSeg) => op := 'SEGMENT - hashCode? sig and EQL(sig, hashPercent) => - SPADCALL CAR SPADCALL(CDR dollar, dollar, op, '($), box, false, lookupFun) - CAR SPADCALL(CDR dollar, dollar, op, sig, box, false, lookupFun) - -basicLookupCheckDefaults(op,sig,domain,dollar) == - box := [nil] - not VECP(dispatch := CAR dollar) => error "bad domain format" - lookupFun := dispatch.3 - dispatch.0 = 0 => -- new compiler domain object - hashPercent := - VECP dollar => hashType(dollar.0,0) - hashType(dollar,0) - - hashSig := - hashCode? sig => sig - hashType( ['Mapping,:sig], hashPercent) - - if SYMBOLP op then op := hashString SYMBOL_-NAME op - CAR SPADCALL(CDR dollar, dollar, op, hashSig, box, not $lookupDefaults, lookupFun) - CAR SPADCALL(CDR dollar, dollar, op, sig, box, not $lookupDefaults, lookupFun) - -$hasCatOpHash := hashString '"%%" -opIsHasCat op == - hashCode? op => EQL(op, $hasCatOpHash) - EQ(op, "%%") - --- has cat questions lookup up twice if false --- replace with following ? --- not(opIsHasCat op) and --- (u := lookupInDomainVector(op,sig,domvec,domvec)) => u - -oldCompLookup(op, sig, domvec, dollar) == - $lookupDefaults:local := nil - u := lookupInDomainVector(op,sig,domvec,dollar) => u - $lookupDefaults := true - lookupInDomainVector(op,sig,domvec,dollar) - -oldCompLookupNoDefaults(op, sig, domvec, dollar) == - $lookupDefaults:local := nil - lookupInDomainVector(op,sig,domvec,dollar) - ---------------------> NEW DEFINITION (override in nrungo.boot.pamphlet) -lookupInDomainVector(op,sig,domain,dollar) == - PAIRP domain => basicLookupCheckDefaults(op,sig,domain,domain) - slot1 := domain.1 - SPADCALL(op,sig,dollar,slot1) - ---------------------> NEW DEFINITION (override in nrunfast.boot.pamphlet) -lookupComplete(op,sig,dollar,env) == - hashCode? sig => hashNewLookupInTable(op,sig,dollar,env,nil) - newLookupInTable(op,sig,dollar,env,nil) - ---------------------> NEW DEFINITION (override in nrunfast.boot.pamphlet) -lookupIncomplete(op,sig,dollar,env) == - hashCode? sig => hashNewLookupInTable(op,sig,dollar,env,true) - newLookupInTable(op,sig,dollar,env,true) - ---------------------> NEW DEFINITION (override in nrunfast.boot.pamphlet) -lookupInCompactTable(op,sig,dollar,env) == - hashCode? sig => hashNewLookupInTable(op,sig,dollar,env,true) - newLookupInTable(op,sig,dollar,env,true) - ---------------------> NEW DEFINITION (override in nrunfast.boot.pamphlet) -lazyMatchArg2(s,a,dollar,domain,typeFlag) == - if s = '$ then --- a = 0 => return true --needed only if extra call in newGoGet to basicLookup - s := devaluate dollar -- calls from HasCategory can have $s - INTEGERP a => - not typeFlag => s = domain.a - a = 6 and $isDefaultingPackage => s = devaluate dollar - VECP (d := domainVal(dollar,domain,a)) => - s = d.0 => true - domainArg := ($isDefaultingPackage => domain.6.0; domain.0) - KAR s = QCAR d.0 and lazyMatchArgDollarCheck(s,d.0,dollar.0,domainArg) - --VECP CAR d => lazyMatch(s,CDDR d,dollar,domain) --old style (erase) - isDomain d => - dhash:=getDomainHash d - dhash = - (if hashCode? s then s else hashType(s, dhash)) --- s = devaluate d - lazyMatch(s,d,dollar,domain) --new style - a = '$ => s = devaluate dollar - a = "$$" => s = devaluate domain - STRINGP a => - STRINGP s => a = s - s is ['QUOTE,y] and PNAME y = a - IDENTP s and PNAME s = a - atom a => a = s - op := opOf a - op = 'NRTEVAL => s = nrtEval(CADR a,domain) - op = 'QUOTE => s = CADR a - lazyMatch(s,a,dollar,domain) - --above line is temporarily necessary until system is compiled 8/15/90 ---s = a - ---------------------> NEW DEFINITION (override in nrunfast.boot.pamphlet) -getOpCode(op,vec,max) == ---search Op vector for "op" returning code if found, nil otherwise - res := nil - hashCode? op => - for i in 0..max by 2 repeat - EQL(hashString PNAME QVELT(vec,i),op) => return (res := QSADD1 i) - res - for i in 0..max by 2 repeat - EQ(QVELT(vec,i),op) => return (res := QSADD1 i) - res - -hashNewLookupInTable(op,sig,dollar,[domain,opvec],flag) == - opIsHasCat op => - HasCategory(domain, sig) - if hashCode? op and EQL(op, $hashOp1) then op := 'One - if hashCode? op and EQL(op, $hashOp0) then op := 'Zero - hashPercent := - VECP dollar => hashType(dollar.0,0) - hashType(dollar,0) - if hashCode? sig and EQL(sig, hashPercent) then - sig := hashType('(Mapping $), hashPercent) - dollar = nil => systemError() - $lookupDefaults = true => - hashNewLookupInCategories(op,sig,domain,dollar) --lookup first in my cats - or newLookupInAddChain(op,sig,domain,dollar) - --fast path when called from newGoGet - success := false - if $monitorNewWorld then - sayLooking(concat('"---->",form2String devaluate domain, - '"----> searching op table for:","%l"," "),op,sig,dollar) - someMatch := false - numvec := getDomainByteVector domain - predvec := domain.3 - max := MAXINDEX opvec - k := getOpCode(op,opvec,max) or return - flag => newLookupInAddChain(op,sig,domain,dollar) - nil - maxIndex := MAXINDEX numvec - start := ELT(opvec,k) - finish := - QSGREATERP(max,k) => opvec.(QSPLUS(k,2)) - maxIndex - if QSGREATERP(finish,maxIndex) then systemError '"limit too large" - numArgs := if hashCode? sig then -1 else (#sig)-1 - success := nil - $isDefaultingPackage: local := - -- use special defaulting handler when dollar non-trivial - dollar ^= domain and isDefaultPackageForm? devaluate domain - while finish > start repeat - PROGN - i := start - numTableArgs :=numvec.i - predIndex := numvec.(i := QSADD1 i) - (predIndex ^= 0) and null testBitVector(predvec,predIndex) => nil - exportSig := - [newExpandTypeSlot(numvec.(i + j + 1), - dollar,domain) for j in 0..numTableArgs] - sig ^= hashType(['Mapping,: exportSig],hashPercent) => nil --signifies no match - loc := numvec.(i + numTableArgs + 2) - loc = 1 => (someMatch := true) - loc = 0 => - start := QSPLUS(start,QSPLUS(numTableArgs,4)) - i := start + 2 - someMatch := true --mark so that if subsumption fails, look for original - subsumptionSig := - [newExpandTypeSlot(numvec.(QSPLUS(i,j)), - dollar,domain) for j in 0..numTableArgs] - if $monitorNewWorld then - sayBrightly [formatOpSignature(op,sig),'"--?-->", - formatOpSignature(op,subsumptionSig)] - nil - slot := domain.loc - null atom slot => - EQ(QCAR slot,'newGoGet) => someMatch:=true - --treat as if operation were not there - --if EQ(QCAR slot,'newGoGet) then - -- UNWIND_-PROTECT --break infinite recursion - -- ((SETELT(domain,loc,'skip); slot := replaceGoGetSlot QCDR slot), - -- if domain.loc = 'skip then domain.loc := slot) - return (success := slot) - slot = 'skip => --recursive call from above 'replaceGoGetSlot - return (success := newLookupInAddChain(op,sig,domain,dollar)) - systemError '"unexpected format" - start := QSPLUS(start,QSPLUS(numTableArgs,4)) - (success ^= 'failed) and success => - if $monitorNewWorld then - sayLooking1('"<----",uu) where uu() == - PAIRP success => [first success,:devaluate rest success] - success - success - subsumptionSig and (u:= basicLookup(op,subsumptionSig,domain,dollar)) => u - flag or someMatch => newLookupInAddChain(op,sig,domain,dollar) - nil - ---------------------> NEW DEFINITION (override in nrunfast.boot.pamphlet) -newExpandLocalType(lazyt,dollar,domain) == - VECP lazyt => lazyt.0 - isDomain lazyt => devaluate lazyt - ATOM lazyt => lazyt - lazyt is [vec,.,:lazyForm] and VECP vec => --old style - newExpandLocalTypeForm(lazyForm,dollar,domain) - newExpandLocalTypeForm(lazyt,dollar,domain) --new style - -hashNewLookupInCategories(op,sig,dom,dollar) == - slot4 := dom.4 - catVec := CADR slot4 - SIZE catVec = 0 => nil --early exit if no categories - INTEGERP KDR catVec.0 => - newLookupInCategories1(op,sig,dom,dollar) --old style - $lookupDefaults : local := nil - if $monitorNewWorld = true then sayBrightly concat('"----->", - form2String devaluate dom,'"-----> searching default packages for ",op) - predvec := dom.3 - packageVec := QCAR slot4 ---the next three lines can go away with new category world - varList := ['$,:$FormalMapVariableList] - valueList := [dom,:[dom.(5+i) for i in 1..(# rest dom.0)]] - valueList := [MKQ val for val in valueList] - nsig := MSUBST(dom.0,dollar.0,sig) - for i in 0..MAXINDEX packageVec | - (entry := packageVec.i) and entry ^= 'T repeat - package := - VECP entry => - if $monitorNewWorld then - sayLooking1('"already instantiated cat package",entry) - entry - IDENTP entry => - cat := catVec.i - packageForm := nil - if not GETL(entry,'LOADED) then loadLib entry - infovec := GETL(entry,'infovec) - success := - --VECP infovec => ----new world - true => ----new world - opvec := infovec.1 - max := MAXINDEX opvec - code := getOpCode(op,opvec,max) - null code => nil - byteVector := CDDDR infovec.3 - endPos := - code+2 > max => SIZE byteVector - opvec.(code+2) - --not nrunNumArgCheck(#(QCDR sig),byteVector,opvec.code,endPos) => nil - --numOfArgs := byteVector.(opvec.code) - --numOfArgs ^= #(QCDR sig) => nil - packageForm := [entry,'$,:CDR cat] - package := evalSlotDomain(packageForm,dom) - packageVec.i := package - package - ----old world - table := HGET($Slot1DataBase,entry) or systemError nil - (u := LASSQ(op,table)) - and (v := or/[rest x for x in u]) => - packageForm := [entry,'$,:CDR cat] - package := evalSlotDomain(packageForm,dom) - packageVec.i := package - package - nil - null success => - if $monitorNewWorld = true then - sayBrightlyNT '" not in: " - pp (packageForm and devaluate package or entry) - nil - if $monitorNewWorld then - sayLooking1('"candidate default package instantiated: ",success) - success - entry - null package => nil - if $monitorNewWorld then - sayLooking1('"Looking at instantiated package ",package) - res := basicLookup(op,sig,package,dollar) => - if $monitorNewWorld = true then - sayBrightly '"candidate default package succeeds" - return res - if $monitorNewWorld = true then - sayBrightly '"candidate fails -- continuing to search categories" - nil - ---------------------> NEW DEFINITION (override in nrunfast.boot.pamphlet) -replaceGoGetSlot env == - [thisDomain,index,:op] := env - thisDomainForm := devaluate thisDomain - bytevec := getDomainByteVector thisDomain - numOfArgs := bytevec.index - goGetDomainSlotIndex := bytevec.(index := QSADD1 index) - goGetDomain := - goGetDomainSlotIndex = 0 => thisDomain - thisDomain.goGetDomainSlotIndex - if PAIRP goGetDomain and SYMBOLP CAR goGetDomain then - goGetDomain := lazyDomainSet(goGetDomain,thisDomain,goGetDomainSlotIndex) - sig := - [newExpandTypeSlot(bytevec.(index := QSADD1 index),thisDomain,thisDomain) - for i in 0..numOfArgs] - thisSlot := bytevec.(QSADD1 index) - if $monitorNewWorld then - sayLooking(concat('"%l","..",form2String thisDomainForm, - '" wants",'"%l",'" "),op,sig,goGetDomain) - slot := basicLookup(op,sig,goGetDomain,goGetDomain) - slot = nil => - $returnNowhereFromGoGet = true => - ['nowhere,:goGetDomain] --see newGetDomainOpTable - sayBrightly concat('"Function: ",formatOpSignature(op,sig), - '" is missing from domain: ",form2String goGetDomain.0) - keyedSystemError("S2NR0001",[op,sig,goGetDomain.0]) - if $monitorNewWorld then - sayLooking1(['"goget stuffing slot",:bright thisSlot,'"of "],thisDomain) - SETELT(thisDomain,thisSlot,slot) - if $monitorNewWorld then - sayLooking1('"<------",[CAR slot,:devaluate CDR slot]) - slot - -HasAttribute(domain,attrib) == - hashPercent := - VECP domain => hashType(domain.0,0) - hashType(domain,0) - isDomain domain => - FIXP((first domain).0) => - -- following call to hashType was missing 2nd arg. - -- getDomainHash domain added on 4/01/94 by RSS - basicLookup("%%",hashType(attrib, hashPercent),domain,domain) - HasAttribute(CDDR domain, attrib) ---> - isNewWorldDomain domain => newHasAttribute(domain,attrib) ---+ - (u := LASSOC(attrib,domain.2)) and lookupPred(first u,domain,domain) - -newHasAttribute(domain,attrib) == - hashPercent := - VECP domain => hashType(domain.0,0) - hashType(domain,0) - predIndex := - hashCode? attrib => - -- following call to hashType was missing 2nd arg. - -- hashPercent added by PAB 15/4/94 - or/[x for x in domain.2 | attrib = hashType(first x, hashPercent)] - LASSOC(attrib,domain.2) - predIndex => - EQ(predIndex,0) => true - predvec := domain.3 - testBitVector(predvec,predIndex) - false - -newHasCategory(domain,catform) == - catform = '(Type) => true - slot4 := domain.4 - auxvec := CAR slot4 - catvec := CADR slot4 - $isDefaultingPackage: local := isDefaultPackageForm? devaluate domain - #catvec > 0 and INTEGERP KDR catvec.0 => --old style - predIndex := lazyMatchAssocV1(catform,catvec,domain) - null predIndex => false - EQ(predIndex,0) => true - predvec := QVELT(domain,3) - testBitVector(predvec,predIndex) - lazyMatchAssocV(catform,auxvec,catvec,domain) --new style - ---------------------> NEW DEFINITION (override in nrunfast.boot.pamphlet) -lazyMatchAssocV(x,auxvec,catvec,domain) == --new style slot4 - n : FIXNUM := MAXINDEX catvec - -- following call to hashType was missing 2nd arg. 0 added on 3/31/94 by RSS - hashCode? x => - percentHash := - VECP domain => hashType(domain.0, 0) - getDomainHash domain - or/[ELT(auxvec,i) for i in 0..n | - x = hashType(newExpandLocalType(QVELT(catvec,i),domain,domain), percentHash)] - xop := CAR x - or/[ELT(auxvec,i) for i in 0..n | - --xop = CAR (lazyt := QVELT(catvec,i)) and lazyMatch(x,lazyt,domain,domain)] - xop = CAR (lazyt := getCatForm(catvec,i,domain)) and lazyMatch(x,lazyt,domain,domain)] - -getCatForm(catvec, index, domain) == - NUMBERP(form := QVELT(catvec,index)) => domain.form - form - -has(domain,catform') == HasCategory(domain,catform') - -HasCategory(domain,catform') == - catform' is ['SIGNATURE,:f] => HasSignature(domain,f) - catform' is ['ATTRIBUTE,f] => HasAttribute(domain,f) - isDomain domain => - FIXP((first domain).0) => - catform' := devaluate catform' - basicLookup("%%",catform',domain,domain) - HasCategory(CDDR domain, catform') - catform:= devaluate catform' - isNewWorldDomain domain => newHasCategory(domain,catform) - domain0:=domain.0 -- handles old style domains, Record, Union etc. - slot4 := domain.4 - catlist := slot4.1 - member(catform,catlist) or - MEMQ(opOf(catform),'(Object Type)) or --temporary hack - or/[compareSigEqual(catform,cat,domain0,domain) for cat in catlist] - ---systemDependentMkAutoload(fn,cnam) == --- FBOUNDP(cnam) => "next" --- SETF(SYMBOL_-FUNCTION cnam,mkAutoLoad(fn, cnam)) - ---------------------> NEW DEFINITION (override in nrunfast.boot.pamphlet) -lazyDomainSet(lazyForm,thisDomain,slot) == - form := - --lazyForm is [vec,.,:u] and VECP vec => u --old style - lazyForm --new style - slotDomain := evalSlotDomain(form,thisDomain) - if $monitorNewWorld then - sayLooking1(concat(form2String devaluate thisDomain, - '" activating lazy slot ",slot,'": "),slotDomain) --- name := CAR form ---getInfovec name - SETELT(thisDomain,slot,slotDomain) - - ---------------------> NEW DEFINITION (override in template.boot.pamphlet) -evalSlotDomain(u,dollar) == - $returnNowhereFromGoGet: local := false - $ : fluid := dollar - $lookupDefaults : local := nil -- new world - isDomain u => u - u = '$ => dollar - u = "$$" => dollar - FIXP u => - VECP (y := dollar.u) => y - isDomain y => y - y is ['SETELT,:.] => eval y--lazy domains need to marked; this is dangerous? - y is [v,:.] => - VECP v => lazyDomainSet(y,dollar,u) --old style has [$,code,:lazyt] - constructor? v or MEMQ(v,'(Record Union Mapping)) => - lazyDomainSet(y,dollar,u) --new style has lazyt - y - y - u is ['NRTEVAL,y] => - y is ['ELT,:.] => evalSlotDomain(y,dollar) - eval y - u is ['QUOTE,y] => y - u is ['Record,:argl] => - FUNCALL('Record0,[[tag,:evalSlotDomain(dom,dollar)] - for [.,tag,dom] in argl]) - u is ['Union,:argl] and first argl is ['_:,.,.] => - APPLY('Union,[['_:,tag,evalSlotDomain(dom,dollar)] - for [.,tag,dom] in argl]) - u is ['spadConstant,d,n] => - dom := evalSlotDomain(d,dollar) - SPADCALL(dom . n) - u is ['ELT,d,n] => - dom := evalSlotDomain(d,dollar) - slot := dom . n - slot is ['newGoGet,:env] => replaceGoGetSlot env - slot - u is [op,:argl] => APPLY(op,[evalSlotDomain(x,dollar) for x in argl]) - systemErrorHere '"evalSlotDomain" - ---------------------> NEW DEFINITION (override in i-util.boot.pamphlet) -domainEqual(a,b) == - devaluate(a) = devaluate(b) - ---makeConstructorsAutoLoad() - --- following changes should go back into xrun.boot --- patched version from xrun.boot ---------------------> NEW DEFINITION (override in clammed.boot.pamphlet) ---------------------> NEW DEFINITION (override in xrun.boot.pamphlet) -coerceConvertMmSelection(funName,m1,m2) == - -- calls selectMms with $Coerce=NIL and tests for required - -- target type. funName is either 'coerce or 'convert. - $declaredMode : local:= NIL - $reportBottomUpFlag : local:= NIL - l := selectMms1(funName,m2,[m1],[m1],NIL) --- mmS := [[sig,[targ,arg],:pred] for x in l | x is [sig,[.,arg],:pred] and - mmS := [x for x in l | x is [sig,:.] and hasCorrectTarget(m2,sig) and - sig is [dc,targ,oarg] and isEqualOrSubDomain(m1,oarg)] - mmS and CAR mmS - ---------------------> NEW DEFINITION (see i-funsel.boot.pamphlet) -getFunctionFromDomain(op,dc,args) == - -- finds the function op with argument types args in dc - -- complains, if no function or ambiguous - $reportBottomUpFlag:local:= NIL - member(CAR dc,$nonLisplibDomains) => - throwKeyedMsg("S2IF0002",[CAR dc]) - not constructor? CAR dc => - throwKeyedMsg("S2IF0003",[CAR dc]) - p:= findFunctionInDomain(op,dc,NIL,args,args,NIL,NIL) => ---+ - --sig := [NIL,:args] - domain := evalDomain dc - for mm in nreverse p until b repeat - [[.,:osig],nsig,:.] := mm - b := compiledLookup(op,nsig,domain) - b or throwKeyedMsg("S2IS0023",[op,dc]) - throwKeyedMsg("S2IF0004",[op,dc]) - -@ - -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/interp/interp-fix.boot b/src/interp/interp-fix.boot new file mode 100644 index 00000000..d21bfd1b --- /dev/null +++ b/src/interp/interp-fix.boot @@ -0,0 +1,77 @@ +-- 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. + + +-- From newfort.boot: + +checkPrecision e == + -- Do we have a string? + CHAR_-CODE(CHAR(e,0)) = 34 => e + e := delete(char " ",STRINGIMAGE e) + $fortranPrecision = "double" => + iPart := SUBSEQ(e,0,(period:=POSITION(char ".",e))+1) + expt := if ePos := POSITION(char "E",e) then SUBSEQ(e,ePos+1) else "0" + rPart := + ePos => SUBSEQ(e,period+1,ePos) + period+1 < LENGTH e => SUBSEQ(e,period+1) + "0" + STRCONC(iPart,rPart,"D",expt) + e + +-- From i-eval.boot + +evaluateType1 form == + --evaluates the arguments passed to a constructor + [op,:argl]:= form + constructor? op => + null (sig := getConstructorSignature form) => + throwEvalTypeMsg("S2IE0005",[form]) + [.,:ml] := sig + ml := replaceSharps(ml,form) + # argl ^= #ml => throwEvalTypeMsg("S2IE0003",[form,form]) + for x in argl for m in ml for argnum in 1.. repeat + typeList := [v,:typeList] where v == + categoryForm?(m) => + m := evaluateType MSUBSTQ(x,'_$,m) + evalCategory(x' := (evaluateType x), m) => x' + throwEvalTypeMsg("S2IE0004",[form]) + + m := evaluateType m + GETDATABASE(opOf m,'CONSTRUCTORKIND) = 'domain and + (tree := mkAtree x) and putTarget(tree,m) and + ((bottomUp tree) is [m1]) and + (v:= coerceInteractive(getAndEvalConstructorArgument tree,m)) + => objValUnwrap v + if x = $EmptyMode then x := $quadSymbol + throwEvalTypeMsg("S2IE0006",[makeOrdinal argnum,m,form]) + [op,:NREVERSE typeList] + throwEvalTypeMsg("S2IE0007",[op]) + diff --git a/src/interp/interp-fix.boot.pamphlet b/src/interp/interp-fix.boot.pamphlet deleted file mode 100644 index c0edc418..00000000 --- a/src/interp/interp-fix.boot.pamphlet +++ /dev/null @@ -1,99 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/interp interp-fix.boot} -\author{The Axiom Team} -\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. - -@ -<<*>>= -<> - --- From newfort.boot: - -checkPrecision e == - -- Do we have a string? - CHAR_-CODE(CHAR(e,0)) = 34 => e - e := delete(char " ",STRINGIMAGE e) - $fortranPrecision = "double" => - iPart := SUBSEQ(e,0,(period:=POSITION(char ".",e))+1) - expt := if ePos := POSITION(char "E",e) then SUBSEQ(e,ePos+1) else "0" - rPart := - ePos => SUBSEQ(e,period+1,ePos) - period+1 < LENGTH e => SUBSEQ(e,period+1) - "0" - STRCONC(iPart,rPart,"D",expt) - e - --- From i-eval.boot - -evaluateType1 form == - --evaluates the arguments passed to a constructor - [op,:argl]:= form - constructor? op => - null (sig := getConstructorSignature form) => - throwEvalTypeMsg("S2IE0005",[form]) - [.,:ml] := sig - ml := replaceSharps(ml,form) - # argl ^= #ml => throwEvalTypeMsg("S2IE0003",[form,form]) - for x in argl for m in ml for argnum in 1.. repeat - typeList := [v,:typeList] where v == - categoryForm?(m) => - m := evaluateType MSUBSTQ(x,'_$,m) - evalCategory(x' := (evaluateType x), m) => x' - throwEvalTypeMsg("S2IE0004",[form]) - - m := evaluateType m - GETDATABASE(opOf m,'CONSTRUCTORKIND) = 'domain and - (tree := mkAtree x) and putTarget(tree,m) and - ((bottomUp tree) is [m1]) and - (v:= coerceInteractive(getAndEvalConstructorArgument tree,m)) - => objValUnwrap v - if x = $EmptyMode then x := $quadSymbol - throwEvalTypeMsg("S2IE0006",[makeOrdinal argnum,m,form]) - [op,:NREVERSE typeList] - throwEvalTypeMsg("S2IE0007",[op]) - -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/interp/interp-proclaims.lisp b/src/interp/interp-proclaims.lisp deleted file mode 100644 index 30d61fc7..00000000 --- a/src/interp/interp-proclaims.lisp +++ /dev/null @@ -1,3391 +0,0 @@ - -(IN-PACKAGE "USER") -(PROCLAIM '(FTYPE (FUNCTION (*) (VALUES T T)) BOOT:|ReadLine|)) -(PROCLAIM - '(FTYPE (FUNCTION (T) FUNCTION) FOAM::FOAMPROGINFOSTRUCT-FUNCALL)) -(PROCLAIM - '(FTYPE (FUNCTION (T) FIXNUM) BOOT::LINE-NUMBER BOOT::|eq0| - VMLISP:CHAR2NUM BOOT::|nothingWidth| BOOT::|nothingSub| - BOOT::|nothingSuper| BOOT::LINE-LAST-INDEX - BOOT::LINE-CURRENT-INDEX FOAM:|ProgHashCode| - FOAM:|strLength| BOOT:|StringLength| BOOT::|widthSC|)) -(PROCLAIM - '(FTYPE (FUNCTION (T) FOAM:|SInt|) - FOAM::FOAMPROGINFOSTRUCT-HASHVAL)) -(PROCLAIM - '(FTYPE (FUNCTION (T) (VALUES T T)) BOOT::|mkSharpVar| - BOOT::|makeCharacter| BOOT::|mapCatchName| - BOOT::|queryUser| BOOT:|LispKeyword| BOOT::MONITOR-INFO - BOOT::FILE-GETTER-NAME BOOT::|mkDomainCatName| - FOAM:AXIOMXL-FILE-INIT-NAME BOOT::|getKeyedMsg| - BOOT::|mkCacheName| BOOT::|mkAuxiliaryName|)) -(PROCLAIM - '(FTYPE (FUNCTION ((VECTOR T) (VECTOR T)) T) VMLISP::VGREATERP - VMLISP::LEXVGREATERP)) -(PROCLAIM '(FTYPE (FUNCTION ((VECTOR T)) T) BOOT:TRIMLZ)) -(PROCLAIM - '(FTYPE (FUNCTION (T) (*)) BOOT:|StringToInteger| - BOOT:|StringToFloat|)) -(PROCLAIM '(FTYPE (FUNCTION (T *) (VALUES T T)) VMLISP:|read-line|)) -(PROCLAIM '(FTYPE (FUNCTION (STRING FIXNUM) T) BOOT::|subWord|)) -(PROCLAIM - '(FTYPE (FUNCTION (T T) FIXNUM) VMLISP:QSQUOTIENT - VMLISP:QSREMAINDER VMLISP:QENUM FOAM:|SetProgHashCode| - BOOT:GETCHARN BOOT::|attributeCategoryParentCount|)) -(PROCLAIM - '(FTYPE (FUNCTION (T T) (VALUES T T)) BOOT::|htMakeLabel| - BOOT::|fetchKeyedMsg|)) -(PROCLAIM - '(FTYPE (FUNCTION (T T T T T) *) BOOT::|applpar1| BOOT::|apprpar1| - BOOT::|appargs1| BOOT::|appagg1| BOOT::|matrixBorder| - BOOT::|e02befDefaultSolve| BOOT::|e02agfDefaultSolve| - BOOT::|e02dafDefaultSolve| BOOT::|htQueryPage| - BOOT::|compileAndLink| BOOT::|f04jgfDefaultSolve| - BOOT::|f02aefDefaultSolve| BOOT::|f02agfDefaultSolve| - BOOT::|apphor| BOOT::|appvertline| BOOT::|applpar| - BOOT::|e04jafDefaultSolve| BOOT::|f01brfDefaultSolve| - BOOT::|e04ycfDefaultSolve|)) -(PROCLAIM - '(FTYPE (FUNCTION (T T *) *) VMLISP:CONCAT - BOOT::LOCALDATABASE BOOT::FE BOOT::|ncBug|)) -(PROCLAIM - '(FTYPE (FUNCTION (T T T) *) BOOT::|replacePercentByDollar,fn| - BOOT::|getSlotFromDomain| BOOT::|ncGetFunction| - BOOT::|c02affDefaultSolve| BOOT::|c02agfDefaultSolve| - BOOT::|Qf2F| BOOT::|selectOptionLC| BOOT::|compUniquely| - BOOT::|compExpression| BOOT::|e02gafDefaultSolve| - BOOT::|e02aefDefaultSolve| BOOT::|e02bbfDefaultSolve| - BOOT::|asytranForm| BOOT::|asytranFormSpecial| - BOOT::|asytranApplySpecial| BOOT::SOCK-GET-STRING - BOOT::|sockGetString| BOOT::|showIt| BOOT::|pmPreparse,fn| - BOOT::|pmPreparse,gn| BOOT::|dbSearchAbbrev| - BOOT::|mkUpDownPattern,recurse| BOOT::|htMkPath| - BOOT::|getVal| BOOT::|htGlossPage| BOOT::|checkCondition| - BOOT::|compTopLevel| BOOT::GETOP - BOOT::|checkTransformFirsts| BOOT::|parseIf,ifTran| - BOOT::|dbShowOpAllDomains| BOOT::|templateVal| - BOOT::|dbChooseDomainOp| BOOT::|whoUsesOperation| - BOOT::|c05pbfDefaultSolve| BOOT::|c05nbfDefaultSolve| - BOOT::|c06frfDefaultSolve| BOOT::|c06ekfDefaultSolve| - BOOT::|NRTvectorCopy| BOOT::|c06fufDefaultSolve| - BOOT::|c06fpfDefaultSolve| BOOT::|c06fqfDefaultSolve| - BOOT::|applyInPackage| BOOT::|exp2FortSpecial| - BOOT::|f04mcfDefaultSolve| BOOT::|f04atfDefaultSolve| - BOOT::|f04fafDefaultSolve| BOOT::|f02affDefaultSolve| - BOOT::|dbShowCons1| BOOT::|f02aafDefaultSolve| - BOOT::|dbSelectCon| BOOT::|dbShowOperationsFromConform| - BOOT::|genSearch1| BOOT::|dbSearch| - BOOT::|constructorSearch| BOOT::|underscoreDollars,fn| - BOOT::|oSearchGrep| BOOT::|selectOption| - BOOT::|constructorSearchGrep| BOOT::|dbInfoChoose1| - BOOT::|bcDrawIt2| BOOT::|charybdis| BOOT::|bcMkFunction| - BOOT::|charyTop| BOOT::|bcDrawIt| - BOOT::|f01qcfDefaultSolve| BOOT::|e02zafDefaultSolve| - BOOT::|ncloopInclude0| VMLISP:$FCOPY)) -(PROCLAIM - '(FTYPE (FUNCTION (T T T T T T) *) BOOT::|e02befColdSolve| - BOOT::|e02ahfDefaultSolve| BOOT::|e02akfDefaultSolve| - BOOT::|d02bbfDefaultSolve| BOOT::|d02cjfDefaultSolve| - BOOT::|e01sefDefaultSolve| BOOT::|htSetLiterals| - BOOT::|f04mbfDefaultSolve| BOOT::|f02axfDefaultSolve| - BOOT::|f02akfDefaultSolve| BOOT::|kcaPage1| - BOOT::MAKE-DEPSYS BOOT::|makeLongStatStringByProperty| - BOOT::|f01rdfDefaultSolve| BOOT::|f01qdfDefaultSolve|)) -(PROCLAIM - '(FTYPE (FUNCTION (T T T T) *) BOOT::|compileConstructorLib| - BOOT::|quoteApp| BOOT::|argsapp| BOOT::|appargs| - BOOT::|inApp| BOOT::|appsc| BOOT::|appfrac| BOOT::|exptApp| - BOOT::|charyTrouble| BOOT::|overbarApp| - BOOT::|appHorizLine| BOOT::|overlabelApp| BOOT::/D-1 - BOOT::|appmat| BOOT::|e01bhfDefaultSolve| - BOOT::|e02adfDefaultSolve| BOOT::|e02bcfDefaultSolve| - BOOT::|makeStream| BOOT::|newExpandLocalTypeArgs| - FOAM:|fputss| FOAM:|fgetss| BOOT::|f01mafDefaultSolve| - BOOT::|conform2StringList| BOOT::|f02abfDefaultSolve| - BOOT::|f02awfDefaultSolve| BOOT::|f02ajfDefaultSolve| - BOOT::|f02adfDefaultSolve| BOOT::|patternCheck,mknew| - BOOT::|kDomainName| BOOT::|koPageAux| BOOT::|dbShowOp1| - BOOT::APP BOOT::|appagg| BOOT::|binomialApp| - BOOT::|charyTrouble1| BOOT::|appsub| BOOT::|slashApp| - BOOT::|appsetq| BOOT::|makeStatString| - BOOT::|e02dffDefaultSolve| BOOT::|e04dgfDefaultSolve| - BOOT::|e04fdfDefaultSolve| BOOT::|e04gcfDefaultSolve| - BOOT::|f01refDefaultSolve| BOOT::|f01qefDefaultSolve|)) -(PROCLAIM - '(FTYPE (FUNCTION (T T T T T T T T T T) *) BOOT::|makeFortranFun| - BOOT::|d03eefDefaultSolve| BOOT::|e04nafDefaultSolve|)) -(PROCLAIM - '(FTYPE (FUNCTION (T T T T T T T) *) BOOT::|e02ajfDefaultSolve| - BOOT::|e02dcfDefaultSolve| BOOT::|e02ddfDefaultSolve| - BOOT::|d02ejfDefaultSolve| BOOT::|d02bhfDefaultSolve| - BOOT::|d01fcfDefaultSolve| BOOT::|d01gbfDefaultSolve| - BOOT::|f04qafDefaultSolve| BOOT::|f02bjfDefaultSolve| - BOOT::|f02bbfDefaultSolve| BOOT::|e04mbfDefaultSolve|)) -(PROCLAIM - '(FTYPE (FUNCTION (T T T T T T T T T T T T T T) *) - BOOT::BUILD-INTERPSYS)) -(PROCLAIM - '(FTYPE (FUNCTION (T T T T T T T T) *) BOOT::|e02ddfColdSolve| - BOOT::|f02xefDefaultSolve| BOOT::|f02wefDefaultSolve| - BOOT::BUILD-DEPSYS)) -(PROCLAIM - '(FTYPE (FUNCTION (T T T T T T T T T) *) BOOT::|e04ucfDefaultSolve| - BOOT::|e02dcfColdSolve| BOOT::|d02kefDefaultSolve| - BOOT::|d02gbfDefaultSolve| BOOT::|d02gafDefaultSolve|)) -(PROCLAIM - '(FTYPE (FUNCTION (T T T T T T T T T T T T T) *) - BOOT::|d02rafDefaultSolve|)) -(PROCLAIM - '(FTYPE (FUNCTION (T T T) T) BOOT::|mapRecurDepth| BOOT::THETACHECK - BOOT::|flowSegmentedMsg| BOOT::|rewriteMap0| - BOOT::|restoreDependentMapInfo| BOOT::|dcSig| - BOOT::|analyzeNonRecur| BOOT::|addMap| BOOT::|fortCall| - BOOT::|axAddLiteral| BOOT::|writeStringLengths| - BOOT::|writeXDR| BOOT::|deleteMap| BOOT::|fnameNew| - BOOT::|axFormatDefaultOpSig| BOOT::|htpSetProperty| - BOOT::|rewriteMap1| BOOT::|displayMap| - BOOT::|compileDeclaredMap| BOOT::|compileCoerceMap| - BOOT::|displaySingleRule| BOOT::|hasAtt| BOOT::|hasAttSig| - BOOT::SPADRWRITE0 BOOT::SPADRWRITE BOOT::|recordNewValue| - BOOT::|recordOldValue| BOOT::|orderUnionEntries,split| - BOOT::|getSlotNumberFromOperationAlist| - BOOT::|isSuperDomain| BOOT::|recordOldValue0| - BOOT::|PARSE-getSemanticForm| BOOT::|recordNewValue0| - BOOT::|getSlotFromFunctor| BOOT::|addConstructorModemaps| - BOOT::|compDefWhereClause| BOOT::|get1| BOOT::|get2| - BOOT::|get0| BOOT::|throwListOfKeyedMsgs| - BOOT::|getConstructorOpsAndAtts| - BOOT::|mkExplicitCategoryFunction| - BOOT::|findDomainSlotNumber| BOOT::|addIntSymTabBinding| - BOOT::|sigsMatch| BOOT::|compDefineAddSignature| - BOOT::|hasFullSignature| BOOT:ELEMN BOOT::|mkAtree2| - BOOT::|mkAtree3| BOOT::|getValueFromSpecificEnvironment| - BOOT::|compForMode| BOOT::|transferPropsToNode,transfer| - BOOT::|genDomainOps| BOOT::|getOperationAlist| - BOOT::|remprop| BOOT::|setMsgForcedAttr| BOOT::|P2Uts| - BOOT::|Up2FR| BOOT::|mac0Define| BOOT::|getMappingArgValue| - BOOT::|compContained| BOOT::|getArgValueComp| - BOOT::|altTypeOf| BOOT::|mac0InfiniteExpansion| - BOOT::|setMsgUnforcedAttr| BOOT::|genDomainViewList| - BOOT::|compSubDomain| BOOT::|compCapsule| - BOOT::|sideEffectedArg?| BOOT::|evalFormMkValue| - BOOT::|doItIf| BOOT::|compSingleCapsuleItem| - BOOT::|compJoin| BOOT::|rewriteMap| - BOOT::|NRTgetLookupFunction| BOOT::|lisplibWrite| - BOOT::|getLocalMms| BOOT::|makeFunctorArgumentParameters| - BOOT::|selectMmsGen,exact?| BOOT::REDUCE-1 - BOOT::|getLocalMms,f| BOOT::|isOpInDomain| - BOOT::|compDefine| BOOT::|compCategory| - BOOT::|getTargetFromRhs| BOOT::|unifyStructVar| - BOOT::|augmentSub| BOOT::|unifyStruct| BOOT::|compAdd| - BOOT::|filterModemapsFromPackages| BOOT::|constrArg| - BOOT::|evalMmCond0| BOOT::|maprinSpecial| BOOT::|hasCaty| - BOOT::|evalMmCond| BOOT:ADDASSOC BOOT::|hasCate| - BOOT::|matchTypes| BOOT::|findUniqueOpInDomain| - BOOT::|hasSigOr| BOOT::|hasSigAnd| - BOOT::|findCommonSigInDomain| BOOT::|evalMmCat1| - BOOT::|coerceTypeArgs| BOOT::|domArg2| BOOT::|L2Tuple| - BOOT::V2M BOOT::DEF-INNER BOOT::|OV2Sy| BOOT::|Qf2EF| - BOOT::|Sy2P| BOOT::I2NNI BOOT::|Rm2L| BOOT::|Var2OtherPS| - BOOT::|Var2UpS| BOOT::OV2SE BOOT::|NDmp2domain| VMLISP:PUT - BOOT::|Var2Up| BOOT::|Expr2Mp| BOOT::|Expr2Dmp| - BOOT::|Sy2NDmp| VMLISP:DEFIOSTREAM BOOT::|Dmp2P| - BOOT::|Sy2Mp| BOOT::|Var2SUP| BOOT::|Factored2Factored| - VMLISP:EQSUBSTLIST BOOT::I2PI BOOT::|P2Expr| BOOT::|P2Up| - BOOT::|P2Dmp| BOOT::|Var2FS| BOOT::|Sy2Dmp| BOOT::B-MDEF - BOOT::|Ker2Expr| BOOT::|Sy2OV| BOOT::|Var2QF| BOOT::|Sm2V| - BOOT::M2V BOOT::|Var2P| BOOT::I2OI BOOT::P2FR - BOOT::|makeEijSquareMatrix| BOOT::|Set2L| BOOT::|Sm2Rm| - BOOT::DEF BOOT::|Var2NDmp| BOOT::|Dmp2Dmp| - BOOT::|coerceDmp2| BOOT::|rread| BOOT::I2EI BOOT::|Var2Mp| - BOOT::|compCapsuleInner| BOOT::|Mp2FR| BOOT::|Qf2domain| - BOOT::|compCapsuleItems| BOOT::|L2Set| BOOT::|Var2Gdmp| - BOOT::COMP-ILAM BOOT::COMP-SPADSLAM BOOT::|L2Sm| - BOOT::|mkCategoryPackage| BOOT::COMP-SLAM BOOT::L2M - BOOT::|compDefine1| BOOT::|Mp2Expr| BOOT::|Ker2Ker| - BOOT::|Var2Dmp| VMLISP:MSUBST BOOT::|Dmp2NDmp| - BOOT::|Sm2PolyType| BOOT::|Var2OV| - BOOT::|orderPredicateItems| BOOT::|L2Rm| BOOT::|substVars| - BOOT::|OV2poly| BOOT::|Sm2M| - BOOT::|augmentLisplibModemapsFromFunctor| BOOT::OV2P - BOOT::|needBlankForRoot| BOOT::|Rn2F| - BOOT::|getInCoreModemaps| BOOT::|Sm2L| BOOT::|splitConcat| - BOOT::|Un2E| BOOT::|SUP2Up| BOOT::OV2OV - BOOT::|insertAlist,fn| BOOT::|replaceVars| - BOOT::|compFromIf| BOOT::|Scr2Scr| BOOT::|compBoolean| - BOOT::|L2Record| BOOT::|Rm2V| VMLISP:RPLNODE - BOOT::|domain2NDmp| BOOT::|Up2Up| - BOOT::|augLisplibModemapsFromCategory| BOOT::|P2Mp| - BOOT::|compWithMappingMode,FreeList| BOOT::|orderPredTran| - BOOT::|Rm2Sm| BOOT::|Rm2M| BOOT::|Up2SUP| BOOT::|Mp2Up| - BOOT::|Mp2Dmp| BOOT::|LargeMatrixp| BOOT::DP2DP - BOOT::|Dmp2Up| BOOT::|Up2P| BOOT::|Complex2Expr| - BOOT::|seteltModemapFilter| BOOT::/MONITORX BOOT::|P2Upxs| - BOOT::|coerceTraceFunValue2E| BOOT::|Complex2FR| - BOOT::|Up2Mp| BOOT::V2L BOOT::|P2Uls| BOOT::|M2Sm| - BOOT::|coerceTraceArgs2E| BOOT::|Complex2underDomain| - BOOT::|resolveTTRed2| BOOT::|Agg2L2Agg| - BOOT::|resolveTTRed1| BOOT::|fnameMake| - BOOT::MONITOR-PRINARGS VMLISP:HREMPROP - BOOT::|eltModemapFilter| BOOT::|coerceOrCroak| - BOOT::|resolveTTEq2| BOOT::|resolveTTEq1| - BOOT::|matchUpToPatternVars| - BOOT::|getConditionalCategoryOfType| - BOOT::|getSubDomainPredicate| BOOT::|resolveTMEq2| - BOOT::|coerceIntX| BOOT::|compSymbol| - BOOT::|coerceSubDomain| BOOT::|compExpressionList| - BOOT::|NRTcompileEvalForm| BOOT::|setqMultiple,decompose| - BOOT::|permuteToOrder| BOOT::|retractUnderDomain| - BOOT::|compList| BOOT::SMALL-ENOUGH-COUNT - BOOT::|isRectangularList| BOOT::|augModemapsFromDomain1| - BOOT::|canCoerceByFunction1| - BOOT::|sayFunctionSelectionResult| BOOT::|compForm| - BOOT::|compTypeOf| BOOT::|comp3| BOOT::|coerceOrFail| - BOOT::|computeTTTranspositions,compress| BOOT::|algEqual| - BOOT::|compiledLookupCheck| VMLISP:RWRITE - BOOT::|coerceOrThrowFailure| BOOT::|NRTcompiledLookup| - BOOT::|spad2BootCoerce| BOOT::|M2Rm| BOOT::M2M - VMLISP:MACRO-INVALIDARGS BOOT::L2V BOOT::|Mp2P| - BOOT::|Mp2Mp| BOOT::|coerceDmpCoeffs| BOOT::|Expr2Complex| - BOOT::|Dmp2Expr| BOOT::|coerceFFE| BOOT::M2L VMLISP:QESET - BOOT::|V2Sm| BOOT::|isRectangularVector| BOOT::V2DP - BOOT::L2DP BOOT::|Up2Expr| BOOT::|Qf2Qf| BOOT::|NDmp2NDmp| - BOOT::|V2Rm| BOOT::|Qf2PF| BOOT::|Dmp2Mp| BOOT::|Up2Dmp| - BOOT::|Sy2Var| BOOT::|Agg2Agg| BOOT::|Expr2Up| - BOOT::|Sy2Up| VMLISP:HPUT BOOT::|pvarCondList1| - VMLISP:SUBSTRING BOOT::|interpRewriteRule| BOOT::|putAtree| - BOOT::|isEltable| BOOT::|selectMms| BOOT::|throwKeyedMsgSP| - BOOT::|pushDownTargetInfo| - BOOT::|pushDownOnArithmeticVariables| - BOOT::|keyedMsgCompFailureSP| BOOT::|intCodeGenCoerce1| - BOOT::|throwKeyedMsgCannotCoerceWithValue| - BOOT::|asytranForm1| BOOT::|hput| BOOT::|asyCattranOp1| - BOOT::|asyMakeOperationAlist| BOOT::|setVector4| - BOOT::|SetDomainSlots124| BOOT::|asGetExports| - BOOT::|asySig1| BOOT::|ncPutQ| - BOOT::|putConstructorProperty| BOOT::|throwKeyedErrorMsg| - BOOT::|mkUserConstructorAbbreviation| - BOOT::|unabbrevSpecialForms| BOOT::|nAssocQ| - BOOT::|New,ENTRY,2| BOOT::READ-INPUT BOOT::READ-SPAD - BOOT::|errorSupervisor1| BOOT::|argumentDataError| - BOOT::|BesselasymptA| BOOT::|htpSetLabelSpadValue| - BOOT::|optPackageCall| BOOT::|from?| BOOT::|clngamma| - BOOT::|chebevalarr| BOOT::|PsiBack| BOOT::|logH| - BOOT::|PiMinusLogSinPi| BOOT::|besselIcheb| - BOOT::|chebstarevalarr| BOOT::|chebf01coefmake| - BOOT::|clngammacase23| BOOT::|PsiAsymptoticOrder| - BOOT::|grepf| BOOT::|clngammacase1| BOOT::|cotdiffeval| - BOOT::|BesselIAsympt| BOOT::|lffloat| - BOOT::|substringMatch| BOOT::|makeResultRecord| - BOOT::|makeCompilation| BOOT::|extractFileNameFromPath,fn| - BOOT::|makeAspGenerators| BOOT::|makeAspGenerators1| - BOOT::|mkNewUnionFunList| BOOT::|EnumEqual| - BOOT::|cleanUpAfterNagman| BOOT::|sySpecificErrorAtToken| - BOOT::|prepareResults,defaultValue| - BOOT::|setVector4Onecat| BOOT::|pfLambda| BOOT::|pfWIf| - BOOT::|SigSlotsMatch| BOOT::|DomainPrint1| - BOOT::|DescendCodeAdd1,update| BOOT::|CheckVector| - BOOT::|pfTLambda| BOOT::|htSystemVariables,fn| - BOOT::|postCollect,finish| VMLISP:|nsubst| - BOOT::|npBackTrack| BOOT::|bchtMakeButton| - BOOT::|compWhere| BOOT::|compVector| BOOT::|compAtom| - BOOT::|getUniqueModemap| BOOT::|modeIsAggregateOf| - BOOT::|compArgumentsAndTryAgain| VMLISP:MACRO-MISSINGARGS - BOOT::|compForm1| BOOT::|mergeModemap| - BOOT::|compSubsetCategory| BOOT::|compString| - BOOT::|augModemapsFromDomain| BOOT::|compWithMappingMode| - BOOT::|extractCodeAndConstructTriple| BOOT::|compCat| - BOOT::|pfWith| BOOT::|compMakeDeclaration| - BOOT::|extendsCategoryForm| BOOT::|compSeq| - BOOT::|compSeq1| BOOT::|compReturn| BOOT::|isSubset| - BOOT::|getModemapList| BOOT::|compCase1| - BOOT::|compCoerce1| BOOT::|compPretend| BOOT::|compMacro| - BOOT::|compConstructorCategory| BOOT::|compCoerce| - BOOT::|compColon| BOOT::|compSetq| BOOT::|compLeave| - BOOT::|npList| BOOT::|modeEqualSubst| BOOT::|compIf| - BOOT::|compIs| BOOT::|comp2| BOOT::|compImport| - BOOT::|coerce,fn| BOOT::|throwKeyedMsgFromDb| - BOOT::|sayKeyedMsgFromDb| BOOT::|compHas| BOOT::|compExit| - BOOT::|compElt| BOOT::|compConstruct| BOOT::|compCons| - BOOT::|compCons1| BOOT::|compSeqItem| - BOOT::|recordInstantiation1| BOOT::|compCase| - BOOT::|compQuote| BOOT::|recordInstantiation| - BOOT::|compAtSign| BOOT::|compSuchthat| - BOOT::|addToConstructorCache| BOOT::|loadLibNoUpdate| - BOOT::SETDATABASE BOOT::|lassocShiftWithFunction| - BOOT::|assocCache| BOOT::|assocCacheShift| - BOOT::|assocCacheShiftCount| BOOT::|pileForests| - BOOT::|isLegitimateMode;| BOOT::|hasFileProperty;| - BOOT::|coerceConvertMmSelection;| - BOOT::|hasFilePropertyNoCache| BOOT::|writeLib1| - BOOT::|rwrite| BOOT::|putModemapIntoDatabase| - BOOT::|getOplistWithUniqueSignatures| - BOOT::|checkSkipOpToken| BOOT::|checkSkipIdentifierToken| - BOOT::|readLib1| BOOT::|checkSkipBlanks| - BOOT::MAKE-PARSE-FUNC-FLATTEN-1 BOOT::|checkSkipToken| - BOOT::|getDocForCategory| BOOT::|newWordFrom| - BOOT::PRINT-XDR-STREAM BOOT::|getDocForDomain| - BOOT::|getDoc| BOOT::|htcharPosition| - BOOT::|PackageDescendCode| BOOT::|RecordEqual| - BOOT::|processPackage,replace| BOOT::|UnionEqual| - BOOT::|mkEnumerationFunList| BOOT::|mkMappingFunList| - BOOT::|mkUnionFunList| BOOT::|mkRecordFunList| - BOOT::|MappingEqual| BOOT::|CondAncestorP| - BOOT::|updateDatabase| BOOT::|compressSexpr| - BOOT::|parseTypeError| BOOT::|moreGeneralCategoryPredicate| - BOOT::|encodeUnion| BOOT::|makeCatPred| - BOOT::|lookupInDomainByName| BOOT::|simpHasAttribute| - BOOT::|domainHput| BOOT::|simpHasPred,simpHas| - BOOT::|substDollarArgs| BOOT::|NRTisRecurrenceRelation| - BOOT::|dbShowOpSigList| BOOT::|dbSelectData| - BOOT::|dbReduceOpAlist| BOOT::|listOfCategoryEntriesIf| - BOOT::|dbResetOpAlistCondition| - BOOT::|algCoerceInteractive| BOOT::|buildPredVector,fn| - BOOT::|extendsCategoryBasic| BOOT::|catExtendsCat?| - BOOT::|expandType| BOOT::|expandTypeArgs| BOOT::|stuffSlot| - BOOT::|dbPresentOpsSaturn| BOOT::|reduceOpAlistForDomain| - BOOT::|mungeAddGensyms,fn| BOOT::|dbReduceBySelection| - BOOT::|extendsCategoryBasic0| BOOT::|substSlotNumbers| - BOOT::|dbReduceBySignature| BOOT::|extendsCategory| - BOOT::|buildPredVector| BOOT::|dbParts| - BOOT::|NRTextendsCategory1| BOOT::|getSubstQualify| - BOOT::|fortFormatLabelledIfGoto| BOOT::|whoUsesMatch1?| - BOOT::|fullSubstitute| BOOT::|whoUsesMatch?| - BOOT::|getfortarrayexp| BOOT::|addWhereList| - BOOT::|dbGetDisplayFormForOp| - BOOT::|dbGetFormFromDocumentation| BOOT::|anySubstring?| - VMLISP::MAKE-ENTRY BOOT::|NRTsetVector4a| - BOOT::|NRTsetVector4Part1| BOOT::|NRTencode,encode| - BOOT::|consOpSig| BOOT::|genSlotSig| BOOT::|NRTsetVector4| - BOOT::|newExpandGoGetTypeSlot| BOOT::MAKEOP - BOOT::|insertEntry| BOOT::|nextown| BOOT::|mkFortFn| - BOOT::|exp2Fort2| BOOT::|evalQUOTE| BOOT::|evalSEQ| - BOOT::|IFcodeTran| BOOT::|exp2FortFn| - BOOT::|fortFormatHead| BOOT::|addContour,fn1| - BOOT::|traverse,traverseInner| BOOT::|upTableSetelt| - BOOT::|printSignature| BOOT::|addContour,fn3| - BOOT::|commandAmbiguityError| BOOT::|charPosition| - BOOT::|traverse| BOOT::|dbPart| BOOT::|commandErrorMessage| - BOOT::|substituteOp| BOOT::|displayModemap| - BOOT::|displayType| BOOT::|comp| BOOT::|displayMode| - BOOT::|numOfOccurencesOf,fn| VMLISP::QUOREM - BOOT::|pmatchWithSl| BOOT::|displayCondition| - BOOT::|displayValue| - BOOT::|intersectionContour,buildModeAssoc| BOOT::|get| - BOOT::|sigDomainVal| BOOT::GEQNSUBSTLIST - BOOT::|compNoStacking| BOOT::|transImplementation| - BOOT::GEQSUBSTLIST BOOT::|libConstructorSig,g| - BOOT::|coerceable| BOOT::|substituteIntoFunctorModemap| - BOOT::|adjExitLevel| BOOT::|getParentsFor| - BOOT::|asytranApply| BOOT::|explodeIfs,fn| BOOT::|dbSplit| - BOOT::|buildLibAttr| BOOT::|buildLibOp| - BOOT::|transKCatAlist| BOOT::|dbTickIndex| - BOOT::|insertShortAlist| BOOT::|sublisFormal,sublisFormal1| - BOOT::PUTALIST FOAM:|FormatNumber| - BOOT::|dbSetOpAlistCondition| BOOT::|compiledLookup| - BOOT::|insertAlist| BOOT::|reduceAlistForDomain| - BOOT:|StreamCopyChars| BOOT:|StreamCopyBytes| - BOOT::|dbXParts| BOOT::|kePageDisplay| - BOOT::|dbShowOpItems| BOOT::MKPFFLATTEN-1 - BOOT::|dbSearchOrder| BOOT::CARCDRX1 BOOT::SETELTREST - BOOT::SETELTFIRST BOOT::AS-INSERT1 BOOT::AS-INSERT - BOOT::PROPERTY BOOT::|mkDomTypeForm| BOOT::|stringPosition| - BOOT:|StringFromTo| BOOT::|patternCheck,equal| - BOOT:|StringFromLong| BOOT::|rightCharPosition| - BOOT::|infix?| BOOT::|matchSegment?| BOOT::|stringMatch| - BOOT::|skipBlanks| BOOT::|dbPresentConsSaturn| - BOOT::MAKE-DEFUN BOOT::|compOrCroak| BOOT::|profileRecord| - BOOT::|getSignature| BOOT::|traceDomainLocalOps| - BOOT::|getArgumentModeOrMoan| - BOOT::|filterListOfStringsWithFn| - BOOT::|mkGrepPattern1,charPosition| - BOOT::|displayModemap,g| - BOOT::|filterAndFormatConstructors| BOOT::READ-BOOT - BOOT::|userLevelErrorMessage| BOOT::|addBinding| - BOOT::|dbShowConsDoc1| BOOT::|makePathname| - BOOT::|mkConform| BOOT::|dbInfoFindCat| BOOT::|compReduce| - BOOT::|dbShowInfoList| BOOT::|dbShowConditions| - BOOT::|compRepeatOrCollect| BOOT::|dbInfoOrigin| - BOOT::|dbConstructorDoc| BOOT::|interpret2| - BOOT::|htpSetLabelInputString| BOOT::|letPrint2| - BOOT::|letPrint| BOOT::|mapLetPrint| - BOOT::|htpAddInputAreaProp| BOOT::|getOpBindingPower| - BOOT::|infixArgNeedsParens| BOOT::|linearFinalRequest| - BOOT::|bcInputEquations,f| BOOT::|htpSetLabelErrorMsg| - BOOT::|isBreakSegment?| BOOT::|substring?| - BOOT::|sublisMatAlist| BOOT::MAKESPAD - BOOT::|reportCategory| BOOT::|longext| - BOOT::|npParenthesize| BOOT::|bcString2WordList,fn| - VMLISP::ECQGENEXP VMLISP::RCQGENEXP BOOT::|outputString| - BOOT::|outputNumber| VMLISP::DODSETQ - BOOT::|pfInfApplication| BOOT::|insertString| - BOOT::|npAndOr| BOOT::|npListofFun| BOOT::|optSpecialCall| - BOOT::|pfPushBody| BOOT::|pfIf| BOOT::|incZip| - BOOT::|augProplist| BOOT::|augProplistInteractive| - BOOT::|centerString| BOOT::|evalCOLLECT| - BOOT::|interpCOLLECTbody| BOOT::|upLoopIterIN| - BOOT::|position,posn| BOOT::|domainVal| BOOT::|subVecNodes| - BOOT::|addBindingInteractive| BOOT::|interpCOLLECT| - BOOT::|upTaggedUnionConstruct| BOOT::|upRecordConstruct| - BOOT::|newExpandTypeSlot| BOOT::|upNullList| - BOOT::|upStreamIterIN| BOOT::|getCatForm| - BOOT::|oldAxiomAddChild| BOOT::|evalCOERCE| - BOOT::|mkAndApplyZippedPredicates| BOOT::|lookupPred| - BOOT::|oldAxiomDomainHasCategory| BOOT::|mkIterFun| - BOOT::|attributeCategoryBuild| - BOOT::|oldAxiomCategoryBuild| BOOT::|upLETtype| - BOOT::|upLETWithFormOnLhs| BOOT::|lazyMatchAssocV1| - BOOT::|oldAxiomCategoryNthParent| BOOT::|assignSymbol| - BOOT::|evalIsntPredicate| BOOT::|evalIsPredicate| - BOOT::|SpadInterpretStream| BOOT::|upSetelt| BOOT:SUBLISLIS - BOOT::|upNullTuple| BOOT::|evalIF| BOOT::|intloopProcess| - BOOT::|evalis| BOOT::|evalREPEAT| BOOT::|upwhereMain| - BOOT::|upwhereMkAtree| BOOT::|upwhereClause| - BOOT::|intloopInclude0| BOOT::|intloopSpadProcess,interp| - BOOT::|incPrefix?| BOOT::|inclmsgIfSyntax| - BOOT::|renamePatternVariables1| BOOT::|newExpandLocalType| - BOOT::|newExpandLocalTypeForm| - BOOT::|oldAxiomPreCategoryBuild| - BOOT::|getFunctionFromDomain| BOOT::|lazyOldAxiomAddChild| - BOOT:SUBSTEQ BOOT::|getOpCode| BOOT::|lazyDomainSet| - BOOT::|application2String| BOOT::|putI| BOOT::|mkInterpFun| - BOOT::|interpret1| BOOT::|analyzeMap0| - BOOT::|reportOpSymbol,sayMms| BOOT::|findLocalsInLoop|)) -(PROCLAIM - '(FTYPE (FUNCTION (T T T T T) T) BOOT::|analyzeRecursiveMap| - BOOT::|augmentMap| BOOT::|reportFunctionCompilation| - BOOT::|putSrcPos| BOOT::|hasSigInTargetCategory,fn| - BOOT::|encodeFunctionName| BOOT::|getArgValueComp2| - BOOT::|augModemapsFromCategory| BOOT::|compDefineFunctor1| - BOOT::|augModemapsFromCategoryRep| - BOOT::|compDefineFunctor| BOOT::|processFunctor| - BOOT::|buildFunctor| BOOT::|selectMmsGen,matchMms| - BOOT::|makeConstrArg| - BOOT::|commuteSparseUnivariatePolynomial| - BOOT::|commuteUnivariatePolynomial| - BOOT::|commuteSquareMatrix| BOOT::|coerceDmp1| - BOOT::|aggregateApp| BOOT::|compDefineCategory1| - BOOT::|commuteFraction| BOOT::|compDefineCategory| - BOOT::|commuteQuaternion| BOOT::|commuteComplex| - BOOT::|resolveTT2| BOOT::|concatApp1| - BOOT::|compFormPartiallyBottomUp| - BOOT::|canReturn,findThrow| BOOT::|orderMms| - BOOT::|sayFunctionSelection| BOOT::MATCH-FUNCTION-DEF - BOOT::|commuteNewDistributedMultivariatePolynomial| - BOOT::|commuteMPolyCat| - BOOT::|commuteDistributedMultivariatePolynomial| - BOOT::|commuteMultivariatePolynomial| - BOOT::|commutePolynomial| BOOT::|bottomUpDefaultCompile| - BOOT::|bottomUpDefaultEval| BOOT::|bottomUpFormTuple| - BOOT::|bottomUpFormAnyUnionRetract| BOOT::|bottomUpForm| - BOOT::|bottomUpFormUntaggedUnionRetract| - BOOT::|bottomUpFormRetract| BOOT::|bottomUpForm2| - BOOT::|bottomUpForm0| BOOT::|bottomUpForm3| - BOOT::|coerceByTable| BOOT::|compileRecurrenceRelation| - BOOT::|logS| BOOT::|spadify| BOOT::|prepareResults| - BOOT::|DescendCodeAdd1| - BOOT::|htSystemVariables,displayOptions| BOOT::|evalAndSub| - BOOT::FINCOMBLOCK BOOT::|compIf,Env| BOOT::LOCALASY - BOOT::|mkCacheVec| BOOT::LOCALNRLIB BOOT::|selectMms1;| - BOOT::|selectMms2| BOOT::|processPackage| - BOOT::|mkCategory| BOOT::|newCompareSig| - BOOT::|lookupInDomain| BOOT::|fortFormatDo| - BOOT::|newLookupInDomain| BOOT::|getNewDefaultPackage| - BOOT::|printLabelledList| BOOT::|compApplication| - BOOT::|dbExpandOpAlistIfNecessary| BOOT::-REDUCE - BOOT::|compDefineCapsuleFunction| BOOT::|genSearchSay| - BOOT::|compRepeatOrCollect,fn| BOOT::|dbGetDocTable| - BOOT::|apprpar| BOOT::WRITE-TAG-LINE BOOT::|concatTrouble| - BOOT::|charyBinary| BOOT::|split2| BOOT::|needStar| - BOOT::|lazyMatchArg2| BOOT::|newLookupInTable| - BOOT::|hashNewLookupInTable| BOOT::|compileADEFBody| - BOOT::|interpLoopIter| BOOT::|compileIF| - BOOT::|xlCannotRead| BOOT::|xlMsg| BOOT::|xlNoSuchFile| - BOOT::|incLine| BOOT::|xlFileCycle| BOOT::|xlConStill| - BOOT::|xlConActive| BOOT::|xlSay| BOOT::|xlOK1| - BOOT::|incLude| BOOT::|analyzeDeclaredMap|)) -(PROCLAIM - '(FTYPE (FUNCTION (T T T T) T) BOOT::|analyzeNonRecursiveMap| - BOOT::|makeInternalMapName| BOOT::|printCName| - BOOT::|clearDep1| BOOT::|domArg| BOOT::|mkDomPvar| - BOOT::|hasSig| BOOT::|putIntSymTab| - BOOT::|findConstructorSlotNumber| BOOT::MAKE-FLOAT - BOOT::|getFileProperty| - BOOT::|compDefWhereClause,fetchType| BOOT::|compSubDomain1| - BOOT::|putFileProperty| BOOT::|srcPosNew| - BOOT::|substNames| BOOT::|mac0MLambdaApply| - BOOT::|mac0ExpandBody| BOOT::|genDomainView| - BOOT::|getArgValue2| BOOT::|compFunctorBody| - BOOT::|analyzeMap| BOOT::|defaultTarget| - BOOT::|selectDollarMms| BOOT::|selectMmsGen| - BOOT::|allOrMatchingMms| BOOT::|evalMmCat| - BOOT::|matchMmSig| BOOT::/LOCATE BOOT::|hasCateSpecialNew| - BOOT::|evalMm| BOOT::|evalMmFreeFunction| - BOOT::|hasCateSpecial| BOOT::|hasCate1| BOOT::|boxApp| - BOOT::|concatApp| BOOT::|appsum| BOOT::|altSuperSubApp| - BOOT::|concatbApp| BOOT::|appSum| BOOT::|binomApp| - BOOT::|aggApp| BOOT::|fixUpPredicate| BOOT::|stepApp| - BOOT::|appneg| BOOT::|setqMultipleExplicit| - BOOT::|braceApp| BOOT::|compSetq1| BOOT::|timesApp| - BOOT::|rootApp| BOOT::|bracketApp| BOOT::|plusApp| - BOOT::|appparu1| BOOT::|bigopWidth| BOOT::|P2Us| - BOOT::|pi2App| BOOT::|boxLApp| VMLISP:STRPOSL - BOOT::|compOrCroak1| BOOT::|piApp| BOOT::|compForm2| - BOOT::|compForm3| BOOT::|getConditionalCategoryOfType1| - BOOT::|indefIntegralApp| BOOT::|nothingApp| - BOOT::|evalconstruct| BOOT::|evalInfiniteTupleConstruct| - BOOT::|setqSetelt| BOOT::|evalTupleConstruct| - BOOT::|consProplistOf| BOOT::|setqMultiple| - BOOT::|coerceImmediateSubDomain| BOOT::|intApp| - BOOT::|setqSingle| BOOT::|assignError| BOOT::|sigma2App| - BOOT::|canReturn| BOOT::|appext| BOOT::|centerApp| - BOOT::|sigmaApp| BOOT::|stringApp| BOOT::|MpP2P| - BOOT::|evalForm| BOOT::|selectLocalMms| - BOOT::|bottomUpDefault| BOOT::|canCoerceTopMatching| - BOOT::|catchCoerceFailure| BOOT::|asGetModemaps| - BOOT::|asytranCategory| BOOT::|asytranCategoryItem| - BOOT::|asytranDeclaration| - BOOT::|InvestigateConditions,flist| BOOT::|getTranslation| - BOOT::|condUnabbrev| - BOOT::|constructorAbbreviationErrorCheck| BOOT::READ-SPAD0 - BOOT::|BesselasymptB| BOOT::|optCallSpecially| - BOOT::|getDocDomainForOpSig| BOOT::|reportFunctionCacheAll| - BOOT::|clngammacase2| BOOT::|constoken| BOOT::|writeMalloc| - BOOT::|printDec| BOOT::|htPred2English,gn| - BOOT::|prepareData| BOOT::|protectedNagCall| - BOOT::|axiomType| BOOT::|DescendCode| - BOOT::|SetFunctionSlots| - BOOT::|InvestigateConditions,update| - BOOT::|htSystemVariables,functionTail| VMLISP:STRPOS - BOOT::|replaceExitEtc,fn| BOOT::|compNoStacking1| - BOOT::|compClam| BOOT::|getModemapListFromDomain| - BOOT::|say2Split| BOOT::|compColonInside| BOOT::|haddProp| - BOOT::|npEnclosed| BOOT::|hputNewProp| - BOOT::ASHARPMKAUTOLOADFUNCTOR - BOOT::ASHARPMKAUTOLOADCATEGORY BOOT::|addCoreModemap| - BOOT::|getMatchingRightPren| BOOT::|checkHTargs| - BOOT::|mkOperatorEntry| BOOT::|catPairUnion| - BOOT::|lookupUF| BOOT::|newLookupInCategories| - BOOT::|lookupFF| BOOT::|simpHasSignature| - BOOT::|compareSig| BOOT::|lazyCompareSigEqual| - BOOT::|lookupInAddChain| BOOT::|lookupInCategories| - BOOT::|lookupInTable| BOOT::|lookupDisplay| - BOOT::|domainTableLookup| BOOT::|dbShowOpConditions| - BOOT::|dbShowOpParameterJump| - BOOT::|dbShowOpImplementations| BOOT::|dbShowOpParameters| - BOOT::|dbShowOpOrigins| BOOT::|dbShowOpSignatures| - BOOT::|getSigSubst| BOOT::|optDeltaEntry| - BOOT::|lazyMatchArg| BOOT::|nrunNumArgCheck| - BOOT::|nextown2| BOOT::|semchkProplist| - BOOT::|interpREPEAT| BOOT::|makeCommonEnvironment,fn| - BOOT::|compMapCondFun| BOOT::|compApplyModemap| - BOOT::|compMapCond| BOOT::|compMapCond'| - BOOT::|compToApply| BOOT::REDUCE-N BOOT::|applyMapping| - BOOT::|compFormWithModemap| BOOT::|compAtomWithModemap| - BOOT::|ancestorsRecur| BOOT::|checkCommentsForBraces| - BOOT::|dbShowOpDocumentation| BOOT::|dbShowOpNames| - BOOT::REDUCE-N-1 BOOT::|dbGatherData| BOOT::|dbConsHeading| - BOOT::REDUCE-N-2 BOOT::|termMatch| BOOT::|matchAnySegment?| - BOOT::|replaceExitEtc| BOOT::|put| BOOT::|checkAndDeclare| - BOOT::|hasSigInTargetCategory| BOOT::READ-SPAD1 - BOOT::|mkDetailedGrepPattern| BOOT::|displayInfoOp| - BOOT::|dbShowInfoOp| BOOT::|compReduce1| BOOT::|letPrint3| - BOOT::|intloopSpadProcess| BOOT::|zagApp| - BOOT::|findBalancingBrace| BOOT::|appelse| BOOT::|appChar| - BOOT::|appInfix| BOOT::|htMakeButtonSaturn| - BOOT::|vconcatapp| BOOT::|superSubApp| BOOT::|xLate| - BOOT::|appconc| BOOT::MAKELIB BOOT::|appparu| - BOOT::|charySemiColon| BOOT::|charyElse| - BOOT::|charyEquatnum| BOOT::|bcFindString| - BOOT::|charySplit| BOOT::|charyMinus| VMLISP::DCQGENEXP - BOOT::|augProplistOf| BOOT::|putHist| - BOOT::|evalUntargetedADEF| BOOT::|evalTargetedADEF| - BOOT::|mergeInPlace| BOOT::|upLoopIterSTEP| - BOOT::|mergeSort| BOOT::|interpLoop| BOOT::|collectStream| - BOOT::|collectStream1| BOOT::|lazyMatch| - BOOT::|lazyMatchArgDollarCheck| - BOOT::|interpCOLLECTbodyIter| BOOT::|lookupInCompactTable| - BOOT::|sayLooking| BOOT::|upStreamIterSTEP| - BOOT::|lookupIncomplete| BOOT::|newLookupInAddChain| - BOOT::|hashNewLookupInCategories| BOOT::|lookupComplete| - BOOT::|newLookupInCategories1| BOOT::|lazyMatchAssocV| - BOOT::|collectSeveralStreams| BOOT::|mkIterZippedFun| - BOOT::|compareSigEqual| BOOT::|mkInterpTargetedADEF| - BOOT::|compileTargetedADEF| BOOT::|collectOneStream| - BOOT::|oldCompLookupNoDefaults| BOOT::|evalTuple| - BOOT::|interpIF| BOOT::|getReduceFunction| - BOOT::|NRTgetMinivectorIndex| BOOT::|xlPrematureFin| - BOOT::|xlPrematureEOF| BOOT::|xlCmdBug| BOOT::|xlIfBug| - BOOT::|xlSkippingFin| BOOT::|xlConsole| BOOT::|xlOK| - BOOT::|xlSkip| BOOT::|lookupInDomainVector| - BOOT::|basicLookupCheckDefaults| BOOT::|basicLookup| - BOOT::|oldCompLookup| BOOT::|analyzeUndeclaredMap|)) -(PROCLAIM - '(FTYPE (FUNCTION (T T T T T T) T) BOOT::|compDefineLisplib| - BOOT::|compConLib1| BOOT::|addModemap| BOOT::|mmCost| - BOOT::|findFunctionInDomain1| BOOT::/WRITEUPDATE - BOOT::|mmCost0| BOOT::|/D,2,LIB| - BOOT::|processFunctorOrPackage| BOOT::|compOrCroak1,fn| - BOOT::/D-2 BOOT::|BesselIBackRecur| BOOT::|invokeFortran| - BOOT::|nagCall| BOOT::|makeFort| BOOT::|addModemapKnown| - BOOT::|addModemap1| BOOT::|addEltModemap| BOOT::|compHash| - BOOT::|compHashGlobal| BOOT::|compApply| BOOT::|kdPageInfo| - BOOT::|addModemap0| BOOT::|bracketagglist| - BOOT::|attributeLookupExport| BOOT::|upDollarTuple| - BOOT::|xlIfSyntax| BOOT::|incLine1| - BOOT::|oldAxiomCategoryLookupExport| BOOT::|genMapCode| - BOOT::|putMapCode|)) -(PROCLAIM - '(FTYPE (FUNCTION (T T *) T) BOOT::|pfLeaf| BOOT::BPITRACE - VMLISP:|remove| VMLISP:RREAD VMLISP:REMOVEQ - BOOT::MATCH-LISP-TAG VMLISP:NREMOVE VMLISP:NREMOVEQ - BOOT::|tokConstruct| BOOT::|pfAdd| - BOOT:|ByteFileReadLineIntoString| BOOT:MATCH-TOKEN)) -(PROCLAIM - '(FTYPE (FUNCTION (T T T *) T) BOOT::|ncHardError| - BOOT::TOKEN-INSTALL BOOT::|ncSoftError| BOOT::|lnCreate|)) -(PROCLAIM - '(FTYPE (FUNCTION (T T T T T T T) T) BOOT::|findFunctionInCategory| - BOOT::|Mp2MpAux1| BOOT::|Mp2MpAux0| BOOT::|Expr2Dmp1| - BOOT::|Mp2SimilarDmp| BOOT::|bigopAppAux| - BOOT::|findFunctionInDomain| BOOT::|abbreviationError| - BOOT::|lisplibError| BOOT::|invokeNagman| - BOOT::|mkNewModemapList| BOOT::|mkDiffAssoc| - BOOT::|dbGatherThenShow| BOOT::|appInfixArg| - BOOT::|lazyOldAxiomDomainLookupExport| - BOOT::|oldAxiomDomainLookupExport|)) -(PROCLAIM - '(FTYPE (FUNCTION (T T T T T T T T T T T) T) - BOOT::|displayDomainOp|)) -(PROCLAIM '(FTYPE (FUNCTION (T T T T *) T) VMLISP:RPLACSTR)) -(PROCLAIM - '(FTYPE (FUNCTION (T T T T T T T T T T) T) BOOT::|P2DmpAux| - BOOT::|makeSpadFun|)) -(PROCLAIM - '(FTYPE (FUNCTION (T T T T T T T T) T) BOOT::|compDefineCategory2| - BOOT::|P2MpAux| BOOT::|makeFort1|)) -(PROCLAIM - '(FTYPE (FUNCTION (T T T T T T T T T) T) BOOT::|writeCFile| - BOOT::|Mp2MpAux2|)) -(PROCLAIM '(FTYPE (FUNCTION (T T T T T *) T) BOOT::|msgCreate|)) -(PROCLAIM - '(FTYPE (FUNCTION NIL *) BOOT::|generateResultsName| - BOOT::|generateDataName| BOOT::|htShowPage| - BOOT::|PARSE-Label| BOOT::|bcMatrix| BOOT::|PARSE-Primary1| - BOOT::|PARSE-Enclosure| BOOT::|bcDraw2DSolve| - BOOT::|PARSE-Selector| BOOT::|PARSE-Category| - BOOT::|PARSE-Option| BOOT::|PARSE-TokenOption| - BOOT::|PARSE-Sexpr1| BOOT::|PARSE-Sexpr| - BOOT::|PARSE-Scripts| BOOT::|PARSE-SpecialCommand| - BOOT::|PARSE-FloatBasePart| BOOT::|PARSE-FloatBase| - BOOT::|PARSE-Leave| BOOT::|e02aef| BOOT::|e04ucfCopOut| - BOOT::|c02agf| BOOT::|c02aff| BOOT::|e02adf| BOOT::|c05pbf| - VMLISP:RECLAIM BOOT::MKPROMPT BOOT::|sendHTErrorSignal| - BOOT::|testPage| BOOT::|e01sef| BOOT::|e01saf| - BOOT::|e01daf| BOOT::|e01bhf| BOOT::|e01bgf| BOOT::|e01bff| - BOOT::|e01bef| BOOT::|e01baf| BOOT::|e02zaf| BOOT::|e02gaf| - BOOT::|e02dff| BOOT::|e02def| BOOT::|e02ddf| BOOT::|e02dcf| - BOOT::|e02daf| BOOT::|e02bef| BOOT::|e02bdf| - BOOT::|minusInfinity| BOOT::|plusInfinity| - BOOT::SERVER-SWITCH BOOT::CLEARDATABASE BOOT::NBOOT-LEXPR - BOOT::BOOT-LEXPR BOOT::|executeQuietCommand| - BOOT::|serverSwitch| BOOT::|scanS| - BOOT::|sendNagmanErrorSignal| BOOT::|d01gbf| BOOT::|d01gaf| - BOOT::|d01fcf| BOOT::|d01bbf| BOOT::|d01asf| - BOOT::|d02rafCopOut| BOOT::|d02raf| BOOT::|d02kef| - BOOT::|d02gbf| BOOT::|d02gaf| BOOT::|d02ejf| BOOT::|d02cjf| - BOOT::|d02bhf| BOOT::|d02bbf| BOOT::|e02ahf| - BOOT::|d03edfShort| BOOT::|d03edfLong| BOOT::|d03eefInput| - BOOT::|d03faf| BOOT::|d03eef| BOOT::|d03edf| - BOOT::|htSystemVariables| BOOT::|htSetVars| - BOOT::|mkSetTitle| BOOT::|npCategory| - BOOT::PARSE-CONS_SEXPR BOOT::PARSE-SEXPR - BOOT::PARSE-REF_SEXPR BOOT::PARSE-EXPR2 BOOT::PARSE-EXPR1 - BOOT::|htsv| BOOT::|npDefinitionItem| BOOT::|npDefn| - BOOT::|npMacro| BOOT::|npMDEFinition| BOOT::|npRule| - BOOT::RESETHASHTABLES BOOT::READSPADEXPR - BOOT::|batchExecute| BOOT::|c05nbf| BOOT::|c05adf| - BOOT::|c06gsf| BOOT::|c06gqf| BOOT::|c06gcf| BOOT::|c06gbf| - BOOT::|c06fuf| BOOT::|c06frf| BOOT::|c06fqf| BOOT::|c06fpf| - BOOT::|c06ekf| BOOT::|c06ecf| BOOT::|c06ebf| BOOT::|c06eaf| - BOOT::|s17def| BOOT::|s17dcf| BOOT::|s17akf| BOOT::|s17ajf| - BOOT::|s17ahf| BOOT::|s17agf| BOOT::|s17aff| BOOT::|s17aef| - BOOT::|s17adf| BOOT::|s17acf| BOOT::|s15aef| BOOT::|s15adf| - BOOT::|s14baf| BOOT::|s14abf| BOOT::|s14aaf| BOOT::|s13adf| - BOOT::|s13acf| BOOT::|s13aaf| BOOT::|s01eaf| BOOT::|s21bdf| - BOOT::|s21bcf| BOOT::|s21bbf| BOOT::|s21baf| BOOT::|s20adf| - BOOT::|e02agf| BOOT::|s20acf| BOOT::|d01aqf| BOOT::|s19adf| - BOOT::|d01apf| BOOT::|s19acf| BOOT::|d01anf| BOOT::|d01amf| - BOOT::|d01alf| BOOT::|s19abf| BOOT::|d01akf| BOOT::|s19aaf| - BOOT::|d01ajf| BOOT::|s18def| BOOT::|s18dcf| BOOT::|s18aff| - BOOT::|s18aef| BOOT::|s18adf| BOOT::|s18acf| BOOT::|f04qaf| - BOOT::|f04mcf| BOOT::|f04mbf| BOOT::|f04maf| BOOT::|f04jgf| - BOOT::|f04faf| BOOT::|f04axf| BOOT::|f04atf| BOOT::|f04asf| - BOOT::|quit| BOOT::|f04arf| BOOT::|quitSpad2Cmd| - BOOT::|f04adf| BOOT::|pquit| BOOT::|pquitSpad2Cmd| - BOOT::CONTINUE BOOT::|continue| BOOT::|purgeLocalLibdb| - BOOT::|dbSplitLibdb| BOOT::|f07fef| BOOT::|f07fdf| - BOOT::|f07aef| BOOT::|f07adf| BOOT::|copyright| - BOOT::|s17dlf| BOOT::|s17dhf| BOOT::|s17dgf| BOOT::|f02xef| - BOOT::|f02wef| BOOT::|f02fjf| BOOT::|f02bjf| BOOT::|f02bbf| - BOOT::|f02axf| BOOT::|f02awf| BOOT::|f02akf| BOOT::|f02ajf| - BOOT::|f02agf| BOOT::|htShowPageNoScroll| BOOT::|f02aff| - BOOT::|f02aef| BOOT::|f02adf| BOOT::|f02abf| BOOT::|f02aaf| - BOOT::|measure| BOOT::|writeSaturnSuffix| BOOT::NEWRULE - BOOT::PARSE-LOCAL_VAR BOOT::|htErrorStar| - BOOT::|queryClients| BOOT::|onDisk| BOOT::|endHTPage| - BOOT::|readSpadProfileIfThere| BOOT::|bcDraw3Dpar1| - BOOT::|bcDraw3Dpar| BOOT::|htShowPageStarSaturn| - BOOT::|htShowPageStar| BOOT::|bcDraw3Dfun| - BOOT::|bcDraw2Dpar| BOOT::|bcSum| BOOT::|bcSeries| - BOOT::|bcProduct| BOOT::|bcLimit| - BOOT::|bcIndefiniteIntegrate| BOOT::|bcDraw| - BOOT::|bcDifferentiate| BOOT::|bcDefiniteIntegrate| - BOOT::|bcDraw2Dfun| BOOT::MAKE-TAGS-FILE BOOT::|bcSolve| - BOOT::|npPrimary1| BOOT::|e02bcf| BOOT::|e02bbf| - BOOT::|e02baf| BOOT::|e02akf| BOOT::|e02ajf| BOOT::|e04ycf| - BOOT::|e04ucf| BOOT::|e04naf| BOOT::|e04mbf| BOOT::|e04jaf| - BOOT::|e04gcf| BOOT::|e04fdf| BOOT::|e04dgf| BOOT::|f01ref| - BOOT::|f01rdf| BOOT::|f01rcf| BOOT::|f01qef| BOOT::|f01qdf| - BOOT::|f01qcf| BOOT::|f01mcf| BOOT::|f01maf| BOOT::|f01bsf| - BOOT::|f01brf|)) -(PROCLAIM - '(FTYPE (FUNCTION NIL T) BOOT::|getCodeVector| - BOOT:PARSE-IDENTIFIER BOOT::|axDoLiterals| - BOOT::|PARSE-Suffix| BOOT:CURRENT-TOKEN - BOOT::|PARSE-TokTail| BOOT::|PARSE-InfixWith| - BOOT::|PARSE-With| BOOT::|PARSE-Form| - BOOT::|PARSE-Reduction| BOOT::|PARSE-SemiColon| - BOOT::|PARSE-Iterator| BOOT::|PARSE-Primary| - BOOT::|PARSE-ElseClause| BOOT::|PARSE-Conditional| - BOOT::|PARSE-Name| BOOT::|PARSE-Sequence| - BOOT::|PARSE-Data| BOOT::|PARSE-FormalParameter| - BOOT::|PARSE-IntegerTok| BOOT::|PARSE-String| - BOOT::|PARSE-Quad| BOOT::|PARSE-VarForm| - BOOT::|PARSE-Qualification| BOOT::|PARSE-Prefix| - BOOT::|PARSE-Infix| BOOT::|PARSE-Application| - BOOT:CURRENT-SYMBOL BOOT::|clearCmdSortedCaches| - BOOT::|PARSE-Statement| BOOT::|PARSE-Command| - BOOT::|updateInCoreHist| BOOT::|processSynonyms| - BOOT::|disableHist| BOOT::|PARSE-IteratorTail| - BOOT::|histFileName| BOOT::|PARSE-OpenBrace| - BOOT::|PARSE-Sequence1| BOOT::|PARSE-OpenBracket| - BOOT::|PARSE-PrimaryNoFloat| BOOT:FAIL BOOT::|PARSE-Float| - BOOT::|PARSE-PrimaryOrQM| BOOT::|PARSE-TokenList| - BOOT::|PARSE-AnyId| BOOT::|resetInCoreHist| - BOOT::|PARSE-TokenCommandTail| BOOT::|isTokenDelimiter| - BOOT::|PARSE-ScriptItem| BOOT::|PARSE-CommandTail| - BOOT::|historySpad2Cmd| BOOT::|PARSE-FormalParameterTok| - BOOT::|PARSE-SpecialKeyWord| - BOOT::|writeHistModesAndValues| BOOT::|PARSE-FloatTok| - BOOT::|PARSE-FloatExponent| BOOT::|updateHist| - BOOT::|initHistList| BOOT::|initHist| BOOT::|PARSE-Exit| - BOOT::|oldHistFileName| BOOT:PARSE-NUMBER - BOOT::|PARSE-Return| BOOT::|PARSE-ReductionOp| - BOOT::|PARSE-LabelExpr| BOOT::|PARSE-Import| - BOOT::|writeHiFi| BOOT::|PARSE-Loop| - BOOT::|updateCurrentInterpreterFrame| BOOT::|PARSE-Seg| - BOOT:CURINPUTLINE BOOT::|profileWrite| BOOT:PARSE-BSTRING - BOOT:NEXT-TOKEN BOOT:IOSTAT BOOT::|isPackageFunction| - BOOT:UNGET-TOKENS BOOT::|setOptKeyBlanks| - BOOT::|getInfovecCode| BOOT::|NRTmakeSlot1Info| - BOOT::|reportOnFunctorCompilation| BOOT:BUMPCOMPERRORCOUNT - BOOT::|displayMissingFunctions| BOOT:PARSE-STRING - BOOT:ADVANCE-TOKEN BOOT::ERRHUH BOOT:CURRENT-CHAR - VMLISP:$TOTAL-ELAPSED-TIME BOOT::IS-GENSYM - BOOT::|getSpecialCaseAssoc| - BOOT::|makeConstructorsAutoLoad| - BOOT::|displayExposedGroups| - BOOT::|displayHiddenConstructors| - BOOT::|displaySemanticErrors| BOOT::|clock| - BOOT::|startTimer| BOOT::|spadPrompt| BOOT::|stopTimer| - BOOT::|quadSch| BOOT::/TRACEREPLY BOOT::TRACELETREPLY - BOOT::|voidValue| BOOT::/COMP BOOT::|getDateAndTime| - BOOT::|coercionFailure| VMLISP:EMBEDDED - BOOT::|printableArgModeSetList| BOOT::|asList| - BOOT::|boot2LispError| BOOT::|extendConstructorDataTable| - BOOT::|fin| BOOT::PARSERSTATE BOOT::|New,ENTRY,1| - BOOT::|mkLowerCaseConTable| BOOT::NEW-LEXPR-INTERACTIVE - BOOT::NEW-LEXPR BOOT::|spadThrow| BOOT::INITIALIZE - BOOT::NEW BOOT::|New,ENTRY| BOOT::|traceComp| - BOOT::|New,ENTRY1| BOOT::|New,ENTRY,SYS| BOOT::NEWPO - BOOT::|returnToReader| BOOT::|returnToTopLevel| BOOT::TOP - BOOT::|serverLoop| BOOT::|describeSetOutputTex| - BOOT::|describeSetOutputFortran| - BOOT::|describeSetLinkerArgs| - BOOT::|describeProtectSymbols| - BOOT::|describeOutputLibraryArgs| - BOOT::|describeSetFortDir| BOOT::|describeFortPersistence| - BOOT::|describeSetFortTmpDir| - BOOT::|describeProtectedSymbolsWarning| - BOOT::|describeSetStreamsCalculate| - BOOT::|describeSetOutputFormula| - BOOT::|describeInputLibraryArgs| - BOOT::|resetWorkspaceVariables| BOOT::|describeSetNagHost| - BOOT::|describeAsharpArgs| BOOT::|describeSetOutputAlgebra| - BOOT::|sayAllCacheCounts| BOOT::|describeSetFunctionsCache| - BOOT::|nangenericcomplex| BOOT::|createTypeEquivRules| - BOOT::|createResolveTTRules| BOOT::|createResolveTMRules| - BOOT::|bcBlankLine| BOOT::|browserAutoloadOnceTrigger| - BOOT::|scanKeyTableCons| BOOT::|scanToken| BOOT::|scanEsc| - BOOT::|scanError| BOOT::|scanEscape| BOOT::|scanNumber| - BOOT::|asharpConstructors| BOOT::|scanString| - BOOT::|scanSpace| BOOT::|scanPunct| BOOT::|scanNegComment| - BOOT::|startsNegComment?| BOOT::|scanComment| - BOOT::|startsComment?| BOOT::|scanPunCons| - BOOT::|scanDictCons| BOOT::|resetStackLimits| - BOOT::|npRecoverTrap| BOOT::|syGeneralErrorHere| - BOOT::|DPname| BOOT::|pfNoPosition| VMLISP:CURRENTTIME - BOOT::|buildHtMacroTable| BOOT::|checkWarningIndentation| - BOOT::|npDecl| BOOT::|npType| VMLISP:$SCREENSIZE - BOOT::|npAmpersand| BOOT::|npName| BOOT::|npFromdom| - BOOT::|npSCategory| BOOT::|npPrimary| BOOT::|npState| - BOOT::|npDefaultValue| BOOT::|npAssignVariableName| - BOOT::|npPDefinition| BOOT::|npDollar| - BOOT::|npSQualTypelist| BOOT::PARSE-NON_DEST_REF - BOOT::PARSE-OPT_EXPR BOOT::PARSE-REPEATOR - BOOT::|npCategoryL| BOOT::PARSE-SEXPR_STRING - BOOT::|npProduct| BOOT::PARSE-TEST BOOT::|npIterators| - BOOT::PARSE-EXPR BOOT::|npWhile| - BOOT::|displayPreCompilationErrors| BOOT::PARSE-N_TEST - BOOT::|npForIn| BOOT::PARSE-REP_TEST BOOT::|npGives| - BOOT::PARSE-FIL_TEST BOOT::|npLogical| BOOT::PARSE-SUBEXPR - BOOT::|npExpress| BOOT::PARSE-FID BOOT::PARSE-RULE - BOOT::|npExpress1| BOOT::PARSE-HEADER - BOOT::|npCommaBackSet| BOOT::PARSE-RULE1 BOOT::|npQualType| - VMLISP:$TOTAL-GC-TIME BOOT::|npADD| - BOOT::|npConditionalStatement| - BOOT::|npQualifiedDefinition| BOOT::|npPushId| - BOOT::|npVariable| BOOT::|npDefinitionOrStatement| - BOOT::|npAssignVariable| BOOT::|npColon| - BOOT::|npAssignment| BOOT::|profileDisplay| - BOOT:|TimeStampString| BOOT::|computeDomainVariableAlist| - BOOT::MONITOR-READINTERP BOOT::|npSingleRule| - BOOT::MONITOR-UNTESTED BOOT::|npDefTail| BOOT::|npQuiver| - BOOT::MONITOR-PERCENT BOOT::|npDef| BOOT::|npStatement| - BOOT::|npImport| BOOT::|npTyping| BOOT::|npItem| - BOOT::|npQualDef| BOOT::|npAssign| BOOT::MONITOR-AUTOLOAD - BOOT::|npDefinition| BOOT::MONITOR-RESULTS - BOOT::MONITOR-END BOOT::|npPop3| BOOT::MONITOR-INITTABLE - BOOT::|npAtom2| BOOT::|npInfixOperator| BOOT::|npPower| - BOOT::MONITOR-HELP BOOT::|npMatch| BOOT::MONITOR-REPORT - BOOT::|npMdef| BOOT::|reportInstantiations| - BOOT::|npPrimary2| BOOT::?DOMAINS BOOT::|?domains| - BOOT::|npSuch| BOOT::|npMDEF| BOOT::|npDisjand| - BOOT::|npInfixOp| BOOT::|npDiscrim| - BOOT::|clearConstructorAndLisplibCaches| - BOOT::|npVariableName| BOOT::|clearConstructorCaches| - BOOT::|clearClams| BOOT::|clearCategoryCaches| - BOOT::|cacheStats| BOOT::|reportAndClearClams| - BOOT::|traceDown| BOOT::|statRecordInstantiationEvent| - BOOT::|tc| BOOT::GET-CURRENT-DIRECTORY - BOOT::|removeAllClams| BOOT::|clamStats| BOOT::|npPop1| - BOOT::|npTrap| BOOT::|npApplication| BOOT::|npPop2| - BOOT::|npApplication2| BOOT::WRITE-WARMDATA - BOOT::WRITE-INTERPDB BOOT::|npAssignVariablelist| - BOOT::|clearHashReferenceCounts| BOOT::|npSignature| - BOOT::|pfNothing| BOOT::|npSigItemlist| BOOT::|npEncl| - BOOT::|npBDefinition| BOOT::|npPrefixColon| BOOT::|npNext| - BOOT::|allOperations| BOOT::WRITE-CATEGORYDB - BOOT::WRITE-OPERATIONDB BOOT::WRITE-BROWSEDB - BOOT::WRITE-COMPRESS BOOT::INITIAL-GETDATABASE - BOOT::CATEGORYOPEN BOOT::BROWSEOPEN BOOT::OPERATIONOPEN - BOOT::INTERPOPEN BOOT::COMPRESSOPEN - BOOT::CREATE-INITIALIZERS BOOT::|poNoPosition| - BOOT::|saveDependentsHashTable| BOOT::|saveUsersHashTable| - BOOT::|mkTopicHashTable| BOOT::TOKEN-STACK-SHOW - BOOT::|system| BOOT::|terminateSystemCommand| - BOOT::|getSystemCommandLine| BOOT::TERMCHR - BOOT::IOSTREAMS-SHOW BOOT::|displayExposedConstructors| - BOOT::|finalizeDocumentation| BOOT::REDUCE-STACK-SHOW - BOOT::CLEAR-HIGHLIGHT BOOT::RESET-HIGHLIGHT BOOT::RESTART0 - START BOOT::|libraryFileLists| BOOT::|waitForViewport| - BOOT::|setViewportProcess| - BOOT::|installStandardTestPackages| BOOT::|printCopyright| - BOOT::AKCL-VERSION BOOT::SET-RESTART-HOOK - BOOT::|undoINITIALIZE| BOOT::|simpCategoryTable| - BOOT::|simpTempCategoryTable| BOOT::COMPFIN - BOOT::INPUT-CLEAR BOOT::|genTempCategoryTable| BOOT::|cc| - BOOT::|initNewWorld| BOOT::|genCategoryTable| - BOOT::|dbOpsExposureMessage| BOOT::|htSayUnexposed| - BOOT::|NRTmakeCategoryAlist| - BOOT::|NRTgenFinalAttributeAlist| BOOT::|dcSizeAll| - BOOT::|initialiseIntrinsicList| BOOT::|tempLen| - BOOT::|changeDirectoryInSlot1| BOOT::|NRTaddDeltaCode| - BOOT::|ncIntLoop| BOOT::SPECIALCASESYNTAX - BOOT::|newFortranTempVar| BOOT::|currentSP| - BOOT::|elapsedTime| BOOT::|traceUp| - BOOT::|getIntrinsicList| BOOT::|getInterpMacroNames| - BOOT::|synonymSpad2Cmd| BOOT::|interpFunctionDepAlists| - BOOT::NPPPG BOOT::|isFalse| BOOT::NPPPF BOOT::NPPPFF - BOOT::|printDashedLine| BOOT::|satBreak| BOOT::|up| - BOOT::|getWorkspaceNames| BOOT::|getParserMacroNames| - BOOT::|oldCompilerAutoloadOnceTrigger| BOOT::|TrimCF| - BOOT::|displayWorkspaceNames| BOOT::UP - BOOT::|displayWarnings| BOOT::|buildGloss| - BOOT::|nextInterpreterFrame| BOOT::|down| - BOOT::|displayFrameNames| BOOT::DOWN - BOOT::|previousInterpreterFrame| BOOT::SAME BOOT::|same| - BOOT::|mkUsersHashTable| BOOT::|allConstructors| - BOOT::|frameNames| BOOT::|sayShowWarning| BOOT::|credits| - BOOT::|mkDependentsHashTable| - BOOT::|buildDefaultPackageNamesHT| - BOOT::|dbAugmentConstructorDataTable| FOAM:|fiGetDebugVar| - BOOT::|menuButton| BOOT::|htSaturnBreak| BOOT::|random| - BOOT::|dbConsExposureMessage| BOOT::|mkSigPredVectors| - BOOT::FIRST-ERROR BOOT::|writeSaturnPrefix| BOOT::|on| - BOOT::|offDisk| BOOT::|htBigSkip| BOOT::PARSE-PROGRAM - BOOT::IN-META BOOT::|traceReply| BOOT::|?t| - BOOT::SKIP-BLANKS BOOT::|pspacers| BOOT::NEXT-LINES-SHOW - BOOT::|resetCounters| BOOT::PARSE-DEST_REF - BOOT::SPAD_SHORT_ERROR BOOT::|pcounters| - BOOT::SPAD_LONG_ERROR BOOT::INIT-BOOT/SPAD-READER - BOOT::NEXT-LINES-CLEAR BOOT::|resetTimers| - BOOT::|resetSpacers| BOOT::|ptimers| - BOOT::|PARSE-Expression| - BOOT::|oldParserAutoloadOnceTrigger| BOOT::|boot-LEXPR| - BOOT::|reportCount| BOOT::NEW-LEXPR1 BOOT::|spadReply| - BOOT::|listConstructorAbbreviations| BOOT::BOOT-SKIP-BLANKS - BOOT::|updateFromCurrentInterpreterFrame| - BOOT::PARSE-ARGUMENT-DESIGNATOR BOOT::PARSE-KEYWORD - BOOT::PARSE-SPADSTRING - BOOT::|initializeInterpreterFrameRing| BOOT::READ-SPAD-1 - BOOT::READBOOT BOOT::|reportWhatOptions| - BOOT::TERSYSCOMMAND BOOT::|PARSE-NewExpr| - BOOT::|makeInitialModemapFrame| - BOOT::|createCurrentInterpreterFrame| - BOOT::|getParserMacros| BOOT::|clearCmdCompletely| - BOOT::|clearCmdAll| BOOT::|clearMacroTable| - BOOT::|initializeSystemCommands| BOOT::|htSayHrule| - BOOT::|htEndTable| BOOT::|mkMenuButton| BOOT::|runspad| - BOOT::|htBeginTable| BOOT::|ncTopLevel| - BOOT::|spadStartUpMsgs| BOOT::|initializeRuleSets| - BOOT::|loadExposureGroupData| - BOOT::|statisticsInitialization| BOOT::|ut| - BOOT::|printStatisticsSummary| BOOT::|printStorage| - BOOT::|prTraceNames| BOOT::|spad| BOOT::|spadpo| - BOOT::|intloop| BOOT::|off| BOOT::|htEndTabular| - BOOT::|htSaySaturnAmpersand| BOOT::|page| - BOOT::|clearFrame| BOOT::|getSaturnExampleList| - BOOT::|saturnTERPRI| BOOT::|bcSadFaces| BOOT::YEARWEEK - BOOT::|npBPileDefinition| BOOT::|npTypified| - BOOT::|npVariablelist| BOOT::|npTagged| BOOT::|bcvspace| - BOOT::|npTypeStyle| BOOT::|npColonQuery| BOOT::|npPretend| - BOOT::|npRestrict| BOOT::|npCoerceTo| BOOT::|npRelation| - BOOT::|npFirstTok| BOOT::|npVoid| BOOT::|npSLocalItem| - BOOT::NPPCG BOOT::|npLocalItemlist| BOOT::|npFix| - BOOT::NPPCFF BOOT::|npDefaultItemlist| BOOT::|npSynthetic| - BOOT::|npAmpersandFrom| BOOT::|npBy| BOOT::|npLet| - BOOT::|npTypeVariable| BOOT::|npSignatureDefinee| - BOOT::|npAtom1| BOOT::|npConstTok| BOOT::|npLocalItem| - BOOT::|npLocalDecl| BOOT::|npExport| BOOT::|npLocal| - BOOT::|npInline| BOOT::|npFree| BOOT::|npInterval| - BOOT::|npSegment| BOOT::|npArith| BOOT::|npBreak| - BOOT::|npDefaultItem| BOOT::|npDefaultDecl| - BOOT::|npReturn| BOOT::|npSemiBackSet| - BOOT::|npSDefaultItem| BOOT::|npTypeVariablelist| - BOOT::|npPileDefinitionlist| BOOT::|npDefinitionlist| - BOOT::|npComma| BOOT::|npSymbolVariable| BOOT::|npId| - BOOT::|npSum| BOOT::|npTerm| BOOT::|npRemainder| - BOOT::|npIterate| BOOT::|npLoop| BOOT::|npSuchThat| - BOOT::|npSelector| BOOT::|npIterator| BOOT::|npSigItem| - BOOT::|npSigDecl| BOOT::|statRecordLoadEvent| - BOOT::|computeElapsedTime| BOOT::|npLambda| - BOOT::|computeElapsedSpace| BOOT::|popTimedName| - BOOT::|npBacksetElse| BOOT::|peekTimedName| - BOOT::|npQualTypelist| BOOT::|npPileExit| BOOT::|npExit| - BOOT::|statisticsSummary| BOOT::|displayHeapStatsIfWanted| - BOOT::|update| BOOT:RESTART BOOT:|version| BOOT:/EMBEDREPLY - BOOT:NEXTINPUTLINE BOOT:|Category| BOOT::|intUnsetQuiet| - BOOT::|intSetQuiet| BOOT:POP-REDUCTION - BOOT::|intSetNeedToSignalSessionManager| - BOOT::|intNewFloat| BOOT::|leaveScratchpad| BOOT::|ncError| - BOOT::|incConsoleInput| BOOT:NEXT-CHAR - BOOT::|inclmsgCmdBug| BOOT::|inclmsgIfBug| - BOOT::|inclmsgFinSkipped| BOOT::|inclmsgConsole| - COMPILER::GAZONK-NAME HELP BOOT:ADVANCE-CHAR - BOOT::|rbrkSch| BOOT::|lbrkSch|)) -(PROCLAIM - '(FTYPE (FUNCTION (*) *) BOOT::|makeSpadCommand| BOOT::/RF - BOOT::|/RQ,LIB| VMLISP:$ERASE BOOT::|mkGrepPattern1| - BOOT::|nothingFoundPage| BOOT::|dbNotAvailablePage| - BOOT::|htSetCache| BOOT::NEXT-LINE BOOT::/EF - BOOT::INIT-MEMORY-CONFIG BOOT::/RQ BOOT::|newGoGet| - BOOT::|goGet| BOOT::|dbShowOps| BOOT::|oPage| BOOT::|aPage| - BOOT::|buildLibdb| BOOT::|emptySearchPage| - BOOT::|conOpPage1| BOOT::|conPage| BOOT::|kPage| - BOOT::|genSearch| BOOT::|dbShowCons| BOOT::|form2HtString| - BOOT::|bcFinish| BOOT::|Undef| BOOT:META-SYNTAX-ERROR)) -(PROCLAIM - '(FTYPE (FUNCTION (T) *) BOOT::|numArgs| - BOOT::|formatSignatureArgs0| BOOT::|formatSignatureArgs| - BOOT::|sayWidth| BOOT::SRCABBREVS BOOT::|bcMatrixGen| - BOOT::|bcwords2liststring| BOOT::|bcGenExplicitMatrix| - BOOT::|bcGen| BOOT::|bcInputMatrixByFormulaGen| - BOOT::|bcReadMatrix| BOOT::|systemCommand| - BOOT::|safeWritify| BOOT::|unAbbreviateKeyword| - BOOT::|replacePercentByDollar| BOOT::|e04ucfSolve| - BOOT::|brightPrint0AsTeX| BOOT::|sayDisplayStringWidth| - BOOT:GET-TOKEN BOOT::|initializeLisplib| BOOT::|getMsgTag| - BOOT::|poFileName| BOOT::|mac0InfiniteExpansion,name| - BOOT::|NRTtypeHack| BOOT::|getMsgPos2| BOOT::|e02agfSolve| - BOOT::|c02agfGen| BOOT:NUMOFARGS BOOT::|c02affSolve| - BOOT::|c02affGen| BOOT::|c02agfSolve| BOOT::|c05adfGen| - BOOT::|outputTran| BOOT::|replaceSharpCalls| - BOOT::/UNTRACE-0 BOOT::|doReplaceSharpCalls| BOOT::DEFTRAN - BOOT::LIST2STRING BOOT::DEF-WHERECLAUSELIST BOOT::DEF-ISNT - BOOT::|quoteSuper| BOOT::|quoteSub| BOOT::MK_LEFORM - BOOT::MK_LEFORM-CONS BOOT::|aggSuper| - BOOT::|oldParseString| BOOT::|outformWidth| BOOT::|aggSub| - BOOT::|agggwidth| BOOT::|agggsuper| BOOT::|agggsub| - BOOT::|obj2String| BOOT::|compileFileQuietly| - BOOT::|exptSub| BOOT::|mathPrint| BOOT::|rootSub| - BOOT::|parseTransform| BOOT::|overbarWidth| - BOOT::MONITOR-EVALAFTER BOOT::|overlabelWidth| - BOOT::|object2String| BOOT::|e02aefGen| BOOT::/TRACE-0 - BOOT::LENGTH2STR BOOT::|matSub| BOOT::/MKINFILENAM - BOOT::|qTSuper| BOOT::|qTSub| BOOT::|sayMSGNT| - VMLISP:BPINAME BOOT::|e01safSolve| BOOT::|e01befSolve| - BOOT::|linkToHTPage| BOOT::|killHTPage| - BOOT::|startReplaceHTPage| BOOT::|e01dafSolve| - BOOT::|startHTPopUpPage| BOOT::|e01bffSolve| - BOOT::|e01bafGen| BOOT::|e01sefGen| BOOT::|e01bhfGen| - BOOT::|e01bhfSolve| BOOT::|e01dafGen| BOOT::|e01bgfGen| - BOOT::|e01befGen| BOOT::|e02dcfColdGen| BOOT::|e02bafGen| - BOOT::|e02agfGen| BOOT::|e02befColdGen| BOOT::|e02ajfSolve| - BOOT::|e02ddfColdGen| BOOT::|numMapArgs| - BOOT::|e02befSolve| BOOT::|e02dcfSolve| - BOOT::|e02ddfWarmGen| BOOT::|e02adfSolve| - BOOT::|e02aefSolve| BOOT::|e02ddfSolve| BOOT::|e02bafSolve| - BOOT::|e02bcfSolve| BOOT::|e02ahfGen| BOOT::|e02gafSolve| - BOOT::|e02bbfGen| BOOT::|e02adfGen| BOOT::|e02defGen| - BOOT::|e02ahfSolve| BOOT::|e02bdfGen| BOOT::|e02akfGen| - BOOT::|e02dafGen| BOOT::|e02bdfSolve| BOOT::|e02dffGen| - BOOT::|e02akfSolve| BOOT::|asyJoinPart| BOOT::|printLine| - BOOT::|sockSendWakeup| BOOT::|sockGetFloat| - BOOT::PRINT-LINE BOOT::SOCK-SEND-WAKEUP - BOOT::SOCK-GET-FLOAT BOOT::|/tb| BOOT::|/ry| BOOT::|/rx| - BOOT::|/cxd| BOOT::/FOOBAR BOOT::/CX BOOT::NEWNAMTRANS - BOOT::|htMakeInputList| BOOT::SPAD-MODETRAN - BOOT::|popSatOutput| BOOT::|subrname| BOOT::SOCK-GET-INT - BOOT::OPEN-SERVER BOOT::|protectedEVAL| - BOOT::|setOutputTex| BOOT::|setOutputFortran| BOOT::|set| - BOOT::|setLinkerArgs| BOOT::|protectSymbols| - BOOT::|protectedSymbolsWarning| BOOT::|setStreamsCalculate| - BOOT::|setOutputFormula| BOOT::|setNagHost| - BOOT::|setFunctionsCache| BOOT::|spadType| BOOT::|spadSys| - BOOT::|mkGrepFile| BOOT::|mkGrepPattern1,addOptions| - BOOT::|mkGrepPattern1,remUnderscores| - BOOT::|mkUpDownPattern| BOOT::|mkUpDownPattern,fixchar| - BOOT::|cSearch| BOOT::|verbatimize| - BOOT::|pmParseFromString,flatten| - BOOT::|htCommandToInputLine| BOOT::|detailedSearch| - BOOT::|docSearch| BOOT::|form2HtString,fnTailTail| - BOOT::|form2HtString,fn| BOOT::|sexpr2HtString| - BOOT::|kInvalidTypePage| BOOT::|args2LispString,fnTailTail| - BOOT::|sexpr2LispString,fn| BOOT::|args2LispString| - BOOT::|sexpr2LispString| BOOT::|sexpr2HtString,fn| - BOOT::|spleI| BOOT::|dbComments| BOOT::|sockGetInt| - BOOT::|parseAndEvalStr| BOOT::|parseAndEvalStr1| - BOOT::|d01gafSolve| BOOT::|d01apfGen| BOOT::|d01fcfSolve| - BOOT::|d01asfGen| BOOT::|d02bbfSolve| BOOT::|d02rafGen| - BOOT::|d02kefGen| BOOT::|d02kefSolve| BOOT::|d02ejfGen| - BOOT::|d02gbfSolve| BOOT::|d02bbfGen| BOOT::|d02bhfGen| - BOOT::|d02rafSolve| BOOT::|d02ejfSolve| BOOT::|d02bhfSolve| - BOOT::|d02gafGen| BOOT::|d02gbfGen| BOOT::|d02gafSolve| - BOOT::|d02cjfGen| BOOT::|d02cjfSolve| BOOT::|d03edfControl| - BOOT::|d03edfSolve| BOOT::|d03eefSolve| - BOOT::|d03edfLongGen| BOOT::|d03eefGen| - BOOT::|d03edfShortGen| BOOT::|e01sefSolve| - BOOT::|lnFileName| BOOT::|e01bgfSolve| BOOT::|e01safGen| - BOOT::|e01bffGen| BOOT::|e01bafSolve| - BOOT::|pfGlobalLinePosn| BOOT::|quoteString| - BOOT::|postTran| BOOT::|decodeScripts| BOOT::|htGloss| - BOOT::|htTutorialSearch| BOOT::|postInSeq| - BOOT::|htTextSearch| BOOT::|htGreekSearch| - BOOT::|postMakeCons| BOOT::|postCategory,fn| - BOOT::|htShowFunctionPageContinued| BOOT::|htCacheSet| - BOOT::|htSetFunCommand| BOOT::|listOfStrings2String| - BOOT::|htCacheOne| BOOT::|htShowSetTree| - BOOT::|htShowSetTreeValue| BOOT::|postBigFloat| - BOOT::|htSetInteger| BOOT::|chkRange| BOOT::|postConstruct| - BOOT::|postSlash| BOOT::|htCacheAddChoice| - BOOT::|startHTPage| BOOT::|htSetLinkerArgs| - BOOT::|htSetOutputCharacters| BOOT::|htSetKernelWarn| - BOOT::|htSetKernelProtect| BOOT::|htSetExpose| - BOOT::|htSetInputLibrary| BOOT::|htSetOutputLibrary| - BOOT::|htSetHistory| SPAD-SAVE BOOT:|OsEnvGet| - BOOT:|LispCompile| BOOT:|LispCompileFile| - BOOT::|condErrorMsg| BOOT:|LispLoadFile| - BOOT:|LispLoadFileQuietly| BOOT::MONITOR-RESTORE - BOOT::|brightPrintCenterAsTeX| BOOT::|brightPrint0| - BOOT::|sayWidth,fn| BOOT::|brightPrintCenter| - BOOT::|clearClam| BOOT::|brightPrintHighlightAsTeX| - BOOT::|brightPrintHighlight| BOOT::|sayDisplayWidth,fn| - BOOT::|sayDisplayWidth| BOOT::INIT-LIB-FILE-GETTER - BOOT::INIT-FILE-GETTER BOOT::|entryWidth| BOOT::FILE-RUNNER - BOOT::|editFile| BOOT::|readForDoc| BOOT::|checkNumOfArgs| - BOOT::|openServer| BOOT::|removeBackslashes| - BOOT::|checkAddBackSlashes| BOOT::/RF-1 BOOT::|docreport| - BOOT::|ExecuteInterpSystemCommand| BOOT::|pfFileName| - BOOT::|InterpExecuteSpadSystemCommand| BOOT::|alistSize| - BOOT::|parseTranList| BOOT::|parseOr| BOOT::|parseIf| - BOOT::|parseImplies| BOOT::|parseEquivalence| - BOOT::|parseLhs| BOOT::|parseAnd| BOOT::|parseLeftArrow| - BOOT::|parseUpArrow| BOOT::|parseNotEqual| BOOT::|parseNot| - BOOT::|parseDollarNotEqual| BOOT::|parseDollarGreaterEqual| - BOOT::|parseDollarLessEqual| BOOT::|parseGreaterEqual| - BOOT::|parseLessEqual| BOOT::|scriptTranRow1| - BOOT::|scriptTran| BOOT::|scriptTranRow| - BOOT::|parseExclusiveOr| BOOT::QUOTE-IF-STRING - BOOT::|dbConformGenUnder| BOOT::|listOfEntries| - BOOT::|conformString| BOOT::|dbConformGen| - BOOT::|evalableConstructor2HtString| BOOT::|halfWordSize| - BOOT::|fortFormatCharacterTypes,mkCharName| - BOOT::|opPageFast| - BOOT::|fortFormatCharacterTypes,par2string| VMLISP::MAKEDIR - VMLISP::DELETE-DIRECTORY VMLISP::GET-IO-INDEX-STREAM - VMLISP::GET-INPUT-INDEX-STREAM VMLISP::DIRECTORY? - BOOT::|c05pbfGen| BOOT::|c05nbfGen| BOOT::|c05pbfSolve| - BOOT::|c05nbfSolve| BOOT::|e02dafSolve| BOOT::|c06ebfGen| - BOOT::|c06ebfSolve| BOOT::|c06gsfGen| BOOT::|c06gsfSolve| - BOOT::|c06ekfSolve| BOOT::|c06eafSolve| BOOT::|c06gqfGen| - BOOT::|c06ecfGen| BOOT::|c06fpfGen| BOOT::|c06frfSolve| - BOOT::|c06gbfSolve| BOOT::|c06fqfGen| BOOT::|c06gqfSolve| - BOOT::|c06eafGen| BOOT::|c06gcfGen| BOOT::|c06gcfSolve| - BOOT::|c06gbfGen| BOOT::|c06fufGen| BOOT::|s01eafGen| - BOOT::|s21bafGen| BOOT::|c06fpfSolve| BOOT::|s17dcfGen| - BOOT::|c06fqfSolve| BOOT::|s18defGen| BOOT::|c06frfGen| - BOOT::|s14bafGen| BOOT::|s18dcfGen| BOOT::|s17dhfGen| - BOOT::|c06ecfSolve| BOOT::|s21bdfGen| BOOT::|c06fufSolve| - BOOT::|c06ekfGen| BOOT::|s21bcfGen| BOOT::|sGen| - BOOT::|s17dgfGen| BOOT::|d01anfGen| BOOT::|d01ajfGen| - BOOT::|d01aqfGen| BOOT::|d01gafGen| BOOT::|d01bbfGen| - BOOT::|s21bbfGen| BOOT::|d01amfGen| BOOT::|s17dlfGen| - BOOT::|d01alfGen| BOOT::|d01fcfGen| BOOT::|d01akfGen| - BOOT::|d01gbfGen| BOOT::|d01gbfSolve| VMLISP::|npPC| - VMLISP::|npPP| BOOT::|exp2FortOptimizeArray| - BOOT::|fortError1| BOOT::|fortPre1| BOOT::|spadcall1| - BOOT::|fortPreRoot| BOOT::|checkPrecision| - BOOT::|fix2FortranFloat| BOOT::|normalizeStatAndStringify| - BOOT::|mkParameterList,par2string| BOOT::|f02wefSolve| - BOOT::|f02ajfGen| BOOT::|printAny| BOOT::|f02adfGen| - BOOT::|e02dffSolve| BOOT::|printString| BOOT::|f04jgfGen| - BOOT::|f04qafGen| BOOT::|f04asfGen| BOOT::|summary| - BOOT::|show| BOOT::|showSpad2Cmd| BOOT::|f04qafSolve| - BOOT::|f04mbfGen| BOOT::|f04fafGen| BOOT::|f04arfGen| - BOOT::|f04adfSolve| BOOT::|fixObjectForPrinting| - BOOT::|savesystem| BOOT::|escapeSpecialChars| - BOOT::|f04mcfSolve| BOOT::|encodeItem| BOOT::|f04atfGen| - BOOT::|form2LispString| BOOT::|f04adfGen| - BOOT::|concatWithBlanks| BOOT::|withAsharpCmd| - BOOT::|f04jgfSolve| BOOT::|extendLocalLibdb| - BOOT::|deleteFile| BOOT::|compileAsharpCmd1| - BOOT::|f04mcfGen| BOOT::|f04arfSolve| BOOT::|frame| - BOOT::|frameSpad2Cmd| BOOT::|addNewInterpreterFrame| - BOOT::|getEnv| BOOT::|f04asfSolve| BOOT::|f04fafSolve| - BOOT::|f04mbfSolve| BOOT::|f04atfSolve| BOOT::|f07fdfSolve| - BOOT::|obey| BOOT::|f07aefGen| BOOT::|buildLibdbString| - BOOT::|f07aefSolve| BOOT::|f07fefGen| BOOT::|f07adfSolve| - BOOT::|f07adfGen| BOOT::|dbReadComments| - BOOT::|f07fefSolve| BOOT::|f07fdfGen| BOOT::|s17defGen| - BOOT::|f01qdfSolve| BOOT::|f01rcfSolve| BOOT::|f01mafGen| - BOOT::|f01rdfGen| BOOT::|f01mafSolve| BOOT::|f01brfGen| - BOOT::|f01mcfGen| BOOT::|f02axfGen| BOOT::|f02aefSolve| - BOOT::|f02akfGen| BOOT::|f02abfSolve| BOOT::|f02bjfGen| - BOOT::|bcErrorPage| BOOT::|f02xefGen| BOOT::|form2String| - BOOT::|f02aafSolve| BOOT::|dbSourceFile| - BOOT::MAKE-REASONABLE BOOT::|f02ajfSolve| - BOOT::|f02axfSolve| BOOT::|f02affSolve| BOOT::|downlink| - BOOT::BRIGHTPRINT-0 BOOT::|f02wefGen| - BOOT::|conform2String| BOOT::|f02akfSolve| - BOOT::|f02adfSolve| BOOT::|f02aafGen| - BOOT::|dbSpecialExports| BOOT::|f02agfGen| - BOOT::|f02bjfSolve| BOOT::|buildLibdbConEntry| - BOOT::|f02agfSolve| BOOT::|dbSpecialDescription| - BOOT::|f02xefSolve| BOOT::|f02abfGen| BOOT::|f02bbfGen| - BOOT::|mkButtonBox| BOOT::|f02awfSolve| - BOOT::|assignSlotToPred| BOOT::|f02bbfSolve| - BOOT::|f02aefGen| BOOT::|f02awfGen| BOOT::|f02affGen| - BOOT::|dbMkEvalable| BOOT::|mkEvalable| - BOOT::|conPageChoose| BOOT::KILL-TRAILING-BLANKS - BOOT::|ySearch| BOOT::|aSearch| BOOT::|close| - BOOT::|kSearch| BOOT::|compileBoot| BOOT::|aokSearch| - BOOT::|showNamedConstruct| - BOOT::|reportOpsFromUnitDirectly1| BOOT::|oSearch| - BOOT::|tabsToBlanks| BOOT::|underscoreDollars| - BOOT::|mkGrepTextfile| BOOT::|reportOpsFromUnitDirectly0| - BOOT::|replaceGrepStar| BOOT::|grepSource| BOOT::|xSearch| - BOOT::|pSearch| BOOT::|dSearch| BOOT::|doSystemCommand| - BOOT::|standardizeSignature| BOOT::|conPageFastPath| - BOOT::|conPageConEntry| BOOT::|quickForm2HtString| - BOOT::|dbAttr| BOOT::|e02ajfGen| BOOT::|pluralize| - BOOT::|parseTran| BOOT::|e02defSolve| - BOOT::|dbSpecialOperations| BOOT::|issueHTStandard| - BOOT::|justifyMyType| BOOT::|getCallBackFn| - BOOT::|bcDifferentiateGen| BOOT::|bcIndefiniteIntegrateGen| - BOOT::|htMakeErrorPage| BOOT::|issueHT| - BOOT::|setOutputAlgebra| BOOT::|bcDraw2DparGen| - BOOT::|ExecuteSpadSystemCommand| BOOT::|bcDraw3Dpar1Gen| - BOOT::|bcProductGen| BOOT::|ts| BOOT::|bcRealLimitGen| - BOOT::|e02zafGen| BOOT::|bcSumGen| BOOT::|bcDraw3DparGen| - BOOT::|bcDraw3DfunGen| BOOT::|aggwidth| BOOT::WIDTH - BOOT::|bcDefiniteIntegrateGen| BOOT::|bcSeriesGen| - BOOT::|subspan| BOOT::|bcPuiseuxSeriesGen| - BOOT::|bcLaurentSeriesGen| BOOT::|superspan| - BOOT::|bcSeriesByFormulaGen| BOOT::|bcNotReady| - BOOT::|bcDraw2DfunGen| BOOT::|bcTaylorSeriesGen| - BOOT::|bcDraw2DSolveGen| BOOT::KCL-OS-ENV-GET - BOOT::|bcComplexLimitGen| BOOT::|saturnPRINTEXP| - BOOT::|bcSeriesExpansionGen| BOOT::COMPILE-BOOT-FILE - BOOT::|bcCreateVariableString| BOOT::|bcGenEquations| - BOOT::|vConcatSuper| BOOT::BOOT-LOAD - BOOT::|bcSolveNumerically1| BOOT::|bcLinearSolveEqnsGen| - BOOT::|bcMakeUnknowns| BOOT::|bcInputSolveInfo| - BOOT::|bcInputEquationsEnd| BOOT::|bcSystemSolveEqns1| - BOOT::|bcLinearSolveEqns1| BOOT::|bcVectorGen| - BOOT::|printBasic| BOOT::|subSuper| BOOT::|tr| - BOOT::|bcLinearSolveMatrix1| BOOT::|stringList2String| - BOOT::|bcString2HyString2| BOOT::|bcwords2liststring,fn| - BOOT::|linkGen| BOOT::|optCallEval| BOOT::|tokType| - BOOT::|timedEvaluate| BOOT::|roundStat| - BOOT::|bracketString| BOOT::|e02bcfGen| BOOT::|e02gafGen| - BOOT::|e02bbfSolve| VMLISP:OBEY BOOT::|e04ycfSolve| - BOOT::|e04nafSolve| BOOT::|e04dgfSolve| BOOT::|e04fdfGen| - BOOT::|e04gcfGen| BOOT::|NRTevalDomain| BOOT::|e04fdfSolve| - BOOT::|e04mbfSolve| BOOT::|e04nafGen| BOOT::|e04gcfSolve| - BOOT::|e04ucfGen| BOOT::|e04jafGen| BOOT::|e04mbfGen| - BOOT::|e04jafSolve| BOOT::|e04dgfGen| BOOT::|e04ycfGen| - BOOT::|f01rdfSolve| BOOT::|f01mcfSolve| BOOT::|f01qdfGen| - BOOT::|f01qcfGen| BOOT::|f01qefGen| BOOT::|f01rcfGen| - BOOT::|f01refSolve| BOOT::|f01qefSolve| BOOT::|e02zafSolve| - BOOT::|f01qcfSolve| BOOT::|f01refGen| BOOT::|f01brfSolve| - BOOT::|poGlobalLinePosn| BOOT:|sayString| - BOOT::|incHandleMessage| BOOT::|pred2English| - BOOT::|prefix2String0| BOOT::|form2StringLocal| - BOOT::|formatOpType| BOOT::|form2String1| BOOT::|ncTag| - BOOT::|ncAlist| BOOT::|tuple2String,f| - BOOT::|formatAttributeArg| BOOT::|formString| - BOOT::|form2StringWithPrens| BOOT::|prefix2String| - BOOT::|form2StringAsTeX| BOOT::|prefix2StringAsTeX|)) -(PROCLAIM - '(FTYPE (FUNCTION (*) T) BOOT::|bcConform| BOOT:STREAM-EOF - BOOT::|categoryParts| BOOT:IOCLEAR BOOT:SAY BOOT:MOAN - BOOT::|centerNoHighlight| BOOT:CROAK BOOT::INTERRUPT - BOOT::LISP-BREAK-FROM-AXIOM BOOT:META VMLISP:NILFN - BOOT::MAKE-DATABASE BOOT::|defaultTargetFE| BOOT::/DUPDATE - BOOT::/UPDATE BOOT::/MONITOR VMLISP:$FILEP VMLISP:CALLBELOW - BOOT::|systemError| BOOT::|listSort| - BOOT::|asCategoryParts| BOOT::RDEFOUTSTREAM - BOOT::RDEFINSTREAM VMLISP::SETQERROR BOOT::|throwMessage| - BOOT::TOPLEVEL BOOT::|getDomainSigs| - BOOT::|getInheritanceByDoc| BOOT::|showImp| - BOOT::|showFrom| BOOT::|getDomainDocs| BOOT::|grepFile| - BOOT::|printRecordFile| BOOT::|wasIs| - BOOT::|htFile2RecordFile| BOOT::|inputFile2RecordFile| - BOOT::|htFile2InputFile| BOOT::|bcComments| - BOOT::|bcNameTable| BOOT::|dbSayItemsItalics| - BOOT::|htPred2English| BOOT::|interpret| - BOOT::|Enumeration,LAM| VMLISP:VMREAD VMLISP:RKEYIDS - BOOT::/RP BOOT::MONITOR-TESTED BOOT::MONITOR-RESET - BOOT::MONITOR-DISABLE BOOT::MONITOR-ENABLE - BOOT::|returnStLFromKey| BOOT::MAKE-MONITOR-DATA - BOOT::|level| BOOT::LEVEL BOOT::|resolveTT| - BOOT::|isLegitimateMode| BOOT::|hasFileProperty| - BOOT::|coerceConvertMmSelection| BOOT::|canCoerce| - BOOT::|selectMms1| BOOT::|canCoerceFrom| BOOT::MAKE-TOKEN - BOOT::MAKE-LINE BOOT::|centerAndHighlight| BOOT::|getOpDoc| - BOOT::MAKE-STACK BOOT::|firstNonBlankPosition| - BOOT::MAKE-XDR-STREAM BOOT::INITROOT - BOOT::|EnumerationCategory,LAM| BOOT::|Mapping| - BOOT::|RecordCategory,LAM| BOOT::|Union| - BOOT::|UnionCategory,LAM| BOOT::|displayCategoryTable| - BOOT::MAKE-REDUCTION BOOT::READ-A-LINE BOOT::|dbPresentOps| - BOOT::|buildBitTable| BOOT::|htBlank| - BOOT::|dbMakeContrivedForm| BOOT::|dcSize| BOOT::|sum| - BOOT::|args2HtString| BOOT::|dc| BOOT::|bcNameCountTable| - VMLISP::MAKE-LIBSTREAM BOOT::|nextown1| BOOT::|next1| - BOOT::|incAppend1| BOOT::|synonym| BOOT::|grepConstruct| - VMLISP::LOTSOF BOOT::|htBeginMenu| BOOT::|bcCon| - BOOT::|koOps| BOOT::|dbWriteLines| BOOT::|catsOf| - BOOT::|getDomainOpTable| BOOT:|PlainError| - BOOT:|PlainPrint| BOOT::|htInitPageNoScroll| - BOOT:|ReadLispExpr| BOOT::|conSpecialString?| - BOOT::|htSayStandard| BOOT:|StreamFlush| BOOT:|NewPathname| - BOOT:|SessionPathname| BOOT::|domainsOf| - BOOT::|dbPresentCons| READLINE BOOT:|StringConcat| - BOOT::|htBcLinks| BOOT::|pluralSay| - BOOT::|getConstructorExports| BOOT::|sublisFormal| - BOOT::NEXT-META-LINE BOOT::|htLispLinks| - BOOT::META-META-ERROR-HANDLER BOOT::|dbHeading| - BOOT::NEXT-BOOT-LINE BOOT::|concat| BOOT::SPAD_SYNTAX_ERROR - BOOT::BOOT BOOT::|htQuery| BOOT::SPAD - BOOT::|htSayIndentRel| BOOT::|bcConPredTable| - BOOT::|htSaySaturn| BOOT::|dbSayItems| BOOT::|simpHasPred| - BOOT::|start| BOOT::|protectedPrompt| - BOOT::|htpMakeEmptyPage| BOOT::|htMakeButton| - BOOT::|htSayIfStandard| BOOT::|htSay| BOOT::|incZip1| - BOOT::|incIgen1| BOOT::|incRgen1| - BOOT::|runOldAxiomFunctor| BOOT:|fillerSpaces| - BOOT::|incLude1| FOAM::MAKE-FOAMPROGINFOSTRUCT - BOOT::|bcPred| BOOT::|sayNewLine|)) -(PROCLAIM - '(FTYPE (FUNCTION (T) CHARACTER) VMLISP:EBCDIC VMLISP:NUM2CHAR - BOOT::LINE-CURRENT-CHAR)) -(PROCLAIM '(FTYPE (FUNCTION (T T *) FIXNUM) BOOT::LINE-NEW-LINE)) -(PROCLAIM - '(FTYPE (FUNCTION (T T T) FIXNUM) BOOT::|rwrite128|)) -(PROCLAIM - '(FTYPE (FUNCTION (T) STRING) BOOT::|stripSpaces| BOOT::LINE-BUFFER - BOOT::DROPTRAILINGBLANKS)) -(PROCLAIM - '(FTYPE (FUNCTION (T) T) BOOT::|form2FenceQuoteTail| - BOOT::|combineMapParts| BOOT::|form2FenceQuote| - BOOT::|mkMapPred| BOOT::|formatOpConstant| - BOOT::|formJoin2| BOOT::|axOpTran| BOOT::|axFormatOpList| - BOOT::|axFormatOp| BOOT::|optcomma| - BOOT::|displayTranModemap| - BOOT::|makeInternalMapMinivectorName| - BOOT::|cleanUpSegmentedMsg| BOOT::|makeDefaultDef| - BOOT::|getDefaultingOps| BOOT::|getOpSegment| - BOOT::|removeIsDomainD| BOOT::|formatSignatureAsTeX| - BOOT::|axFormatType| BOOT::|sayRemoveFunctionOrValue| - BOOT::|pvarCondList| BOOT::|makeTypeSequence| - BOOT::|makeArgumentIntoNumber| BOOT::|axFormatAttrib| - BOOT::|categoryForm?| BOOT::|axFormatCondOp| BOOT:OPTIONAL - BOOT::|axFormatPred| BOOT::|fileConstructors| - BOOT::SOURCEPATH BOOT::|untraceMapSubNames| BOOT:LASTELEM - BOOT::|mapPredTran| BOOT::|makeDefaultArgs| - BOOT::|stripType| BOOT::|dqUnitCopy| BOOT::|mkAliasList| - BOOT::|dqUnit| BOOT::|modemapToAx| - BOOT::|isDefaultPackageName| BOOT::|getEqualSublis| - BOOT::|myWritable?| BOOT::|getInfovec| BOOT::|predTran| - BOOT::|fnameReadable?| BOOT::|hasDefaultPackage| - BOOT::|compFailure| BOOT::|fnameType| - BOOT::|setExtendedDomains| - BOOT::|simplifyMapConstructorRefs| BOOT::|fnameName| - BOOT::|StringToDir| - BOOT::|spad2AxTranslatorAutoloadOnceTrigger| - BOOT::|fnameDirectory| - BOOT::|simplifyMapPattern,unTrivialize| BOOT::|DirToString| - BOOT::|isPatternArgument| BOOT::|htQuote| - BOOT::|isConstantArgument| BOOT::|frameName| - BOOT::|objValUnwrap| BOOT::|htMakePage| - BOOT::|PARSE-LedPart| BOOT::|htpPropertyList| - BOOT::|analyzeMap,f| BOOT::|PARSE-NudPart| - BOOT::|PARSE-Expr| BOOT::|bcHt| BOOT::|getIteratorIds| - BOOT::|getUserIdentifiersInIterators| - BOOT::|htpInputAreaAlist| BOOT::|getUserIdentifiersIn| - BOOT::|PARSE-GliphTok| BOOT::|kePageOpAlist| - BOOT::|fileNameStrings| BOOT::|inclmsgCannotRead| - BOOT::MAKE-SYMBOL-OF BOOT:MATCH-ADVANCE-STRING - BOOT::|removeUndoLines| BOOT::STACK-SIZE BOOT:NOTE - BOOT::|histFileErase| BOOT::|histInputFileName| - BOOT::STACK-STORE BOOT::|readHiFi| BOOT::|restoreHistory| - BOOT::STACK-UPDATED BOOT::|clearSpad2Cmd| BOOT::|getToken| - BOOT::|makeHistFileName| BOOT::|changeHistListLen| - BOOT::|showHistory| BOOT::|setIOindex| BOOT::|saveHistory| - BOOT::|PARSE-NBGliphTok| BOOT::|dewritify,dewritifyInner| - BOOT::|setHistoryCore| BOOT::|charDigitVal| - BOOT::|dewritify,is?| BOOT::|writify| BOOT::|history| - BOOT::|gensymInt| BOOT::|dewritify| BOOT::TOKEN-NONBLANK - BOOT::|undoFromFile| BOOT::FLOATEXPID - BOOT::|e02dffSolve,fy| BOOT::|spadClosure?| - BOOT::|bustUnion| BOOT::|writify,writifyInner| - BOOT::|undoChanges| BOOT::|undoInCore| BOOT::|getSlot1| - BOOT::|writifyComplain| BOOT::|unwritable?| - BOOT::|dbSpecialDisplayOpChar?| BOOT::|removeAttributes| - BOOT:|pathname| BOOT::|isLeaf| BOOT::|srcPosDisplay| - BOOT::|srcPosColumn| BOOT::|transformOperationAlist| - BOOT::|srcPosSource| BOOT::|sayNonUnique| - BOOT::|compDefWhereClause,removeSuchthat| - BOOT::|srcPosLine| BOOT::|compTuple2Record| - BOOT::|srcPosFile| BOOT::|mkAtreeValueOf1| BOOT::|center80| - BOOT::|loadFunctor| - BOOT::|compDefWhereClause,transformType| - BOOT::|mkCategoryPackage,gn| - BOOT::|updateCategoryFrameForConstructor| BOOT:|sayFORMULA| - BOOT::|convertOpAlist2compilerInfo| - BOOT::|getCategoryOpsAndAtts| BOOT::|lispize| - BOOT::|getSrcPos| BOOT::|mustInstantiate| - BOOT::|isSystemDirectory| BOOT:ASSOCRIGHT BOOT::|getFlag| - BOOT::|getMsgToWhere| BOOT::|mkExplicitCategoryFunction,fn| - BOOT::|updateCategoryFrameForCategory| BOOT:CURSTRMLINE - BOOT::|alreadyOpened?| BOOT::|msgImPr?| BOOT::|Operators| - BOOT::|mkAtree1| BOOT::|getLineText| BOOT::|pfSourceText| - BOOT::|toFile?| BOOT::|getMsgArgL| BOOT::|poGetLineObject| - BOOT:BRIGHTPRINT BOOT::|getLinePos| - BOOT::|loadIfNecessaryAndExists| BOOT::|lnPlaceOfOrigin| - BOOT::|makeLeaderMsg| BOOT::|putInLocalDomainReferences| - BOOT::|pfPosOrNopos| BOOT::|killNestedInstantiations| - BOOT::|NRTputInTail| BOOT::|quotifyCategoryArgument| - BOOT::|getLisplibVersion| BOOT::|getMsgPrefix| - BOOT::|unInstantiate| BOOT::|asTupleAsVector| - BOOT::|lisplibDoRename| BOOT::|asTupleSize| - BOOT::|finalizeLisplib| BOOT::|disallowNilAttribute| - BOOT::|asTupleNewCode0| BOOT::|processKeyedError| - BOOT::|toScreen?| BOOT::|compileConstructor1| - BOOT::|compileDocumentation| BOOT::|transformREPEAT| - BOOT::|line?| BOOT::|readLibPathFast| - BOOT::|modemap2Signature| BOOT::|transformCollect| - BOOT::|msgLeader?| BOOT::|compileConstructor| - BOOT::|initToWhere| BOOT::|initImPr| - BOOT::|putDatabaseStuff| BOOT::|e02defSolve,fxy| - BOOT::|getMsgPosTagOb| BOOT::|pfIdSymbol| - BOOT::|mkAtreeExpandMacros| BOOT::|getMsgPos| - BOOT::|macApplication| BOOT::|isInterpMacro| - BOOT::|getMsgFTTag?| BOOT::|leader?| - BOOT::|pf0ApplicationArgs| BOOT::|atree2EvaluatedTree| - BOOT::|remFile| BOOT::|pfMLambda?| BOOT::|whichCat| - BOOT::|pfApplicationOp| BOOT::|removeBindingI| - BOOT::|addArgumentConditions,fn| BOOT::|macId| - BOOT:STRMBLANKLINE BOOT::|getUnname1| BOOT:STRMSKIPTOBLANK - BOOT::|remLine| BOOT::|pfSourcePosition| - BOOT::|spadCompileOrSetq| BOOT::|getMsgKey?| - BOOT::|mac0Get| BOOT::|getMsgKey| BOOT::|compile| - BOOT::|evaluateType| BOOT::|constructMacro| - BOOT::|poPosImmediate?| BOOT::|pfMLambdaBody| - BOOT::|poNopos?| BOOT::|evaluateType1| - BOOT::|pf0MLambdaArgs| BOOT:NEXTSTRMLINE - BOOT::|evaluateSignature| BOOT::|macMacro| - BOOT::|poLinePosn| BOOT::|failCheck| BOOT::|pfNothing?| - BOOT::|compile,isLocalFunction| BOOT::|macSubstituteOuter| - BOOT::|erMsgSep| BOOT::|pfMacroRhs| BOOT::|mkConstructor| - BOOT::|showMsgPos?| BOOT::|pfMacroLhs| BOOT::|macExpand| - BOOT:IS_GENVAR BOOT::|mkEvalableMapping| BOOT::|macLambda| - BOOT::|getMsgInfoFromKey| BOOT::|evaluateType0| - BOOT::|getStFromMsg| BOOT::|getUnnameIfCan| - BOOT::|macWhere| BOOT::|tabbing| BOOT::|getMsgLitSym| - BOOT::|pfApplication?| BOOT::|getPosStL| BOOT::|pfMacro?| - BOOT::|doItIf,localExtras| BOOT::|getMsgText| - BOOT::|mkEvalableUnion| BOOT::|pfLambda?| - BOOT::|getMsgPrefix?| BOOT::|mkEvalableRecord| - BOOT::|pfWhere?| BOOT::|getPreStL| BOOT::|makeOrdinal| - BOOT::|mac0GetName| BOOT::|getAndEvalConstructorArgument| - BOOT::|msgOutputter| BOOT::|pfLeaf?| - BOOT::|mkEvalableCategoryForm| BOOT::|getMsgTag?| - BOOT::|devaluateDeeply| BOOT::|pfLeafPosition| - BOOT::|compDefineFunctor1,FindRep| BOOT::|pfAbSynOp| - BOOT::|listOutputter| BOOT::|pfTypedId| - BOOT::|processChPosesForOneLine| BOOT::|pf0LambdaArgs| - BOOT::|e02dffSolve,fx| BOOT::|getModeSetUseSubdomain| - BOOT::MKQSADD1 BOOT::|getModeSet| BOOT::|poCharPosn| - BOOT::|posPointers| BOOT::|NRTgenInitialAttributeAlist| - BOOT::|makeMsgFromLine| BOOT::THETA_ERROR - BOOT::|mkRationalFunction| BOOT::MACROEXPANDALL - BOOT::|isCategoryPackageName| BOOT::|erMsgSort| - BOOT::|isAVariableType| BOOT::|msgNoRep?| - BOOT::|getPrincipalView| BOOT::|To| BOOT::|hitListOfTarget| - BOOT::SUBANQ BOOT::|From| BOOT::|domainDepth| - BOOT::|NRTgetLocalIndexClear| BOOT::|constructSubst| - BOOT::|containsVars| BOOT::|evalMmDom| - BOOT::|abbreviationsSpad2Cmd| - BOOT::|formatUnabbreviatedSig| BOOT::|optFunctorBody| - BOOT::|optimize| BOOT::|emptyAtree| BOOT::|templateParts| - BOOT::|dqToList| BOOT::|dqConcat| BOOT::|isHomogeneousList| - BOOT::|isUncompiledMap| BOOT::|printMms| - BOOT::|getSymbolType| BOOT::/UNTRACE-REDUCE - BOOT::|matchMmCond| BOOT::|object2Identifier| - BOOT::|selectMostGeneralMm| BOOT::|fixUpTypeArgs| - BOOT::|handleLispBreakLoop| BOOT::TRACEOPTIONS BOOT:REMDUP - BOOT::|evalMmStack| BOOT::SHOWBIND BOOT::DROPENV - BOOT::UNVEC BOOT::|noSharpCallsHere| - BOOT::|untraceDomainConstructor| BOOT:CURMAXINDEX - BOOT::|isDomain| BOOT::|getFunctionSourceFile| - BOOT::|isMap| BOOT::HACKFORIS1 BOOT::HACKFORIS - BOOT::|containsVars1| BOOT::|orderMmCatStack| - BOOT::|evalMmStackInner| BOOT::DEF-IN2ON - BOOT::|new2OldTran| BOOT::|resolveTypeList| - BOOT::|newConstruct| BOOT::|newIf2Cond| BOOT::|newDef2Def| - BOOT::|asTupleNew0| BOOT::DEF-MESSAGE1 BOOT::LIST2STRING1 - BOOT::DEF-WHERE BOOT::DEF-SEQ BOOT::SEQOPT BOOT::DEF-IS - BOOT::DEF-EQUAL BOOT::DEF-MESSAGE BOOT::DEF-CATEGORY - BOOT::DEF-REPEAT BOOT::DEF-COND BOOT::DEF-LESSP - BOOT::SMINT-ABLE BOOT::DEF-COLLECT BOOT::DEF-STRING - BOOT::|Zeros| BOOT::DEF-SETELT BOOT::DEF-RENAME1 - BOOT::DEF-ELT BOOT::|DEF-:| BOOT::DEF-ADDLET - BOOT::|quoteWidth| BOOT::DEF-INSERT_LET1 BOOT::|boxSuper| - BOOT::DEF-WHERECLAUSE BOOT::DEF-STRINGTOQUOTE - BOOT::|boxSub| BOOT::DEF-INSERT_LET BOOT::LIST2CONS-1 - BOOT::|bootTransform| BOOT::|concatWidth| - BOOT::DEF-IS-REMDUP1 BOOT::|altSuperSubWidth| - BOOT::|altSuperSubSuper| BOOT::|concatbWidth| - BOOT::LIST2CONS BOOT::|altSuperSubSub| BOOT::DEF-IS-REMDUP - BOOT::|concatSuper| BOOT::DEF-IS-EQLIST - VMLISP:RECOMPILE-DIRECTORY BOOT::|concatSub| - BOOT::|new2OldDefForm| BOOT::|binomWidth| - BOOT::|binomSuper| BOOT::DEF-SELECT BOOT::|binomSub| - BOOT::COMP-TRAN-1 BOOT::PUSHLOCVAR BOOT::COMP-EXPAND - BOOT::|canCacheLocalDomain,domargsglobal| VMLISP:MAKE-CVEC - BOOT::|inSuper| BOOT::COMP-NEWNAM BOOT::COMP-TRAN - BOOT::|inSub| BOOT::COMP-FLUIDIZE BOOT::|addInputLibrary| - BOOT::|inWidth| BOOT::|dropInputLibrary| - BOOT::|openOutputLibrary| BOOT::|moveORsOutside| - BOOT::|stepSuper| BOOT::|outputTranMatrix| - BOOT::|fracwidth| BOOT::|stepSub| BOOT::|compQuietly| - BOOT::|listOfPatternIds| BOOT::|fracsuper| BOOT::COMP-1 - BOOT::|getOplistForConstructorForm| BOOT::|stepWidth| - BOOT::COMP-2 VMLISP:TRIMSTRING BOOT::|maprin0| - BOOT::|compAndDefine| BOOT::|abbreviate| BOOT::|fracsub| - BOOT::|exptSuper| BOOT::|mathPrintTran| - BOOT::|COMP,FLUIDIZE| VMLISP:COMP370 BOOT::|exptWidth| - BOOT::|rootWidth| BOOT::|with| BOOT::|exptNeedsPren| - BOOT::|minusWidth| VMLISP:|log| BOOT::|maprin| - BOOT::|loadDependents| BOOT::|concatTrouble,fixUp| - BOOT::|loadIfNecessary| VMLISP:MBPIP BOOT::|timesWidth| - BOOT::|rootSuper| BOOT::|interactiveModemapForm,fn| - BOOT::|largeMatrixAlist| VMLISP:QSORT BOOT::|sumWidth| - VMLISP:PLACEP BOOT::LOG10 BOOT::|aggWidth| BOOT::|zagWidth| - BOOT::|pi2Width| BOOT::|rebuildCDT| BOOT::|LZeros| - BOOT::|e02zafSolve,fmu| BOOT::|signatureTran| - BOOT::|destructT| BOOT::|userError| BOOT::|clearAllSlams| - BOOT::|displayComp| VMLISP:HKEYS BOOT::|mkErrorExpr| - BOOT::|pi2Sup| BOOT::|compOrCroak1,compactify| - BOOT::|pi2Sub| BOOT::|convertSpadToAsFile| - BOOT::|overbarSuper| BOOT::|outputOp| BOOT::|compiler| - BOOT::|resolveTMRed1| BOOT::|resolveTTRed3| - BOOT::|fnameWritable?| BOOT::MONITOR-EVALBEFORE - VMLISP:UPCASE BOOT::|interpOp?| BOOT::|pathnameName| - BOOT::|pathnameDirectory| BOOT::SPADSYSNAMEP VMLISP:STATEP - BOOT::|compileSpad2Cmd| BOOT::MONITOR-BLANKS - BOOT::|piWidth| BOOT::|newType?| BOOT::WHOCALLED - BOOT::|charyTopWidth| VMLISP:FBPIP BOOT::|bubbleType| - BOOT::|putWidth| BOOT::|piSup| BOOT::OPTIONS2UC - BOOT::|overlabelSuper| BOOT::|pathnameType| - BOOT::|spadThrowBrightly| BOOT::/OPTIONS BOOT::|piSub| - BOOT::/UNEMBED-Q BOOT::/UNEMBED-1 - BOOT::|typeIsASmallInteger| BOOT::|indefIntegralWidth| - BOOT::|indefIntegralSup| BOOT::|isSimple| VMLISP:UNEMBED - BOOT::|indefIntegralSub| BOOT::|primitiveType| - BOOT::|mkAtree| BOOT::/UNTRACELET-2 - BOOT::|outputTranIterate| BOOT::|errorRef| - VMLISP:RE-ENABLE-INT BOOT::/UNTRACELET-1 BOOT::|intWidth| - BOOT::|NRTgetLocalIndex| BOOT::|getOutputAbbreviatedForm| - BOOT::|isFluid| VMLISP:IVECP BOOT::|iterVarPos| - BOOT::|remWidth| VMLISP:LIST2VEC BOOT::|matWidth| - BOOT::|asTupleAsList| BOOT::|outputTranIteration| - VMLISP:LISTOFQUOTES BOOT::|upcase| BOOT::|intSup| - BOOT::|reassembleTowerIntoType| BOOT::|upor| - BOOT::|matSuper| BOOT::|hasFormalMapVariable,hasone?| - BOOT::|intSub| VMLISP:IS-CONSOLE BOOT::|coerceUnion2Branch| - BOOT::|PushMatrix| BOOT::MKPROGN BOOT::|uncons| - VMLISP:MAKE-ABSOLUTE-FILENAME - BOOT::|retract2Specialization| BOOT::|sigma2Width| - VMLISP:FUNARGP BOOT::|syminusp| BOOT::|NRTassocIndex| - BOOT::|resolveTypeListAny| BOOT::MONITOR-PRINTREST - BOOT::|extwidth| BOOT::|varsInPoly| BOOT::|sigma2Sup| - BOOT::|stackWarning| BOOT::SMALL-ENOUGH BOOT::|extsuper| - BOOT::|sigma2Sub| BOOT::|extsub| BOOT::|sigmaWidth| - BOOT::/INITUPDATES BOOT::|sigmaSup| BOOT::IS_SHARP_VAR - BOOT::|sigmaSub| BOOT::|retract1| BOOT::|qTWidth| VMLISP:LN - BOOT::|decomposeTypeIntoTower| BOOT::|transcomparg| - BOOT::FUNLOC BOOT::|stringWidth| - BOOT::|mathprintWithNumber| BOOT::COND-UCASE - VMLISP:PROPLIST BOOT::|texFormat| BOOT::|bubbleConstructor| - BOOT::|isSubForRedundantMapName| BOOT::|isDomainOrPackage| - BOOT::|dispfortexp| BOOT::|isInterpOnlyMap| - BOOT::|formulaFormat| BOOT::|boxWidth| BOOT::|sayMath| - BOOT::|domainZero| BOOT::|domainOne| VMLISP:COPY - VMLISP:DOWNCASE BOOT::|e04ucfSolve,fg| VMLISP:SHUT - BOOT::|unescapeStringsInForm| - BOOT::|executeInterpreterCommand| VMLISP:REROOT - BOOT::|parseAndInterpret| VMLISP:DIG2FIX - BOOT::|ncSetCurrentLine| BOOT::|pvarsOfPattern| - BOOT::|htEscapeString| BOOT::|e01safSolve,f| - BOOT::|e04ucfSolve,fe| BOOT::|e01befSolve,f| - BOOT::|e01bffSolve,g| VMLISP:LOG2 BOOT::|e01dafSolve,g| - BOOT::|e01dafSolve,f| VMLISP:SIZE VMLISP:EOFP - BOOT::|e01bffSolve,f| VMLISP:RSHUT BOOT::|e04ucfSolve,fd| - BOOT::|e01bhfSolve,f| BOOT::|objVal| BOOT::|getValue| - BOOT::|getMode| BOOT::|getUnname| VMLISP:DIGITP - BOOT::|bottomUp| BOOT::|mkAtreeNode| VMLISP:VEC2LIST - VMLISP:MAKE-VEC VMLISP:GCMSG BOOT::|retract| - BOOT::|getUnionOrRecordTags| BOOT::|e02dcfColdSolve,h| - BOOT::|e02ajfSolve,f| BOOT::|polyVarlist| - BOOT::|e02befColdSolve,f| BOOT::|removeQuote| - BOOT::|e02dcfColdSolve,g| BOOT::|e02dcfColdSolve,f| - BOOT::|isMapExpr| BOOT::|getTarget| - BOOT::|e02ddfColdSolve,f| BOOT::|isType| - BOOT::|bottomUpElt| BOOT::|e02adfSolve,f| - BOOT::|retractAtree| BOOT::|bottomUpPercent| - BOOT::|fetchOutput| BOOT::|e02aefSolve,f| - BOOT::|e02gafSolve,fb| BOOT::|bottomUpUseSubdomain| - BOOT::|getBasicObject| BOOT::|bottomUpCompile| - BOOT::|e02ddfSolve,h| BOOT::|e02ddfSolve,g| - BOOT::|e02bafSolve,g| BOOT::|e02bcfSolve,f| - BOOT::|getBasicMode| BOOT::|e02ddfSolve,f| BOOT::|unwrap| - BOOT::|isWrapped| BOOT::|e02bafSolve,f| BOOT::GETZEROVEC - BOOT::|containsPolynomial| - BOOT::|getModeOrFirstModeSetIfThere| BOOT::|e02ahfSolve,f| - BOOT::|e04ucfSolve,fc| BOOT::|wrapMapBodyWithCatch| - BOOT::|e02agfSolve,i| BOOT::|e02agfSolve,h| - BOOT::|e02bdfSolve,f| BOOT::|containsVariables| - BOOT::|e02bbfSolve,f| BOOT::|wrapped2Quote| - BOOT::|objCodeVal| BOOT::|objCodeMode| - BOOT::|e02akfSolve,f| BOOT::|asyUnTuple| - BOOT::|asyTypeUnitList| BOOT::|asyComma?| - BOOT::|interactiveModemapForm| BOOT::|isTaggedUnion| - BOOT::|asIsCategoryForm| BOOT::|opOf| BOOT::|e02agfSolve,g| - BOOT::|asySubstMapping| BOOT::|e02agfSolve,f| - BOOT::|asyTypeMapping| BOOT::|asyCATEGORY| - BOOT::|e02dafSolve,fp| BOOT::|asyShorten| - BOOT::|e02dafSolve,fmu| BOOT::|createAbbreviation| - BOOT::|astran| BOOT::|asMakeAlist| BOOT::|asyParents| - BOOT::|asyDocumentation| BOOT::|asyConstructorModemap| - BOOT::|asytran| BOOT::|asyPredTran| BOOT::|asyPredTran1| - BOOT::|as| BOOT::|asytranLiteral| BOOT::|asytranEnumItem| - BOOT::|constructor?| BOOT::|hackToRemoveAnd| - BOOT::|asyGetAbbrevFromComments| BOOT::|intern| - BOOT::|asyTypeJoinPartPred| BOOT::|zeroOneConversion| - BOOT::|asyArgs| BOOT::|asyArg| BOOT::|asyFindAttrs| - BOOT::|asyAncestors| BOOT::|asyAncestorList| - BOOT::|asyTypeJoinItem| BOOT::|isLowerCaseLetter| - BOOT::|abbreviation?| BOOT::|asAll| BOOT::|error| - BOOT::|asyTypeJoinPartIf| BOOT::|asyType| - BOOT::|asyTypeJoin| BOOT::|asyTypeJoinPartExport| - BOOT::|asyCattranOp| BOOT::|predicateBitRef| - BOOT::|asyMkpred| BOOT::|asyLooksLikeCatForm?| - BOOT::|asyCosigType| BOOT::|setVector12| - BOOT::|asMakeAlistForFunction| BOOT::|optFunctorPROGN| - BOOT::|getAttributesFromCATEGORY| BOOT::|worthlessCode| - BOOT::|mySort| BOOT::|optFunctorBody,CondClause| - BOOT::|mkDomainFormer| BOOT::|mkNiladics| BOOT::|optCall| - BOOT::|explodeIfs| BOOT::|folks| BOOT::|mkVector| - BOOT::|asyExtractDescription| BOOT::|asyCattran1| - BOOT::|simpCattran| BOOT::|asyCattran| BOOT::|asyCatItem| - BOOT::|asyExportAlist| BOOT::FOOBAR - BOOT::|bootAbsorbSEQsAndPROGNs| BOOT::|displayDatabase| - BOOT::|bootAbsorbSEQsAndPROGNs,flatten| BOOT::|bootTran| - BOOT::|asyConstructorArg| BOOT::|bootLabelsForGO| - BOOT::GP2COND BOOT::|bootPROGN| BOOT::|asyTypeMakePred| - BOOT::|bootSEQ| BOOT::|tryToRemoveSEQ| BOOT::|nakedEXIT?| - BOOT::|asyConstructorArgs| BOOT::|mergeCONDsWithEXITs| - BOOT::STREAM2UC BOOT::|asyTypeJoinStack| BOOT::|bootCOND| - BOOT::STRINGREST BOOT::|bootAND| BOOT::|boot2Lisp| - BOOT::|bootOR| BOOT::|asyTypeJoinPartWith| BOOT::|bootIF| - BOOT::|asyCosig| BOOT::|bootAND,flatten| - BOOT::|bootPushEXITintoCONDclause| BOOT::|asyIsCatForm| - BOOT::|bootOR,flatten| BOOT::|asCategoryParts,exportsOf| - BOOT::|removeEXITFromCOND| BOOT::|flattenCOND| BOOT::/FLAG - BOOT::|extractCONDClauses| BOOT::|hashable| - BOOT::|trimString| BOOT::|mergeableCOND| - BOOT::|knownEqualPred| BOOT::|removeEXITFromCOND?| - BOOT::CPSAY BOOT::|zeroOneConvert| BOOT::/EDIT - BOOT::|domainForm?| BOOT::|makeByteWordVec| - BOOT::DECIMAL-LENGTH BOOT::|unabbrevAndLoad| BOOT::READLISP - BOOT::|abbQuery| BOOT::SPAD-EVAL BOOT::/TRANSNBOOT - BOOT::SPAD-MDTR-2 BOOT::SPAD-MDTR-1 BOOT::/TRANSPAD - BOOT::|setAutoLoadProperty| BOOT::/TRANSMETA - BOOT::|getConstructorUnabbreviation| BOOT::|getLisplibName| - BOOT::OPTIMIZE&PRINT - BOOT::|getPartialConstructorModemapSig| BOOT::UNCONS - BOOT::|maximalSuperType| BOOT::|getImmediateSuperDomain| - BOOT::|augmentLowerCaseConTable| BOOT::|isNameOfType| - BOOT::|objMode| BOOT::|isDomainValuedVariable| - BOOT::|packageForm?| BOOT::|sayMSG2File| BOOT::|concatList| - BOOT::|mkMessage| BOOT::|clearCache| BOOT::|IdentityError| - BOOT::/TRANSBOOT BOOT::|process| BOOT::|mathprint| - BOOT::ISLOCALOP-1 BOOT::|pushSatOutput| BOOT::|fracpart| - BOOT::|negintp| BOOT::|intpart| BOOT::|optRECORDELT| - BOOT::|optIF2COND| BOOT::C-TO-R BOOT::C-TO-S BOOT::S-TO-C - BOOT::CGAMMA BOOT::RGAMMA BOOT::CLNGAMMA BOOT::RLNGAMMA - BOOT::|getDomainOps| BOOT::|showGoGet| - BOOT::|showAttributes| BOOT::|showPredicates| - BOOT::|showSummary| BOOT::|getExtensionsOfDomain| - BOOT::|getDomainSeteltForm| BOOT::|getCategoriesOfDomain| - BOOT::|getDomainExtensionsOfDomain| BOOT::|bnot| - BOOT::|notDnf| BOOT::|b2dnf| BOOT::|ordList| BOOT::|bor| - BOOT::|band| BOOT::|bassert| BOOT::|notCoaf| BOOT::|list3| - BOOT::|list2| BOOT::|list1| BOOT::|dnf2pf| BOOT::|be| - BOOT::|reduceDnf| BOOT::|bassertNot| BOOT::|prove| - BOOT::|testPredList| BOOT::|nodeCount| - BOOT::|mkCircularAlist| BOOT::|clearSlam,LAM| - BOOT::|getCacheCount| BOOT::|clearLocalModemaps| - BOOT::|hashCount| BOOT::|parseAndEvalToHypertex| - BOOT::|oldParseAndInterpret| BOOT::|parseAndInterpToString| - BOOT::|parseAndEvalToStringEqNum| BOOT::|setHistory| - BOOT::|setExposeAddGroup| BOOT::|setFortDir| - BOOT::|validateOutputDirectory| BOOT::|setOutputLibrary| - BOOT::|setFortPers| BOOT::|setExposeDropConstr| - BOOT::|setExposeDropGroup| BOOT::|setExposeDrop| - BOOT::|setFortTmpDir| BOOT::|setExposeAdd| - BOOT::|setExpose| BOOT::|setInputLibrary| - BOOT::|setAsharpArgs| BOOT::|countCache| BOOT::|cgamma| - BOOT::|rgamma| BOOT::|clngammacase3| BOOT::|cgammaBernsum| - BOOT::|cgammaAdjust| BOOT::|lnrgammaRatapprox| - BOOT::|phiRatapprox| BOOT::|lnrgamma| - BOOT::|gammaRatapprox| BOOT::|gammaRatkernel| - BOOT::|gammaStirling| BOOT::|PsiIntpart| - BOOT::|isFilterDelimiter?| - BOOT::|mkDetailedGrepPattern,simp| BOOT::|cgammat| - BOOT::|isDefaultOpAtt| BOOT::|replaceTicksBySpaces| - BOOT::COT BOOT::|conform2OutputForm| BOOT::|lncgamma| - BOOT::|dbGetName| BOOT::|pfTupleList| BOOT::|pfWIfElse| - BOOT::|pfWIfThen| BOOT::|mkGrepPattern1,addWilds| - BOOT::|pfWIfCond| BOOT::|pfWIf?| BOOT::|mkGrepPattern1,g| - BOOT::|organizeByName| BOOT::|pfAssignLhsItems| - BOOT::|pfRetractToType| BOOT::|getTempPath| BOOT::|pfSexpr| - BOOT::|looksLikeDomainForm| BOOT::|pfRetractToExpr| - BOOT::|pfRetractTo?| BOOT::|pfExpression?| - BOOT::|genSearchUniqueCount| - BOOT::|pf0FlattenSyntacticTuple| BOOT::|pfSexpr,strip| - BOOT::|pmPreparse| BOOT::|dbUnpatchLines| - BOOT::|evaluateLines| BOOT::|verifyRecordFile| - BOOT::|sayDocMessage| BOOT::|recordAndPrintTest,fn| - BOOT::|pmParseFromString| - BOOT::|conLowerCaseConTranTryHarder| BOOT::|fnameExists?| - BOOT::|htTrimAtBackSlash| BOOT::|setExposeAddConstr| - BOOT::|dbBasicConstructor?| BOOT::|lfnegcomment| - BOOT::|lfcomment| BOOT::|bcStarConform| BOOT::|lfstring| - BOOT::|bcStar| BOOT::|simpBool| BOOT::|scanKeyTr| - BOOT::|extractHasArgs,find| BOOT::|lfkey| - BOOT::|scanPossFloat| BOOT::|scanCloser?| - BOOT::|bcStarSpace| BOOT::|keyword| - BOOT::|loadLibIfNotLoaded| BOOT::|lineoftoks| - BOOT::|lisp2HT| BOOT::|getCType| BOOT::|lisp2HT,fn| - BOOT::|conform2HtString| BOOT::|nextline| - BOOT::|unMkEvalable| BOOT::|int2Bool| BOOT::|keyword?| - BOOT::|htSayList| BOOT::|scanW| BOOT::|isLoaded?| - BOOT::|mkQuote| BOOT::|lfinteger| BOOT::|mkQuote,addQuote| - BOOT::|functionAndJacobian| BOOT::|lferror| - BOOT::|scanWord| BOOT::|scanTransform| - BOOT::|htPred2English,fnAttr| BOOT::|dbConname| - BOOT::|digit?| BOOT::|addSpaces| BOOT::|dbKindString| - BOOT::|lfspaces| BOOT::|stripUnionTags| BOOT::|lfid| - BOOT::|mkPredList| BOOT::|spad2lisp| - BOOT::|orderUnionEntries| BOOT::|punctuation?| - BOOT::|Record0| BOOT::|makeFort,untangle| - BOOT::|makeFort,untangle2| BOOT::|makeOutputAsFortran| - BOOT::|rdigit?| BOOT::|vec2Lists| BOOT::|npMoveTo| - BOOT::|complexRows| BOOT::|makeLispList| - BOOT::|pfSourceStok| BOOT::|vec2Lists1| - BOOT::|multiToUnivariate| BOOT::|spadTypeTTT| - BOOT::|makeUnion| BOOT::|stripNil| - BOOT::|parseAndEvalToString| - BOOT::|parseAndEvalToStringForHypertex| BOOT::|XDRFun| - BOOT::|pair2list| BOOT::|pfStringConstString| - BOOT::|pfExportDef| BOOT::|prefix2Infix| - BOOT::|pfDefinitionSequenceArgs| BOOT::|lispType| - BOOT::|pfComDefinitionDef| BOOT::|checkForBoolean| - BOOT::|npTrapForm| BOOT::|pfTransformArg| - BOOT::|vectorOfFunctions| BOOT::|pfTaggedToTyped1| - BOOT::|pfFlattenApp| BOOT::|pfTaggedToTyped| - BOOT::|pfCollectVariable1| - BOOT::|InvestigateConditions,pessimise| BOOT::|pfCollect1?| - BOOT::|d01gafSolve,f| BOOT::|pfComDefinitionDoc| - BOOT::|PrepareConditional| BOOT::|pfLoopIterators| - BOOT::|TryGDC| BOOT::|d01fcfSolve,f| BOOT::|compCategories| - BOOT::|pfHidePart| BOOT::|makeMissingFunctionEntry,tran| - BOOT::|PacPrint| BOOT::|keyItem| BOOT::|pfHide?| - BOOT::|pfDocumentText| BOOT::|pfDocument?| - BOOT::|e02dafSolve,fxy| BOOT::|pfLambdaArgs| - BOOT::|ConstantCreator| BOOT::|pfDefinitionLhsItems| - BOOT::|pf0WithWithin| BOOT::|d02bbfSolve,fb| - BOOT::|pfWithWithin| BOOT::|d02bbfSolve,fa| - BOOT::|pf0WithBase| BOOT::|d02gbfSolve,fe| - BOOT::|pfWithBase| BOOT::|pfWithWithon| BOOT::|pfNot| - BOOT::|d02kefSolve,fc| BOOT::|pfId| BOOT::|pfTupleParts| - BOOT::|d02kefSolve,fb| BOOT::|pfWhereContext| - BOOT::|InvestigateConditions| BOOT::|pfCheckArg| - BOOT::|InvestigateConditions,reshape| - BOOT::|d02kefSolve,fa| BOOT::|pfCheckId| - BOOT::|getPossibleViews| BOOT::|pfQualTypeQual| - BOOT::|ICformat| BOOT::|pfTupleListOf| - BOOT::|InvestigateConditions,mkNilT| BOOT::|pfQualTypeType| - BOOT::|pfQualType?| BOOT::|getViewsConditions| - BOOT::|pfDWhereExpr| BOOT::|ICformat,Hasreduce| - BOOT::|pfForinLhs| BOOT::|ICformat,ORreduce| - BOOT::|d02gbfSolve,fi| BOOT::|d02gbfSolve,fh| - BOOT::|pfDWhereContext| BOOT::|CategoriesFromGDC| - BOOT::|pfSymbolVariable?| BOOT::|d02rafSolve,fc| - BOOT::|pfMLambdaArgs| BOOT::|optFunctorBodyRequote| - BOOT::|d02gafSolve,ff| BOOT::|pfInlineItems| - BOOT::|d02rafSolve,fb| BOOT::|pfSemiColonBody| - BOOT::|d02rafSolve,fa| BOOT::|pfSemiColon?| - BOOT::|optFunctorBodyQuotable| BOOT::|d02gafSolve,fd| - BOOT::|pfInline| BOOT::|pf0AddBase| BOOT::|pfAddBase| - BOOT::|d02ejfSolve,fb| BOOT::|pfSemiColon| - BOOT::|pfAddAddon| BOOT::|d02ejfSolve,fa| - BOOT::|pfAddAddin| BOOT::|d02bhfSolve,fb| - BOOT::|pf0ImportItems| BOOT::|d02bhfSolve,fa| - BOOT::|pfImportItems| BOOT::|pfInline?| - BOOT::|pfReturnFrom| BOOT::|pfImport| - BOOT::|d02gafSolve,fb| BOOT::|pfListOf?| - BOOT::|pfFreeItems| BOOT::|pf0TLambdaArgs| - BOOT::|d02gafSolve,fa| BOOT::|pfTLambdaArgs| - BOOT::|pfTLambdaBody| BOOT::|pfExitNoCond| - BOOT::|pf0WrongRubble| BOOT::|pfWrongRubble| - BOOT::|pfTLambdaRets| BOOT::|pfWrongWhy| - BOOT::|pfIterateFrom| BOOT::|pfLocalItems| - BOOT::|pfAttributeExpr| BOOT::|d02cjfSolve,fb| - BOOT::|pfAttribute?| BOOT::|pfLoop| BOOT::|d02cjfSolve,fa| - BOOT::|pfDo| BOOT::|pfWDeclareDoc| BOOT::|pfSecond| - BOOT::|pfWDeclareSignature| BOOT::|pfWDeclare?| - BOOT::|pfCheckInfop| BOOT::|d03edfSolve,fd| - BOOT::|pf0CollectIterators| BOOT::|pfExport?| - BOOT::|d03edfSolve,fc| BOOT::|pfDeclPart?| - BOOT::|d03edfSolve,fa| IDENTITY BOOT::|pfDWhere?| - BOOT::|pfImport?| BOOT::|pfTyping?| BOOT::|pfSuchthat| - BOOT::|pfComDefinition?| BOOT::|pfTLambda?| BOOT::|pfWhile| - BOOT::|pfAdd?| BOOT::|pf0ExportItems| BOOT::|pfExportItems| - BOOT::|pfExpr?| BOOT::|pfWith?| BOOT::|e01sefSolve,f| - BOOT::|pf0TypingItems| BOOT::|pfTypingItems| - BOOT::|pfGetLineObject| BOOT::|lnFileName?| - BOOT::|e01bgfSolve,g| BOOT::|e01bgfSolve,f| - BOOT::|pfNopos?| BOOT::|lnExtraBlanks| - BOOT::|pfPlaceOfOrigin| BOOT::|ravel| - BOOT::|poPlaceOfOrigin| BOOT::|e01bafSolve,f| - BOOT::|pfFileName?| BOOT::|poFileName?| - BOOT::|parseAndEval| BOOT::|getDomainHash| BOOT::|aplTran1| - BOOT::|hasAplExtension| BOOT::|htpDomainConditions| - BOOT::|aplTranList| BOOT::|postDefArgs| - BOOT::|postTranScripts| BOOT::|getHtMacroItem| - BOOT::|postTranScripts,fn| BOOT::|unTuple| - BOOT::|isPackageType| BOOT::|buttonNames| - BOOT::|postcheckTarget| BOOT::|postcheck| - BOOT::|dbNonEmptyPattern| BOOT::|postBlockItemList| - VMLISP:|last| BOOT::|postBlockItem| BOOT::|postQuote| - BOOT::|postSequence| BOOT::|postTranList| - BOOT::|checkWarning| VMLISP:HASHTABLE-CLASS - BOOT::|downlinkSaturn| BOOT::|decodeScripts,fn| - BOOT::|mkUnixPattern| BOOT::|tuple2List| - BOOT::|postCapsule| BOOT::|patternCheck| BOOT::|postElt| - BOOT::|postSEGMENT| BOOT::|e04nafSolve,ff| - BOOT::|postIteratorList| BOOT::|npEqPeek| BOOT::|postForm| - BOOT::|htAllOrNum| BOOT::|postOp| BOOT::|stringize| - VMLISP:LISTOFFREES BOOT::|postTuple| BOOT::|postExit| - BOOT::|parseWord| BOOT::|postMapping| VMLISP:GENSYMP - BOOT::|postMDef| BOOT::|pfAttribute| BOOT::|postDef| - BOOT::|npRestore| BOOT::|postCategory| BOOT::|aplTran| - BOOT::|containsBang| BOOT::|htMakePathKey| BOOT::|postJoin| - BOOT::|npWConditional| BOOT::|postTransformCheck| - BOOT::|npBraced| VMLISP:PAPPP - BOOT::|chkAllNonNegativeInteger| BOOT::|postIf| - BOOT::|chkNonNegativeInteger| BOOT::|postPretend| - BOOT::|pfId?| BOOT::|postAtSign| BOOT::|npBracketed| - BOOT::|postColon| BOOT::|chkDirectory| - BOOT::|postColonColon| BOOT::|postWhere| - BOOT::|npZeroOrMore| BOOT::|postSemiColon| - BOOT::|postBlock| BOOT::|pfParts| BOOT::|deepestExpression| - BOOT::|translateYesNo2TrueFalse| BOOT::|postComma| - BOOT::|pfEnSequence| BOOT::|comma2Tuple| - BOOT::|npParenthesized| BOOT::|chkOutputFileName| - BOOT::|postReduce| BOOT::|chkPosInteger| BOOT::|postAdd| - BOOT::|pfUnSequence| BOOT::|postTupleCollect| - BOOT::|postCollect| BOOT::|postRepeat| BOOT::|postIn| - BOOT::|htShowCount| BOOT::|satisfiesUserLevel| - BOOT::|postin| BOOT::|postQUOTE| BOOT::|pfListOf| - BOOT::|postScripts| BOOT::|translateTrueFalse2YesNo| - BOOT::|postWith| BOOT::|e02dffSolve,fp| VMLISP:CHARP - BOOT::|chkNameList| BOOT::|isSymbol| BOOT::INFIXTOK - BOOT::|npQualified| BOOT::SKIP-TO-ENDIF - BOOT::|npConditional| BOOT::|stackMessageIfNone| - BOOT::PREPARSEREADLINE BOOT::|npElse| - BOOT::|translateYesNoToTrueFalse| BOOT::|npMissing| - BOOT::PREPARSEREADLINE1 BOOT::|npDDInfKey| VMLISP:RPACKFILE - BOOT::SKIP-IFBLOCK BOOT::|tokPart| BOOT::|npInfKey| - VMLISP:RECOMPILE-LIB-FILE-IF-NECESSARY BOOT::|npWith| - BOOT::|optimizeFunctionDef| BOOT::PREPARSE-ECHO - BOOT::|npCompMissing| VMLISP::LIBSTREAM-DIRNAME - BOOT::ATENDOFUNIT BOOT::PARSEPRINT BOOT::|npAdd| - BOOT::PREPARSE1 BOOT::|e02defSolve,fp| - BOOT::|htpRadioButtonAlist| BOOT::MONITOR-DATA-COUNT - BOOT::MONITOR-DATA-NAME BOOT::|htpDomainPvarSubstList| - BOOT::MONITOR-DATA-SOURCEFILE BOOT::|profileTran| - BOOT::MONITOR-DELETE BOOT::|pfSequenceToList| - BOOT::MONITOR-DATA-MONITORP BOOT::|pfSequenceArgs| - BOOT::|renamePatternVariables| BOOT::|pfSequence?| - BOOT:|LispEval| BOOT::|pfNovalueExpr| - BOOT::MONITOR-EXPOSEDP BOOT::|pfNovalue?| - BOOT::|htpDomainVariableAlist| BOOT::|pfNotArg| - BOOT::MONITOR-APROPOS BOOT::|pfNot?| BOOT::MONITOR-DATA-P - BOOT::|pfOrRight| BOOT::|pfOrLeft| BOOT::MONITOR-LIBNAME - BOOT::|pfOr?| BOOT::MONITOR-FILE BOOT::|pfAndRight| - BOOT::|pfAndLeft| BOOT::|pfAnd?| BOOT::MONITOR-SPADFILE - BOOT::|getDomainsInScope| BOOT::|pfWrong?| - BOOT::MONITOR-PARSE BOOT::|pf0LocalItems| - BOOT::MONITOR-DECR BOOT::|pfLocal?| BOOT::|pfNovalue| - BOOT::|pf0FreeItems| BOOT::|npItem1| BOOT::|pfFree?| - BOOT::|pfRestrictType| BOOT::MONITOR-INCR - BOOT::|pfRestrictExpr| BOOT::|npLetQualified| - BOOT::|isConstructorForm| BOOT::|pfRestrict?| - BOOT::|library| BOOT::MONITOR-NRLIB BOOT::|pfDefinition?| - BOOT::|unknownTypeError| BOOT::|pfAssignRhs| - BOOT::|pf0AssignLhsItems| BOOT::|pfAssign?| BOOT::|quotify| - BOOT::|pfDoBody| BOOT::|reportHashCacheStats| - BOOT::MONITOR-DIRNAME BOOT::|pfDo?| - BOOT::|mkHashCountAlist| BOOT::|pfSuchthatCond| - BOOT::|displayCacheFrequency| BOOT::|pfSuchthat?| - BOOT::MONITOR-CHECKPOINT BOOT::|pfWhileCond| - BOOT::|pfWhile?| BOOT::|pfForinWhole| - BOOT::|outputDomainConstructor| BOOT::|e02dffSolve,fmu| - BOOT::|pf0ForinLhs| BOOT::|typeTimePrin| - BOOT::|pfCheckMacroOut| BOOT::|isSomeDomainVariable| - BOOT::|pfForin?| BOOT::|displayHashtable| - BOOT::|pfCollect?| BOOT::|removeZeroOne| BOOT::|npEncAp| - BOOT::|pf0LoopIterators| BOOT::|addBlanks| - BOOT::|compHasFormat| BOOT::|loopIters2Sex| - BOOT::|noBlankBeforeP| BOOT::|pfLoop?| - BOOT::|stopTimingProcess| BOOT::|noBlankAfterP| - BOOT::|?comp| BOOT::|pfExitExpr| BOOT::|pfExitCond| - BOOT::|compileQuietly| BOOT::|sayLongOperation| - BOOT::|isAlmostSimple,setAssignment| BOOT::|pfExit?| - BOOT::|compileInteractive| BOOT::|say2PerLineThatFit| - BOOT::?COMP BOOT::|npBracked| BOOT::|pfFromdomDomain| - BOOT::|startTimingProcess| BOOT::|prEnv| - BOOT::|pfFromdomWhat| BOOT::|operationLink| BOOT::|opTran| - BOOT::|pfFromdom?| BOOT::|hasType,fn| BOOT::|pfPretendType| - BOOT::|clearCategoryCache| BOOT::|pfTuple| - BOOT::|pfPretendExpr| BOOT::|clearConstructorCache| - BOOT::|qModemap| BOOT::|pfPretend?| - BOOT::|splitListSayBrightly| BOOT::|formatModemap| - BOOT::|pfCoercetoType| BOOT::|printEnv| - BOOT::|pfCoercetoExpr| BOOT::|tabber| BOOT::|pfCoerceto?| - BOOT::|decExitLevel| BOOT::|pfTaggedExpr| - BOOT::|splitSayBrightly| BOOT::|pfTaggedTag| - BOOT::|brightPrintRightJustify| BOOT::|pfTagged?| - BOOT::|pfIfElse| BOOT::|splitSayBrightlyArgument| - BOOT::DATABASE-ABBREVIATION BOOT::|pfIfThen| - BOOT::|mkDomainConstructor| BOOT::|pfIfCond| - BOOT::|brightPrint1| BOOT::SET-FILE-GETTER BOOT::|mkList| - BOOT::|pfIf?| BOOT::|brightPrint| BOOT::|pf0TupleParts| - BOOT::|pfTuple?| BOOT::DATABASE-SOURCEFILE - BOOT::|minimalise| BOOT::|minimalise,min| - BOOT::|pfLiteral?| BOOT::|mkDevaluate| - BOOT::|minimalise,HashCheck| BOOT::|pfSymbolSymbol| - BOOT::|numberOfEmptySlots| BOOT::|pfSymbol?| - BOOT::|sayBrightlyLength1| BOOT::|hasOptArgs?| - BOOT::|npFromdom1| BOOT::|pfSuchThat2Sex| - BOOT::|CDRwithIncrement| BOOT::|npPush| - BOOT::|segmentedMsgPreprocess| BOOT::|pfOp2Sex| - BOOT::SHOWDATABASE BOOT::|pmDontQuote?| BOOT::|initCache| - BOOT::|blankIndicator| BOOT::|pfDefinitionRhs| - BOOT::|npEqKey| BOOT::|pf0DefinitionLhsItems| - BOOT::|pfApplicationArg| BOOT::SQUEEZE - BOOT::|rulePredicateTran| BOOT::|pfRuleRhs| BOOT::UNSQUEEZE - BOOT::|npDotted| BOOT::|pfRuleLhsItems| - BOOT::|constructor2ConstructorForm| BOOT::|npAngleBared| - BOOT::|pfCollectBody| BOOT::DATABASE-SPARE - BOOT::|pfCollectIterators| BOOT::|remHashEntriesWith0Count| - BOOT::|float2Sex| BOOT::DATABASE-DEFAULTDOMAIN - BOOT::|npListing| BOOT::|pfLiteralString| - BOOT::DATABASE-NILADIC BOOT::|pfLeafToken| - BOOT::DATABASE-CONSTRUCTORCATEGORY BOOT::|pfLiteralClass| - BOOT::DATABASE-OBJECT BOOT::DATABASE-MODEMAPS - BOOT::DATABASE-OPERATIONALIST BOOT::DATABASE-DEPENDENTS - BOOT::DATABASE-USERS BOOT::DATABASE-PARENTS BOOT::|tokPosn| - BOOT::|pileColumn| BOOT::|underDomainOf| - BOOT::DATABASE-PREDICATES BOOT::|underDomainOf;| - BOOT::|pileCforest| BOOT::DATABASE-ATTRIBUTES - BOOT::|enPile| BOOT::|separatePiles| - BOOT::DATABASE-DOCUMENTATION BOOT::|pilePlusComments| - BOOT::|pilePlusComment| BOOT::|insertpile| - BOOT::|lastTokPosn| BOOT::|firstTokPosn| - BOOT::|pileComment| BOOT::|isValidType;| - BOOT::|lnGlobalNum| BOOT::|lnLocalNum| - BOOT::|pfSourcePositionlist| BOOT::|isPartialMode| - BOOT::|pfSourcePositions| - BOOT::|makeOldAxiomDispatchDomain| BOOT::|lnString| - BOOT::DATABASE-ANCESTORS BOOT::|poNoPosition?| - BOOT::|poImmediate?| BOOT::|poIsPos?| BOOT::|hashString| - BOOT::DATABASE-CONSTRUCTOR BOOT::|pfPosn| - BOOT::|isLegitimateRecordOrTaggedUnion| - BOOT::|lnImmediate?| BOOT::|listOfDuplicates| - BOOT::|pfPosImmediate?| BOOT::|isPolynomialMode| - BOOT::|pfSourceToken| BOOT::|equiType| BOOT::|pfFirst| - BOOT::|getUnderModeOf| FOAM::PROCESS-IMPORT-ENTRY - BOOT::|deconstructT| BOOT::|attribute?| BOOT::TRARGPRINT - BOOT::|makeLazyOldAxiomDispatchDomain| BOOT::|eqType| - BOOT::DATABASE-P BOOT::LINE-ADVANCE-CHAR - BOOT::DATABASE-COSIG BOOT::LINE-AT-END-P BOOT::TRBLANKS - BOOT::MAKE-STRING-ADJUSTABLE BOOT::|sayMessage| - BOOT::|dropPrefix| BOOT::TRMETA1 BOOT::|mkDatabasePred| - BOOT::TRY-GET-TOKEN BOOT::TRMETA BOOT::|namestring| - BOOT::|isFreeFunctionFromMmCond| BOOT::|isSharpVarWithNum| - BOOT::|isFreeFunctionFromMm| - BOOT::|mkAlistOfExplicitCategoryOps| BOOT::LINE-P - BOOT::|mkAlistOfExplicitCategoryOps,atomizeOp| - BOOT::|flattenSignatureList| BOOT::|collectAndDeleteAssoc| - BOOT::|checkSplitBrace| BOOT::|getFirstArgTypeFromMm| - BOOT::|checkSplitPunctuation| BOOT::|checkSplitOn| - BOOT::|checkSplitBackslash| BOOT::STACK-POP - BOOT::|checkAlphabetic| BOOT::|isDomainSubst| - BOOT::UNDERSCORE BOOT::|collectComBlock| - BOOT::|getDomainFromMm| BOOT::/MDEF BOOT::STACK-TOP - BOOT::|formal2Pattern| BOOT::|finalizeDocumentation,hn| - BOOT::STACK-P BOOT::LINE-NEXT-CHAR BOOT::REDUCTION-RULE - BOOT::|checkExtractItemList| - BOOT::|recordHeaderDocumentation| BOOT::|checkIeEgfun| - BOOT::|appendOver| BOOT::|rebuild| BOOT::|checkInteger| - BOOT::|spool| BOOT::|setOutputCharacters| - BOOT::/VERSIONCHECK BOOT::INTERP-MAKE-DIRECTORY - BOOT::CACHEKEYEDMSG BOOT::XDR-STREAM-HANDLE - BOOT::|normalizeArgFileName| BOOT::|checkTrim,trim| - BOOT::XDR-STREAM-P BOOT::|checkDocError| BOOT::|bootFind| - BOOT::|checkTrim,wherePP| BOOT::|checkDecorateForHt| - BOOT::XDR-STREAM-NAME BOOT::|checkRecordHash| - BOOT::|checkIsValidType| BOOT::|normalizeTimeAndStringify| - BOOT::SETLETPRINTFLAG BOOT::|checkGetParse| - BOOT::|checkGetStringBeforeRightBrace| - BOOT::|checkGetLispFunctionName| BOOT::MAKE-DIRECTORY - BOOT::|checkLookForRightBrace| - BOOT::|checkLookForLeftBrace| BOOT::|checkFixCommonProblem| - BOOT::|checkArguments| BOOT::SHAREDITEMS BOOT::|checkTexht| - BOOT::|isVowel| BOOT::|getOfCategoryArgument| - BOOT::|checkAddPeriod| BOOT::|newMKINFILENAM| - BOOT::|getFunctionSourceFile1| BOOT::|checkDecorate| - BOOT::|pathname?| BOOT::|hasNoVowels| BOOT::|checkBalance| - BOOT::|checkSayBracket| BOOT::|pfSequence2Sex| - BOOT::|checkBeginEnd| BOOT::|pf2Sex1| BOOT::|checkIeEg| - BOOT::|pfSequence2Sex0| BOOT::|checkDocError1| - BOOT::|ruleLhsTran| BOOT::|patternVarsOf| - BOOT::|checkAddMacros| BOOT::|pfLambdaTran| - BOOT::|pfLambdaBody| BOOT::|checkSplit2Words| - BOOT::|pfLambdaRets| BOOT::|checkAddSpaces| - BOOT::|pfTypedType| BOOT::|newString2Words| - BOOT::|pfCollectArgTran| BOOT::|checkGetArgs| - BOOT::|pfTyped?| BOOT::|pfRhsRule2Sex| - BOOT::|pfLhsRule2Sex| BOOT::|checkDocMessage| - BOOT::|checkRemoveComments| BOOT::|pfRule2Sex| - BOOT::|checkTrimCommented| BOOT::|pfLambda2Sex| - BOOT::|pfDefinition2Sex| BOOT::|leftTrim| - BOOT::|pfCollect2Sex| BOOT::|checkGetMargin| - BOOT::|pfApplication2Sex| BOOT::|whoOwns| - BOOT::|pfLiteral2Sex| BOOT::|pfWhereExpr| - BOOT::|pf0WhereContext| BOOT::|pfIterate?| - BOOT::|pfReturnExpr| BOOT::|pfReturn?| BOOT::|setOutStream| - BOOT::|pfBreakFrom| BOOT::|pfBreak?| BOOT::|pfRule?| - BOOT::DATABASE-CONSTRUCTORMODEMAP BOOT::|%key| BOOT::|ppos| - BOOT::|porigin| BOOT::|pfLinePosn| BOOT::|pfCharPosn| - BOOT::|pfImmediate?| BOOT::|pfNoPosition?| BOOT::|%pos| - BOOT::|processPackage,setPackageCode| BOOT::|%fname| - BOOT::|pfname| BOOT::|%origin| BOOT::|mkRepititionAssoc| - BOOT::|%id| BOOT::|pkey| BOOT::|getCaps| - BOOT::|constructorCategory| BOOT::|evalDomain| - BOOT::|parseAtom| BOOT::|systemErrorHere| - BOOT::|coerceMap2E| BOOT::|parseConstruct| - BOOT::|parseTran,g| BOOT::|parseWhere| BOOT::|parseVCONS| - BOOT::|parseSeq| BOOT::|transSeq| BOOT::|postError| - BOOT::|parseSegment| BOOT::|parseReturn| - BOOT::|parsePretend| BOOT::|parseType| BOOT::|RecordInner| - BOOT::|parseTypeEvaluate| BOOT::|isRecord| - BOOT::|parseMDEF| BOOT::|parseLETD| BOOT::|parseLET| - BOOT::|transIs| BOOT::|CatEval| BOOT::|transUnCons| - BOOT::|parseLeave| BOOT::|mkCategory,Prepare| - BOOT::|parseJoin| BOOT::|parseJoin,fn| BOOT::|parseIsnt| - BOOT::|parseBigelt| BOOT::|parseIs| - BOOT::|DropImplementations| BOOT::|parseInBy| - BOOT::|parseIn| BOOT::|FindFundAncs| BOOT::|parseHas| - BOOT::|parseHas,mkand| BOOT::|TruthP| BOOT::|parseHas,fn| - BOOT::|parseExit| BOOT::|isCategory| BOOT::|parseDEF| - BOOT::|setDefOp| BOOT::|mkCategory,Prepare2| - BOOT::|transIs1| BOOT::|isListConstructor| - BOOT::|parseCategory| BOOT::|parseDropAssertions| - BOOT::|parseAtSign| BOOT::|parseHasRhs| BOOT::|parseCoerce| - BOOT::|getCategoryExtensionAlist0| BOOT::|parseColon| - BOOT::|getCategoryExtensionAlist| BOOT::|sayMSG| - BOOT::|parseDollarGreaterThan| BOOT::|squeeze1| - BOOT::|squeezeList| BOOT::|parseGreaterThan| - BOOT::|categoryParts,exportsOf| - BOOT::|makeSimplePredicateOrNil| BOOT::|simpHasPred,eval| - BOOT::|simpHasPred,simp| BOOT::|specialModeTran| - BOOT::|compressHashTable| BOOT::|simpOrUnion| - BOOT::|clearCategoryTable| BOOT::|transCategoryItem| - BOOT::|parseCases| BOOT::TOKEN-PRINT BOOT::|getConstrCat| - BOOT::LINE-CURRENT-SEGMENT - BOOT::|mkCategoryExtensionAlistBasic| BOOT::STACK-CLEAR - BOOT::|macrop| BOOT::|showCategoryTable| - BOOT::|clearTempCategoryTable| BOOT::TOKEN-P - BOOT::|addToCategoryTable| - BOOT::|simpHasPred,simpDevaluate| - BOOT::|mkCategoryExtensionAlist| - BOOT::|updateCategoryTableForCategory| - BOOT::|isFormalArgumentList| BOOT::|defaultingFunction| - BOOT::|getOperationAlistFromLisplib| - BOOT::|getConstructorAbbreviation| - BOOT::|predicateBitIndex| BOOT::|encodeCatform| - BOOT::|evalableConstructor2HtString,unquote| - BOOT::|orderByContainment| BOOT::|stripOutNonDollarPreds| - BOOT::|isHasDollarPred| BOOT::|transHasCode| - BOOT::|removeAttributePredicates| BOOT::|getCatAncestors| - BOOT::|makeCompactDirect1,fn| BOOT::|depthAssoc| - BOOT::|depthAssocList| BOOT::|fromHeading| - BOOT::|htAddHeading| BOOT::|infovec| BOOT::|dcData1| - BOOT::|dbDoesOneOpHaveParameters?| BOOT::|ppTemplate| - BOOT::|dbOuttran| BOOT::|bitsOf| BOOT::|mathform2HtString| - BOOT::|conname2StringList| BOOT::|dcData| - BOOT::|predicateBitIndexRemop| BOOT::|form2StringList| - BOOT::|dbConform| BOOT::|dbMapping2StringList| - BOOT::|htTab| BOOT::|orderBySubsumption| BOOT::|dcCats| - BOOT::|dcCats1| BOOT::|getLookupFun| - BOOT::|listOfCategoryEntries| BOOT::|niladicHack| - BOOT::|dbGatherDataImplementation,fn| BOOT::|NRTcatCompare| - BOOT::|dbGatherDataImplementation,gn| BOOT::|template| - BOOT::|dcAtts| BOOT::|dcSlots| BOOT::|dcOpTable| - BOOT::|getConstructorArgs| BOOT::|dbNewConname| - BOOT::|escapeString| BOOT::|nodeSize| BOOT::|fortexp0| - BOOT::|vectorSize| BOOT::|myLastAtom| - BOOT::|isDefaultPackageForm?| BOOT::|numberOfNodes| - BOOT::|dcOps| BOOT::|removeAttributePredicates,fn| - BOOT::|removeAttributePredicates,fnl| - BOOT::DATABASE-CONSTRUCTORFORM BOOT::|makeCompactDirect| - BOOT::|htSayTuple| BOOT::|dcPreds| BOOT::|htSayArgument| - BOOT::|makeDomainTemplate| BOOT::|hashTable2Alist| - BOOT::|stuffDomainSlots| BOOT::|getExportCategory| - BOOT::|koCatOps1| BOOT::|simplifyAttributeAlist| - BOOT::|hasPatternVar| BOOT::|dcAll| - BOOT::|findSubstitutionOrder?| BOOT::|isInstantiated| - BOOT::|modemap2SigConds| BOOT::|getSubstCandidates| - BOOT::|htSayExplicitExports| - BOOT::|fortFormatCharacterTypes| BOOT::|opPageFastPath| - BOOT::|fortFormatCharacterTypes,mkParameterList2| - BOOT::|exp2FortOptimizeCS1,popCsStacks| - BOOT::|kFormatSlotDomain,fn| - BOOT::|fortFormatTypes,unravel| BOOT::|formatSlotDomain| - BOOT::|getSubstSignature| BOOT::|getfortexp1| - BOOT::|fortran2Lines1| BOOT::|koOps,trim| - BOOT::|isPatternVar| BOOT::|dispfortexp1| - BOOT::|displayBreakIntoAnds| VMLISP::LIBRARY-FILE - VMLISP::GET-DIRECTORY-LIST VMLISP::PROBE-NAME - VMLISP::SPAD-FIXED-ARG VMLISP::LIBSTREAM-INDEXSTREAM - VMLISP::LIBSTREAM-INDEXTABLE VMLISP::LIBSTREAM-MODE - VMLISP::GETINDEXTABLE VMLISP::GET-INDEX-TABLE-FROM-STREAM - VMLISP::LIBSTREAM-P BOOT::|NRTassocIndexAdd| - BOOT::|optDeltaEntry,quoteSelector| BOOT::|NRToptimizeHas| - BOOT::|listOfBoundVars| BOOT::|slot1Filter,fn| - BOOT::|reverseCondlist| BOOT::|c05pbfSolve,fb| - BOOT::|genDeltaSig| BOOT::|c05pbfSolve,fa| - BOOT::|c05nbfSolve,fb| - BOOT::|NRTsubstDelta,replaceSlotTypes| - BOOT::|c05nbfSolve,fa| BOOT::|slot1Filter| - BOOT::|NRTsubstDelta| BOOT::|c06ebfSolve,f| - BOOT::|catList2catPackageList,fn| BOOT::|addConsDB| - BOOT::|changeDirectoryInSlot1,fn| - BOOT::|changeDirectoryInSlot1,sigloc| - BOOT::|NRTreplaceAllLocalReferences| BOOT::|mkSlot1sublis| - BOOT::|NRTputInLocalReferences| BOOT::|NRTputInHead| - BOOT::|NRTcheckVector| BOOT::|NRTmakeSlot1| - BOOT::|NRTisExported?| BOOT::|makePredicateBitVector| - BOOT::|catList2catPackageList| BOOT::|c06eafSolve,f| - BOOT::|NRTgetAddForm| BOOT::|c06frfSolve,h| - BOOT::|NRTaddInner| BOOT::|c06ekfSolve,f| - BOOT::|updateSlot1DataBase| BOOT::|genDeltaSpecialSig| - BOOT::|c06gbfSolve,f| BOOT::|newHasTest,evalCond| - BOOT::|c06fufSolve,hn| BOOT::|c06gcfSolve,f| - BOOT::|c06fufSolve,hm| BOOT::|c06fpfSolve,h| - BOOT::|c06fqfSolve,h| BOOT::|c06ecfSolve,f| BOOT:|length1?| - BOOT:|ListRemoveDuplicatesQ| BOOT:|ListNReverse| - BOOT::|d01gbfSolve,f| BOOT:|TableKeys| - BOOT::|ncParseAndInterpretString| BOOT::|pfPrintSrcLines| - BOOT::TERMINATOR VMLISP::MAKE-BVEC - BOOT::|exp2FortOptimizeCS| BOOT::|exp2FortOptimizeCS1| - BOOT::|expression2Fortran| BOOT::|fortranCleanUp| - BOOT::|exp2FortOptimize| BOOT::|fortPre| BOOT::|incRgen| - BOOT::|segment| BOOT::|exp2Fort1| FOAM:|printNewLine| - FOAM:|formatDFloat| FOAM:|formatSFloat| FOAM:|formatBInt| - BOOT::|npNull| FOAM:|formatSInt| BOOT::|isFloat| - BOOT::|fortExpSize| BOOT::|parseAndEval1| - BOOT::|printStats| BOOT::|mkParameterList| - BOOT::|unStackWarning| BOOT::|fortFormatIntrinsics| - BOOT::?M BOOT::|displayLines| BOOT::|?m| BOOT::|addCommas| - BOOT::|unErrorRef| BOOT::|fortran2Lines| BOOT::|uppretend| - BOOT::|typeOfType| BOOT::|checkLines| BOOT::|uptypeOf| - BOOT::|statement2Fortran| BOOT::|displayLines1| - BOOT::|upQUOTE| BOOT::|dispStatement| - BOOT::|makeCommonEnvironment,interLocalE| BOOT::|upSEQ| - BOOT::|mkMat| BOOT::|makeCommonEnvironment,interC| - BOOT::|fortSize,elen| BOOT::|quote2Wrapped| - BOOT::|deltaContour,eliminateDuplicatePropertyLists| - BOOT::|fortSize| BOOT::|checkType| BOOT::|interpOnlyREPEAT| - BOOT::|upREPEAT1| BOOT::|old2NewModemaps| BOOT::|upREPEAT0| - BOOT::|displayModemaps| BOOT::|uplocal| - BOOT::|fortFormatElseIf| BOOT::|upfree| - BOOT::|indentFortLevel| FOAM:|Halt| BOOT::|upREPEAT| - BOOT::|?modemaps| BOOT::|fortFormatIf| BOOT::|upDEF| - BOOT::|upreturn| BOOT::|uperror| BOOT::|what| - BOOT::?MODEMAPS BOOT::|whatSpad2Cmd| BOOT::|stackAndThrow| - BOOT::|makeCommonEnvironment,interE| BOOT::|constructor| - BOOT::|alqlGetParams| BOOT::|makeNonAtomic| - BOOT::|alqlGetOrigin| BOOT::|alqlGetKindString| - BOOT::|npboot| BOOT::|compAndTrace| VMLISP::SIMPLE-ARGLIST - BOOT::|string2BootTree| VMLISP::REMOVE-FLUIDS - BOOT::|f04qafSolve,f| BOOT::|getBrowseDatabase| - BOOT::|wrapSEQExit| BOOT::|compileSpadLispCmd| - BOOT::|incExitLevel| BOOT::ASEC BOOT::|mkErrorExpr,bracket| - BOOT::|displayProperties,sayFunctionDeps| BOOT::ACOT - BOOT::|displayMacro| VMLISP::QUOTESOF BOOT::|genDeltaEntry| - BOOT::|displayParserMacro| VMLISP::DEQUOTE - BOOT::|compilerMessage| BOOT::MANEXP - BOOT::|asharpConstructorName?| VMLISP::ISQUOTEDP - BOOT::|f04mcfSolve,gj| BOOT::|f04arfSolve,h| VMLISP::VARP - BOOT::|f04mcfSolve,fd| BOOT::|dbpHasDefaultCategory?| - BOOT::|stackMessage| BOOT::|dbAddChainDomain| - BOOT::|listOfIdentifiersIn| BOOT::|knownInfo| - BOOT::|outerProduct| BOOT::|f04jgfSolve,h| - BOOT::|helpSpad2Cmd| BOOT::|f04mcfSolve,fal| - BOOT::|sayAsManyPerLineAsPossible| BOOT::|extractHasArgs| - BOOT::|read| BOOT::|readSpad2Cmd| BOOT::|displayMacros| - BOOT::|warnLiteral| BOOT::|getConstructorModemap| - BOOT::GCOPY BOOT::|koAttrs,fn| BOOT::|displayOperations| - BOOT::|libConstructorSig| BOOT::|f04asfSolve,h| - BOOT::|libConstructorSig,fn| BOOT::|npProcessSynonym| - BOOT::|listOfSharpVars| BOOT::|compileAsharpLispCmd| - BOOT::|isAlmostSimple| BOOT::|libdbTrim| - BOOT::|isAlmostSimple,fn| BOOT::|isFunctor| - BOOT::|stripLisp| BOOT::|parentsOfForm| - BOOT::|isSideEffectFree| BOOT::|ltrace| BOOT::|dbMkForm| - BOOT::|trace| BOOT::|compileAsharpCmd| BOOT::MSORT - BOOT::|displayProplist,fn| BOOT::|removeEnv| BOOT::|load| - BOOT::|loadSpad2Cmd| BOOT::|dbReadLines| BOOT::?VALUE - BOOT::|help| BOOT::|?value| BOOT::|trimComments| - BOOT::|f04atfSolve,h| BOOT::|f04fafSolve,h| - BOOT::|spreadGlossText| BOOT::?PROPERTIES - BOOT::|asyExtractAbbreviation| BOOT::|getGlossLines| - BOOT::|?properties| BOOT::|asyTypeUnit| - BOOT::|getParentsForDomain| BOOT::|f04fafSolve,g| - BOOT::|prModemaps| BOOT::|asyTypeItem| - BOOT::|f04fafSolve,f| BOOT::|importFromFrame| - BOOT::|decExitLevel,removeExit0| - BOOT::|closeInterpreterFrame| BOOT::|f04mbfSolve,f| - BOOT::|tokTran| BOOT::?MODE BOOT::|parseSystemCmd| - BOOT::|?mode| BOOT::|dumbTokenize| BOOT::|edit| - BOOT::|editSpad2Cmd| BOOT::|getDefaultPackageClients| - BOOT::|displayOperationsFromLisplib| BOOT::|say2PerLine| - BOOT::|getArgumentConstructors,fn| - BOOT::|getArgumentConstructors,gn| BOOT::|display| - BOOT::|displaySpad2Cmd| BOOT::|frameEnvironment| - BOOT::|getArgumentConstructors| BOOT::|buildLibAttrs| - BOOT::|buildLibOps| BOOT::|splitIntoOptionBlocks| - BOOT::|writedb| BOOT::|getFirstWord| BOOT::|f07aefSolve,fp| - BOOT::|isSharpVar| BOOT::HAS_SHARP_VAR - BOOT::|dbHasExamplePage| BOOT::|isExistingFile| - BOOT::|mkHasArgsPred| BOOT::|lefts| BOOT::|findEqualFun| - BOOT::|dbFromConstructor?| BOOT::|f01mafSolve,f| - BOOT::|dbShowKind| BOOT::|unAbbreviateIfNecessary| - BOOT:|DeepCopy| BOOT::|evalDomainOpPred,convertCatArg| - BOOT::|dbOpsForm| BOOT::|form2Fence| BOOT::|devaluateList| - BOOT::|dbConstructorDoc,fn| FOAM:|fiStrHash| - BOOT::|dbGetInputString| BOOT::|pmTransFilter| - BOOT::|dbExtractUnderlyingDomain| FOAM:|fiGetDebugger| - BOOT::|isValidType| BOOT:|ByteFileReadLine| BOOT::RENAME - BOOT::|isExposedConstructor| FOAM:|fiSetDebugVar| - BOOT:|InputStream?| BOOT::|ncParseFromString| - BOOT:|OutputStream?| BOOT:|StreamSize| - BOOT:|StreamGetPosition| BOOT:|StreamEnd?| - BOOT:|StreamClose| BOOT::|dbConstructorDoc,gn| - BOOT::|digits2Names| BOOT::|dbCompositeWithMap| - BOOT::|extractFileNameFromPath| BOOT:|ToPathname| - BOOT::IDENT-CHAR-LIT BOOT::IS-CONSOLE-NOT-XEDIT - BOOT::|dbAddChain| BOOT::MESSAGEPRINT - BOOT:|PathnameDirectory| BOOT::MESSAGEPRINT-2 - BOOT::|kFormatSlotDomain| BOOT:|PathnameName| - BOOT::MESSAGEPRINT-1 BOOT::|devaluate| BOOT:|PathnameType| - BOOT::|simpCatPredicate| BOOT:|PathnameString| - BOOT::|dbInfovec| BOOT:|PathnameAbsolute?| - BOOT:|PathnameWithoutType| BOOT::|getImports| - BOOT:|PathnameWithoutDirectory| BOOT::|saySpadMsg| - BOOT::|mkConArgSublis| BOOT:|PathnameToUsualCase| - BOOT:|PathnameDirectoryOfDirectoryPathname| BOOT::|sayTeX| - BOOT::|getUsersOfConstructor| BOOT:|Bit?| BOOT::EQUABLE - BOOT::|makeTemplate| BOOT::|dbShowConsKinds| - BOOT::|makeOpDirect| BOOT:|Vector?| BOOT::|bcConTable| - BOOT::|makeOpDirect,fn| BOOT::|mkUniquePred| - BOOT::PARTCODET BOOT::|bcAbbTable| BOOT::|putPredHash| - BOOT::|bcNameConTable| BOOT::|NRTinnerGetLocalIndex| - BOOT::|breakIntoLines| BOOT::|dbConstructorKind| - BOOT::BLANKP BOOT::|setLoadTimeQ| BOOT:|CharDigit?| - BOOT::|dbConstructorDoc,hn| BOOT::|setLoadTime| - BOOT::NONBLANKLOC BOOT::|extendVectorSize| - BOOT::|markUnique| BOOT:|Cset| BOOT::INDENT-POS - BOOT::|addConsDB,min| BOOT::NEXT-TAB-LOC - BOOT:|CsetComplement| BOOT::|measureCommon| - BOOT:|CsetString| BOOT::|getDependentsOfConstructor| - BOOT::|htMakeSaturnFilterPage| BOOT::|writeSaturnLines| - BOOT::|hasIdent| BOOT::|addConsDB,HashCheck| - BOOT::|parseNoMacroFromString| BOOT::|mapConsDB| - BOOT::|pf2Sex| BOOT::|squeezeConsDB| BOOT::|StreamNull| - BOOT::|squeezeConsDB,fn| BOOT::|mkBold| BOOT::|incString| - BOOT::|postSignature| BOOT::|killColons| BOOT:|ToString| - BOOT::|e02dffSolve,flam| BOOT::|removeSuperfluousMapping| - BOOT:|StringImage| BOOT::|dbShowConstructorLines| - BOOT:|String?| BOOT::|postAtom| BOOT::|dbName| - BOOT::|makeSpadConstant| BOOT::|postType| - BOOT::|childrenOf| BOOT::|htBcLispLinks| - BOOT::|typeCheckInputAreas| BOOT::|kisValidType| - BOOT::|kCheckArgumentNumbers| BOOT:|StringUpperCase| - BOOT:|StringLowerCase| BOOT::|topicCode| - BOOT::|htMakePage1| BOOT::|string2OpAlist| - BOOT::|htProcessDoitButton| BOOT::|blankLine?| - BOOT::|htProcessDoneButton| BOOT::|e02defSolve,fmu| - BOOT::|topics| BOOT::|htProcessBcButtons| - BOOT::|topLevelInterpEval| BOOT::|tdPrint| - BOOT::|htProcessToggleButtons| - BOOT::|htProcessDomainConditions| - BOOT::|getConstructorSignature| BOOT::|getDefaultProps| - BOOT::|htInputStrings| BOOT::GET-A-LINE - BOOT::|getConstructorDocumentation| - BOOT::|htBcRadioButtons| BOOT::KILL-COMMENTS - BOOT::|topicCode,fn| BOOT::|htRadioButtons| - BOOT::|listOfTopics| BOOT::|htLispMemoLinks| - BOOT::PRINT-RULE BOOT::|code2Classes| BOOT::SET-PREFIX - BOOT::PRINT-FLUIDS BOOT::|td| BOOT::|unabbrev| - BOOT::|prTriple| BOOT::|htEndMenu| BOOT::GET-META-TOKEN - BOOT::|hasNewInfoAlist| BOOT::|addTraceItem| - BOOT::GET-BSTRING-TOKEN BOOT::|untraceAllDomainLocalOps| - BOOT::|bright| BOOT::GET-STRING-TOKEN - BOOT::|formatUnabbreviated| BOOT::GET-IDENTIFIER-TOKEN - BOOT::BVEC-NOT BOOT::TOKEN-LOOKAHEAD-TYPE - BOOT::|orderBySlotNumber| BOOT::|traceSpad2Cmd| - BOOT::|compArgumentConditions| BOOT::|e02defSolve,flam| - BOOT::|trace1| BOOT::LINE-PRINT BOOT::|saveMapSig| - BOOT::LINE-PAST-END-P BOOT::|untrace| - BOOT::|stripOffArgumentConditions| - BOOT::DATABASE-CONSTRUCTORKIND BOOT::SPAD_ERROR_LOC - BOOT::|getTraceOptions| BOOT::|transTraceItem| - BOOT::BOOT-PARSE-1 BOOT::|genSearchTran| - BOOT::REDUCTION-VALUE BOOT::|removeSurroundingStars| - BOOT::|getTraceOption| BOOT::|checkFilter| BOOT::PREPARSE - BOOT::|getMapSubNames| BOOT::|getPreviousMapSubNames| - BOOT::|coerceSpadArgs2E| BOOT::|clear| - BOOT::|whatConstructors| BOOT::|stupidIsSpadFunction| - BOOT::|sayBrightlyLength| BOOT::|stackTraceOptionError| - BOOT::GET-BOOT-TOKEN BOOT::|reportOpsFromUnitDirectly| - BOOT::|coerceSpadFunValue2E| BOOT::|searchCount| - BOOT::GET-SPECIAL-TOKEN BOOT::|domainToGenvar| - BOOT::|searchDropUnexposedLines| BOOT::GET-SPADSTRING-TOKEN - BOOT::|compileAsharpArchiveCmd| BOOT::|genDomainTraceName| - BOOT::GET-NUMBER-TOKEN BOOT::GET-ARGUMENT-DESIGNATOR-TOKEN - BOOT::|spadReply,printName| BOOT::|abbreviations| - BOOT::|getTraceOption,hn| BOOT::BOOT-TOKEN-LOOKAHEAD-TYPE - BOOT::|changeToNamedInterpreterFrame| - BOOT::|removeTracedMapSigs| BOOT::|findFrameInRing| - BOOT::|isListOfIdentifiers| BOOT::|string2Constructor| - BOOT::|isListOfIdentifiersOrStrings| BOOT::|dbString2Words| - BOOT::|conLowerCaseConTran| BOOT::|emptyInterpreterFrame| - BOOT::|string2Words| BOOT::|whatCommands| - BOOT::BUMPERRORCOUNT BOOT::|commandsForUserLevel| - BOOT::MAKE-ADJUSTABLE-STRING BOOT::|dnForm| BOOT::|pp2Cols| - BOOT::|dnForm,negate| BOOT::|dbGetCommentOrigin| - BOOT::|whatSpad2Cmd,fixpat| BOOT::DEF-PROCESS - BOOT::|synonymsForUserLevel| BOOT::DEF-RENAME - BOOT::|postTransform| - BOOT::|processSynonymLine,removeKeyFromLine| - BOOT::|pmPreparse,hn| BOOT::|new2OldLisp| - BOOT::|processSynonymLine| BOOT::PRINT-PACKAGE - BOOT::|printSynonyms| BOOT::INITIALIZE-PREPARSE - BOOT::|clearParserMacro| - BOOT::|dbScreenForDefaultFunctions| BOOT::S-PROCESS - BOOT::|newHelpSpad2Cmd| BOOT::|dbChooseOperandName| - BOOT::|zsystemDevelopmentSpad2Cmd| BOOT::|parseFromString| - BOOT::|checkPmParse,fn| BOOT::|dbRead| - BOOT::|string2SpadTree| BOOT::|checkPmParse| SYSTEM:PNAME - BOOT::|htCopyProplist| BOOT::|pathnameTypeId| - BOOT::|capitalize| BOOT::|htSayValue| - BOOT::|clearCmdExcept| BOOT::|getSubstSigIfPossible| - BOOT::|workfilesSpad2Cmd| BOOT::|isIntegerString| - BOOT::|cd| BOOT::|dbGetExpandedOpAlist| - BOOT::|dbAddDocTable| BOOT::|zsystemdevelopment| - BOOT::|getConstructorForm| BOOT::|workfiles| - BOOT::|originsInOrder| BOOT::|getInfoAlist| - BOOT::|parentsOf| BOOT::|listOrVectorElementMode| - BOOT::|zeroOneConvertAlist| BOOT::|dbInfoSig| - BOOT::|numberize| BOOT::|hasNewInfoText| - BOOT::|splitConTable| BOOT::|dbGetDocTable,gn| - BOOT::|string2Integer| BOOT::|recordFrame| - BOOT::|issueHTSaturn| BOOT::|kTestPred| - BOOT::|segmentKeyedMsg| BOOT::|htpPageDescription| - BOOT::|dbDocTable| BOOT::|saturnTran| BOOT::|bcUnixTable| - BOOT::|mkTabularItem| BOOT::|printAsTeX| - BOOT::|isAsharpFileName?| BOOT::|isMenuItemStyle?| - BOOT::|saturnTranText| BOOT::|bcError| - BOOT::|transOnlyOption| BOOT::|kPageContextMenu| - BOOT::|bcString2WordList| BOOT::|unTab1| - BOOT::|shortenForPrinting| BOOT::|getBpiNameIfTracedMap| - BOOT::|recordAndPrintTest| BOOT::|mkTabularItem,fn| - BOOT::|PullAndExecuteSpadSystemCommand| BOOT::|htNewPage| - BOOT::|htpName| BOOT::|prTraceNames,fn| - BOOT::|htMakePageSaturn| BOOT::|e02zafSolve,flam| - BOOT::|isCapitalWord| BOOT::|zagSuper| BOOT::|height| - BOOT::|zagSub| BOOT::|inputPrompt| - BOOT::|flattenOperationAlist| BOOT::|variableNumber| - BOOT::|spadTrace,g| BOOT::|mkPredList,fn| - BOOT::|isTraceGensym| BOOT::|htPopSaturn| - BOOT::|htMakePageStandard| BOOT::|undo| BOOT::|dbKind| - BOOT::|undoCount| BOOT::|stringer| BOOT::|outputTranIf| - BOOT::|htInitPageNoHeading| BOOT::|undoLocalModemapHack| - BOOT::|saturnHasExamplePage| BOOT::|reportUndo| BOOT::|iht| - BOOT::|bcIssueHt| BOOT::|bcConform1| BOOT::|keyp| - BOOT::|bcConform1,hd| BOOT::|binomialWidth| - BOOT::|htSaySourceFile| BOOT::|basicStringize| - BOOT::|mapStringize| BOOT::|binomialSuper| - BOOT::|bcConform1,mapping| - BOOT::|outputTranMatrix,outtranRow| - BOOT::PLAIN-PRINT-FORMAT-STRING BOOT::|bcConform1,tuple| - BOOT::|binomialSub| BOOT::|vConcatWidth| BOOTTRAN::BOOTTOCL - BOOT::|bcConform1,tl| BOOT::|deMatrix| BOOT::TRANSLIST - BOOT::|sumWidthA| BOOT::TRANSLATE BOOT::|htSayItalics| - BOOT::|dbGetDocTable,hn| BOOT::|absym| - BOOT::|dbEvalableConstructor?| BOOT::|getCallBack| - BOOT::|texFormat1| BOOT::|unTab| - BOOT::RETRANSLATE-DIRECTORY BOOT::|kPageContextMenuSaturn| - BOOT::|maPrin| BOOT::RETRANSLATE-FILE-IF-NECESSARY - BOOT::|saturnExampleLink| BOOT::|explainLinear| - BOOT::RECOMPILE-ALL-LIBS BOOT::|htSayCold| - BOOT::RECOMPILE-LIB-DIRECTORY - BOOT::RECOMPILE-NRLIB-IF-NECESSARY BOOT::|writeSaturnTable| - BOOT::|maprinRows| BOOT::RECOMPILE-ALL-FILES - BOOT::|writeSaturn| BOOT::|maprinChk| - BOOT::|writeSaturnPrint| BOOT::RECOMPILE-ALL-ALGEBRA-FILES - BOOT::|bcConform1,say| BOOT::|escapeSpecialIds| - BOOT::|vConcatSub| BOOT::LOAD-DIRECTORY - BOOT::|postDoubleSharp| BOOT::|sumoverlist| - BOOT::|htProcessBcStrings| BOOT::|matSuperList| - BOOT::|superSubWidth| BOOT::CHAPTER-NAME BOOT::|isQuotient| - BOOT::|matSubList| BOOT::|superSubSuper| - BOOT::|isRationalNumber| BOOT::|matLSum| - BOOT::|superSubSub| BOOT::BLANKCHARP - BOOT::SPADTAGS-FROM-FILE BOOT::|matLSum2| - BOOT::OUR-WRITE-DATE BOOT::LIFT-NRLIB-NAME - BOOT::RECOMPILE-FILE-IF-NECESSARY BOOT::|suScWidth| - BOOT::|bcLinearSolveMatrixInhomo,f| BOOT::LIBCHECK - BOOT::|bcLinearExtractMatrix| BOOT::|printMap| - BOOT::|isInitialMap| BOOT::SPAD-CLEAR-INPUT - BOOT::|bcString2HyString| - BOOT::|NeedAtLeastOneFunctionInThisFile| BOOT::|pfSequence| - BOOT::|npPileBracketed| BOOT::|npAnyNo| BOOT::|bcOptional| - VMLISP::EQUABLE VMLISP::*LAM BOOT::|subSub| VMLISP::RCQEXP - BOOT::|flattenOps| BOOT::|npInfGeneric| BOOT::|slashWidth| - BOOT::|slashSuper| VMLISP::COMPILE1 BOOT::|slashSub| - BOOT::|pfPile| BOOT::|npParened| BOOT::BVEC-COPY - BOOT::|letWidth| VMLISP::FLAT-BV-LIST BOOT::|sortCarString| - BOOT::|pfAppend| VMLISP::PLIST2ALIST BOOT::|pfFix| - BOOT::|outputConstructTran| BOOT::|pfTyping| - BOOT::|outputTranSEQ| BOOT::|outputTranRepeat| - BOOT::|outputTranReduce| BOOT::|outputTranCollect| - BOOT::|outputMapTran| BOOT::|npSemiListing| - BOOT::|pfExport| BOOT::|pfLocal| - BOOT::|optSEQ,getRidOfTemps| BOOT::|optSPADCALL| - BOOT::|pfFree| BOOT::|optXLAMCond| BOOT::|optCONDtail| - BOOT::|optPredicateIfTrue| BOOT::|optCons| BOOT::|optSEQ| - BOOT::|pfBreak| BOOT::|optSEQ,tryToRemoveSEQ| - BOOT::|optSEQ,SEQToCOND| BOOT::|optimize,opt| - BOOT::|optCond| BOOT::|pfReturnNoName| BOOT::|optMkRecord| - BOOT::|npListAndRecover| BOOT::|optCatch| BOOT::|npTuple| - BOOT::|pf0SequenceArgs| BOOT::|compileTimeBindingOf| - BOOT::|optimizeFunctionDef,removeTopLevelCatch| - BOOT::|optEQ| BOOT::|optLESSP| BOOT::|pfIterate| - BOOT::|opt-| BOOT::|optQSMINUS| BOOT::|pfLoop1| - BOOT::|optMINUS| BOOT::|optSuchthat| BOOT::|optRECORDCOPY| - BOOT::|optSETRECORDELT| BOOT::|npParse| - BOOT::|timedEVALFUN| BOOT::|pfDocument| - BOOT::|updateTimedName| BOOT::|pfTweakIf| - BOOT::|timedOptimization| BOOT::|pfCheckItOut| - BOOT::|timedAlgebraEvaluation| BOOT::|pushTimedName| - BOOT::|significantStat| BOOT::|printNamedStats| - BOOT::|htpDestroyPage| BOOT::|splitIntoBlocksOf200| - BOOT::|incIgen| BOOT::|e02dafSolve,flam| - BOOT::|e04nafSolve,fe| BOOT::|str2Tex| - BOOT::|e04nafSolve,fd| BOOT::|wrap| BOOT::|e04nafSolve,fc| - BOOT::|e04ycfSolve,fa| BOOT::|str2Outform| - BOOT::|parse2Outform| BOOT::|e04nafSolve,fj| - BOOT::|e04nafSolve,fg| BOOT::|e04dgfSolve,fb| - BOOT::|e04mbfSolve,fg| BOOT::|evalLoopIter| - BOOT::|formatUnabbreviatedTuple| BOOT::|e04mbfSolve,fe| - BOOT::|length2?| BOOT::|Identity| BOOT::|upADEF| - BOOT::|bool| BOOT::|e04mbfSolve,fd| BOOT::|orderList| - BOOT::|e04mbfSolve,fc| BOOT::|upLoopIters| BOOT::NMSORT - BOOT::|pr| BOOT::|e04fdfSolve,fb| BOOT::|interpIter| - BOOT::|functionp| BOOT::|quoteCatOp| BOOT::|e04fdfSolve,fa| - BOOT::|isLetter| BOOT::|mkNestedElts| BOOT::|charRangeTest| - BOOT::|instantiate| BOOT::|isUpperCaseLetter| - BOOT::|e04gcfSolve,fb| BOOT::|flattenSexpr| - BOOT::|e04gcfSolve,fa| BOOT::|isStreamCollect| - BOOT::|removeZeroOneDestructively| BOOT::|StringToCompStr| - BOOT::|boolODDP| BOOT::|rightTrim| - BOOT::|dropLeadingBlanks| BOOT::|getDomainByteVector| - BOOT::|interpOnlyCOLLECT| BOOT::|e04jafSolve,fc| - BOOT::|upCOLLECT| BOOT::|upAlgExtension| - BOOT::|e04jafSolve,fb| BOOT::|eq2AlgExtension| - BOOT::|e04jafSolve,fa| BOOT::|clearCmdParts| - BOOT::|upCOLLECT0| BOOT::|loadLib| BOOT::|upCOLLECT1| - BOOT::|upand| BOOT::|upDeclare| BOOT:|pp| - BOOT::|f01rdfSolve,fz| BOOT::|mkZipCode| BOOT:ATOM2STRING - BOOT::|orderCatAnc| BOOT::|f01mcfSolve,g| - BOOT::|isOkInterpMode| BOOT::|f01mcfSolve,f| - BOOT::|mkAndApplyPredicates| BOOT:MATCH-STRING - BOOT::|upCOERCE| BOOT::|upStreamIters| BOOT::|upconstruct| - BOOT::|upTARGET| BOOT::|falseFun| BOOT::|upLET| - BOOT::|closeOldAxiomFunctor| BOOT::|f01refSolve,fz| - BOOT::|upLETWithPatternOnLhs| BOOT::|isTupleForm| - BOOT::|f01qefSolve,fz| BOOT::|e02zafSolve,fxy| - BOOT::|shoeStrings| BOOT::|removeConstruct| BOOT:|break| - BOOT::|shoeIntern| BOOT::|isLocalPred| - BOOT::|shoeInternFile| BOOT::|upequation| - BOOT::|SpadInterpretFile| BOOT::|intInterpretPform| - BOOT::|altSeteltable| BOOT::|packageTran| - BOOT::|isHomogeneous| BOOT::|zeroOneTran| - BOOT::|intProcessSynonyms| BOOT::|upbreak| - BOOT::|f01brfSolve,f| BOOT::|intnplisp| BOOT::|upDollar| - BOOT::|nplisp| BOOT::|setCurrentLine| - BOOT::|f01qdfSolve,fz| BOOT::|copyHack| BOOT::|copyHack,fn| - BOOT:ADJCURMAXINDEX BOOT::|upTuple| BOOT::|ncloopParse| - BOOT::|ncloopIncFileName| BOOT::|phBegin| - BOOT::|ncloopEscaped| BOOT::|upiterate| BOOT::|upIF| - BOOT::|upisnt| BOOT::|upisAndIsnt| BOOT::|phInterpret| - BOOT::|isHomogeneousArgs| BOOT:LASTATOM BOOT::|uphas| - BOOT::|phMacro| BOOT::|macroExpanded| BOOT::|upis| - BOOT::|ncConversationPhase,wrapup| BOOT:CONSOLEINPUTP - BOOT::|upwhere| BOOT::|serverReadLine| - BOOT::|ncloopPrintLines| BOOT::|mkLineList| - BOOT::|nonBlank| BOOT:|MakeSymbol| BOOT::|intloopEchoParse| - BOOT::|incBiteOff| BOOT::|SkipEnd?| BOOT::|incFileName| - BOOT::|Else?| BOOT::|Elseif?| BOOT::|If?| - BOOT::|inclmsgNoSuchFile| BOOT::|inclmsgPrematureFin| - BOOT::|incFileInput| BOOT::|Top?| - BOOT::|inclmsgPrematureEOF| BOOT::|SkipPart?| - BOOT::|KeepPart?| BOOT:COMP BOOT:GETGENSYM - BOOT::|incNConsoles| BOOT::|Skipping?| BOOT::|incClassify| - BOOT::EXPAND-TABS BOOT::|incCommand?| BOOT::|incRenumber| - BOOT::|incFile| BOOT::|incPos| - BOOT:|initializeSetVariables| BOOT::|inclmsgSay| - BOOT::|inclmsgConStill| BOOT::|incStringStream| - BOOT::|inclmsgConActive| BOOT:NUMOFNODES FOAM::TYPE2INIT - BOOT:TRANSPGVAR FOAM::FOAM-FUNCTION-INFO BOOT::|GetValue| - BOOT::|hasToInfo| FOAM::INSERT-TYPES BOOT::|formatPred| - BOOT::|chaseInferences,foo| BOOT::|liftCond| - FOAM::FOAMPROGINFOSTRUCT-P BOOT::|formatInfo| - BOOT:TOKEN-TYPE BOOT::|addInformation,info| - BOOT:|updateSourceFiles| BOOT::|infoToHas| BOOT::|addInfo| - BOOT::|formatPredParts| BOOT::|printInfo| - BOOT::|linearFormat| BOOT::|formatOperationAlistEntry| - BOOT::|formatIf| BOOT:MKQ BOOT::|linearFormatName| - BOOT::|dollarPercentTran| BOOT::|string2Float| - BOOT::|specialChar| BOOT:TOKEN-SYMBOL BOOT::|hashCode?| - BOOT::|formatArgList| BOOT::|listOfPredOfTypePatternIds| - BOOT::|script2String| BOOT::|form2Fence1| - BOOT::|replaceGoGetSlot| BOOT::|constructorName| - BOOT::|sayModemap| BOOT:ACTION BOOT::|opIsHasCat| - BOOT::|isNewWorldDomain| BOOT::|formCollect2String| - BOOT::|DNameToSExpr1| BOOT::|tuple2String| - BOOT::|DNameFixEnum| BOOT::|formJoin2String| BOOT:ASSOCLEFT - BOOT::|DNameToSExpr| BOOT:|sayALGEBRA| - BOOT::|CompStrToString| BOOT::|record2String| - FOAM-USER::|AXL-spitSInt| BOOT::|computedMode| - BOOT::|formWrapId| BOOT::|getIProplist| - BOOT::|isBinaryInfix| BOOT::|mkAtreeValueOf| - BOOT::|collectDefTypesAndPreds| BOOT::|formatSignature| - BOOT::|freeOfSharpVars| BOOT::|unVectorize| - BOOT::|formatSignature0| BOOT::|isInternalFunctionName| - BOOT::|objEnv| BOOT:NREVERSE0 BOOT::|formatMapping| - BOOT::|canRemoveIsDomain?| BOOT:|sayFORTRAN| - BOOT::|formIterator2String| BOOT:|IS_#GENVAR| - BOOT::|removeIsDomains| BOOT:LISTOFATOMS - BOOT::|formatAttribute| BOOT::|formTuple2String| - BOOT::|numOfSpadArguments| BOOT::|args2Tuple| - BOOT::|blankList| BOOT::|removeBodyFromEnv| - BOOT::|form2StringWithWhere| BOOT::|reportOpSymbol| - BOOT::|apropos| BOOT::|formatModemap,fn| - BOOT::|listOfVariables| BOOT::|isFreeVar| - BOOT::|isLocalVar| BOOT::|expr2String| - BOOT::|isInternalMapName| BOOT::|atom2String|)) -(PROCLAIM - '(FTYPE (FUNCTION (T *) *) VMLISP:MAKE-APPENDSTREAM - VMLISP:MAKE-INSTREAM VMLISP:MAKE-OUTSTREAM - VMLISP:COMPILE-LIB-FILE BOOT:|OsRunProgram| - BOOT:|OsRunProgramToStream| BOOT::ASHARP - FOAM:COMPILE-AS-FILE BOOT:|Prompt| BOOT:|sayBrightlyNT|)) -(PROCLAIM - '(FTYPE (FUNCTION (T T T) (VALUES T T)) BOOT::|getScriptName| - FOAM:AXIOMXL-GLOBAL-NAME BOOT::|spadTraceAlias|)) -(PROCLAIM '(FTYPE (FUNCTION (T T *) (VALUES T T)) VMLISP:MDEF)) -(PROCLAIM '(FTYPE (FUNCTION (T *) STRING) VMLISP:MAKE-FULL-CVEC)) -(PROCLAIM - '(FTYPE (FUNCTION (T T) *) BOOT::|bcInputMatrixByFormula| - BOOT::|bcInputExplicitMatrix| BOOT::|htStringPad| - BOOT::|evalAndRwriteLispForm| BOOT::|mkAtreeWithSrcPos| - BOOT::|rwriteLispForm| BOOT::COMPILE-DEFUN BOOT::|doIt| - BOOT::BPIUNTRACE VMLISP:QUOTIENT BOOT::|print| - BOOT::|compilerDoitWithScreenedLisplib| - BOOT::|compilerDoit| BOOT::MONITOR-PRINVALUE BOOT::/TRACE-2 - VMLISP:|LAM,FILEACTQ| BOOT::|hasFormalMapVariable| - BOOT::|ScanOrPairVec| VMLISP:SUFFIX BOOT::PRINMATHOR0 - BOOT::|spadTrace| BOOT::|output| BOOT::|e01bffDefaultSolve| - BOOT::|e01safDefaultSolve| BOOT::|popUpNamedHTPage| - BOOT::|e01dafDefaultSolve| BOOT::|replaceNamedHTPage| - BOOT::|e02bafDefaultSolve| BOOT::|e02bdfDefaultSolve| - BOOT::|e02defDefaultSolve| BOOT::|sockSendFloat| - BOOT::SOCK-SEND-SIGNAL BOOT::SOCK-SEND-FLOAT - BOOT::SOCK-SEND-STRING BOOT::SOCK-SEND-INT BOOT::ERASE - BOOT::|sayErrorly| BOOT::|saturnSayErrorly| BOOT::|set1| - BOOT::|displaySetOptionInformation| BOOT::|mkGrepPattern| - BOOT::|showDoc| BOOT::|genSearchSayJump| BOOT::|oPageFrom| - BOOT::|showConstruct| BOOT::|htCommandToInputLine,fn| - BOOT::|grepConstructorSearch| BOOT::|showNamedDoc| - BOOT::|form2HtString,fnTail| BOOT::|xdrWrite| - BOOT::|spleI1| BOOT::|readData,xdrRead1| BOOT::|xdrRead| - BOOT::|sockSendSignal| BOOT::|htpLabelFilteredInputString| - BOOT::|e01bgfDefaultSolve| BOOT::|e01befDefaultSolve| - BOOT::|e01bafDefaultSolve| BOOT::|htGlossSearch| - BOOT::|htSetSystemVariable| BOOT::|htSetSystemVariableKind| - BOOT::|htSetNotAvailable| BOOT::|htShowLiteralsPage| - BOOT::|htCheck| BOOT::|htShowIntegerPage| - BOOT::|htShowFunctionPage| BOOT::|htSetFunCommandContinue| - BOOT::|htKill| BOOT::|htFunctionSetLiteral| - BOOT::|htShowSetPage| BOOT::ADDCLOSE BOOT::|htSetLiteral| - BOOT:|LispCompileFileQuietlyToObject| - ; BOOT::|findStringInFile| - BOOT::|ppPair| - BOOT::|getMinimalVarMode| BOOT::|checkAddSpaceSegments| - BOOT::|checkAddIndented| BOOT::|alistSize,count| - BOOT::|dbConformGen1| BOOT::|pickitForm| - BOOT::|koaPageFilterByCategory1| VMLISP::COPY-FILE - VMLISP::COPY-LIB-DIRECTORY BOOT::|c06ebfDefaultSolve| - BOOT::|c06gsfDefaultSolve| BOOT::|c06eafDefaultSolve| - BOOT::|c06gbfDefaultSolve| BOOT::|c06gqfDefaultSolve| - BOOT::|c06ecfDefaultSolve| BOOT::|c06gcfDefaultSolve| - BOOT::|d01gafDefaultSolve| BOOT::|spadcall2| - BOOT::|sublisV| BOOT::|sublisV,suba| BOOT::|fortError| - BOOT::|f04adfDefaultSolve| BOOT::|f04arfDefaultSolve| - BOOT::|koPageFromKKPage| BOOT::|kArgPage| BOOT::|npsystem| - BOOT::|f04asfDefaultSolve| - BOOT::|handleParsedSystemCommands| - BOOT::|handleTokensizeSystemCommands| - BOOT::|f07fdfDefaultSolve| BOOT::|tokenSystemCommand| - BOOT::|reportOpsFromLisplib1| BOOT::|handleNoParseCommands| - BOOT::|f07aefDefaultSolve| BOOT::|f07fefDefaultSolve| - BOOT::|f07adfDefaultSolve| BOOT::|addPatchesToLongLines| - BOOT::|kArgumentCheck| BOOT::COERCE-FAILURE-MSG - BOOT::|kxPage| BOOT::|kcnPage| BOOT::SAYBRIGHTLYNT1 - BOOT::|kcuPage| BOOT::|ksPage| BOOT::|conOpPage| - BOOT::|kcdoPage| BOOT::|kcdePage| BOOT::|kcdPage| - BOOT::|kccPage| BOOT::|patternCheck,subWild| - BOOT::|kcaPage| BOOT::|kcpPage| BOOT::|htDoneButton| - BOOT::|sockSendInt| BOOT::|kePage| BOOT::|sockSendString| - BOOT::|koaPageFilterByName| BOOT::|koaPageFilterByCategory| - BOOT::|koPageAux1| BOOT::|kcPage| BOOT::|getmode| - BOOT::|docSearch1| BOOT::|grepSearchQuery| - BOOT::|repeatSearch| BOOT::|reportOpsFromLisplib0| - BOOT::|reportOperations| BOOT::|generalSearchDo| - BOOT::|grepSearchJump| BOOT::|mkDetailedGrepPattern,conc| - BOOT::|kiPage| BOOT::|errorPage| - BOOT::|dbShowConsKindsFilter| BOOT::|koPage| - BOOT::|dbInfoChoose| BOOT::|kciPage| - BOOT::|dbInfoChooseSingle| BOOT::|dbSort| BOOT::|msgText| - BOOT::|bcSeriesByFormula| BOOT::|bcRealLimitGen1| - BOOT::|bcSeriesExpansion| BOOT::|ncloopInclude| - BOOT::|bcComplexLimit| BOOT::|bcRealLimit| - BOOT::|htFilterPage| BOOT::|bcPuiseuxSeries| - BOOT::KCL-OS-RUN-PROGRAM-TO-STREAM BOOT::|bcLaurentSeries| - BOOT::KCL-OS-RUN-PROGRAM BOOT::|bcTaylorSeries| - BOOT::|bcLinearSolveMatrix| BOOT::|bcMakeEquations| - BOOT::|bcMakeLinearEquations| BOOT::|bcLinearSolveEqns| - BOOT::|bcSolveSingle| BOOT::|bcInputEquations| BOOT::FC - BOOT::|bcSystemSolve| BOOT::|bcSolveEquationsNumerically| - BOOT::|bcSolveEquations| BOOT::|bcLinearSolve| - BOOT::|bcLinearMatrixGen| - BOOT::|bcLinearSolveMatrixInhomoGen| - BOOT::|bcLinearSolveMatrixInhomo| - BOOT::|bcLinearSolveMatrixHomo| BOOT::|finalExactRequest| - BOOT::|printMap1| BOOT::|htMkName| - BOOT::|makeLongSpaceString| BOOT::|makeLongTimeString| - BOOT::|nrtEval| BOOT::|f01mcfDefaultSolve| - BOOT::|f01rcfDefaultSolve| BOOT::|ncloopCommand| - BOOT::|ncloopInclude1| BOOT::|ncConversationPhase| - BOOT:DEFSTREAM BOOT::|inclHandleBug| BOOT::|evalSlotDomain| - BOOT::|ncEltQ| BOOT::|formArguments2String,fn|)) -(PROCLAIM - '(FTYPE (FUNCTION (T *) T) BOOT:|sayBrightly| BOOT:BLANKS - BOOT:MATCH-NEXT-TOKEN BOOT::|desiredMsg| - BOOT:|sayBrightlyI| BOOT:MATCH-CURRENT-TOKEN - VMLISP:RDEFIOSTREAM VMLISP:CATCHALL VMLISP:TAB - VMLISP:|F,PRINT-ONE| VMLISP:VMPRINT BOOT::FINDTAG - VMLISP:MAKE-HASHTABLE VMLISP:MAKE-FILENAME VMLISP:MACERR - VMLISP:PRETTYPRINT BOOT::|pfExpression| BOOT::|pfSymbol| - VMLISP:|LAM,EVALANDFILEACTQ| VMLISP:PRETTYPRIN0 - BOOT::|pfSymb| VMLISP::MAKE-INPUT-FILENAME - BOOT:|LispReadFromString| BOOT::MONITOR-ADD BOOT::|cpCms| - VMLISP::MAKE-FULL-NAMESTRING BOOT:|PrettyPrint| - BOOT:|PlainPrintOn| BOOT:|WriteLispExpr| BOOT:|WriteLine| - BOOT:|WriteString| BOOT:|ReadLineIntoString| - BOOT:|ReadBytesIntoVector| BOOT:|Pathname| - BOOT:|FullVector| BOOT:|FullBvec| BOOT:|FullString| - BOOT::PRINT-NEW-LINE BOOT::PRINT-FULL - BOOT::GET-BOOT-IDENTIFIER-TOKEN BOOT::COMPSPADFILES)) -(PROCLAIM - '(FTYPE (FUNCTION (T T) T) BOOT::|mkAliasList,fn| BOOT:PREDECESSOR - BOOT::|depthOfRecursion| BOOT::|formatJoinKey| - BOOT::|putBodyInEnv| BOOT::|mapDefsWithCorrectArgCount| - BOOT::|sayModemapWithNumber| BOOT::|addDefaults| BOOT:NLIST - BOOT::|formatOperation| BOOT::|get1defaultOp| - BOOT::|compileBody| BOOT::|makeLocalModemap| BOOT:NSTRCONC - BOOT::|saveDependentMapInfo| BOOT:GETRULEFUNLISTS - BOOT::|axFormatDecl| BOOT::|mkMapAlias| BOOT::|readData| - BOOT::|axFormatConstantOp| BOOT::|axFormatOpSig| - BOOT::|mkFormalArg| BOOT::|writeData| BOOT:POINT - BOOT::|mkValCheck| BOOT::|mkValueCheck| BOOT::|isPointer?| - BOOT::|wt| BOOT::|dqAppend| BOOT::|makePattern| - BOOT::|makeAxFile| BOOT::|clearDependencies| - BOOT::|getEqualSublis,fn| BOOT::|sourceFilesToAxFile| - BOOT::|getLocalVars| BOOT::|simplifyMapPattern| - BOOT::|getMapBody| BOOT:GETTAIL BOOT::|htpLabelInputString| - BOOT::|htpLabelSpadValue| BOOT::|putDependencies| - BOOT::STACK-PUSH BOOT:COMPARE BOOT::|htMakeDoneButton| - BOOT::|putDependencies,removeObsoleteDependencies| - BOOT::|makeNewDependencies| BOOT::|PARSE-Operation| - BOOT::|htInitPage| BOOT::|notCalled| BOOT::|htpProperty| - BOOT::|containsOp| BOOT::|makeRuleForm| - BOOT::|nonRecursivePart| BOOT::|outputFormat| - BOOT::|sayDroppingFunctions| BOOT::|nonRecursivePart1| - BOOT::|expandRecursiveBody| BOOT::|addDefMap| - BOOT::|e04nafSolve,fh| BOOT:FLAG BOOT::|ifCond| - BOOT::|incCommandTail| BOOT::|incTrunc| BOOT::|dollarTran| - BOOT:PAIR BOOT::CHAR-EQ BOOT::|PARSE-rightBindingPowerOf| - BOOT::|e04nafSolve,fi| BOOT:SUBLISNQ - BOOT::|writeInputLines| BOOT::|rempropI| BOOT:DELASC - BOOT::|showInput| BOOT::|showInOut| BOOT::SPADRREAD - BOOT:LASSOC BOOT::|ScanOrPairVec,ScanOrInner| BOOT::|getI| - BOOT::|mergeSignatureAndLocalVarAlists| BOOT::CHAR-NE - BOOT:S+ BOOT::|convertOpAlist2compilerInfo,formatSig| - BOOT::|getLisplibNoCache| BOOT::|getLisplib| - BOOT::|PARSE-leftBindingPowerOf| BOOT:MAKE-PARSE-FUNCTION - BOOT::|spadPrint| BOOT::|getSlotFromCategoryForm| - BOOT::|systemDependentMkAutoload| BOOT:MKPF - BOOT::|mkAutoLoad| BOOT:STRM BOOT::|wordFrom| - FOAM::|magicEq1| BOOT::|throwKeyedMsg1| - BOOT::|saturnThrowKeyedMsg| BOOT::|center| - BOOT::|substituteCategoryArguments| - BOOT::|isDomainConstructorForm| BOOT::|keyedSystemError1| - BOOT::|orderByDependency| BOOT::|saturnKeyedSystemError| - BOOT::|getFunctorOpsAndAtts| BOOT::|breakKeyedMsg| - BOOT::|fastSearchCurrentEnv| BOOT::|putMode| - BOOT::|splitListOn| BOOT::|putFlag| - BOOT::|mkAtreeNodeWithSrcPos| BOOT::|getMsgCatAttr| - BOOT::|DomainSubstitutionFunction| - BOOT::|transferSrcPosInfo| BOOT::|isNestedInstantiation| - BOOT::|DomainSubstitutionFunction,Subst| - BOOT::|mkAtree1WithSrcPos| BOOT::|wrapDomainSub| - BOOT::|listInitialSegment| BOOT::|compCategoryItem| - BOOT::|writeLib| - BOOT::|makeFunctorArgumentParameters,findExtrasP| - BOOT::|loadLibIfNecessary| BOOT::|rep| - BOOT::|collectDefTypesAndPreds,addPred| - BOOT::|setMsgPrefix| BOOT::|setMsgCatlessAttr| - BOOT::|getSignatureFromMode| - BOOT::|makeFunctorArgumentParameters,findExtras| - BOOT::|makeFunctorArgumentParameters,findExtras1| - BOOT::|autoLoad| BOOT::|isMacro| BOOT::|readLib| - BOOT::|getValueFromEnvironment| - BOOT::|unloadOneConstructor| - BOOT::|compileCases,FindNamesFor| BOOT::|asTupleNewCode| - BOOT::|macroExpandList| BOOT::|setMsgForcedAttrList| - BOOT::|macSubstituteId| BOOT::|atree2Tree1| - BOOT::|compileCases,isEltArgumentIn| - BOOT::|makeFunctorArgumentParameters,augmentSig| - BOOT::|mkAtree3,fn| BOOT::|macroExpandInPlace| - BOOT::|getErFromDbL| BOOT::|compJoin,getParms| - BOOT::|pfMapParts| BOOT::|erMsgCompare| - BOOT::|compareposns| BOOT::|pfCopyWithPos| - BOOT::|mkCategoryPackage,fn| BOOT::|getArgumentMode| - BOOT:REMFLAG BOOT::|listDecideHowMuch| - BOOT::|throwEvalTypeMsg| BOOT::|splitEncodedFunctionName| - BOOT:QLASSQ BOOT::|decideHowMuch| BOOT::|getArgValue1| - BOOT::|setMsgText| BOOT::|setMsgUnforcedAttrList| - BOOT::|genDomainViewList0| BOOT::|macLambda,mac| - BOOT::|macWhere,mac| - BOOT::|makeFunctorArgumentParameters,fn| - BOOT::|canCacheLocalDomain| - BOOT::|makeCategoryPredicates,fn| - BOOT::|makeCategoryPredicates,fnl| - BOOT::|getArgValueOrThrow| BOOT::|mac0SubstituteOuter| - BOOT::|insertPos| BOOT::|macLambdaParameterHandling| - BOOT::|genDomainViewName| BOOT::|isKeyQualityP| - BOOT::|queueUpErrors| BOOT::|thisPosIsEqual| - BOOT::|getOpArgTypes1| BOOT::|redundant| - BOOT::|argCouldBelongToSubdomain| BOOT::|thisPosIsLess| - BOOT::APPEND-N BOOT::|putFTText| BOOT::CONS-N - BOOT::|getModemap| BOOT::|sameMsg?| BOOT::EVAL-DEFUN - BOOT::|mkOpVec| BOOT::|resolveTCat| - BOOT::PRINT-AND-EVAL-DEFUN BOOT::|AssocBarGensym| - BOOT::|FromTo| BOOT::|compareMode2Arg| - BOOT::|c02affSolve,f| BOOT::|subCopy| - BOOT::|getOpArgTypes,f| BOOT::|isTowerWithSubdomain| - BOOT::|addEmptyCapsuleIfNecessary| BOOT::|constructM| - BOOT:|delete| BOOT::|c02agfSolve,f| BOOT::|bootStrapError| - BOOT::|getOpArgTypes| BOOT::|dqAddAppend| BOOT::|tracelet| - BOOT::/UNTRACE-2 BOOT:|rassoc| BOOT::|resolveTM1| - BOOT::|matchMmSigTar| BOOT::/UNTRACE-1 BOOT::|deepSubCopy| - BOOT::|CONTAINEDisDomain| BOOT::|hasCatExpression| - BOOT::PAIRTRACE BOOT::|spadUntrace| BOOT:LENGTHENVEC - BOOT::|defaultTypeForCategory| BOOT::DEF-IT BOOT:|breaklet| - BOOT::|mmCatComp| BOOT::|mergeSubs| BOOT::DEF-LET - BOOT::|hasCaty1| BOOT:STRINGPAD BOOT::|mkObjWrap| - BOOT:TRUNCLIST BOOT::|position1| BOOT::DEF-IS2 - BOOT::|defLET| BOOT::|defLETdcq| - BOOT::|sortAndReorderDmpExponents| BOOT::WHDEF - BOOT::|removeListElt| BOOT::|everyNth| BOOT::LET_ERROR - BOOT::|defIS| BOOT::DEF-IS-REV VMLISP:SETDIFFERENCE - BOOT::DEF-SELECT2 BOOT::DEF-SELECT1 BOOT::|addInformation| - BOOT::|varIsOnlyVarInPoly| BOOT::|makeCategoryPredicates| - BOOT::|compDefWhereClause,addSuchthat| VMLISP:DIVIDE - BOOT::NOTEQUALLIBS VMLISP:GETL BOOT::|modemapPattern| - BOOT::|removeVectorElt| BOOT::GETALIST - BOOT::|buildDatabase| BOOT::|mathPrint1| - BOOT::|getInverseEnvironment| BOOT::|getSuccessEnvironment| - BOOT::|getSystemModemaps| BOOT::|insertWOC| - BOOT::|getModemapsFromDatabase| BOOT::|removeCoreModemaps| - BOOT::|SubstWhileDesizing| BOOT::|resolveTTUnion| - BOOT::|resolveTTEq| BOOT::|rightBindingPowerOf| - BOOT::/GETOPTION BOOT::|resolveTTCC| - BOOT::|leftBindingPowerOf| BOOT::|stackSemanticError| - BOOT::/GETTRACEOPTIONS BOOT::|resolveTTRed| - BOOT::/TRACELET-PRINT BOOT::|resolveTTSpecial| - BOOT::MONITOR-PRINT BOOT::|compareTT| BOOT::|opWidth| - BOOT::|isConstantId| BOOT::|acceptableTypesToResolve| - BOOT::|resolveTCat1| BOOT::|getConditionsForCategoryOnType| - BOOT::|resolveTTAny| BOOT::|resolveTMOrCroak| - BOOT::|outputMapTran0| BOOT::|spliceTypeListForEmptyMode| - BOOT::MONITOR-EVALTRAN BOOT::|constructTowerT| - BOOT::|throwKeyedMsg| BOOT::|canCoerceExplicit2Mapping| - BOOT::|term1RWall| BOOT::|absolutelyCannotCoerce| - BOOT::|rassocSub| BOOT::|coerceOrConvertOrRetract| - VMLISP:NCONC2 BOOT::|term1RW| BOOT::|coerceOrRetract| - BOOT::|resolveTMTaggedUnion| BOOT::|canCoerceUnion| - BOOT::|acceptableTypesToResolve1| BOOT::|canCoercePermute| - BOOT::|computeTTTranspositions| BOOT::|resolveTM2| - BOOT::|newCanCoerceCommute| BOOT::|coerceIntCommute| - BOOT::|resolveTMRed| BOOT::|coerceInt1| BOOT::|pmatch| - BOOT::/TRACE-1 BOOT::|resolveTMEq| BOOT::|getUnionMode| - BOOT::|resolveTMEq1| BOOT::|isUnionMode| - BOOT::|coerceInt2Union| BOOT::|resolveTMSpecial| - BOOT::|coerceIntFromUnion| VMLISP:REMAINDER - BOOT::|resolveTMRecord| BOOT::|resolveTMUnion| - BOOT::|isFunction| BOOT::|coerceIntAlgebraicConstant| - BOOT::|coerceIntTower| BOOT::|coerceRetract| - BOOT::|compareTypeLists| BOOT::|modifyModeStack| - BOOT::|replaceSymbols| BOOT::|coerceIntTableOrFunction| - BOOT::|isDomainForm| BOOT::|coerceIntSpecial| - BOOT::/TRACELET-2 BOOT::|SubstWhileDesizingList| - BOOT::|coerceIntPermute| BOOT::|getProplist| - BOOT::|coerceBranch2Union| BOOT::ASSOCIATER - BOOT::/TRACELET-1 BOOT::|retractByFunction| - BOOT::|constructT| BOOT::MONITOR-PRINARGS-1 - BOOT::|outputComp| VMLISP:GGREATERP BOOT::|isDomainInScope| - BOOT::|canConvertByFunction| VMLISP:CGREATERP - BOOT::|canCoerceLocal| BOOT::|maxSuperType| - BOOT::|canCoerceTower| BOOT::/UPDATE-1 BOOT::|coerceInt0| - BOOT::|objSetMode| VMLISP:SORTBY BOOT::MONITOR-GETVALUE - VMLISP:|member| BOOT::MONITOR-EVALTRAN1 - BOOT::|coerceIntByMapInner| BOOT::|getConstantFromDomain| - BOOT::|valueArgsEqual?| BOOT::|traceDomainConstructor| - BOOT::|coerceIntByMap| BOOT::|equalZero| - BOOT::|replaceLast| BOOT::|coerceIntTest| VMLISP:ADDOPTIONS - BOOT::|isSubTowerOf| BOOT::|starstarcond| BOOT::|equalOne| - VMLISP:|assoc| VMLISP:SETSIZE BOOT::|evalSharpOne| - VMLISP:EFFACE BOOT::|canCoerceCommute| - BOOT::|clearDependentMaps| BOOT::|constantInDomain?| - VMLISP:EMBED BOOT::|translateMpVars2PVars| - VMLISP:LEXGREATERP VMLISP:RPLPAIR - BOOT::|addDmpLikeTermsAsTarget| VMLISP:HPUT* - BOOT::|genMpFromDmpTerm| VMLISP:STRING2ID-N - BOOT::|htMakeTemplates,substLabel| BOOT::|doDoitButton| - VMLISP:$FINDFILE BOOT::|keyedMsgCompFailure| BOOT::|objNew| - BOOT::|putValue| BOOT::|getAtree| BOOT::|putModeSet| - VMLISP:$SHOWLINE VMLISP:RDROPITEMS BOOT::|bottomUpType| - BOOT::|bottomUpIdentifier| BOOT::|transferPropsToNode| - BOOT::|getArgValue| BOOT::|bottomUpCompilePredicate| - BOOT::|bottomUpPredicate| BOOT::|putTarget| - BOOT::|getMinimalVariableTower| - BOOT::|computeTypeWithVariablesTarget| - BOOT::|removeUnionsAtStart| BOOT::|pushDownOp?| - BOOT::|e02gafSolve,fc| BOOT::|e02gafSolve,fr| - BOOT::|sayIntelligentMessageAboutOpAvailability| - BOOT::|getBasicMode0| BOOT::|mkObjCode| - BOOT::|intCodeGenCOERCE| BOOT::|canCoerceByMap| - BOOT::|canCoerceByFunction| BOOT::|isSubDomain| - BOOT::|absolutelyCanCoerceByCheating| - BOOT::|e04ucfSolve,fa| BOOT::|coerceCommuteTest| - BOOT::|asyGetAbbrevFromComments,fn| BOOT::|asySplit| - BOOT::|asyWrap| BOOT::GETDATABASE - BOOT::|asyAbbreviation,chk| BOOT::|asyTypeJoinPart| - BOOT::|setVector4part3| BOOT::|sublisProp| - BOOT::|setVector12,freeof| BOOT::|setVector4Onecat,form| - BOOT::|asyDisplay| BOOT::ERROR-FORMAT - BOOT::|asyAbbreviation| BOOT::|asyCattranConstructors| - BOOT::|DomainPrint| BOOT::|makeSF| BOOT::|asySimpPred| - BOOT::|setVector0| BOOT::|setVector3| BOOT::DIVIDE2 - BOOT::QUOTIENT2 BOOT::|htpSetName| BOOT::|sort| - BOOT::|defLET2| BOOT::|defLetForm| BOOT::|asyMapping| - BOOT::|defIS1| BOOT::|asySig| BOOT::|defISReverse| - BOOT::|addCARorCDR| BOOT::|defLET1| - BOOT::|asyExportAlist,fn| BOOT::|displayDatabase,fn| - BOOT::|quickAnd| BOOT::|asyCattranSig| BOOT::|asySigTarget| - BOOT::|asyMkSignature| BOOT::|asCategoryParts,build| - BOOT::/COMPINTERP BOOT::|unabbrevRecordComponent| - BOOT::|unabbrev1| BOOT::|makeByteWordVec2| - BOOT::|condAbbrev| BOOT::|unabbrevUnionComponent| - BOOT::|constructorNameConflict| BOOT::SPAD-PRINTTIME - BOOT::|htpLabelType| BOOT::|errorSupervisor| - BOOT::|sayErrorly1| BOOT::INTEGER-BIT BOOT::|chebeval| - BOOT::|rPsi| BOOT::|cpsireflect| BOOT::|cPsi| - BOOT::|BesselJRecur| BOOT::|substFromAlist| - BOOT::|BesselJAsymptOrder| BOOT::|BesselJAsympt| - BOOT::|PsiXotic| BOOT::|f01| BOOT::|brutef01| - BOOT::RBESSELJ BOOT::CPSI BOOT::RPSI BOOT::CHYPER0F1 - BOOT::CBESSELI BOOT::RBESSELI BOOT::CBESSELJ - BOOT::|formatLazyDomainForm| BOOT::|formatLazyDomain| - BOOT::|getDomainSigs1| BOOT::|showDomainsOp1| - BOOT::|devaluateSlotDomain| BOOT::|getDomainRefName| - BOOT::|andDnf| BOOT::|ordUnion| BOOT::|coafAndDnf| - BOOT::|orDel| BOOT::|orDnf| BOOT::|dnfContains,fn| - BOOT::|andReduce| BOOT::|simpBoolGiven| BOOT::|dnfContains| - BOOT::|coafAndCoaf| BOOT::|ordIntersection| - BOOT::|ordSetDiff| BOOT::|coafOrDnf| BOOT::|predCircular| - BOOT::|clearAllSlams,fn| BOOT::|assocCircular| - BOOT::|recurrenceError| BOOT::|countCircularAlist| - BOOT::|displaySetVariableSettings| BOOT::|sayCacheCount| - BOOT::|chebstareval| BOOT::|BesselIAsymptOrder| - BOOT::|horner| BOOT::|BesselKAsymptOrder| BOOT::|cbeta| - BOOT::|PsiAsymptotic| BOOT::|PsiEps| BOOT::|FloatError| - BOOT::|cgammaG| BOOT::|besselIback| BOOT::|rPsiW| - BOOT::|firstNonDelim| BOOT::|chebf01| BOOT::|BesselJ| - BOOT::|BesselI| BOOT::|grepSplit| BOOT::|grepConstruct1| - BOOT::|grepConstructDo| BOOT::|mkGrepPattern1,h| - BOOT::|pfCoerceto| BOOT::|stripOffSegments| - BOOT::|pfFromdom| BOOT::|pfRetractTo| BOOT::|pfRestrict| - BOOT::|mkGrepPattern1,split| BOOT::|testInput2Output| - BOOT::|hyperize| BOOT::|testPrin| BOOT::|grepCombine| - BOOT::|subMatch| BOOT::|bcAbb| BOOT::|lfrinteger| - BOOT::|getFortranType| BOOT::|wl| BOOT::|scanIgnoreLine| - BOOT::|makeVector| BOOT::|htPred2English,fn| BOOT::|posend| - BOOT::|functionAndJacobian,DF| BOOT::|isString?| - BOOT::|bcOpTable| BOOT::|xdrOpen| BOOT::|scanExponent| - BOOT::|scanCheckRadix| BOOT::|coerceUn2E| - BOOT::|inFirstNotSecond| BOOT::|coerceVal2E| - BOOT::|EnumPrint| BOOT::|scanInsert| VMLISP::WRAP - BOOT::|RecordPrint| BOOT::|coerceRe2E| - BOOT::|syIgnoredFromTo| BOOT::|sySpecificErrorHere| - BOOT::|pfTree| BOOT::|makeList| - BOOT::|setVector4Onecat,Supplementaries| BOOT::|pfSuch| - BOOT::|compCategories1| BOOT::|pfParen| BOOT::|pfPretend| - BOOT::|pfComDefinition| BOOT::|pfMLambda| - BOOT::|resolvePatternVars| BOOT::|cons5| - BOOT::|makeMissingFunctionEntry| BOOT::|pfHide| - BOOT::|setVector5| BOOT::|d02kefSolve,fd| - BOOT::|mkVectorWithDeferral| BOOT::|d02kefSolve,fe| - BOOT::|d02gbfSolve,ff| BOOT::|pfBracketBar| - BOOT::|d02gbfSolve,fg| BOOT::|pfIdPos| BOOT::|ProcessCond| - BOOT::|DescendCodeAdd| BOOT::|LookUpSigSlots| - BOOT::|DomainPrintSubst| BOOT::|d02gbfSolve,fc| - BOOT::|partPessimise| BOOT::|d02gbfSolve,fd| - BOOT::|pfBraceBar| BOOT::|sublisProp,inspect| - BOOT::|pfTagged| BOOT::|HasCategory| BOOT::|d02gbfSolve,fa| - BOOT::|HasSignature| BOOT::|d02gbfSolve,fb| - BOOT::|HasAttribute| BOOT::|pfWDeclare| - BOOT::|InvestigateConditions,Conds| BOOT::|pfBracket| - BOOT::|pfDWhere| BOOT::|NewbFVectorCopy| - BOOT::|DescendCodeVarAdd| BOOT::|getDomainView| - BOOT::|pfBrace| BOOT::|d02gafSolve,fe| - BOOT::|d02gafSolve,fc| BOOT::|pfOr| BOOT::|pfAnd| - BOOT::|d03edfSolve,fb| BOOT::|pfTLam| - BOOT::|stringChar2Integer| BOOT::|reshape| - BOOT::|e01dafSolve,h| BOOT::|hashCombine| - BOOT::|e01dafSolve,k| BOOT::|hashType| VMLISP:$REPLACE - VMLISP:UNIONQ BOOT::|spadSysBranch| - BOOT::|htSystemVariables,gn| BOOT::|postFlatten| - BOOT::|gatherGlossLines| VMLISP:|intersection| - BOOT::|postFlattenLeft| BOOT::|postTranSegment| - VMLISP:DEFINE-FUNCTION BOOT::SEGMENT BOOT::|pfTyped| - BOOT::|postScriptsForm| BOOT::|htCheckList| - BOOT::|htSetvarDoneButton| BOOT::|htMakePathKey,fn| - BOOT::|npLeftAssoc| VMLISP:SETDIFFERENCEQ - BOOT::|htMarkTree| BOOT::|pfCollect| BOOT::|pfQualType| - BOOT::|deltaContour| BOOT::ADD-PARENS-AND-SEMIS-TO-LINE - BOOT::|getUniqueSignature| VMLISP:INTERSECTIONQ - BOOT::|AMFCR,redefinedList| BOOT::|putDomainsInScope| - BOOT::INITIAL-SUBSTRING BOOT::|compFormMatch,match| - BOOT::STOREBLANKS BOOT::|compFormMatch| BOOT::ESCAPED - BOOT::PARSEPILES BOOT::|addNewDomain| BOOT::|htDoNothing| - BOOT::|AMFCR,redefined| BOOT::|domainMember| - BOOT::|e04ycfSolve,fb| BOOT::MONITOR-WRITE - BOOT::|htpSetDomainPvarSubstList| BOOT::|coerceByModemap| - BOOT::|htpLabelFilter| BOOT::|profileDisplayOp| - BOOT::|htpLabelSpadType| BOOT::|pfAssign| - BOOT::|htpSetDomainVariableAlist| BOOT::|convertOrCroak| - BOOT::|htpSetDomainConditions| - BOOT::|intersectionEnvironment| BOOT::|pfRule| - BOOT::|coerceExit| BOOT::|resolveTM| - BOOT::|autoCoerceByModemap| BOOT::|coerceExtraHard| - BOOT::|hasType| BOOT::|getConstructorMode| - BOOT::|getConstructorFormOfMode| BOOT::|pfWhere| - BOOT::|coerceHard| BOOT::|npRightAssoc| - BOOT::|coerceSubset| BOOT::|reportCircularCacheStats| - BOOT::|mkCircularCountAlist| BOOT::|pfPushMacroBody| - BOOT::|pfMacro| BOOT::|coerceEasy| BOOT::|keyedSystemError| - BOOT::|chaseInferences| BOOT::|say2PerLineWidth| - BOOT::|getFormModemaps| BOOT::|prEnv,tran| BOOT::|qArg| - BOOT::|npMissingMate| BOOT::|canFit2ndEntry| - BOOT::|sayKeyedMsgLocal| BOOT::|mkUnion| - BOOT::|printEnv,tran| BOOT::|listTruncate| - BOOT::|newHasTest| BOOT::|makeCategoryForm| - BOOT::ADDOPERATIONS BOOT::ASHARPMKAUTOLOADFUNCTION - BOOT::|HGETandCount| BOOT::|consForHashLookup| - BOOT::|sayKeyedMsgAsTeX| BOOT::|SymMemQ| BOOT::|addToSlam| - BOOT::|throwPatternMsg| BOOT::DELDATABASE - BOOT::|sayPatternMsg| BOOT::|getKeyedMsgInDb| - BOOT::|lassocShift| BOOT::|htMakeTemplates| - BOOT::|isKeyedMsgInDb| BOOT::|patternVarsOf1| - BOOT::GETCONSTRUCTOR BOOT::|pfFromDom| BOOT::|symEqual| - BOOT::|domainEqualList| BOOT::SET-LIB-FILE-GETTER - BOOT::|pfApplication| BOOT::|rightJustifyString| - BOOT::|remHashEntriesWith0Count,fn| - BOOT::|globalHashtableStats| BOOT::|lassocShiftQ| - BOOT::|pfWDec| BOOT::|pileForest| BOOT::|canCoerce;| - BOOT::|pileForest1| BOOT::|canCoerce1| BOOT::DAASENAME - BOOT::|pileTree| BOOT::|eqpileTree| BOOT::|pileCtree| - BOOT::|resolveTT;| BOOT::WRAPDOMARGS BOOT::|evalCategory| - BOOT::|replaceSharps| BOOT::|ofCategory| - BOOT::|canCoerceFrom;| BOOT::|canCoerceFrom0| - BOOT::|isEqualOrSubDomain| BOOT::|hasCorrectTarget| - BOOT::MAKE-DATABASES BOOT::|resolveTT1| - BOOT::|applyWithOutputToString| BOOT::|isDomainSubst,fn| - BOOT::|isDomainSubst,findSub| BOOT::|insertModemap| - BOOT::|makeBigFloat| BOOT::REDUCTION-PRINT - BOOT::|mkAlistOfExplicitCategoryOps,fn| BOOT::REMOVER - BOOT::STACK-LOAD BOOT::ESCAPE-KEYWORDS BOOT::|allLASSOCs| - BOOT::MAKE-PARSE-FUNCTION1 BOOT::|pairList| - BOOT::INITIAL-SUBSTRING-P BOOT::|finalizeDocumentation,fn| - BOOT::|formatOpSignature| BOOT::|sayKeyedMsg| - BOOT::|transDocList| BOOT::MAKE-PARSE-FUNC-FLATTEN - BOOT::|recordAttributeDocumentation| - BOOT::|recordDocumentation| - BOOT::|recordSignatureDocumentation| BOOT::|macroExpand| - BOOT::|checkRewrite| BOOT::|checkComments| - BOOT::|checkExtract| BOOT::|checkTrim| - BOOT::|spadSysChoose| BOOT::|testError| - BOOT::|spadtestValueHook| BOOT::|checkIsValidType,fn| - BOOT::|transDoc| BOOT::|checkIndentedLines| - BOOT::SAYBRIGHTLY1 BOOT::|pvarPredTran| BOOT::|mkAbbrev| - BOOT::|addSuffix| BOOT::|processPackage,opt| - BOOT::|subTree| BOOT::|mkRepititionAssoc,mkRepfun| - BOOT::|setPackageLocals| BOOT::|UnionPrint| - BOOT::|JoinInner| BOOT::|objNewWrap| - BOOT::|coerceByFunction| BOOT::|MappingPrint| - BOOT::|parseTypeEvaluateArgs| BOOT::|createEnum| - BOOT::|parseTranCheckForRecord| BOOT::|installConstructor| - BOOT::|AncestorP| BOOT::|SourceLevelSubset| - BOOT::|JoinInner,AddPredicate| BOOT::|mkAnd| BOOT::|mkOr| - BOOT::|SigListUnion| BOOT::|PredImplies| - BOOT::|DescendantP| BOOT::|mkOr2| BOOT::|SigOpsubsume| - BOOT::|SourceLevelSubsume| BOOT::|compMakeCategoryObject| - BOOT::|MachineLevelSubset| BOOT::|MachineLevelSubsume| - BOOT::|SigListOpSubsume| BOOT::|SigEqual| - BOOT::|SigListMember| BOOT::|CategoryPrint| BOOT::|mkAnd2| - BOOT::|categoryParts,build| - BOOT::|catPairUnion,addConflict| - BOOT::|clearCategoryTable1| BOOT::|parseCases,casefn| - BOOT::|hasCat| BOOT::|superSub| BOOT::|encodeCategoryAlist| - BOOT::|simpCategoryOr| BOOT::|tempExtendsCat| - BOOT::CONVERSATION1 BOOT::|addDomainToTable| - BOOT::|mkCategoryOr| BOOT::/EMBED-Q - BOOT::|formalSubstitute| - BOOT::|updateCategoryTableForDomain| - BOOT::|simpCatHasAttribute| BOOT::|testExtend| - BOOT::|mergeOr| BOOT::|newHasTest,fn| BOOT::|simpOrUnion1| - BOOT::|updateCategoryTable| BOOT::|substDomainArgs| - BOOT::|NRTreplaceLocalTypes| BOOT::|dcOpPrint| - BOOT::|predicateBitIndex,pn| BOOT::|augmentPredCode| - BOOT::|mungeAddGensyms| BOOT::|htSayExpose| - BOOT::|makeCompactSigCode| BOOT::|evalDomainOpPred,process| - BOOT::|makeGoGetSlot| BOOT::|dbShowOpHeading| - BOOT::|makePrefixForm| BOOT::|dbShowOperationLines| - BOOT::|buildBitTable,fn| BOOT::|makeCompactDirect1| - BOOT::|augmentPredVector| BOOT::|simpOrDumb| - BOOT::|dbReduceByForm| BOOT::|dbContrivedForm| - BOOT::|dbReduceByOpSignature| BOOT::|dcOpLatchPrint| - BOOT::|reduceByGroup| BOOT::|dbGetCondition| - BOOT::|dbGetOrigin| BOOT::|koCatOps| BOOT::|modemap2Sig| - BOOT::|substInOrder| BOOT::|pairlis| BOOT::|getDcForm| - BOOT::|koCatAttrsAdd| BOOT::|getSubstInsert| - BOOT::|integerAssignment2Fortran1| BOOT::|koOps,fn| - BOOT::|getAllModemapsFromDatabase| BOOT::|koOps,merge| - BOOT::|exp2FortOptimizeCS1,pushCsStacks| - BOOT::|fortFormatTypes| BOOT::|segment2| BOOT::|whoUses| - BOOT::|fortranifyIntrinsicFunctionName| - BOOT::|expression2Fortran1| BOOT::|dispfortarrayexp| - BOOT::|fortFormatIfGoto| BOOT::|koCatAttrs| - BOOT::|dbGetContrivedForm| BOOT::|dispfortexpj| - BOOT::|assignment2Fortran1| BOOT::|beenHere| - BOOT::|dispfortexpf| BOOT::|htSayConstructor| - BOOT::|stringPrefix?| VMLISP::PUTINDEXTABLE - VMLISP::WRITE-INDEXTABLE BOOT::|NRTsetVector4Part2| - BOOT::|consDomainName| BOOT::|NRTencode| - BOOT::|consDomainForm| BOOT::|deltaTran| BOOT::|consSig| - BOOT::|NRTaddToSlam| BOOT::|deepChaseInferences| - BOOT::|c06gsfSolve,g| BOOT::|c06gsfSolve,f| - BOOT::|NRTdescendCodeTran| BOOT::|mergeAppend| - BOOT::|NRTgetLocalIndex1| BOOT::|vectorLocation| - BOOT::|c06frfSolve,fy| BOOT::|c06frfSolve,gy| - BOOT::|c06frfSolve,fx| BOOT::|c06frfSolve,gx| - BOOT::|c06gqfSolve,g| BOOT::|c06gqfSolve,f| - BOOT::|c06fpfSolve,f| BOOT::|c06fpfSolve,g| - BOOT::|c06fqfSolve,f| BOOT::|c06fqfSolve,g| - BOOT::|c06fufSolve,fy| BOOT::|c06fufSolve,gy| - BOOT::|c06fufSolve,fx| BOOT::|c06fufSolve,gx| - BOOT:|ListIsLength?| BOOT:|ListMemberQ?| BOOT:|ListMember?| - BOOT:|ListRemoveQ| BOOT:|ListNRemoveQ| BOOT:|ListUnion| - BOOT:|ListUnionQ| BOOT:|ListIntersection| - BOOT:|ListIntersectionQ| BOOT:|ListAdjoin| - BOOT:|ListAdjoinQ| BOOT:|AlistAssoc| BOOT:|AlistRemove| - BOOT:|AlistAssocQ| BOOT:|AlistRemoveQ| BOOT:|AlistAdjoinQ| - BOOT:|AlistUnionQ| BOOT::|rePackageTran| - BOOT::|ncINTERPFILE| BOOT:|TableUnset| - BOOT::|updateSymbolTable| FOAM:|printDFloat| - FOAM:|printSFloat| FOAM:|fputs| FOAM:|printBInt| - FOAM:|fputc| FOAM:|printSInt| FOAM:|printString| - FOAM:|printChar| BOOT::|incAppend| BOOT::|segment1| - BOOT::|intersectionContour,unifiable| BOOT::|getStatement| - BOOT::|deltaContour,contourDifference| - BOOT::|makeCommonEnvironment,makeSameLength| BOOT::DELLASOS - BOOT::|addContour,fn| BOOT::|fortranifyFunctionName| - BOOT::|displayOpModemaps| BOOT::|fortFormatTypes1| - BOOT::|f02aefSolve,l| FOAM:|PtrMagicEQ| BOOT::|hasOption| - BOOT::|intersectionContour| BOOT::|commandErrorIfAmbiguous| - BOOT::|intersectionContour,computeIntersection| - BOOT::|f04adfSolve,f| BOOT::|f04adfSolve,g| - BOOT::|makeCommonEnvironment| BOOT::|makeLiteral| - BOOT::|isLiteral| BOOT::|f04mcfSolve,f| - BOOT::|f04mcfSolve,g| BOOT::|f04qafSolve,h| BOOT::|mapInto| - BOOT::|f04qafSolve,k| BOOT::|stringMatches?| - BOOT::|basicMatch?| BOOT::|optionError| - BOOT::|displayProperties| BOOT::|mkErrorExpr,highlight| - BOOT::|f04adfSolve,fb| BOOT::|mkErrorExpr,highlight1| - BOOT::|coerce| BOOT::|numOfOccurencesOf| BOOT::|sublisR| - BOOT::|compMapCond''| BOOT::|getAndSay| - BOOT::|intersectionContour,interProplist| BOOT::|position| - BOOT::|satDownLink| BOOT::|getmodeOrMapping| - BOOT::|intersectionContour,compare| - BOOT::|intersectionContour,modeCompare| - BOOT::|getAbbreviation| BOOT::|koAttrs| - BOOT::|GEQNSUBSTLIST,GSUBSTinner| BOOT::|isCategoryForm| - BOOT::|resolve| BOOT::|convert| BOOT::|flatten| - BOOT::|f04jgfSolve,f| BOOT::|npsynonym| - BOOT::|f04jgfSolve,g| BOOT::|getImports,import| - BOOT::|f04arfSolve,f| BOOT::|f04arfSolve,g| - BOOT::|modeEqual| BOOT::|f04mbfSolve,l| - BOOT::|displayWarning| BOOT::|f04mbfSolve,o| - BOOT::|addContour| BOOT::|f04asfSolve,f| - BOOT::|f04asfSolve,g| BOOT::|deleteAssoc| - BOOT::|purgeNewConstructorLines| - BOOT::|filterListOfStrings| BOOT::|asyDocumentation,fn| - BOOT::|satisfiesRegularExpressions| BOOT::|displayProplist| - BOOT::|transformAndRecheckComments| - BOOT::|displaySemanticError| BOOT::|asySignature| - BOOT::|f04mbfSolve,h| BOOT::|asyTypeUnitDeclare| - BOOT::|f04mbfSolve,k| BOOT::|asyCatSignature| - BOOT::|dbSpreadComments| BOOT::|computeAncestorsOf| - BOOT::|descendantsOf| BOOT::|f04atfSolve,f| - BOOT::|f04atfSolve,g| BOOT::|f04adfSolve,gb| - BOOT::|reportOpsFromLisplib| BOOT::|f07fdfSolve,fa| - BOOT::|f07fdfSolve,fb| BOOT::|f07aefSolve,fa| - BOOT::|f07aefSolve,faa| BOOT::|f07adfSolve,fa| - BOOT::|f07adfSolve,fb| BOOT::|childArgCheck| - BOOT::|f07aefSolve,fb| BOOT::POSN1 BOOT::|assocCar| - BOOT::|childAssoc| BOOT::|f07fefSolve,fb| - BOOT::|f07fefSolve,fbb| BOOT::|ancestorsAdd| - BOOT::|f07fefSolve,fa| BOOT::|quickOr| - BOOT::|f07fefSolve,faa| BOOT::|f07aefSolve,fbb| - BOOT::|explodeIfs,gn| BOOT::|f01qdfSolve,fa| - BOOT::|f01qdfSolve,ga| BOOT::|dbGatherDataImplementation| - BOOT::|dbMakeSignature| BOOT::|dbExposed?| - BOOT::|getRegistry| BOOT::|opAlistCount| - BOOT::|f01rdfSolve,gb| BOOT::|bcStarSpaceOp| - BOOT::|evalDomainOpPred,convert| BOOT::|f02aefSolve,f| - BOOT:|Sort| BOOT::|f02aefSolve,g| BOOT:|SortInPlace| - BOOT::|evalDomainOpPred,evpred| BOOT::|f02aefSolve,h| - BOOT::|evalDomainOpPred,evpred1| BOOT::|f02abfSolve,f| - BOOT::|f02abfSolve,g| BOOT::|f02aafSolve,f| - BOOT::|f02aafSolve,g| BOOT::|evalDomainOpPred| - BOOT::|getDomainOpTable,memq| BOOT::|f02ajfSolve,h| - BOOT::|f02ajfSolve,l| BOOT::|superMatch?| - BOOT::|f02affSolve,f| BOOT::|f02affSolve,g| - BOOT:|ByteFileWriteLine| BOOT::NREVERSE-N - BOOT::|f02adfSolve,h| BOOT::|f02adfSolve,l| - FOAM:|fiSetDebugger| BOOT::TRUNCLIST-1 - BOOT::|f02bjfSolve,h| BOOT::-REDUCE-OP - BOOT::|f02bjfSolve,l| BOOT::OR2 BOOT::|f02axfSolve,h| - BOOT::AND2 BOOT::|f02axfSolve,l| BOOT::|f02ajfSolve,f| - BOOT::REPEAT-TRAN BOOT::|f02ajfSolve,g| BOOT::MKPFFLATTEN - BOOT::|f02akfSolve,h| BOOT:|StreamSetPosition| - BOOT::|f02akfSolve,l| BOOT::MKPF1 BOOT::|f02axfSolve,f| - BOOT::|f02axfSolve,g| BOOT::-REPEAT BOOT::|f02xefSolve,fb| - BOOT::|CONTAINED,EQUAL| BOOT::|f02xefSolve,gb| - BOOT::|CONTAINED,EQ| BOOT::|f02awfSolve,h| - BOOT::|f02awfSolve,l| BOOT::|kPageArgs| - BOOT::|dbSubConform| BOOT::|f02akfSolve,f| - BOOT::|f02akfSolve,g| BOOT:|PathnameWithType| - BOOT::MARKHASH BOOT:|PathnameWithDirectory| - BOOT::|f02bjfSolve,f| BOOT::|f02bjfSolve,g| - BOOT::|f02adfSolve,f| BOOT::|f02adfSolve,g| BOOT::|,MIN| - BOOT:|PathnameWithinDirectory| - BOOT::|domainDescendantsOf,jfn| - BOOT::|domainDescendantsOf,catScreen| BOOT::|,MAX| - BOOT:|PathnameWithinOsEnvVar| BOOT::LEXLESSEQP - BOOT::|,DIFFERENCE| BOOT::GLESSEQP BOOT::MAKE-INIT-VECTOR - BOOT::|,TIMES| BOOT::|,PLUS| BOOT::|f02awfSolve,f| - BOOT::|f02awfSolve,g| BOOT::SUBB BOOT::|getCDTEntry| - BOOT::|f02xefSolve,fa| BOOT::|f02xefSolve,ga| - BOOT::|stuffSlots| BOOT::|domainDescendantsOf| BOOT::DO_LET - BOOT::|f02agfSolve,f| BOOT:|CsetMember?| - BOOT::|f02agfSolve,g| BOOT::|measureCommon,fn| - BOOT:|CsetUnion| BOOT::|f02wefSolve,fb| - BOOT::|f02wefSolve,gb| BOOT::|deleteWOC| - BOOT::|f02bbfSolve,f| BOOT::|next| BOOT::|f02bbfSolve,g| - BOOT::|suffix?| BOOT::|list2LongerVec| - BOOT::|f02wefSolve,fa| BOOT::|mkCurryFun| - BOOT::|f02wefSolve,ga| BOOT::|logicalMatch?| - BOOT::|subCopy0| BOOT::|patternCheck,wild| - BOOT:|StringFromToEnd| BOOT::|beforeAfter| - BOOT::|deepSubCopyOrNil| BOOT::|patternCheck,pos| - BOOT:|StringGreater?| BOOT::|deepSubCopy0| BOOT::|prefix?| - BOOT:|StringPrefix?| BOOT::|subCopyOrNil| - BOOT::|htpSetInputAreaAlist| BOOT::|termRW1| - BOOT::|processInteractive| BOOT::|termRW| - BOOT::|maskMatch?| BOOT::|tdAdd| BOOT::|filterByTopic| - BOOT::|addTopic2Documentation| BOOT::|addStats| - BOOT::|transferCodeCon| BOOT::|compileCases| - BOOT::|transferClassCodes| BOOT::|addArgumentConditions| - BOOT::|NRTassignCapsuleFunctionSlot| - BOOT::|reportSpadTrace| BOOT::BVEC-NOR BOOT::BVEC-NAND - BOOT::|addDomain| BOOT::|giveFormalParametersValues| - BOOT::PRINT-DEFUN BOOT::|augmentTraceNames| - BOOT::|stripOffSubdomainConditions| - BOOT::|untraceDomainLocalOps| BOOT::TRANSLABEL1 - BOOT::|getOption| BOOT::TRANSLABEL BOOT::|traceOptionError| - BOOT::GET-GLIPH-TOKEN BOOT::|funfind,LAM| - BOOT::|mergePathnames| BOOT::|subTypes| BOOT::|lassocSub| - BOOT::|dbWordFrom| BOOT::|commandUserLevelError| - BOOT::|applyGrep| BOOT::|htButtonOn?| - BOOT::|generalSearchString| BOOT::|zsystemdevelopment1| - BOOT::|grepForAbbrev| BOOT::|match?| BOOT::|commandError| - BOOT::|optionUserLevelError| BOOT::|firstDelim| BOOT::/READ - BOOT::|kciReduceOpAlist| BOOT::|dbInfoTran| - BOOT::|koPageInputAreaUnchanged?| BOOT::|dbInfoWrapOrigin| - BOOT::|insert| BOOT::|dbInfoSigMatch| BOOT::|ancestorsOf| - BOOT::|compIterator| BOOT::|getIdentity| - BOOT::|augmentHasArgs| BOOT::|processInteractive1| - BOOT::|recordAndPrint| BOOT::|interpretTopLevel| - BOOT::|substituteSegmentedMsg| - BOOT::|dbSpecialExpandIfNecessary| BOOT::|sameUnionBranch| - BOOT::|htpSetPageDescription| BOOT::|testBitVector| - BOOT::|dbShowConsDoc| BOOT::|printTypeAndTimeNormal| - BOOT::|satTypeDownLink| BOOT::|printTypeAndTimeSaturn| - BOOT::|mkDocLink| BOOT::|addParameterTemplates| - BOOT::|hasPair| BOOT::|htpAddToPageDescription| - BOOT::|getAliasIfTracedMapParameter| BOOT::|pfAbSynOp?| - BOOT::|printTypeAndTime| BOOT::|phReportMsgs| - BOOT::|untraceDomainConstructor,keepTraced?| - BOOT::|htpButtonValue| BOOT::|htSayConstructorName| - BOOT::|getMapSig| BOOT::|spadTrace,isTraceable| - BOOT::|removeOption| BOOT::|screenLocalLine| - BOOT::|undoSteps| BOOT::|agg| BOOT::|diffAlist| - BOOT::|undoSingleStep| BOOT::|htSayBind| - BOOT::|bcConstructor| BOOT::|checkArgs| - BOOT::SPADTAGS-FROM-DIRECTORY BOOT::|matSuperList1| - BOOT::|getBindingPowerOf| BOOT::|matSubList1| - BOOT::|matWList1| BOOT::NAG-FILES BOOT::|htpLabelDefault| - BOOT::GET-NAG-CHAPTER BOOT::|setNAGBootAutloadProperties| - BOOT::|htpLabelErrorMsg| BOOT::|setBootAutloadProperties| - BOOT::|setUpDefault| BOOT::|setBootAutoLoadProperty| - BOOT::|mkBootAutoLoad| BOOT::|matWList| VMLISP::ECQEXP - BOOT::|npTypedForm1| BOOT::|htMakeDoitButton| BOOT::|prnd| - BOOT::|reportAO| BOOT::BVEC-XOR BOOT::BVEC-OR - VMLISP::DCQEXP BOOT::BVEC-AND BOOT::BVEC-GREATER - BOOT::BVEC-EQUAL BOOT::BVEC-CONCAT BOOT::|stringLE1| - BOOT::BVEC-MAKE-FULL BOOT::|scylla| BOOT::|mkSuperSub| - BOOT::|EqualBarGensym| BOOT::|pfReturn| BOOT::|pfSpread| - BOOT::|npTypedForm| BOOT::|after| - BOOT::|optCatch,changeThrowToGo| - BOOT::|optCatch,hasNoThrows| - BOOT::|optCatch,changeThrowToExit| - BOOT::|optimizeFunctionDef,replaceThrowByReturn| - BOOT::|optCallSpecially,lookup| BOOT::|EqualBarGensym,fn| - BOOT::|pfLp| BOOT::|optimizeFunctionDef,fn| - BOOT::|htpSetRadioButtonAlist| BOOT::|pfWrong| - BOOT::|pfForin| BOOT::|pfDefinition| BOOT::|pfReturnTyped| - BOOT::|pfLam| BOOT::|pfIfThenOnly| BOOT::|pfExit| - BOOT::|printNamedStatsByProperty| BOOT::|Delay| - BOOT::|initializeTimedNames| BOOT::|searchTailEnv| - BOOT::|searchCurrentEnv| BOOT::|search| - BOOT::|e04ycfSolve,fc| BOOT::|insertWOC,fn| BOOT::|mkObj| - VMLISP:|union| BOOT::|coerceInt| BOOT::|deleteAssocWOC| - BOOT::|e04nafSolve,fa| BOOT::|deleteAssocWOC,fn| - BOOT::|e04nafSolve,fb| BOOT::|deleteLassoc| BOOT::REMALIST - BOOT::|sublisNQ| BOOT::|BooleanEquality| - BOOT::|sublisNQ,fn| BOOT::|modemapsHavingTarget| - BOOT::|PPtoFile| BOOT::|positionInVec| - BOOT::|e04mbfSolve,fa| BOOT::|e04mbfSolve,fb| - BOOT::|mkIterVarSub| BOOT::|lazyOldAxiomDomainDevaluate| - BOOT::|lazyOldAxiomDomainHashCode| BOOT::|declare| - BOOT::|declareMap| BOOT::|concat1| BOOT::|upfreeWithType| - BOOT::|uplocalWithType| BOOT::|deleteAll| - BOOT::|oldAxiomCategoryDevaluate| BOOT::|SExprToDName| - BOOT::|oldAxiomPreCategoryDevaluate| - BOOT::|checkForFreeVariables| BOOT::|f01rdfSolve,fa| - BOOT::|f01rdfSolve,ga| BOOT::|oldAxiomDomainDevaluate| - BOOT::|newHasCategory| BOOT::|orderedDefaults| - BOOT::|f01rdfSolve,fb| BOOT::|attributeNthParent| BOOT:DROP - BOOT::|oldAxiomDomainHashCode| BOOT::|attributeHashCode| - BOOT::|oldAxiomPreCategoryHashCode| - BOOT::|attributeDevaluate| BOOT::|f01refSolve,fa| - BOOT::|f01refSolve,ga| BOOT::|oldAxiomCategoryHashCode| - BOOT:APPLYR BOOT::|f01qcfSolve,f| BOOT::|evalLET| - BOOT::|f01qcfSolve,g| BOOT::|domainEqual| BOOT:STRINGSUFFIX - BOOT::|f01qefSolve,fa| BOOT::|compileIs| - BOOT::|f01qefSolve,ga| BOOT::|f01rcfSolve,fa| - BOOT::|f01rcfSolve,ga| BOOT:CONVERSATION - BOOT::|evalLETchangeValue| BOOT::|isPatternMatch| - BOOT::|seteltable| BOOT::|intSayKeyedMsg| - BOOT::|upLispCall| BOOT::|genIFvalCode| BOOT::|evalLETput| - BOOT::|f01qdfSolve,fb| BOOT::|f01qdfSolve,gb| - BOOT::|intloopProcessString| BOOT::|ncloopDQlines| - BOOT::|intloopInclude1| BOOT::|intloopInclude| - BOOT::|upIFgenValue| BOOT::|putPvarModes| - BOOT::|ncloopPrefix?| BOOT::|intloopPrefix?| - BOOT::|phIntReportMsgs| BOOT::|processMsgList| - BOOT::|phParse| BOOT:TAKE BOOT::|isPatMatch| - BOOT::|intloopReadConsole| BOOT::|streamChop| - BOOT::|inclFname| BOOT::|incDrop| BOOT:SETANDFILE - BOOT:PUSH-REDUCTION BOOT::|inclmsgFileCycle| - BOOT::|assertCond| BOOT::|incActive?| BOOT:TAILFN - BOOT:RPLACW BOOT::|incStream| BOOT::|inclHandleSay| - BOOT::|inclHandleWarning| BOOT:FLAGP - BOOT::|inclHandleError| BOOT:?ORDER BOOT::|incRenumberLine| - BOOT::|incRenumberItem| BOOT::|lnSetGlobalNum| BOOT:S* - FOAM::ALLOC-PROG-INFO BOOT::|liftCond,lcAnd| - BOOT::|actOnInfo| BOOT::|mkJoin| BOOT::|plural| - BOOT::|e04ucfSolve,fb| BOOT:MAKENEWOP BOOT::|has| - BOOT::|containedRight| BOOT::|hashTypeForm| BOOT:CONTAINED - BOOT::|oldAxiomPreCategoryParents| - BOOT::|oldAxiomCategoryDefaultPackage| BOOT:POINTW - BOOT::|linearFormatForm| BOOT::|newHasAttribute| - BOOT::|oldAxiomCategoryParentCount| - BOOT::|findSubstitutionOrder?,fn| BOOT::|app2StringConcat0| - BOOT::|formDecl2String| BOOT::|sayLooking1| - BOOT::|formJoin1| BOOT::|app2StringWrap| BOOT:S- - BOOT::|mkLessOrEqual| BOOT::|formArguments2String| - BOOT::|putValueValue| BOOT::|asTupleNew| BOOT::|objSetVal| - BOOT::|objNewCode| FOAM-USER::H-ERROR BOOT::|displayRule| - BOOT::|coerceInteractive| BOOT::|canMakeTuple| - FOAM-USER::H-STRING BOOT:CARCDREXPAND - BOOT::|formatOpSymbol| FOAM-USER::H-INTEGER - BOOT::|addPatternPred| BOOT::|interpMap| BOOT::|mkLocalVar| - BOOT:/EMBED-1 BOOT::|findLocalVars1| - BOOT::|queryUserKeyedMsg| BOOT::|mkFreeVar| - BOOT::|findLocalVars|)) -(PROCLAIM - '(FTYPE (FUNCTION NIL FIXNUM) BOOT::HEAPELAPSED - BOOT:|OsProcessNumber| BOOT::KCL-OS-PROCESS-NUMBER)) -(PROCLAIM - '(FTYPE (FUNCTION NIL (VALUES T T)) BOOT::MAKE-CLOSEDFN-NAME - BOOT::|genVariable| BOOT::|genSomeVariable| - BOOT::|genDomainVar| BOOT:GENVAR)) diff --git a/src/interp/intfile.boot b/src/interp/intfile.boot new file mode 100644 index 00000000..883047da --- /dev/null +++ b/src/interp/intfile.boot @@ -0,0 +1,61 @@ +-- 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. + + +)package "BOOT" + +shoeInternFile(fn)== + a:=shoeInputFile fn + if null a + then WRITE_-LINE (CONCAT(fn,'" not found"),_*TERMINAL_-IO_*) + else shoeIntern incRgen a + +shoeIntern (s)== + StreamNull s => nil + f:=CAR s + # f < 8 => shoeIntern CDR s + f.0=char " " =>shoeIntern CDR s + a:=INTERN SUBSTRING (f,0,8) + [b,c]:= shoeStrings CDR s + SETF(GET (a,"MSGS"),b) + shoeIntern c + +shoeStrings (stream)== + StreamNull stream => ['"",stream] + a:=CAR stream + if a.0^=char " " + then ['"",stream] + else + [h,t]:=shoeStrings(cdr stream) + [CONCAT(a,h),t] + +--fetchKeyedMsg(key,b)== GET(key,"MSGS") +--shoeInternFile '"/usr/local/scratchpad/cur/doc/msgs/co-eng.msgs" diff --git a/src/interp/intfile.boot.pamphlet b/src/interp/intfile.boot.pamphlet deleted file mode 100644 index 1dcdcf2d..00000000 --- a/src/interp/intfile.boot.pamphlet +++ /dev/null @@ -1,83 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/interp intfile.boot} -\author{The Axiom Team} -\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. - -@ -<<*>>= -<> - -)package "BOOT" - -shoeInternFile(fn)== - a:=shoeInputFile fn - if null a - then WRITE_-LINE (CONCAT(fn,'" not found"),_*TERMINAL_-IO_*) - else shoeIntern incRgen a - -shoeIntern (s)== - StreamNull s => nil - f:=CAR s - # f < 8 => shoeIntern CDR s - f.0=char " " =>shoeIntern CDR s - a:=INTERN SUBSTRING (f,0,8) - [b,c]:= shoeStrings CDR s - SETF(GET (a,"MSGS"),b) - shoeIntern c - -shoeStrings (stream)== - StreamNull stream => ['"",stream] - a:=CAR stream - if a.0^=char " " - then ['"",stream] - else - [h,t]:=shoeStrings(cdr stream) - [CONCAT(a,h),t] - ---fetchKeyedMsg(key,b)== GET(key,"MSGS") ---shoeInternFile '"/usr/local/scratchpad/cur/doc/msgs/co-eng.msgs" -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/interp/intint.lisp b/src/interp/intint.lisp new file mode 100644 index 00000000..0e53d571 --- /dev/null +++ b/src/interp/intint.lisp @@ -0,0 +1,146 @@ +;; 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") + +(defun |intSayKeyedMsg| (key args) + (|sayKeyedMsg| (|packageTran| key) (|packageTran| args))) + +;;(defun |intMakeFloat| (int frac len exp) +;; (MAKE-FLOAT int frac len exp)) + +;;(defun |intSystemCommand| (command) +;; (catch 'SPAD_READER +;; (|systemCommand| (|packageTran| command)))) + +;;(defun |intUnAbbreviateKeyword| (keyword) +;; (|unAbbreviateKeyword| (|packageTran| keyword))) + +(defun |intProcessSynonyms| (str) + (let ((LINE str)) + (declare (special LINE)) + (|processSynonyms|) + LINE)) + +;; (defun |intNoParseCommands| () +;; |$noParseCommands|) + +;;(defun |intTokenCommands| () +;; |$tokenCommands|) + +(defun |intInterpretPform| (pf) + (|processInteractive| (|zeroOneTran| (|packageTran| (|pf2Sex| pf))) pf)) + +;;(defun |intSpadThrow| () +;; (|spadThrow|)) + +;;(defun |intMKPROMPT| (should? step) +;; (if should? (PRINC (MKPROMPT)))) + +(defvar |$intCoerceFailure| '|coerceFailure|) +(defvar |$intTopLevel| '|top_level|) +(defvar |$intSpadReader| 'SPAD_READER) +(defvar |$intRestart| '|restart|) + +;;(defun |intString2BootTree| (str) +;; (|string2BootTree| str)) + +;;(defun |intPackageTran| (sex) +;; (|packageTran| sex)) + +;;--------------------> NEW DEFINITION (override in i-syscmd.boot.pamphlet) +(defun |stripSpaces| (str) + (string-trim '(#\Space) str)) + +;;(defvar |$SessionManager| |$SessionManager|) +;;(defvar |$EndOfOutput| |$EndOfOutput|) + +;;(defun |intServerReadLine| (foo) +;; (|serverReadLine| foo)) + +;; (defun |intProcessSynonym| (str) +;; (|npProcessSynonym| str)) + +(defun |SpadInterpretFile| (fn) + (|SpadInterpretStream| 1 fn nil) ) + +(defun |intNewFloat| () + (list '|Float|)) + +;; (defun |intDoSystemCommand| (string) +;; (|doSystemCommand| string)) + +(defun |intSetNeedToSignalSessionManager| () + (setq |$NeedToSignalSessionManager| T)) + +;; (defun |intKeyedSystemError| (msg args) +;; (|keyedSystemError| msg args)) + +;;#-:CCL +;;(defun |stashInputLines| (l) +;; (|stashInputLines| l)) + +;;(defun |setCurrentLine| (s) +;; (setq |$currentLine| s)) + +(defun |setCurrentLine| (s) + (setq |$currentLine| + (cond ((null |$currentLine|) s) + ((stringp |$currentLine|) + (cons |$currentLine| + (if (stringp s) (cons s nil) s))) + (t (rplacd (last |$currentLine|) + (if (stringp s) (cons s nil) s)) + |$currentLine|)))) + +(defun |intnplisp| (s) + (setq |$currentLine| s) + (|nplisp| |$currentLine|)) + +;; (defun |intResetStackLimits| () (|resetStackLimits|)) + +(defun |intSetQuiet| () + (setq |$QuietCommand| T)) + +(defun |intUnsetQuiet| () + (setq |$QuietCommand| NIL)) + +;; (defun |expandTabs| (s) +;; (expand-tabs s)) + +;; #-:CCL +;; (defun |leaveScratchpad| () +;; (|leaveScratchpad|)) + +;;(defun |readingFile?| () +;; |$ReadingFile|) + diff --git a/src/interp/intint.lisp.pamphlet b/src/interp/intint.lisp.pamphlet deleted file mode 100644 index d132ad87..00000000 --- a/src/interp/intint.lisp.pamphlet +++ /dev/null @@ -1,168 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/interp intint.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") - -(defun |intSayKeyedMsg| (key args) - (|sayKeyedMsg| (|packageTran| key) (|packageTran| args))) - -;;(defun |intMakeFloat| (int frac len exp) -;; (MAKE-FLOAT int frac len exp)) - -;;(defun |intSystemCommand| (command) -;; (catch 'SPAD_READER -;; (|systemCommand| (|packageTran| command)))) - -;;(defun |intUnAbbreviateKeyword| (keyword) -;; (|unAbbreviateKeyword| (|packageTran| keyword))) - -(defun |intProcessSynonyms| (str) - (let ((LINE str)) - (declare (special LINE)) - (|processSynonyms|) - LINE)) - -;; (defun |intNoParseCommands| () -;; |$noParseCommands|) - -;;(defun |intTokenCommands| () -;; |$tokenCommands|) - -(defun |intInterpretPform| (pf) - (|processInteractive| (|zeroOneTran| (|packageTran| (|pf2Sex| pf))) pf)) - -;;(defun |intSpadThrow| () -;; (|spadThrow|)) - -;;(defun |intMKPROMPT| (should? step) -;; (if should? (PRINC (MKPROMPT)))) - -(defvar |$intCoerceFailure| '|coerceFailure|) -(defvar |$intTopLevel| '|top_level|) -(defvar |$intSpadReader| 'SPAD_READER) -(defvar |$intRestart| '|restart|) - -;;(defun |intString2BootTree| (str) -;; (|string2BootTree| str)) - -;;(defun |intPackageTran| (sex) -;; (|packageTran| sex)) - -;;--------------------> NEW DEFINITION (override in i-syscmd.boot.pamphlet) -(defun |stripSpaces| (str) - (string-trim '(#\Space) str)) - -;;(defvar |$SessionManager| |$SessionManager|) -;;(defvar |$EndOfOutput| |$EndOfOutput|) - -;;(defun |intServerReadLine| (foo) -;; (|serverReadLine| foo)) - -;; (defun |intProcessSynonym| (str) -;; (|npProcessSynonym| str)) - -(defun |SpadInterpretFile| (fn) - (|SpadInterpretStream| 1 fn nil) ) - -(defun |intNewFloat| () - (list '|Float|)) - -;; (defun |intDoSystemCommand| (string) -;; (|doSystemCommand| string)) - -(defun |intSetNeedToSignalSessionManager| () - (setq |$NeedToSignalSessionManager| T)) - -;; (defun |intKeyedSystemError| (msg args) -;; (|keyedSystemError| msg args)) - -;;#-:CCL -;;(defun |stashInputLines| (l) -;; (|stashInputLines| l)) - -;;(defun |setCurrentLine| (s) -;; (setq |$currentLine| s)) - -(defun |setCurrentLine| (s) - (setq |$currentLine| - (cond ((null |$currentLine|) s) - ((stringp |$currentLine|) - (cons |$currentLine| - (if (stringp s) (cons s nil) s))) - (t (rplacd (last |$currentLine|) - (if (stringp s) (cons s nil) s)) - |$currentLine|)))) - -(defun |intnplisp| (s) - (setq |$currentLine| s) - (|nplisp| |$currentLine|)) - -;; (defun |intResetStackLimits| () (|resetStackLimits|)) - -(defun |intSetQuiet| () - (setq |$QuietCommand| T)) - -(defun |intUnsetQuiet| () - (setq |$QuietCommand| NIL)) - -;; (defun |expandTabs| (s) -;; (expand-tabs s)) - -;; #-:CCL -;; (defun |leaveScratchpad| () -;; (|leaveScratchpad|)) - -;;(defun |readingFile?| () -;; |$ReadingFile|) - -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/interp/iterator.boot b/src/interp/iterator.boot new file mode 100644 index 00000000..bdcea85b --- /dev/null +++ b/src/interp/iterator.boot @@ -0,0 +1,293 @@ +-- 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. + + +--% ITERATORS + +compReduce(form,m,e) == + compReduce1(form,m,e,$formalArgList) + +compReduce1(form is ["REDUCE",op,.,collectForm],m,e,$formalArgList) == + [collectOp,:itl,body]:= collectForm + if STRINGP op then op:= INTERN op + ^MEMQ(collectOp,'(COLLECT COLLECTV COLLECTVEC)) => + systemError ["illegal reduction form:",form] + $sideEffectsList: local + $until: local + $initList: local + $endTestList: local + $e:= e + itl:= [([.,$e]:= compIterator(x,$e) or return "failed").(0) for x in itl] + itl="failed" => return nil + e:= $e + acc:= GENSYM() + afterFirst:= GENSYM() + bodyVal:= GENSYM() + [part1,m,e]:= comp(["LET",bodyVal,body],m,e) or return nil + [part2,.,e]:= comp(["LET",acc,bodyVal],m,e) or return nil + [part3,.,e]:= comp(["LET",acc,parseTran [op,acc,bodyVal]],m,e) or return nil + identityCode:= + id:= getIdentity(op,e) => u.expr where u() == comp(id,m,e) or return nil + ["IdentityError",MKQ op] + finalCode:= + ["PROGN", + ["LET",afterFirst,nil], + ["REPEAT",:itl, + ["PROGN",part1, + ["IF", afterFirst,part3, + ["PROGN",part2,["LET",afterFirst,MKQ true]]]]], + ["IF",afterFirst,acc,identityCode]] + if $until then + [untilCode,.,e]:= comp($until,$Boolean,e) + finalCode:= substitute(["UNTIL",untilCode],'$until,finalCode) + [finalCode,m,e] + +getIdentity(x,e) == + GETL(x,"THETA") is [y] => y + +numberize x == + x=$Zero => 0 + x=$One => 1 + atom x => x + [numberize first x,:numberize rest x] + +compRepeatOrCollect(form,m,e) == + fn(form,[m,:$exitModeStack],[#$exitModeStack,:$leaveLevelStack],$formalArgList + ,e) where + fn(form,$exitModeStack,$leaveLevelStack,$formalArgList,e) == + $until: local + [repeatOrCollect,:itl,body]:= form + itl':= + [([x',e]:= compIterator(x,e) or return "failed"; x') for x in itl] + itl'="failed" => nil + targetMode:= first $exitModeStack + bodyMode:= + repeatOrCollect="COLLECT" => + targetMode = '$EmptyMode => '$EmptyMode + (u:=modeIsAggregateOf('List,targetMode,e)) => + CADR u + (u:=modeIsAggregateOf('PrimitiveArray,targetMode,e)) => + repeatOrCollect:='COLLECTV + CADR u + (u:=modeIsAggregateOf('Vector,targetMode,e)) => + repeatOrCollect:='COLLECTVEC + CADR u + stackMessage('"Invalid collect bodytype") + return nil + -- If we're doing a collect, and the type isn't conformable + -- then we've boobed. JHD 26.July.1990 + $NoValueMode + [body',m',e']:= + -- (m1:= listOrVectorElementMode targetMode) and comp(body,m1,e) or + compOrCroak(body,bodyMode,e) or return nil + if $until then + [untilCode,.,e']:= comp($until,$Boolean,e') + itl':= substitute(["UNTIL",untilCode],'$until,itl') + form':= [repeatOrCollect,:itl',body'] + m'':= + repeatOrCollect="COLLECT" => + (u:=modeIsAggregateOf('List,targetMode,e)) => CAR u + ["List",m'] + repeatOrCollect="COLLECTV" => + (u:=modeIsAggregateOf('PrimitiveArray,targetMode,e)) => CAR u + ["PrimitiveArray",m'] + repeatOrCollect="COLLECTVEC" => + (u:=modeIsAggregateOf('Vector,targetMode,e)) => CAR u + ["Vector",m'] + m' + coerceExit([form',m'',e'],targetMode) + +--constructByModemap([x,source,e],target) == +-- u:= +-- [cexpr +-- for (modemap:= [map,cexpr]) in getModemapList("construct",1,e) | map is [ +-- .,t,s] and modeEqual(t,target) and modeEqual(s,source)] or return nil +-- fn:= (or/[selfn for [cond,selfn] in u | cond=true]) or return nil +-- [["call",fn,x],target,e] + +listOrVectorElementMode x == + x is [a,b,:.] and member(a,'(PrimitiveArray Vector List)) => b + +compIterator(it,e) == + it is ["IN",x,y] => + --these two lines must be in this order, to get "for f in list f" + --to give an error message if f is undefined + [y',m,e]:= comp(y,$EmptyMode,e) or return nil + $formalArgList:= [x,:$formalArgList] + [mOver,mUnder]:= + modeIsAggregateOf("List",m,e) or return + stackMessage ["mode: ",m," must be a list of some mode"] + if null get(x,"mode",e) then [.,.,e]:= + compMakeDeclaration([":",x,mUnder],$EmptyMode,e) or return nil + e:= put(x,"value",[genSomeVariable(),mUnder,e],e) + [y'',m'',e] := coerce([y',m,e], mOver) or return nil + [["IN",x,y''],e] + it is ["ON",x,y] => + $formalArgList:= [x,:$formalArgList] + [y',m,e]:= comp(y,$EmptyMode,e) or return nil + [mOver,mUnder]:= + modeIsAggregateOf("List",m,e) or return + stackMessage ["mode: ",m," must be a list of other modes"] + if null get(x,"mode",e) then [.,.,e]:= + compMakeDeclaration([":",x,m],$EmptyMode,e) or return nil + e:= put(x,"value",[genSomeVariable(),m,e],e) + [y'',m'',e] := coerce([y',m,e], mOver) or return nil + [["ON",x,y''],e] + it is ["STEP",index,start,inc,:optFinal] => + $formalArgList:= [index,:$formalArgList] + --if all start/inc/end compile as small integers, then loop + --is compiled as a small integer loop + final':= nil + (start':= comp(start,$SmallInteger,e)) and + (inc':= comp(inc,$NonNegativeInteger,start'.env)) and + (not (optFinal is [final]) or + (final':= comp(final,$SmallInteger,inc'.env))) => + indexmode:= + comp(start,$NonNegativeInteger,e) => + $NonNegativeInteger + $SmallInteger + if null get(index,"mode",e) then [.,.,e]:= + compMakeDeclaration([":",index,indexmode],$EmptyMode, + (final' => final'.env; inc'.env)) or return nil + e:= put(index,"value",[genSomeVariable(),indexmode,e],e) + if final' then optFinal:= [final'.expr] + [["ISTEP",index,start'.expr,inc'.expr,:optFinal],e] + [start,.,e]:= + comp(start,$Integer,e) or return + stackMessage ["start value of index: ",start," must be an integer"] + [inc,.,e]:= + comp(inc,$Integer,e) or return + stackMessage ["index increment:",inc," must be an integer"] + if optFinal is [final] then + [final,.,e]:= + comp(final,$Integer,e) or return + stackMessage ["final value of index: ",final," must be an integer"] + optFinal:= [final] + indexmode:= + comp(CADDR it,$NonNegativeInteger,e) => $NonNegativeInteger + $Integer + if null get(index,"mode",e) then [.,.,e]:= + compMakeDeclaration([":",index,indexmode],$EmptyMode,e) or return nil + e:= put(index,"value",[genSomeVariable(),indexmode,e],e) + [["STEP",index,start,inc,:optFinal],e] + it is ["WHILE",p] => + [p',m,e]:= + comp(p,$Boolean,e) or return + stackMessage ["WHILE operand: ",p," is not Boolean valued"] + [["WHILE",p'],e] + it is ["UNTIL",p] => ($until:= p; ['$until,e]) + it is ["|",x] => + u:= + comp(x,$Boolean,e) or return + stackMessage ["SUCHTHAT operand: ",x," is not Boolean value"] + [["|",u.expr],u.env] + nil + +--isAggregateMode(m,e) == +-- m is [c,R] and MEMQ(c,'(Vector List)) => R +-- name:= +-- m is [fn,:.] => fn +-- m="$" => "Rep" +-- m +-- get(name,"value",e) is [c,R] and MEMQ(c,'(Vector List)) => R + +modeIsAggregateOf(ListOrVector,m,e) == + m is [ =ListOrVector,R] => [m,R] +--m = '$EmptyMode => [m,m] I don't think this is correct, breaks POLY + + m is ["Union",:l] => + mList:= [pair for m' in l | (pair:= modeIsAggregateOf(ListOrVector,m',e))] + 1=#mList => first mList + name:= + m is [fn,:.] => fn + m="$" => "Rep" + m + get(name,"value",e) is [[ =ListOrVector,R],:.] => [m,R] + +--% VECTOR ITERATORS + +--the following 4 functions are not currently used + +--compCollectV(form,m,e) == +-- fn(form,[m,:$exitModeStack],[#$exitModeStack,:$leaveLevelStack],e) where +-- fn(form,$exitModeStack,$leaveLevelStack,e) == +-- [repeatOrCollect,it,body]:= form +-- [it',e]:= compIteratorV(it,e) or return nil +-- m:= first $exitModeStack +-- [mOver,mUnder]:= modeIsAggregateOf("Vector",m,e) or $EmptyMode +-- [body',m',e']:= compOrCroak(body,mUnder,e) or return nil +-- form':= ["COLLECTV",it',body'] +-- {n:= +-- it' is ("STEP",.,s,i,f) or it' is ("ISTEP",.,s,i,f) => +-- computeMaxIndex(s,f,i); +-- return nil} +-- coerce([form',mOver,e'],m) +-- +--compIteratorV(it,e) == +-- it is ["STEP",index,start,inc,final] => +-- (start':= comp(start,$Integer,e)) and +-- (inc':= comp(inc,$NonNegativeInteger,start'.env)) and +-- (final':= comp(final,$Integer,inc'.env)) => +-- indexmode:= +-- comp(start,$NonNegativeInteger,e) => $NonNegativeInteger +-- $Integer +-- if null get(index,"mode",e) then [.,.,e]:= +-- compMakeDeclaration([":",index,indexmode],$EmptyMode,final'.env) or +-- return nil +-- e:= put(index,"value",[genSomeVariable(),indexmode,e],e) +-- [["ISTEP",index,start'.expr,inc'.expr,final'.expr],e] +-- [start,.,e]:= +-- comp(start,$Integer,e) or return +-- stackMessage ["start value of index: ",start," is not an integer"] +-- [inc,.,e]:= +-- comp(inc,$NonNegativeInteger,e) or return +-- stackMessage ["index increment: ",inc," must be a non-negative integer"] +-- [final,.,e]:= +-- comp(final,$Integer,e) or return +-- stackMessage ["final value of index: ",final," is not an integer"] +-- indexmode:= +-- comp(CADDR it,$NonNegativeInteger,e) => $NonNegativeInteger +-- $Integer +-- if null get(index,"mode",e) then [.,.,e]:= +-- compMakeDeclaration([":",index,indexmode],$EmptyMode,e) or return nil +-- e:= put(index,"value",[genSomeVariable(),indexmode,e],e) +-- [["STEP",index,start,inc,final],e] +-- nil +-- +--computeMaxIndex(s,f,i) == +-- i^=1 => cannotDo() +-- s=1 => f +-- exprDifference(f,exprDifference(s,1)) +-- +--exprDifference(x,y) == +-- y=0 => x +-- FIXP x and FIXP y => DIFFERENCE(x,y) +-- ["DIFFERENCE",x,y] + diff --git a/src/interp/iterator.boot.pamphlet b/src/interp/iterator.boot.pamphlet deleted file mode 100644 index 52dae4f7..00000000 --- a/src/interp/iterator.boot.pamphlet +++ /dev/null @@ -1,319 +0,0 @@ -\documentclass{article} -\usepackage{axiom} - -\title{\File{src/interp/iterator.boot} Pamphlet} -\author{The Axiom Team} - -\begin{document} -\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. - -@ -<<*>>= -<> - ---% ITERATORS - -compReduce(form,m,e) == - compReduce1(form,m,e,$formalArgList) - -compReduce1(form is ["REDUCE",op,.,collectForm],m,e,$formalArgList) == - [collectOp,:itl,body]:= collectForm - if STRINGP op then op:= INTERN op - ^MEMQ(collectOp,'(COLLECT COLLECTV COLLECTVEC)) => - systemError ["illegal reduction form:",form] - $sideEffectsList: local - $until: local - $initList: local - $endTestList: local - $e:= e - itl:= [([.,$e]:= compIterator(x,$e) or return "failed").(0) for x in itl] - itl="failed" => return nil - e:= $e - acc:= GENSYM() - afterFirst:= GENSYM() - bodyVal:= GENSYM() - [part1,m,e]:= comp(["LET",bodyVal,body],m,e) or return nil - [part2,.,e]:= comp(["LET",acc,bodyVal],m,e) or return nil - [part3,.,e]:= comp(["LET",acc,parseTran [op,acc,bodyVal]],m,e) or return nil - identityCode:= - id:= getIdentity(op,e) => u.expr where u() == comp(id,m,e) or return nil - ["IdentityError",MKQ op] - finalCode:= - ["PROGN", - ["LET",afterFirst,nil], - ["REPEAT",:itl, - ["PROGN",part1, - ["IF", afterFirst,part3, - ["PROGN",part2,["LET",afterFirst,MKQ true]]]]], - ["IF",afterFirst,acc,identityCode]] - if $until then - [untilCode,.,e]:= comp($until,$Boolean,e) - finalCode:= substitute(["UNTIL",untilCode],'$until,finalCode) - [finalCode,m,e] - -getIdentity(x,e) == - GETL(x,"THETA") is [y] => y - -numberize x == - x=$Zero => 0 - x=$One => 1 - atom x => x - [numberize first x,:numberize rest x] - -compRepeatOrCollect(form,m,e) == - fn(form,[m,:$exitModeStack],[#$exitModeStack,:$leaveLevelStack],$formalArgList - ,e) where - fn(form,$exitModeStack,$leaveLevelStack,$formalArgList,e) == - $until: local - [repeatOrCollect,:itl,body]:= form - itl':= - [([x',e]:= compIterator(x,e) or return "failed"; x') for x in itl] - itl'="failed" => nil - targetMode:= first $exitModeStack - bodyMode:= - repeatOrCollect="COLLECT" => - targetMode = '$EmptyMode => '$EmptyMode - (u:=modeIsAggregateOf('List,targetMode,e)) => - CADR u - (u:=modeIsAggregateOf('PrimitiveArray,targetMode,e)) => - repeatOrCollect:='COLLECTV - CADR u - (u:=modeIsAggregateOf('Vector,targetMode,e)) => - repeatOrCollect:='COLLECTVEC - CADR u - stackMessage('"Invalid collect bodytype") - return nil - -- If we're doing a collect, and the type isn't conformable - -- then we've boobed. JHD 26.July.1990 - $NoValueMode - [body',m',e']:= - -- (m1:= listOrVectorElementMode targetMode) and comp(body,m1,e) or - compOrCroak(body,bodyMode,e) or return nil - if $until then - [untilCode,.,e']:= comp($until,$Boolean,e') - itl':= substitute(["UNTIL",untilCode],'$until,itl') - form':= [repeatOrCollect,:itl',body'] - m'':= - repeatOrCollect="COLLECT" => - (u:=modeIsAggregateOf('List,targetMode,e)) => CAR u - ["List",m'] - repeatOrCollect="COLLECTV" => - (u:=modeIsAggregateOf('PrimitiveArray,targetMode,e)) => CAR u - ["PrimitiveArray",m'] - repeatOrCollect="COLLECTVEC" => - (u:=modeIsAggregateOf('Vector,targetMode,e)) => CAR u - ["Vector",m'] - m' - coerceExit([form',m'',e'],targetMode) - ---constructByModemap([x,source,e],target) == --- u:= --- [cexpr --- for (modemap:= [map,cexpr]) in getModemapList("construct",1,e) | map is [ --- .,t,s] and modeEqual(t,target) and modeEqual(s,source)] or return nil --- fn:= (or/[selfn for [cond,selfn] in u | cond=true]) or return nil --- [["call",fn,x],target,e] - -listOrVectorElementMode x == - x is [a,b,:.] and member(a,'(PrimitiveArray Vector List)) => b - -compIterator(it,e) == - it is ["IN",x,y] => - --these two lines must be in this order, to get "for f in list f" - --to give an error message if f is undefined - [y',m,e]:= comp(y,$EmptyMode,e) or return nil - $formalArgList:= [x,:$formalArgList] - [mOver,mUnder]:= - modeIsAggregateOf("List",m,e) or return - stackMessage ["mode: ",m," must be a list of some mode"] - if null get(x,"mode",e) then [.,.,e]:= - compMakeDeclaration([":",x,mUnder],$EmptyMode,e) or return nil - e:= put(x,"value",[genSomeVariable(),mUnder,e],e) - [y'',m'',e] := coerce([y',m,e], mOver) or return nil - [["IN",x,y''],e] - it is ["ON",x,y] => - $formalArgList:= [x,:$formalArgList] - [y',m,e]:= comp(y,$EmptyMode,e) or return nil - [mOver,mUnder]:= - modeIsAggregateOf("List",m,e) or return - stackMessage ["mode: ",m," must be a list of other modes"] - if null get(x,"mode",e) then [.,.,e]:= - compMakeDeclaration([":",x,m],$EmptyMode,e) or return nil - e:= put(x,"value",[genSomeVariable(),m,e],e) - [y'',m'',e] := coerce([y',m,e], mOver) or return nil - [["ON",x,y''],e] - it is ["STEP",index,start,inc,:optFinal] => - $formalArgList:= [index,:$formalArgList] - --if all start/inc/end compile as small integers, then loop - --is compiled as a small integer loop - final':= nil - (start':= comp(start,$SmallInteger,e)) and - (inc':= comp(inc,$NonNegativeInteger,start'.env)) and - (not (optFinal is [final]) or - (final':= comp(final,$SmallInteger,inc'.env))) => - indexmode:= - comp(start,$NonNegativeInteger,e) => - $NonNegativeInteger - $SmallInteger - if null get(index,"mode",e) then [.,.,e]:= - compMakeDeclaration([":",index,indexmode],$EmptyMode, - (final' => final'.env; inc'.env)) or return nil - e:= put(index,"value",[genSomeVariable(),indexmode,e],e) - if final' then optFinal:= [final'.expr] - [["ISTEP",index,start'.expr,inc'.expr,:optFinal],e] - [start,.,e]:= - comp(start,$Integer,e) or return - stackMessage ["start value of index: ",start," must be an integer"] - [inc,.,e]:= - comp(inc,$Integer,e) or return - stackMessage ["index increment:",inc," must be an integer"] - if optFinal is [final] then - [final,.,e]:= - comp(final,$Integer,e) or return - stackMessage ["final value of index: ",final," must be an integer"] - optFinal:= [final] - indexmode:= - comp(CADDR it,$NonNegativeInteger,e) => $NonNegativeInteger - $Integer - if null get(index,"mode",e) then [.,.,e]:= - compMakeDeclaration([":",index,indexmode],$EmptyMode,e) or return nil - e:= put(index,"value",[genSomeVariable(),indexmode,e],e) - [["STEP",index,start,inc,:optFinal],e] - it is ["WHILE",p] => - [p',m,e]:= - comp(p,$Boolean,e) or return - stackMessage ["WHILE operand: ",p," is not Boolean valued"] - [["WHILE",p'],e] - it is ["UNTIL",p] => ($until:= p; ['$until,e]) - it is ["|",x] => - u:= - comp(x,$Boolean,e) or return - stackMessage ["SUCHTHAT operand: ",x," is not Boolean value"] - [["|",u.expr],u.env] - nil - ---isAggregateMode(m,e) == --- m is [c,R] and MEMQ(c,'(Vector List)) => R --- name:= --- m is [fn,:.] => fn --- m="$" => "Rep" --- m --- get(name,"value",e) is [c,R] and MEMQ(c,'(Vector List)) => R - -modeIsAggregateOf(ListOrVector,m,e) == - m is [ =ListOrVector,R] => [m,R] ---m = '$EmptyMode => [m,m] I don't think this is correct, breaks POLY + - m is ["Union",:l] => - mList:= [pair for m' in l | (pair:= modeIsAggregateOf(ListOrVector,m',e))] - 1=#mList => first mList - name:= - m is [fn,:.] => fn - m="$" => "Rep" - m - get(name,"value",e) is [[ =ListOrVector,R],:.] => [m,R] - ---% VECTOR ITERATORS - ---the following 4 functions are not currently used - ---compCollectV(form,m,e) == --- fn(form,[m,:$exitModeStack],[#$exitModeStack,:$leaveLevelStack],e) where --- fn(form,$exitModeStack,$leaveLevelStack,e) == --- [repeatOrCollect,it,body]:= form --- [it',e]:= compIteratorV(it,e) or return nil --- m:= first $exitModeStack --- [mOver,mUnder]:= modeIsAggregateOf("Vector",m,e) or $EmptyMode --- [body',m',e']:= compOrCroak(body,mUnder,e) or return nil --- form':= ["COLLECTV",it',body'] --- {n:= --- it' is ("STEP",.,s,i,f) or it' is ("ISTEP",.,s,i,f) => --- computeMaxIndex(s,f,i); --- return nil} --- coerce([form',mOver,e'],m) --- ---compIteratorV(it,e) == --- it is ["STEP",index,start,inc,final] => --- (start':= comp(start,$Integer,e)) and --- (inc':= comp(inc,$NonNegativeInteger,start'.env)) and --- (final':= comp(final,$Integer,inc'.env)) => --- indexmode:= --- comp(start,$NonNegativeInteger,e) => $NonNegativeInteger --- $Integer --- if null get(index,"mode",e) then [.,.,e]:= --- compMakeDeclaration([":",index,indexmode],$EmptyMode,final'.env) or --- return nil --- e:= put(index,"value",[genSomeVariable(),indexmode,e],e) --- [["ISTEP",index,start'.expr,inc'.expr,final'.expr],e] --- [start,.,e]:= --- comp(start,$Integer,e) or return --- stackMessage ["start value of index: ",start," is not an integer"] --- [inc,.,e]:= --- comp(inc,$NonNegativeInteger,e) or return --- stackMessage ["index increment: ",inc," must be a non-negative integer"] --- [final,.,e]:= --- comp(final,$Integer,e) or return --- stackMessage ["final value of index: ",final," is not an integer"] --- indexmode:= --- comp(CADDR it,$NonNegativeInteger,e) => $NonNegativeInteger --- $Integer --- if null get(index,"mode",e) then [.,.,e]:= --- compMakeDeclaration([":",index,indexmode],$EmptyMode,e) or return nil --- e:= put(index,"value",[genSomeVariable(),indexmode,e],e) --- [["STEP",index,start,inc,final],e] --- nil --- ---computeMaxIndex(s,f,i) == --- i^=1 => cannotDo() --- s=1 => f --- exprDifference(f,exprDifference(s,1)) --- ---exprDifference(x,y) == --- y=0 => x --- FIXP x and FIXP y => DIFFERENCE(x,y) --- ["DIFFERENCE",x,y] - -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} -- cgit v1.2.3