diff --git a/books/Makefile.pamphlet b/books/Makefile.pamphlet index 4ec6678..bb285ae 100644 --- a/books/Makefile.pamphlet +++ b/books/Makefile.pamphlet @@ -89,6 +89,8 @@ The cruft I've found so far has the forms: The sed patterns to match and remove them (in order) are: <>= sed -e 's/{chapter.[0-9]*}//' \ + -e 's/{chapter\*.2}//' \ + -e 's/{chapter\*.3}//' \ -e 's/{section.[0-9]*.[0-9]*}//' \ -e 's/{subsection.[0-9]*.[0-9]*.[0-9]*}//' \ -e 's/{appendix.*}//' \ diff --git a/books/bookheader.tex b/books/bookheader.tex index 7880f12..2cdfca1 100644 --- a/books/bookheader.tex +++ b/books/bookheader.tex @@ -7,6 +7,8 @@ \usepackage{graphicx} \begin{document} +\frontmatter +\setcounter{secnumdepth}{1} \begin{titlepage} \center{\includegraphics{ps/axiomfront.ps}} \vskip 0.1in @@ -238,4 +240,4 @@ November 10, 2003 ((iHy)) \vfill \eject \pagenumbering{arabic} -\setcounter{chapter}{0} % Chapter 1 +\setcounter{chapter}{1} % Chapter 1 diff --git a/books/bookvol0.pamphlet b/books/bookvol0.pamphlet index 8b15a7d..27d14f1 100644 --- a/books/bookvol0.pamphlet +++ b/books/bookvol0.pamphlet @@ -237,9 +237,7 @@ David V. Chudnovsky \hfill Gregory V. Chudnovsky \eject %Original Page xxi - -\pseudoChapter{\Huge Contributors} -\addcontentsline{toc}{chapter}{Contributors} +\chapter{Contributors} The design and development of Axiom was led by the Symbolic Computation Group of the Mathematical Sciences Department, IBM Thomas J. Watson Research Center, Yorktown Heights, New York. The current implemention @@ -435,8 +433,7 @@ constructive suggestions on drafts of this book. %Original Page 1 -\pseudoChapter{\Huge Introduction to Axiom} -%\addcontentsline{toc}{chapter}{Introduction to Axiom} +\chapter{Introduction to Axiom} \label{ugNewIntro} Welcome to the world of Axiom. We call Axiom a scientific computation system: @@ -446,7 +443,7 @@ from symbolics, to numerics, to graphics. This introduction is a quick overview of what Axiom offers. -\subsection{Symbolic Computation} +\section{Symbolic Computation} Axiom provides a wide range of simple commands for symbolic mathematical problem solving. Do you need to solve an equation, to expand a series, or to obtain an integral? If so, just ask Axiom @@ -492,7 +489,7 @@ gives you the answer when an answer exists. If one does not, it provides a proof that there is no answer. Integration is just one of a multitude of symbolic operations that Axiom provides. -\subsection{Numeric Computation} +\section{Numeric Computation} Axiom has a numerical library that includes operations for linear algebra, solution of equations, and special functions. For many of these operations, you can select any number of floating point digits @@ -551,7 +548,7 @@ algebra, basic statistics, step-wise regression, analysis of variance, time series analysis, mathematical programming, and special functions. Contact the Numerical Algorithms Group Limited, Oxford, England. -\subsection{Graphics} +\section{Graphics} You may often want to visualize a symbolic formula or draw a graph from a set of numerical values. To do this, you can call upon the Axiom @@ -575,7 +572,7 @@ zoom, change the coloring, lighting, shading, and perspective on the picture. You can also generate a PostScript copy of your graph to produce hard-copy output. -\subsection{HyperDoc} +\section{HyperDoc} \begin{figure}[htbp] %\includegraphics[bbllx=1, bblly=1, bburx=298, bbury=290]{ps/v0hroot.eps} @@ -600,7 +597,7 @@ series of HyperDoc windows shown in \figureref{fig-intro-br} and the specified mouse clicks, you and HyperDoc generate the correct command to issue to compute the answer. -\subsection{Interactive Programming } +\section{Interactive Programming} Axiom's interactive programming language lets you define your own functions. A simple example of a user-defined function is one that computes the successive Legendre polynomials. Axiom lets @@ -675,7 +672,7 @@ In general, a user function is type-analyzed and compiled on first use. Later, if you use it with a different kind of object, the function is recompiled if necessary. -\subsection{Data Structures} +\section{Data Structures} A variety of data structures are available for interactive use. These include strings, lists, vectors, sets, multisets, and hash tables. A @@ -770,7 +767,7 @@ $$ $$ \returnType{Type: Expression Integer} -\subsection{Mathematical Structures} +\section{Mathematical Structures} Axiom also has many kinds of mathematical structures. These range from simple ones (like polynomials and matrices) to more esoteric ones (like ideals and Clifford algebras). Most structures @@ -809,7 +806,7 @@ $$ $$ \returnType{Type: Union(Matrix Fraction Polynomial Complex Integer,...)} -\subsection{Pattern Matching} +\section{Pattern Matching} %Original Page 7 @@ -868,7 +865,7 @@ Using input files, you can create your own library of transformation rules relevant to your applications, then selectively apply the rules you need. -\subsection{Polymorphic Algorithms} +\section{Polymorphic Algorithms} All components of the Axiom algebra library are written in the Axiom library language. This language is similar to the interactive language except for protocols that authors are obliged to @@ -935,7 +932,7 @@ with equations over any ``field.'' Examples of fields are the rational numbers, floating point numbers, rational functions, power series, and general expressions involving radicals. -\subsection{Extensibility} +\section{Extensibility} Users and system developers alike can augment the Axiom library, all using one common language. Library code, like interpreter code, @@ -992,7 +989,8 @@ omitted for common types in the interactive language. So much for the nutshell. Here are these basic ideas described by ten design principles: -\subsection{Types are Defined by Abstract Datatype Programs} +\chapter{A Technical Introduction to Axiom} +\section{Types are Defined by Abstract Datatype Programs} Basic types are called {\it domains of computation}, or, simply, {\it domains.} @@ -1042,7 +1040,7 @@ objects of the domain. Thus the operation of adding two vectors of real numbers can be described and implemented using the addition operation from {\tt Float}. -\subsection{The Type of Basic Objects is a Domain or Subdomain} +\section{The Type of Basic Objects is a Domain or Subdomain} %Original Page 11 @@ -1065,7 +1063,7 @@ however, must list a subset of the exports of the domain. The {\tt Implementation} part optionally gives special definitions for subdomain objects. -\subsection{Domains Have Types Called Categories} +\section{Domains Have Types Called Categories} Domains and subdomains in Axiom are themselves objects that have types. The type of a domain or subdomain is called a {\it category}. @@ -1098,7 +1096,7 @@ but ``matrix of lists'' is not. Categories say nothing about representation. Domains, which are instances of category types, specify representations. -\subsection{Operations Can Refer To Abstract Types} +\section{Operations Can Refer To Abstract Types} All operations have prescribed source and target types. Types can be denoted by symbols that stand for domains, called ``symbolic @@ -1124,7 +1122,7 @@ $power("oxford",2)$ however fails since $"oxford"$ has type Using symbolic domains, algorithms can be defined in their most natural or general setting. -\subsection{Categories Form Hierarchies} +\section{Categories Form Hierarchies} Categories form hierarchies (technically, directed-acyclic graphs). A simplified hierarchical world of algebraic categories is shown below. @@ -1148,7 +1146,7 @@ Figure 1. A simplified category hierarchy. %Original Page 13 -\subsection{Domains Belong to Categories by Assertion} +\section{Domains Belong to Categories by Assertion} A category designates a class of domains. Which domains? You might think that {\tt Ring} designates the class of all domains that @@ -1194,7 +1192,7 @@ definition for {\tt abs} in Axiom is protected by context: argument $x$ is required to be a member of a domain of category {\tt OrderedSet}. -\subsection{Packages Are Clusters of Polymorphic Operations} +\section{Packages Are Clusters of Polymorphic Operations} In Axiom, facilities for symbolic integration, solution of equations, and the like are placed in ``packages''. A {\it package} @@ -1220,7 +1218,7 @@ compiled your package, your algorithms can then be used for any {\tt F}: floating-point numbers, rational numbers, complex rational functions, and power series, to name a few. -\subsection{The Interpreter Builds Domains Dynamically} +\section{The Interpreter Builds Domains Dynamically} The Axiom interpreter reads user input then builds whatever types it needs to perform the indicated computations. @@ -1269,7 +1267,7 @@ the argument of {\tt Matrix} is required to be a {\tt Ring}, Axiom will not build nonsensical types such as ``matrices of input files''. -\subsection{Axiom Code is Compiled} +\section{Axiom Code is Compiled} Axiom programs are statically compiled to machine code, then placed into library modules. Categories provide an important role in @@ -1282,7 +1280,7 @@ obtaining efficient object code by enabling: though {\tt R} is unknown). \end{itemize} -\subsection{Axiom is Extensible} +\section{Axiom is Extensible} Users and system implementers alike use the Axiom language to add facilities to the Axiom library. The entire Axiom @@ -3732,7 +3730,6 @@ for a in 1..4 for b in 8..5 by -1 repeat Note that without the ``by -1'' the segment 8..5 is empty so there is nothing to iterate over and the loop exits immediately. -\setcounter{chapter}{0} % Chapter 1 \hyphenation{ multi-set @@ -3744,6 +3741,8 @@ New-Distributed-Mul-ti-var-iate-Poly-nomial General-Distributed-Mul-ti-var-iate-Poly-nomial } +\mainmatter +\setcounter{chapter}{0} % Chapter 1 \chapter{An Overview of Axiom} \begin{quote} When we start cataloging the gains in tools sitting on a computer, the @@ -6909,7 +6908,7 @@ This concludes your tour of Axiom. To disembark, issue the system command {\tt )quit} to leave Axiom and return to the operating system. -\setcounter{chapter}{1} +%\setcounter{chapter}{1} \chapter{Using Types and Modes} \begin{quote} @@ -9220,7 +9219,7 @@ domains belonging to {\tt ComplexCategory} is {\tt Complex}. See \domainref{Complex} for more information on that and see \sectionref{ugUserDeclare} for more information on function types. -\setcounter{chapter}{2} +%\setcounter{chapter}{2} %Original Page 93 @@ -9550,7 +9549,7 @@ The default value is {\tt white} \vfill \eject -\setcounter{chapter}{3} +%\setcounter{chapter}{3} %Original Page 99 @@ -10136,7 +10135,7 @@ $$ \returnType{Type: Matrix Float} -\setcounter{chapter}{4} +%\setcounter{chapter}{4} %Original Page @@ -12033,7 +12032,7 @@ With streams, you can let your machine run, interrupt it to see how far it has progressed, then start it up and let it continue from where it left off. -\setcounter{chapter}{5} +%\setcounter{chapter}{5} %Original Page 135 @@ -15184,7 +15183,7 @@ think you need pattern matching, consider this choice carefully. existing domain or by building a new domain of objects for your application. -\setcounter{chapter}{6} +%\setcounter{chapter}{6} %Original Page 179 @@ -18509,7 +18508,7 @@ three-di\-men\-sion\-al control-panel. {\bf Rom8} \end{description} -\setcounter{chapter}{7} % Chapter 8 +%\setcounter{chapter}{7} % Chapter 8 % viewSizeDefault [300,300] %Original Page 227 @@ -25540,7 +25539,7 @@ AlgebraGivenByStructuralConstants(Fraction Integer,4,[AB,Ab,aB,ab], %Original Page 309 -%\setcounter{chapter}{9} % Chapter 10 +%%\setcounter{chapter}{9} % Chapter 10 \chapter{Some Examples of Domains and Packages} In this chapter we show examples of many of the most commonly used Axiom domains and packages. The sections are organized by constructor @@ -58633,7 +58632,7 @@ $drawComplex(g^3,-3..3,-3..3)$ \end{center} \end{minipage} -\setcounter{chapter}{10} % Chapter 11 +%\setcounter{chapter}{10} % Chapter 11 \hyphenation{ In-dexed-Aggre-gate @@ -59441,7 +59440,7 @@ The {\bf bubbleSort!} function is executed in its local environment and produces the result. -\setcounter{chapter}{11} % Chapter 12 +%\setcounter{chapter}{11} % Chapter 12 %Original Page 515 @@ -60224,7 +60223,7 @@ for the definition of domains to mention one or more category before the {\tt with}. \index{with} -\setcounter{chapter}{12} % Chapter 13 +%\setcounter{chapter}{12} % Chapter 13 \hyphenation{ Quad-rat-ic-Form @@ -61469,7 +61468,7 @@ How many distinct names of operations involving matrices are there? %following definition should go into ug.sty \gdef\aliascon#1#2{{\bf #1}} -\setcounter{chapter}{13} % Chapter 14 +%\setcounter{chapter}{13} % Chapter 14 % %Original Page 547 @@ -62486,7 +62485,7 @@ For example, for the category default package %Original Page 568 -\setcounter{chapter}{14} % Chapter 15 +%\setcounter{chapter}{14} % Chapter 15 \chapter{What's New in Axiom Version 2.0} \label{ugWhatsNew} @@ -63485,7 +63484,7 @@ compatible with the compiled output from both the old and new compilers. -\setcounter{chapter}{0} % Appendix A +%\setcounter{chapter}{0} % Appendix A \appendix @@ -65795,7 +65794,7 @@ The command synonym {\tt )apropos} is equivalent to {\tt )set} \index{ugSysCmdset}, and {\tt )show} \index{ugSysCmdshow}. -\setcounter{chapter}{1} % Appendix B +%\setcounter{chapter}{1} % Appendix B %Original Page 595 @@ -66429,7 +66428,7 @@ polynomial quoByVar series} -\setcounter{chapter}{2} % Appendix C +%\setcounter{chapter}{2} % Appendix C %\twocolumn[% @@ -68304,7 +68303,7 @@ sorted? swap! vector zero} -\setcounter{chapter}{3} % Appendix D +%\setcounter{chapter}{3} % Appendix D %Original Page 619 @@ -69219,7 +69218,7 @@ listSquaredFactors} % ---------------------------------------------------------------------- -\setcounter{chapter}{4} % Appendix E +%\setcounter{chapter}{4} % Appendix E %%Original Page 627 @@ -85597,7 +85596,7 @@ returns the range of the \smath{z}-coordinates of the points on the curve \smath{c}. } }\onecolumn -\setcounter{chapter}{5} % Appendix F +%\setcounter{chapter}{5} % Appendix F %Original Page 691 @@ -86423,7 +86422,7 @@ drawOneScherk(s) == { -\setcounter{chapter}{6} % Appendix G +%\setcounter{chapter}{6} % Appendix G \chapter{Glossary} \label{ugGlossary} @@ -88345,7 +88344,7 @@ Each interactive {\it frame} has its own workspace. \vfill \eject -\setcounter{chapter}{7} % Appendix H +%\setcounter{chapter}{7} % Appendix H \chapter{License} \begin{verbatim} Portions Copyright (c) 2005 Timothy Daly diff --git a/books/bookvol1.pamphlet b/books/bookvol1.pamphlet index 3f825e1..ca534f1 100644 --- a/books/bookvol1.pamphlet +++ b/books/bookvol1.pamphlet @@ -1,6 +1,8 @@ \documentclass[dvipdfm]{book} \newcommand{\VolumeName}{Volume 1: Axiom Tutorial} \input{bookheader.tex} +\mainmatter +\setcounter{chapter}{0} % Chapter 1 \chapter{Axiom Features} \label{ch:axiom features} \section{Introduction to Axiom} diff --git a/books/bookvol10.1.pamphlet b/books/bookvol10.1.pamphlet index 2afae66..4a1cd0c 100644 --- a/books/bookvol10.1.pamphlet +++ b/books/bookvol10.1.pamphlet @@ -1,6 +1,8 @@ \documentclass[dvipdfm]{book} \newcommand{\VolumeName}{Volume 10: Axiom Algebra: Theory} \input{bookheader.tex} +\mainmatter +\setcounter{chapter}{0} % Chapter 1 \chapter{Integration} An {\sl elementary function} \index{elementary function} diff --git a/books/bookvol10.2.pamphlet b/books/bookvol10.2.pamphlet index 6175142..51223f7 100644 --- a/books/bookvol10.2.pamphlet +++ b/books/bookvol10.2.pamphlet @@ -1,6 +1,8 @@ \documentclass[dvipdfm]{book} \newcommand{\VolumeName}{Volume 10: Axiom Algebra: Categories} \input{bookheader.tex} +\mainmatter +\setcounter{chapter}{0} % Chapter 1 \chapter{Categories} Axiom has 3 main algebra components, Categories, Domains, and Packages. If we make an analogy to dressmaking, you can consider diff --git a/books/bookvol10.3.pamphlet b/books/bookvol10.3.pamphlet index 9a3888f..e685996 100644 --- a/books/bookvol10.3.pamphlet +++ b/books/bookvol10.3.pamphlet @@ -1,6 +1,9 @@ \documentclass[dvipdfm]{book} \newcommand{\VolumeName}{Volume 10: Axiom Algebra: Domains} \input{bookheader.tex} +\mainmatter +\setcounter{secnumdepth}{0} % override the one in bookheader.tex +\setcounter{chapter}{0} % Chapter 1 \chapter{Chapter Overview} This book contains the domains in Axiom, in alphabetical order. diff --git a/books/bookvol10.4.pamphlet b/books/bookvol10.4.pamphlet index 8bba32f..a157e66 100644 --- a/books/bookvol10.4.pamphlet +++ b/books/bookvol10.4.pamphlet @@ -1,6 +1,9 @@ \documentclass[dvipdfm]{book} \newcommand{\VolumeName}{Volume 10: Axiom Algebra: Packages} \input{bookheader.tex} +\mainmatter +\setcounter{chapter}{0} % Chapter 1 +\setcounter{secnumdepth}{0} % override the one in bookheader.tex \chapter{Chapter Overview} This book contains the packages in Axiom, in alphabetical order. diff --git a/books/bookvol10.5.pamphlet b/books/bookvol10.5.pamphlet index 86bf5a9..09485ba 100644 --- a/books/bookvol10.5.pamphlet +++ b/books/bookvol10.5.pamphlet @@ -1,6 +1,9 @@ \documentclass[dvipdfm]{book} \newcommand{\VolumeName}{Volume 10: Axiom Algebra: Numerics} \input{bookheader.tex} +\mainmatter +\setcounter{secnumdepth}{0} % override the one in bookheader.tex +\setcounter{chapter}{0} % Chapter 1 \chapter{Numerical Analysis \cite{4}} We can describe each number as $x^{*}$ which has a machine-representable form which differs from the number $x$ it is intended to represent. diff --git a/books/bookvol10.pamphlet b/books/bookvol10.pamphlet index f0ffdff..04e0405 100644 --- a/books/bookvol10.pamphlet +++ b/books/bookvol10.pamphlet @@ -1,6 +1,8 @@ \documentclass[dvipdfm]{book} \newcommand{\VolumeName}{Volume 10: Axiom Algebra: Implementation} \input{bookheader.tex} +\mainmatter +\setcounter{chapter}{0} % Chapter 1 \chapter{Implementation} \section{Elementary Functions\cite{4}} diff --git a/books/bookvol2.pamphlet b/books/bookvol2.pamphlet index 4f81301..60bcb0c 100644 --- a/books/bookvol2.pamphlet +++ b/books/bookvol2.pamphlet @@ -1,6 +1,8 @@ \documentclass[dvipdfm]{book} \newcommand{\VolumeName}{Volume 2: Axiom Users Guide} \input{bookheader.tex} +\mainmatter +\setcounter{chapter}{0} % Chapter 1 \chapter{Axiom and Category Theory} \section{Covariance and Contravariance} Axiom has an order relation between types. The types can be in one of diff --git a/books/bookvol3.pamphlet b/books/bookvol3.pamphlet index af9e789..8dc8d7c 100644 --- a/books/bookvol3.pamphlet +++ b/books/bookvol3.pamphlet @@ -1,6 +1,9 @@ \documentclass[dvipdfm]{book} \newcommand{\VolumeName}{Volume 3: Axiom Programmers Guide} \input{bookheader.tex} +\mainmatter +\setcounter{chapter}{0} % Chapter 1 +\chapter{Details for Programmers} \section{Makefile} This book is actually a literate program\cite{2} and can contain executable source code. In particular, the Makefile for this book diff --git a/books/bookvol4.pamphlet b/books/bookvol4.pamphlet index 4095046..5e743fb 100644 --- a/books/bookvol4.pamphlet +++ b/books/bookvol4.pamphlet @@ -1,6 +1,9 @@ \documentclass[dvipdfm]{book} \newcommand{\VolumeName}{Volume 4: Axiom Developers Guide} \input{bookheader.tex} +\mainmatter +\setcounter{chapter}{0} % Chapter 1 +\chapter{Details for Axiom Developers} \section{How Axiom Builds} \subsection{The environment variables} Axiom uses a tree of Makefiles to build the system. Each Makefile diff --git a/books/bookvol5.pamphlet b/books/bookvol5.pamphlet index 306f3eb..832a02a 100644 --- a/books/bookvol5.pamphlet +++ b/books/bookvol5.pamphlet @@ -1,6 +1,8 @@ \documentclass[dvipdfm]{book} \newcommand{\VolumeName}{Volume 5: Axiom Interpreter} \input{bookheader.tex} +\mainmatter +\setcounter{chapter}{0} % Chapter 1 \chapter{The Interpreter} The Axiom interpreter is a large common lisp program. It has several forms of interaction and run from @@ -50422,6 +50424,8 @@ Given \verb|("one" "two" "three")| generate \verb|"(one,two,three)"| \end{chunk} \chapter{Browser Support Code} + +\defun{conPage}{conPage} \calls{conPage}{form2HtString} \calls{conPage}{downcase} \calls{conPage}{lassq} @@ -50430,7 +50434,6 @@ Given \verb|("one" "two" "three")| generate \verb|"(one,two,three)"| \calls{conPage}{kPage} \calls{conPage}{ySearch} \usesdollar{conPage}{conArgstrings} -\defun{conPage}{conPage} \begin{chunk}{defun conPage} (defun |conPage| (&rest arglist) (let (|$conArgstrings| form da pageName line a b) @@ -50775,6 +50778,275 @@ There are 8 parts of an htPage: \end{chunk} +\defun{kePage}{kePage} +\calls{kePage}{htpProperty} +\calls{kePage}{concat} +\calls{kePage}{kDomainName} +\calls{kePage}{errorPage} +\calls{kePage}{htpSetProperty} +\calls{kePage}{mkConform} +\calls{kePage}{opOf} +\calls{kePage}{capitalize} +\calls{kePage}{form2HtString} +\calls{kePage}{sublisFormal} +\calls{kePage}{ifcdr} +\calls{kePage}{getConstructorExports} +\calls{kePage}{simpHasPred} +\calls{kePage}{pluralSay} +\calls{kePage}{length} +\calls{kePage}{htInitPage} +\calls{kePage}{htCopyProplist} +\calls{kePage}{htSayStandard} +\calls{kePage}{htpSetProperty} +\calls{kePage}{htMakePage} +\calls{kePage}{menuButton} +\calls{kePage}{htSay} +\calls{kePage}{bcConPredTable} +\calls{kePage}{htBigSkip} +\calls{kePage}{kePageDisplay} +\calls{kePage}{kePageOpAlist} +\calls{kePage}{htSowPage} +\usesdollar{kePage}{confomrsAreDomains} +\begin{chunk}{defun kePage} +(defun |kePage| (htPage junk) + (declare (ignore junk)) + (let (|$conformsAreDomains| lt1 kind name nargs args constring domname + conform conname heading data conlist attrlist oplist prefix page) + (declare (special |$conformsAreDomains|)) + (setq lt1 (|htpProperty| htPage '|TPDparts|)) + (setq kind (first lt1)) + (setq name (second lt1)) + (setq nargs (third lt1)) + (setq args (sixth lt1)) + (setq constring (concat name args)) + (setq domname (|kDomainName| htPage kind name nargs)) + (cond + ((and (consp domname) (eq (qcar domname) '|error|)) + (|errorPage| htPage domname)) + (t + (|htpSetProperty| htPage '|domname| domname) + (setq |$conformsAreDomains| domname) + (setq conform (|mkConform| kind name args)) + (setq conname (|opOf| conform)) + (setq heading + (list (|capitalize| kind) " {\\sf " + (if domname (|form2HtString| domname nil t) constring) "}" )) + (setq data + (|sublisFormal| + (or (ifcdr domname) (cdr conform)) + (|getConstructorExports| (or domname conform) t))) + (setq conlist (car data)) + (setq attrlist (cadr data)) + (setq oplist (cddr data)) + (when domname + (dolist (x conlist) (rplac (cdr x) (|simpHasPred| (cdr x)))) + (dolist (x attrlist) (rplac (cddr x) (|simpHasPred| (cddr x)))) + (dolist (x oplist) (rplac (cddr x) (|simpHasPred| (cddr x))))) + (setq prefix + (|pluralSay| (+ (+ (|#| conlist) (|#| attrlist)) (|#| oplist)) + "Export" "Exports")) + (setq page + (|htInitPage| (append prefix (cons " of " heading)) + (|htCopyProplist| htPage))) + (|htSayStandard| "\\beginmenu ") + (|htpSetProperty| page '|data| data) + (when conlist + (|htMakePage| + (list + (list '|bcLinks| + (list (|menuButton|) "" '|dbShowCons1| conlist '|names|)))) + (|htSayStandard| "\\tab{2}") + (|htSay| "All attributes and operations from:") + (|bcConPredTable| conlist (|opOf| conform) (cdr conform))) + (when attrlist + (when conlist (|htBigSkip|)) + (|kePageDisplay| page "attribute" (|kePageOpAlist| attrlist))) + (when oplist + (when (or conlist attrlist) (|htBigSkip|)) + (|kePageDisplay| page "operation" (|kePageOpAlist| oplist))) + (|htSayStandard| " \\endmenu ") + (|htShowPage|))))) + +\end{chunk} + +\defun{kePageOpAlist}{kePageOpAlist} +\calls{kePageOpAlist}{lassoc} +\calls{kePageOpAlist}{insertAlist} +\calls{kePageOpAlist}{zeroOneConvert} +\begin{chunk}{defun kePageOpAlist} +(defun |kePageOpAlist| (oplist) + (let (op sig pred u opAlist) + (dolist (item oplist) + (setq op (car item)) + (setq sig (cadr item)) + (setq pred (cddr item)) + (setq u (lassoc op opAlist)) + (setq opAlist + (|insertAlist| (|zeroOneConvert| op) + (cons (list sig pred) u) + opAlist))) + opAlist)) + +\end{chunk} + +\defun{kePageDisplay}{kePageDisplay} +\calls{kePageDisplay}{length} +\calls{kePageDisplay}{htpSetProperty} +\calls{kePageDisplay}{htMakePage} +\calls{kePageDisplay}{menuButton} +\calls{kePageDisplay}{htSayStandard} +\calls{kePageDisplay}{htSay} +\calls{kePageDisplay}{stringimage} +\calls{kePageDisplay}{pluralize} +\calls{kePageDisplay}{htSaySaturn} +\calls{kePageDisplay}{dbGatherData} +\calls{kePageDisplay}{dbSowOpItems} +\begin{chunk}{defun kePageDisplay} +(defun |kePageDisplay| (htPage which opAlist) + (let (count total expandProperty data) + (setq count (|#| opAlist)) + (cond + ((eql count 0) nil) + (t + (setq total + (apply #'+ (loop for entry in opAlist collect (|#| (cdr entry))))) + (if (string= which "operation") + (|htpSetProperty| htPage '|opAlist| opAlist) + (|htpSetProperty| htPage '|attrAlist| opAlist)) + (setq expandProperty + (if (string= which "operation") + '|expandOperations| + '|expandAttributes|)) + (|htpSetProperty| htPage expandProperty '|lists|) + (|htMakePage| + (list + (list '|bcLinks| (list (|menuButton|) "" '|dbShowOps| which '|names|)))) + (|htSayStandard| "\\tab{2}") + (unless (= count total) + (if (eql count 1) + (|htSay| "1 name for ") + (|htSay| (stringimage count) " names for "))) + (if (> total 1) + (|htSay| (stringimage total) " " (|pluralize| which) + " are explicitly exported:") + (|htSay| "1 " which " is explicitly exported:")) + (|htSaySaturn| "\\\\") + (setq data (|dbGatherData| htPage opAlist which '|names|)) + (|dbShowOpItems| which data nil))))) + +\end{chunk} + +\defun{ksPage}{ksPage} +\calls{ksPage}{htpProperty} +\calls{ksPage}{kDomainName} +\calls{ksPage}{errorPage} +\calls{ksPage}{form2HtString} +\calls{ksPage}{htpSetProperty} +\calls{ksPage}{htInitPageNoScroll} +\calls{ksPage}{htCopyProplist} +\calls{ksPage}{htSay} +\calls{ksPage}{htSayStandard} +\calls{ksPage}{dbSearchOrder} +\calls{ksPage}{dbShowCons} +\begin{chunk}{defun ksPage} +(defun |ksPage| (htPage junk) + (declare (ignore junk)) + (let (lt1 kind name nargs domname heading domain conform page u) + (setq lt1 (|htpProperty| htPage '|parts|)) + (setq kind (first lt1)) + (setq name (second lt1)) + (setq nargs (third lt1)) + (setq domname (|kDomainName| htPage kind name nargs)) + (cond + ((and (consp domname) (eq (qcar domname) '|error|)) + (|errorPage| htPage domname)) + (t + (setq heading + (if (null domname) + (|htpProperty| htPage '|heading|) + (list "{\\sf " (|form2HtString| domname nil t) "}"))) + (when domname + (|htpSetProperty| htPage '|domname| domname) + (|htpSetProperty| htPage '|heading| heading)) + (setq domain (unless (string= kind "category") (eval domname))) + (setq conform (|htpProperty| htPage '|conform|)) + (setq page + (|htInitPageNoScroll| (|htCopyProplist| htPage) + (cons "Search order for " heading))) + (|htSay| (concat + "When an operation is not defined by the domain, the following " + "domains are searched in order for a \"default definition")) + (|htSayStandard| "\\beginscroll ") + (setq u (|dbSearchOrder| conform domname domain)) + (|htpSetProperty| htPage '|cAlist| u) + (|htpSetProperty| htPage '|thing| "constructor") + (|dbShowCons| htPage '|names|))))) + +\end{chunk} + +\defun{dbSearchOrder}{dbSearchOrder} +\calls{dbSearchOrder}{opOf} +\calls{dbSearchOrder}{dbInfovec} +\calls{dbSearchOrder}{getdatabase} +\calls{dbSearchOrder}{simpCatPredicate} +\calls{dbSearchOrder}{sublislis} +\calls{dbSearchOrder}{kTestPred} +\calls{dbSearchOrder}{msubst} +\calls{dbSearchOrder}{devaluate} +\calls{dbSearchOrder}{kFormatSlotDomain} +\calls{dbSearchOrder}{dbSubConform} +\calls{dbSearchOrder}{dbAddChain} +\usesdollar{dbSearchOrder}{domain} +\usesdollar{dbSearchOrder}{infovec} +\usesdollar{dbSearchOrder}{predvec} +\begin{chunk}{defun dbSearchOrder} +(defun |dbSearchOrder| (conform domname |$domain|) + (declare (special |$domain|)) + (let (|$infovec| name u catpredvec catinfo catvec p pred pak catform res + catforms t1) + (declare (special |$infovec| |$predvec|)) + (setq conform (or domname conform)) + (setq name (|opOf| conform)) + (setq |$infovec| (|dbInfovec| name)) + (when |$infovec| + (setq u (elt |$infovec| 3)) + (setq |$predvec| + (if |$domain| (elt |$domain| 3) (getdatabase name 'predicates))) + (setq catpredvec (car u)) + (setq catinfo (cadr u)) + (setq catvec (caddr u)) + (setq catforms + (dotimes (i (maxindex catvec) (nreverse0 t1)) + (cond + ((progn + (setq pred + (|simpCatPredicate| + (progn + (setq p + (sublislis (cdr conform) |$FormalMapVariableList| + (|kTestPred| (elt catpredvec i)))) + (if |$domain| (eval p) p)))) + (when (and domname (contained '$ pred)) + (setq pred (msubst domname '$ pred))) + (and (setq pak (elt catinfo i)) pred)) + (setq t1 + (cons + (cons + (cond + ((and pak (null (identp pak))) + (|devaluate| pak)) + (t + (setq catform (|kFormatSlotDomain| (elt catvec i))) + (setq res (|dbSubConform| (cdr conform) + (cons pak (cons '$ (cdr catform))))) + (when domname (setq res (msubst domname '$ res))) + res)) + pred) + t1)))))) + (append (|dbAddChain| conform) catforms)))) + +\end{chunk} + \chapter{The Interpreter} \begin{chunk}{Interpreter} (setq *print-array* nil) @@ -51371,6 +51643,7 @@ There are 8 parts of an htPage: \getchunk{defun DaaseName} \getchunk{defun dbNonEmptyPattern} +\getchunk{defun dbSearchOrder} \getchunk{defun decideHowMuch} \getchunk{defun defaultTargetFE} \getchunk{defun defiostream} @@ -51743,7 +52016,11 @@ There are 8 parts of an htPage: \getchunk{defun kArgPage} \getchunk{defun kdPageInfo} \getchunk{defun KeepPart?} +\getchunk{defun kePage} +\getchunk{defun kePageDisplay} +\getchunk{defun kePageOpAlist} \getchunk{defun kiPage} +\getchunk{defun ksPage} \getchunk{defun lassocSub} \getchunk{defun lastTokPosn} diff --git a/books/bookvol6.pamphlet b/books/bookvol6.pamphlet index 8c0cc1a..c53f5a4 100644 --- a/books/bookvol6.pamphlet +++ b/books/bookvol6.pamphlet @@ -1,6 +1,8 @@ \documentclass[dvipdfm]{book} \newcommand{\VolumeName}{Volume 6: Axiom Command} \input{bookheader.tex} +\mainmatter +\setcounter{chapter}{0} % Chapter 1 \chapter{Overview} The axiom system consists of a set of processes managed by the superman process. The superman process, called sman, is normally diff --git a/books/bookvol7.1.pamphlet b/books/bookvol7.1.pamphlet index 28b88ec..536b1a4 100644 --- a/books/bookvol7.1.pamphlet +++ b/books/bookvol7.1.pamphlet @@ -1,6 +1,8 @@ \documentclass[dvipdfm]{book} \newcommand{\VolumeName}{Volume 7.1: Axiom Hyperdoc Pages} \input{bookheader.tex} +\mainmatter +\setcounter{chapter}{0} % Chapter 1 \chapter{Release Notes} \section{releasenotes.ht} \pagetitle{releaseNotes}{releasenotes.ht}{What is new in Axiom} diff --git a/books/bookvol7.pamphlet b/books/bookvol7.pamphlet index c6ee501..3ae0249 100644 --- a/books/bookvol7.pamphlet +++ b/books/bookvol7.pamphlet @@ -1,6 +1,8 @@ \documentclass[dvipdfm]{book} \newcommand{\VolumeName}{Volume 7: Axiom Hyperdoc} \input{bookheader.tex} +\mainmatter +\setcounter{chapter}{0} % Chapter 1 \chapter{Overview} This book covers 5 top level commands that make up the Axiom Hyperdoc diff --git a/books/bookvol8.1.pamphlet b/books/bookvol8.1.pamphlet index eb1653d..35747e7 100644 --- a/books/bookvol8.1.pamphlet +++ b/books/bookvol8.1.pamphlet @@ -1,6 +1,8 @@ \documentclass[dvipdfm]{book} \newcommand{\VolumeName}{Volume 8.1: Axiom Gallery} \input{bookheader.tex} +\mainmatter +\setcounter{chapter}{0} % Chapter 1 \chapter{General examples} These examples come from code that ships with Axiom in various input files. diff --git a/books/bookvol8.pamphlet b/books/bookvol8.pamphlet index db8d8f4..eb32ac6 100644 --- a/books/bookvol8.pamphlet +++ b/books/bookvol8.pamphlet @@ -1,6 +1,8 @@ \documentclass[dvipdfm]{book} \newcommand{\VolumeName}{Volume 8: Axiom Graphics} \input{bookheader.tex} +\mainmatter +\setcounter{chapter}{0} % Chapter 1 \chapter{Overview} \label{Overview} This book contains 5 programs, all related to the graphics subsystem. diff --git a/books/bookvol9.pamphlet b/books/bookvol9.pamphlet index 1efe91c..919a824 100644 --- a/books/bookvol9.pamphlet +++ b/books/bookvol9.pamphlet @@ -1,6 +1,9 @@ \documentclass[dvipdfm]{book} \newcommand{\VolumeName}{Volume 9: Axiom Compiler} \input{bookheader.tex} +\mainmatter +\setcounter{chapter}{0} % Chapter 1 +\chapter{The Axiom Compiler} \section{Makefile} This book is actually a literate program\cite{2} and contains executable source code. In particular, the Makefile for this book diff --git a/changelog b/changelog index 7c5d723..a6ec1bf 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,26 @@ +20130528 tpd src/axiom-website/patches.html 20130528.01.tpd.patch +20130528 tpd src/interp/br-con.lisp rewrite functions into bookvol5 +20130528 tpd src/interp/util.lisp remove autoload trigger functions +20130528 tpd books/bookvol10.5 standardize the table of contents +20130528 tpd books/bookvol10.4 standardize the table of contents +20130528 tpd books/bookvol10.3 standardize the table of contents +20130528 tpd books/bookvol10.2 standardize the table of contents +20130528 tpd books/bookvol10.1 standardize the table of contents +20130528 tpd books/bookvol10 standardize the table of contents +20130528 tpd books/bookvol9 standardize the table of contents +20130528 tpd books/bookvol8.1 standardize the table of contents +20130528 tpd books/bookvol8 standardize the table of contents +20130528 tpd books/bookvol7.1 standardize the table of contents +20130528 tpd books/bookvol7 standardize the table of contents +20130528 tpd books/bookvol6 standardize the table of contents +20130528 tpd books/bookvol5 standardize the table of contents +20130528 tpd books/bookvol4 standardize the table of contents +20130528 tpd books/bookvol3 standardize the table of contents +20130528 tpd books/bookvol2 standardize the table of contents +20130528 tpd books/bookvol1 standardize the table of contents +20130528 tpd books/bookvol0 standardize the table of contents +20130528 tpd books/bookheader.tex standardize the table of contents +20130528 tpd books/Makefile standardize the table of contents 20130526 tpd src/axiom-website/patches.html 20130526.03.tpd.patch 20130526 tpd src/interp/br-con.lisp incremental rewrite of br-con.lisp 20130526 tpd books/bookvol5 incremental rewrite of br-con.lisp diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index 04bc71b..629cfb0 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -4185,6 +4185,8 @@ books/bookvol10.* fix failing test cases src/interp/regress.lisp improve diff output 20130526.03.tpd.patch books/bookvol5 incremental rewrite of br-con.lisp +20130528.01.tpd.patch +books/bookvol* standardize the table of contents diff --git a/src/interp/br-con.lisp.pamphlet b/src/interp/br-con.lisp.pamphlet index 060a2df..e478a0e 100644 --- a/src/interp/br-con.lisp.pamphlet +++ b/src/interp/br-con.lisp.pamphlet @@ -12,461 +12,6 @@ \begin{chunk}{*} (IN-PACKAGE "BOOT" ) -;kePage(htPage,junk) == -; [kind,name,nargs,xflag,sig,args,abbrev,comments] := htpProperty(htPage,'parts) -; constring := STRCONC(name,args) -; domname := kDomainName(htPage,kind,name,nargs) -; domname is ['error,:.] => errorPage(htPage,domname) -; htpSetProperty(htPage,'domname,domname) -; $conformsAreDomains: local := domname -; conform := mkConform(kind,name,args) -; conname := opOf conform -; heading := [capitalize kind,'" {\sf ", -; (domname => form2HtString(domname,nil,true); constring),'"}"] -; data := sublisFormal(IFCDR domname or rest conform, -; getConstructorExports((domname or conform),true)) -; [conlist,attrlist,:oplist] := data -; if domname then -; for x in conlist repeat RPLAC(CDR x,simpHasPred CDR x) -; for x in attrlist repeat RPLAC(CDDR x,simpHasPred CDDR x) -; for x in oplist repeat RPLAC(CDDR x,simpHasPred CDDR x) -; prefix := pluralSay(#conlist + #attrlist + #oplist,'"Export",'"Exports") -; page := htInitPage([:prefix,'" of ",:heading],htCopyProplist htPage) -; htSayStandard '"\beginmenu " -; htpSetProperty(page,'data,data) -; if conlist then -; htMakePage [['bcLinks,[menuButton(),'"",'dbShowCons1,conlist,'names]]] -; htSayStandard '"\tab{2}" -; htSay '"All attributes and operations from:" -; bcConPredTable(conlist,opOf conform,rest conform) -; if attrlist then -; if conlist then htBigSkip() -; kePageDisplay(page,'"attribute",kePageOpAlist attrlist) -; if oplist then -; if conlist or attrlist then htBigSkip() -; kePageDisplay(page,'"operation",kePageOpAlist oplist) -; htSayStandard '" \endmenu " -; htShowPage() - -(DEFUN |kePage| (|htPage| |junk|) - (declare (ignore |junk|)) - (PROG (|$conformsAreDomains| |LETTMP#1| |kind| |name| |nargs| |xflag| - |sig| |args| |abbrev| |comments| |constring| |domname| - |conform| |conname| |heading| |data| |conlist| |attrlist| - |oplist| |prefix| |page|) - (DECLARE (SPECIAL |$conformsAreDomains|)) - (RETURN - (SEQ (PROGN - (SPADLET |LETTMP#1| (|htpProperty| |htPage| '|parts|)) - (SPADLET |kind| (CAR |LETTMP#1|)) - (SPADLET |name| (CADR |LETTMP#1|)) - (SPADLET |nargs| (CADDR |LETTMP#1|)) - (SPADLET |xflag| (CADDDR |LETTMP#1|)) - (SPADLET |sig| (CAR (CDDDDR |LETTMP#1|))) - (SPADLET |args| (CADR (CDDDDR |LETTMP#1|))) - (SPADLET |abbrev| (CADDR (CDDDDR |LETTMP#1|))) - (SPADLET |comments| (CADDDR (CDDDDR |LETTMP#1|))) - (SPADLET |constring| (STRCONC |name| |args|)) - (SPADLET |domname| - (|kDomainName| |htPage| |kind| |name| |nargs|)) - (COND - ((AND (CONSP |domname|) (EQ (QCAR |domname|) '|error|)) - (|errorPage| |htPage| |domname|)) - ('T (|htpSetProperty| |htPage| '|domname| |domname|) - (SPADLET |$conformsAreDomains| |domname|) - (SPADLET |conform| (|mkConform| |kind| |name| |args|)) - (SPADLET |conname| (|opOf| |conform|)) - (SPADLET |heading| - (CONS (|capitalize| |kind|) - (CONS " {\\sf " - (CONS - (COND - (|domname| - (|form2HtString| |domname| NIL - 'T)) - ('T |constring|)) - (CONS "}" NIL))))) - (SPADLET |data| - (|sublisFormal| - (OR (IFCDR |domname|) (CDR |conform|)) - (|getConstructorExports| - (OR |domname| |conform|) 'T))) - (SPADLET |conlist| (CAR |data|)) - (SPADLET |attrlist| (CADR |data|)) - (SPADLET |oplist| (CDDR |data|)) - (COND - (|domname| - (DO ((G166133 |conlist| (CDR G166133)) - (|x| NIL)) - ((OR (ATOM G166133) - (PROGN (SETQ |x| (CAR G166133)) NIL)) - NIL) - (SEQ (EXIT (RPLAC (CDR |x|) - (|simpHasPred| (CDR |x|)))))) - (DO ((G166142 |attrlist| (CDR G166142)) - (|x| NIL)) - ((OR (ATOM G166142) - (PROGN (SETQ |x| (CAR G166142)) NIL)) - NIL) - (SEQ (EXIT (RPLAC (CDDR |x|) - (|simpHasPred| (CDDR |x|)))))) - (DO ((G166151 |oplist| (CDR G166151)) - (|x| NIL)) - ((OR (ATOM G166151) - (PROGN (SETQ |x| (CAR G166151)) NIL)) - NIL) - (SEQ (EXIT (RPLAC (CDDR |x|) - (|simpHasPred| (CDDR |x|)))))))) - (SPADLET |prefix| - (|pluralSay| - (PLUS (PLUS (|#| |conlist|) - (|#| |attrlist|)) - (|#| |oplist|)) - "Export" - "Exports")) - (SPADLET |page| - (|htInitPage| - (APPEND |prefix| - (CONS " of " - |heading|)) - (|htCopyProplist| |htPage|))) - (|htSayStandard| "\\beginmenu ") - (|htpSetProperty| |page| '|data| |data|) - (COND - (|conlist| - (|htMakePage| - (CONS (CONS '|bcLinks| - (CONS - (CONS (|menuButton|) - (CONS "" - (CONS '|dbShowCons1| - (CONS |conlist| - (CONS '|names| NIL))))) - NIL)) - NIL)) - (|htSayStandard| "\\tab{2}") - (|htSay| "All attributes and operations from:") - (|bcConPredTable| |conlist| (|opOf| |conform|) - (CDR |conform|)))) - (COND - (|attrlist| (COND (|conlist| (|htBigSkip|))) - (|kePageDisplay| |page| "attribute" - (|kePageOpAlist| |attrlist|)))) - (COND - (|oplist| - (COND ((OR |conlist| |attrlist|) (|htBigSkip|))) - (|kePageDisplay| |page| "operation" - (|kePageOpAlist| |oplist|)))) - (|htSayStandard| " \\endmenu ") - (|htShowPage|)))))))) - -;kePageOpAlist oplist == -; opAlist := nil -; for [op,sig,:pred] in oplist repeat -; u := LASSOC(op,opAlist) -;--was -;-- opAlist := insertAlist(op,[[sig,pred],:u],opAlist) -; opAlist := insertAlist(zeroOneConvert op,[[sig,pred],:u],opAlist) -; opAlist - -(DEFUN |kePageOpAlist| (|oplist|) - (PROG (|op| |sig| |pred| |u| |opAlist|) - (RETURN - (SEQ (PROGN - (SPADLET |opAlist| NIL) - (DO ((G166196 |oplist| (CDR G166196)) (G166184 NIL)) - ((OR (ATOM G166196) - (PROGN (SETQ G166184 (CAR G166196)) NIL) - (PROGN - (PROGN - (SPADLET |op| (CAR G166184)) - (SPADLET |sig| (CADR G166184)) - (SPADLET |pred| (CDDR G166184)) - G166184) - NIL)) - NIL) - (SEQ (EXIT (PROGN - (SPADLET |u| (LASSOC |op| |opAlist|)) - (SPADLET |opAlist| - (|insertAlist| - (|zeroOneConvert| |op|) - (CONS - (CONS |sig| (CONS |pred| NIL)) - |u|) - |opAlist|)))))) - |opAlist|))))) - -;kePageDisplay(htPage,which,opAlist) == -; count := #opAlist -; total := +/[#(rest entry) for entry in opAlist] -; count = 0 => nil -; if which = '"operation" -; then htpSetProperty(htPage,'opAlist,opAlist) -; else htpSetProperty(htPage,'attrAlist,opAlist) -; expandProperty := -; which = '"operation" => 'expandOperations -; 'expandAttributes -; htpSetProperty(htPage,expandProperty,'lists) --mark as unexpanded -; htMakePage [['bcLinks,[menuButton(),'"",'dbShowOps,which,'names]]] -; htSayStandard '"\tab{2}" -; if count ^= total then -; if count = 1 -; then htSay('"1 name for ") -; else htSay(STRINGIMAGE count,'" names for ") -; if total > 1 -; then htSay(STRINGIMAGE total,'" ",pluralize which,'" are explicitly exported:") -; else htSay('"1 ",which,'" is explicitly exported:") -; htSaySaturn '"\\" -; data := dbGatherData(htPage,opAlist,which,'names) -; dbShowOpItems(which,data,false) - -(DEFUN |kePageDisplay| (|htPage| |which| |opAlist|) - (PROG (|count| |total| |expandProperty| |data|) - (RETURN - (SEQ (PROGN - (SPADLET |count| (|#| |opAlist|)) - (SPADLET |total| - (PROG (G166214) - (SPADLET G166214 0) - (RETURN - (DO ((G166219 |opAlist| (CDR G166219)) - (|entry| NIL)) - ((OR (ATOM G166219) - (PROGN - (SETQ |entry| (CAR G166219)) - NIL)) - G166214) - (SEQ (EXIT (SETQ G166214 - (PLUS G166214 - (|#| (CDR |entry|)))))))))) - (COND - ((EQL |count| 0) NIL) - ('T - (COND - ((BOOT-EQUAL |which| "operation") - (|htpSetProperty| |htPage| '|opAlist| |opAlist|)) - ('T - (|htpSetProperty| |htPage| '|attrAlist| |opAlist|))) - (SPADLET |expandProperty| - (COND - ((BOOT-EQUAL |which| - "operation") - '|expandOperations|) - ('T '|expandAttributes|))) - (|htpSetProperty| |htPage| |expandProperty| '|lists|) - (|htMakePage| - (CONS (CONS '|bcLinks| - (CONS (CONS (|menuButton|) - (CONS "" - (CONS '|dbShowOps| - (CONS |which| - (CONS '|names| NIL))))) - NIL)) - NIL)) - (|htSayStandard| "\\tab{2}") - (COND - ((NEQUAL |count| |total|) - (COND - ((EQL |count| 1) - (|htSay| "1 name for ")) - ('T - (|htSay| (STRINGIMAGE |count|) - " names for "))))) - (COND - ((> |total| 1) - (|htSay| (STRINGIMAGE |total|) " " - (|pluralize| |which|) - " are explicitly exported:")) - ('T - (|htSay| "1 " |which| - " is explicitly exported:"))) - (|htSaySaturn| "\\\\") - (SPADLET |data| - (|dbGatherData| |htPage| |opAlist| |which| - '|names|)) - (|dbShowOpItems| |which| |data| NIL)))))))) - -;ksPage(htPage,junk) == -; [kind,name,nargs,xpart,sig,args,abbrev,comments] := htpProperty(htPage,'parts) -; domname := kDomainName(htPage,kind,name,nargs) -; domname is ['error,:.] => errorPage(htPage,domname) -; heading := -; null domname => htpProperty(htPage,'heading) -; ['"{\sf ",form2HtString(domname,nil,true),'"}"] -; if domname then -; htpSetProperty(htPage,'domname,domname) -; htpSetProperty(htPage,'heading,heading) -; domain := (kind = '"category" => nil; EVAL domname) -; conform:= htpProperty(htPage,'conform) -; page := htInitPageNoScroll(htCopyProplist htPage, -; ['"Search order for ",:heading]) -; htSay '"When an operation is not defined by the domain, the following domains are searched in order for a _"default definition" -; htSayStandard '"\beginscroll " -; u := dbSearchOrder(conform,domname,domain) -; htpSetProperty(htPage,'cAlist,u) -; htpSetProperty(htPage,'thing,'"constructor") -; dbShowCons(htPage,'names) - -(DEFUN |ksPage| (|htPage| |junk|) - (declare (ignore |junk|)) - (PROG (|LETTMP#1| |kind| |name| |nargs| |xpart| |sig| |args| |abbrev| - |comments| |domname| |heading| |domain| |conform| |page| - |u|) - (RETURN - (PROGN - (SPADLET |LETTMP#1| (|htpProperty| |htPage| '|parts|)) - (SPADLET |kind| (CAR |LETTMP#1|)) - (SPADLET |name| (CADR |LETTMP#1|)) - (SPADLET |nargs| (CADDR |LETTMP#1|)) - (SPADLET |xpart| (CADDDR |LETTMP#1|)) - (SPADLET |sig| (CAR (CDDDDR |LETTMP#1|))) - (SPADLET |args| (CADR (CDDDDR |LETTMP#1|))) - (SPADLET |abbrev| (CADDR (CDDDDR |LETTMP#1|))) - (SPADLET |comments| (CADDDR (CDDDDR |LETTMP#1|))) - (SPADLET |domname| - (|kDomainName| |htPage| |kind| |name| |nargs|)) - (COND - ((AND (CONSP |domname|) (EQ (QCAR |domname|) '|error|)) - (|errorPage| |htPage| |domname|)) - ('T - (SPADLET |heading| - (COND - ((NULL |domname|) - (|htpProperty| |htPage| '|heading|)) - ('T - (CONS "{\\sf " - (CONS (|form2HtString| |domname| NIL 'T) - (CONS "}" NIL)))))) - (COND - (|domname| - (|htpSetProperty| |htPage| '|domname| |domname|) - (|htpSetProperty| |htPage| '|heading| |heading|))) - (SPADLET |domain| - (COND - ((BOOT-EQUAL |kind| "category") NIL) - ('T (EVAL |domname|)))) - (SPADLET |conform| (|htpProperty| |htPage| '|conform|)) - (SPADLET |page| - (|htInitPageNoScroll| (|htCopyProplist| |htPage|) - (CONS "Search order for " - |heading|))) - (|htSay| "When an operation is not defined by the domain, the following domains are searched in order for a \"default definition") - (|htSayStandard| "\\beginscroll ") - (SPADLET |u| (|dbSearchOrder| |conform| |domname| |domain|)) - (|htpSetProperty| |htPage| '|cAlist| |u|) - (|htpSetProperty| |htPage| '|thing| - "constructor") - (|dbShowCons| |htPage| '|names|))))))) - -;dbSearchOrder(conform,domname,$domain) == --domain = nil or set to live domain -; conform := domname or conform -; name:= opOf conform -; $infovec: local := dbInfovec name or return nil --exit for categories -; u := $infovec.3 -; $predvec:= -; $domain => $domain . 3 -; GETDATABASE(name,'PREDICATES) -; catpredvec := CAR u -; catinfo := CADR u -; catvec := CADDR u -; catforms := [[pakform,:pred] for i in 0..MAXINDEX catvec | test ] where -; test == -; pred := simpCatPredicate -; p:=SUBLISLIS(rest conform,$FormalMapVariableList,kTestPred catpredvec.i) -; $domain => EVAL p -; p -; if domname and CONTAINED('$,pred) then pred := SUBST(domname,'$,pred) -;-- which = '"attribute" => pred --all categories -; (pak := catinfo . i) and pred --only those with default packages -; pakform == -; pak and not IDENTP pak => devaluate pak --in case it has been instantiated -; catform := kFormatSlotDomain catvec . i -;-- which = '"attribute" => dbSubConform(rest conform,catform) -; res := dbSubConform(rest conform,[pak,"$",:rest catform]) -; if domname then res := SUBST(domname,'$,res) -; res -; [:dbAddChain conform,:catforms] - -(DEFUN |dbSearchOrder| (|conform| |domname| |$domain|) - (DECLARE (SPECIAL |$domain|)) - (PROG (|$infovec| |name| |u| |catpredvec| |catinfo| |catvec| |p| - |pred| |pak| |catform| |res| |catforms|) - (DECLARE (SPECIAL |$infovec| |$predvec|)) - (RETURN - (SEQ (PROGN - (SPADLET |conform| (OR |domname| |conform|)) - (SPADLET |name| (|opOf| |conform|)) - (SPADLET |$infovec| - (OR (|dbInfovec| |name|) (RETURN NIL))) - (SPADLET |u| (ELT |$infovec| 3)) - (SPADLET |$predvec| - (COND - (|$domain| (ELT |$domain| 3)) - ('T (GETDATABASE |name| 'PREDICATES)))) - (SPADLET |catpredvec| (CAR |u|)) - (SPADLET |catinfo| (CADR |u|)) - (SPADLET |catvec| (CADDR |u|)) - (SPADLET |catforms| - (PROG (G166285) - (SPADLET G166285 NIL) - (RETURN - (DO ((G166291 (MAXINDEX |catvec|)) - (|i| 0 (QSADD1 |i|))) - ((QSGREATERP |i| G166291) - (NREVERSE0 G166285)) - (SEQ (EXIT (COND - ((PROGN - (SPADLET |pred| - (|simpCatPredicate| - (PROGN - (SPADLET |p| - (SUBLISLIS - (CDR |conform|) - |$FormalMapVariableList| - (|kTestPred| - (ELT |catpredvec| - |i|)))) - (COND - (|$domain| - (EVAL |p|)) - ('T |p|))))) - (COND - ((AND |domname| - (CONTAINED '$ |pred|)) - (SPADLET |pred| - (MSUBST |domname| '$ - |pred|)))) - (AND - (SPADLET |pak| - (ELT |catinfo| |i|)) - |pred|)) - (SETQ G166285 - (CONS - (CONS - (COND - ((AND |pak| - (NULL (IDENTP |pak|))) - (|devaluate| |pak|)) - ('T - (SPADLET |catform| - (|kFormatSlotDomain| - (ELT |catvec| |i|))) - (SPADLET |res| - (|dbSubConform| - (CDR |conform|) - (CONS |pak| - (CONS '$ - (CDR |catform|))))) - (COND - (|domname| - (SPADLET |res| - (MSUBST |domname| - '$ |res|)))) - |res|)) - |pred|) - G166285)))))))))) - (APPEND (|dbAddChain| |conform|) |catforms|)))))) - ;kcPage(htPage,junk) == ; [kind,name,nargs,xpart,sig,args,abbrev,comments] := htpProperty(htPage,'parts) ; domname := kDomainName(htPage,kind,name,nargs) diff --git a/src/interp/util.lisp.pamphlet b/src/interp/util.lisp.pamphlet index 5190b7f..69a3900 100644 --- a/src/interp/util.lisp.pamphlet +++ b/src/interp/util.lisp.pamphlet @@ -520,7 +520,6 @@ if you use the browse function of the {\bf hypertex} system. |dbComments| |grepConstruct| |cSearch| - |conPage| |dbName| |dbPart| |form2HtString|