0`{\em (syntax)} Suffix character for \spadgloss{destructive operations}.
4`{\em (syntax)} a separator for items in a \spadgloss{tuple}, \spadignore{e.g.} to separate arguments of a function \spad{f(x,y)}.
9`{\em (syntax)} the expression \spad{a => b} is equivalent to \spad{if a then} \spadgloss{exit} \spad{b}.
16`1. {\em (syntax)} a suffix character for Boolean-valued \spadfun{function} names, \spadignore{e.g.} \spadfun{odd?}. 2. Suffix character for pattern variables. 3. The special type \spad{?} means {\em don't care}. For example, the declaration \newline\centerline{\spad{x : Polynomial ?}}\newline, means that values assigned to \spad{x} must be polynomials over an arbitrary \spadgloss{underlying domain}.
22`a programming language principle used in \Language{} where a datatype is defined in two parts: (1) a {\em public} part describing a set of \spadgloss{exports}, principally operations that apply to objects of that type, and (2) a {\em private} part describing the implementation of the datatype usually in terms of a \spadgloss{representation} for objects of the type. Programs which create and otherwise manipulate objects of the type may only do so through its exports. The representation and other implementation information is specifically hidden.
44`described functionally or conceptually without regard to implementation
61`the degree of exactness of an approximation or measurement. In computer algebra systems, computations are typically carried out with complete accuracy using integers or rational numbers of indefinite size. Domain \spadtype{Float} provides a function \spadfunFrom{precision}{Float} to change the precision for floating point computations. Computations using \spadtype{DoubleFloat} have a fixed precision but uncertain accuracy.
75`a hierarchy formed by \spadgloss{domain extensions}. If domain \spad{A} extends domain \spad{B} and domain \spad{B} extends domain \spad{C}, then \spad{A} has {\em add-chain} \spad{B}-\spad{C}.
90`a data structure designed to hold multiple values. Examples of aggregates are \spadtype{List}, \spadtype{Set}, \spadtype{Matrix} and \spadtype{Bits}.
105`a step-by-step procedure for a solution of a problem; a program
120`(of a domain) a category which is a \spadgloss{parent} of the domain, or a \spadgloss{parent} of a \spadgloss{parent}, and so on.
134`{\em (syntax)} an expression denoting "application" of a function to a set of \spadgloss{argument} parameters. Applications are written as a \spadgloss{parameterized form}. For example, the form \spad{f(x,y)} indicates the "application of the function \spad{f} to the tuple of arguments \spad{x} and \spad{y}". See also \spadgloss{evaluation} and \spadgloss{invocation}.
151`See \spadgloss{application}.
162`1. (actual argument) a value passed to a function at the time of a \spadglossSee{function call}{application}; also called an {\em actual parameter}. 2. (formal argument) a variable used in the definition of a function to denote the actual argument passed when the function is called.
176`1. (function) the number of arguments. 2. (operator or operation) corresponds to the arity of a function implementing the operator or operation.
187`{\em (syntax)} an expression of the form \spad{x := e}, meaning "assign the value of \spad{e} to \spad{x"}. After \spadgloss{evaluation}, the \spadgloss{variable} \spad{x} \spadglossSee{points}{pointer} to an object obtained by evaluating the expression \spad{e}. If \spad{x} has a \spadgloss{type} as a result of a previous \spadgloss{declaration}, the object assigned to \spad{x} must have that type. An interpreter must often \spadglossSee{coerce}{coercion} the value of \spad{e} to make that happen. For example, in the interpreter, \centerline{\spad{x : Float := 11}} first \spadglossSee{declares}{declaration} \spad{x} to be a float. This declaration causes the interpreter to coerce 11 to 11.0 in order to assign a floating point value to \spad{x}.
203`a name or functional form denoting {\em any} useful computational property. For example, \spadtype{CommutativeStar} asserts that "\spadfun{*} is commutative". Also, \spadtype{finiteAggregate} is used to assert that an aggregate has a finite number of immediate components. Currently \Language{} uses categores to express attributes.
218`{\em (algebra)} \spad{S} is a basis of a module \spad{M} over a \spadgloss{ring} if \spad{S} generates \spad{M}, and \spad{S} is linearly independent
229`(of a given domain) a domain or package that the given domain explicitly references (for example, calls functions from) in its implementation
245`operation or function with \spadgloss{arity} 2
257`the association of a variable with properties such as \spadgloss{value} and \spadgloss{type}. The top-level \spadgloss{environment} in the interpreter consists of bindings for all user variables and functions. Every \spadgloss{function} has an associated set of bindings, one for each formal \spadgloss{argument} and \spadgloss{local variable}.
270`{\em (syntax)} a control structure where expressions are sequentially \spadglossSee{evaluated}{evaluation}.
281`a \spadgloss{function body} or \spadgloss{loop body}.
291`objects denoted by the \spadgloss{literals} \spad{true} and \spad{false}; elements of domain \spadtype{Boolean}. See also \spadtype{Bits}.
304`a \spadgloss{function} in the standard \Language{} library. Contrast \spadgloss{user function}.
327`1. (noun) a mechanism for immediate retrieval of previously computed data. For example, a function which does a lengthy computation might store its values in a \spadgloss{hash table} using argument as a key. The hash table then serves as a cache for the function (see also \spadsys{)set functions cache}). Also, when \spadgloss{recurrence relations} which depend upon \spad{n} previous values are compiled, the previous \spad{n} values are normally cached (use \spadsys{)set functions recurrence} to change this). 2. (verb) to save values in a cache.
338`the part of the \spadglossSee{body}{function body} of a \spadgloss{domain constructor} that defines the functions implemented by the constructor.
351`{\em (syntax)} an operator used to conditionally evaluate code based on the branch of a \spadgloss{Union}. For example, if value \spad{u} is \spad{Union(Integer,"failed")}, the conditional expression \spad{if u case Integer then A else B} evaluate \spad{A} if \spad{u} is an integer and \spad{B} otherwise.
361`the distinguished object denoting the type of a category; the class of all categories.
375`{\em (basic concept)} second-order types which serve to define useful "classification worlds" for domains, such as algebraic constructs (\spadignore{e.g.} groups, rings, fields), and data structures (\spadignore{e.g.} homogeneous aggregates, collections, dictionaries). Examples of categories are \spadtype{Ring} ("the class of all rings") and \spadtype{Aggregate} ("the class of all aggregates"). The categories of a given world are arranged in a hierarchy (formally, a directed acyclic graph). Each category inherits the properties of all its ancestors. Thus, for example, the category of ordered rings (\spadtype{OrderedRing}) inherits the properties of the category of rings (\spadtype{Ring}) and those of the ordered sets (\spadtype{OrderedSet}). Categories provide a database of algebraic knowledge and ensure mathematical correctness, \spadignore{e.g.} that "matrices of polynomials" is correct but "polynomials of hash tables" is not, that the multiply operation for "polynomials of continued fractions" is commutative, but that for "matrices of power series" is not. optionally provide "default definitions" for operations they export. Categories are defined in \Language{} by functions called \spadgloss{category constructors}. Technically, a category designates a class of domains with common \spadgloss{operations} and \spadgloss{attributes} but usually with different \spadgloss{functions} and \spadgloss{representations} for its constituent \spadgloss{objects}. Categories are always defined using the \Language{} library language (see also \spadgloss{category extension}). See also file {\em catdef.spad} for definitions of basic algebraic categories in \Language{}.
389`a function that creates categories, described by an abstract datatype in the \Language{} programming language. For example, the category constructor \spadtype{Module} is a function which takes a domain parameter \spad{R} and creates the category "modules over \spad{R}".
415`created by a category definition, an expression usually of the form \spad{A == B with ...}. In English, this means "category A is a \spad{B} with the new operations and attributes as given by ... . See, for example, file {\em catdef.spad} for a definitions of the algebra categories in \Language{}, {\em aggcat.spad} for data structure categories.
439`hierarchy formed by category extensions. The root category is \spadtype{Type}. A category can be defined as a \spadgloss{Join} of two or more categories so as to have multiple \spadgloss{parents}. Categories may also have parameterized so as to allow conditional inheritance.
463`1. an element of a character set, as represented by a keyboard key. 2. a component of a string. For example, the 0th element of the string \spad{"hello there"} is the character {\em h}.
478`(of a given domain) any domain or package that explicitly calls functions from the given domain
490`an automatic transformation of an object of one \spadgloss{type} to an object of a similar or desired target type. In the interpreter, coercions and \spadgloss{retractions} are done automatically by the interpreter when a type mismatch occurs. Compare \spadgloss{conversion}.
504`textual remarks embedded in code. Comments are preceded by a double dash ({\em --}). For \Language{} library code, stylized comments for on-line documentation are preceded by a two plus signs ({\em ++}).
517`A version of \spadgloss{LISP} adopted as a standard by major users and suppliers of LISP
534`the time when category or domain constructors are compiled. Contrast \spadgloss{run-time}.
552`a program that generates low-level code from a higher-level source language. \Language{} has three compilers. A {\em graphics compiler} converts graphical formulas to a compiled subroutine so that points can be rapidly produced for graphics commands. An {\em interpreter compiler} optionally compiles \spadgloss{user functions} when first \spadglossSee{invoked}{invocation} (use \spadsys{)set functions compile} to turn this feature on). A {\em library compiler} compiles all constructors.
567`In \Language{}, domains are objects. This term is used to distinguish the objects which are members of domains rather than domains themselves.
594`a \spadgloss{control structure} of the form \spad{if A then B else C}; The \spadgloss{evaluation} of \spad{A} produces \spad{true} or \spad{false}. If \spad{true}, \spad{B} evaluates to produce a value; otherwise \spad{C} evaluates to produce a value. When the value is not used, \spad{else C} part can be omitted.
612`{\em (syntax)} a reserved word used in \spadgloss{signatures} in \Language{} programming language to signify that mark an operation always returns the same value. For example, the signature \spad{0: constant -> \%} in the source code of \spadtype{AbelianMonoid} tells the \Language{} compiler that \spad{0} is a constant so that suitable optimizations might be performed.
627`a \spadgloss{function} which creates a \spadgloss{category}, \spadgloss{domain}, or \spadgloss{package}.
645`when a line of a program is so long that it must be broken into several lines, then all but the first line are called {\em continuation lines}. If such a line is given interactively, then each incomplete line must end with an underscore.
664`program structures which can specify a departure from normal sequential execution. \Language{} has four kinds of control structures: \spadgloss{blocks}, \spadgloss{case} statements, \spadgloss{conditionals}, and \spadgloss{loops}.
688`the transformation of an object on one \spadgloss{type} to one of another type. Conversions performed automatically are called \spadgloss{coercions}. These happen when the interpreter has a type mismatch and a similar or declared target type is needed. In general, the user must use the infix operation \spadSyntax{\spad{::}} to cause this transformation.
705`the programming language semantics used in Pascal but {\em not} in \Language{}. See also \spadgloss{pointer semantics} for details.
729`a structure for storing data in the computer. Examples are \spadgloss{lists} and \spadgloss{hash tables}.
750`equivalent to \spadgloss{domain} in \Language{}.
765`{\em (syntax)} an expression of the form \spad{x : T} where \spad{T} is some \spad{type}. A declaration forces all values \spadglossSee{assigned}{assignment} to \spad{T} to be of that type. If a value is of a different type, the interpreter will try to \spadglossSee{coerce}{coercion} the value to type \spad{T}. Declarations are necessary in case of ambiguity or when a user wants to introduce an an \spadglossSee{unexposed}{expose} domain.
783`a function defined by a \spadgloss{category}. Such definitions appear category definitions of the form \spad{C: Category == T add I} in an optional implementation part \spad{I} to the right of the keyword \spad{add}.
808`a optional \spadgloss{package} of \spadgloss{functions} associated with a category. Such functions are necessarily defined in terms over other functions exported by the category.
830`{\em (syntax)} 1. An expression of the form \spad{f(a) == b} defining function \spad{f} with \spadgloss{formal arguments} \spad{a} and \spadgloss{body} \spad{b}; equivalent to the statement \spad{f == (a) +-> b}. 2. An expression of the form \spad{a == b} where \spad{a} is a \spadgloss{symbol}, equivalent to \spad{a() == b}. See also \spadgloss{macro} where a similar substitution is done at \spadgloss{parse} time.
847`a \spadgloss{character} which marks the beginning or end of some syntactically correct unit in the language, \spadignore{e.g.} \spadSyntax{"} for strings, blanks for identifiers.
863`An operation which changes a component or structure of a value. In \Language{}, all destructive operations have names which end with an exclamation mark ({\em !}). For example, domain \spadtype{List} has two operations to reverse the elements of a list, one named \spadfunFrom{reverse}{List} which returns a copy of the original list with the elements reversed, another named \spadfunFromX{reverse}{List} which reverses the elements {\em in place} thus destructively changing the original list.
891`1. on-line or hard copy descriptions of \Language{}; 2. text in library code preceded by {\em ++} comments as opposed to general comments preceded by {\em --}.
911`{\em (basic concept)} a domain corresponds to the usual notion of abstract datatypes: that of a set of values and a set of "exported operations" for the creation and manipulation of these values. Datatypes are parameterized, dynamically constructed, and can combine with others in any meaningful way, \spadignore{e.g.} "lists of floats" (\spadtype{List Float}), "fractions of polynomials with integer coefficients" (\spadtype{Fraction Polynomial Integer}), "matrices of infinite \spadgloss{streams} of cardinal numbers" (\spadtype{Matrix Stream CardinalNumber}). The term {\em domain} is actually abbreviates {\em domain of computation}. Technically, a domain denotes a class of objects, a class of \spadgloss{operations} for creating and other manipulating these objects, and a class of \spadgloss{attributes} describing computationally useful properties. Domains also provide \spadgloss{functions} for each operation often in terms of some \spadgloss{representation} for the objects. A domain itself is an \spadgloss{object} created by a \spadgloss{function} called a \spadgloss{domain constructor}.
924`a function that creates domains, described by an abstract datatype in the \Language{} programming language. Simple domains like \spadtype{Integer} and \spadtype{Boolean} are created by domain constructors with no arguments. Most domain constructors take one or more parameters, one usually denoting an \spadgloss{underlying domain}. For example, the domain \spadtype{Matrix(R)} denotes "matrices over \spad{R"}. Domains {\em Mapping}, {\em Record}, and {\em Union} are primitive domains. All other domains are written in the \Language{} programming language and can be modified by users with access to the library source code.
949`a domain constructor \spad{A} is said to {\em extend} a domain constructor \spad{B} if \spad{A}\spad{'s} definition has the form \spad{A == B add ...}. This intuitively means "functions not defined by \spad{A} are assumed to come from \spad{B}". Successive domain extensions form \spadgloss{add-chains} affecting the the \spadglossSee{search order}{search path} for functions not implemented directly by the domain during \spadgloss{dynamic lookup}.
972`using an infix dot ({\em .}) for function application. If \spad{u} is the list \spad{[7,4,-11]} then both \spad{u(2)} and \spad{u.2} return 4. Dot notation nests to left. Thus \spad{f . g . h} is equivalent to \spad{(f . g) . h}.
991`that which is done at \spadgloss{run-time} as opposed to \spadgloss{compile-time}. For example, the interpreter will build the domain "matrices over integers" dynamically in response to user input. However, the compilation of all functions for matrices and integers is done during \spadgloss{compile-time}. Contrast \spadgloss{static}.
1005`In \Language{}, a \spadgloss{domain} may or may not explicitly provide \spadgloss{function} definitions for all of its exported \spadgloss{operations}. These definitions may instead come from domains in the \spadgloss{add-chain} or from \spadgloss{default packages}. When a \spadglossSee{function call}{application} is made for an operation in the domain, up to five steps are carried out.\begin{items} \item (1) If the domain itself implements a function for the operation, that function is returned. \item (2) Each of the domains in the \spadgloss{add-chain} are searched for one which implements the function; if found, the function is returned. \item (3) Each of the \spadgloss{default packages} for the domain are searched in order of the \spadgloss{search path}. If any of the default packages implements the function, the first one found is returned. \item (4) Each of the \spadgloss{default packages} for each of the domains in the \spadgloss{add-chain} are searched in the order of their \spadgloss{search path}. If any of the default packages implements the function, the first one found is returned. \item (5) If all of the above steps fail, an error message is reported. \end{items}
1026`the unique value of objects with type \spadtype{Void}.
1038`a set of \spadgloss{bindings}.
1056`a systematic process which transforms an \spadgloss{expression} into an object called the \spadgloss{value} of the expression. Evaluation may produce \spadgloss{side effects}.
1073`A type. An expression of type Exit should produce no value but transfer control to some outside scope, typically by raising error.
1084`{\em (reserved word)} an \spadgloss{operator} which forces an exit from the current block. For example, the \spadgloss{block} \spad{(a := 1; if i > 0 then exit a; a := 2)} will prematurely exit at the second statement with value 1 if the value of \spad{i} is greater than 0. See \spadgloss{\spad{=>}} for an alternate syntax.
1095`1. (of a domain \spad{D}) any \spadgloss{attribute}, \spadgloss{operation}, or \spadgloss{category} explicitly mentioned in the \spadgloss{type} specification part \spad{T} for the domain constructor definition \spad{D: T == I} 2. (of a category \spad{C}) any \spadgloss{attribute}, \spadgloss{operation}, or \spadgloss{category} explicitly mentioned in the \spadgloss{type} specification part \spad{T} for the domain constructor definition \spad{C: \spadgloss{Category} == T}
1117`\spadgloss{explicit export} or \spadgloss{implicit export} of a domain or category
1130`some constructors are {\em exposed}, others {\em unexposed}. Exposed domains and packages are recognized by the interpreter. Use \spadsys{)set expose} to control change what is exposed. By default \Browse{} shows both exposed and unexposed constructors. Unexposed constructors appear prefixed by star(\spad{*}).
1143`1. any syntactically correct program fragment. 2. an element of domain \spadtype{Expression}
1160`see \spadgloss{category extension} or \spadgloss{domain extension}
1173`{\em (algebra)} a \spadgloss{domain} which is \spadgloss{ring} where every non-zero element is invertible and where \spad{x y=y x}; a member of category \spadtype{Field}. For a complete list of fields, click on {\em Domains} under {\em Cross Reference} for \spadtype{Field}.
1185`a program or collection of data stored on disk, tape or other medium.
1196`a floating-point number with user-specified precision; an element of domain \spadtype{Float}. Floats are \spadgloss{literals} which are written two ways: without an exponent (\spadignore{e.g.} \spad{3.1416}), or with an exponent (\spadignore{e.g.} \spad{3.12E-12}). Use function \spadgloss{precision} to change the precision of the mantissage (20 digits by default). See also \spadgloss{small float}.
1208`(of a function) an identifier \spadglossSee{bound}{binding} to the value of an actual \spadgloss{argument} on \spadgloss{invocation}. In the function definition \spad{f(x,y) == u}, for example, \spad{x} and \spad{y} are the formal parameter.
1231`the basic unit of an interactive session; each frame has its own \spadgloss{step number}, \spadgloss{environment}, and \spadgloss{history}. In one interactive session, users can can create and drop frames, and have several active frames simultaneously.
1243`{\em (syntax)} A keyword used in user-defined functions to declare that a variable is a \spadgloss{free variable} of that function. For example, the statement \spad{free x} declares the variable \spad{x} within the body of a function \spad{f} to be a free variable in \spad{f}. Without such a declaration, any variable \spad{x} which appears on the left hand side of an assignment is regarded as a \spadgloss{local variable} of that function. If the intention of the assignment is to give an value to a \spadgloss{global variable} \spad{x}, the body of that function must contain the statement \spad{free x}.
1254`(of a function) a variable which appears in a body of a function but is not \spadglossSee{bound}{binding} by that function. See \spadgloss{local variable} by default.
1274`implementation of \spadgloss{operation}; it takes zero or more \spadgloss{argument} parameters and produces zero or more values. Functions are objects which can be passed as parameters to functions and can be returned as values of functions. Functions can also create other functions (see also \spadtype{InputForm}). See also \spadgloss{application} and \spadgloss{invocation}. The terms {\em operation} and {\em function} are distinct notions in \Language{}. An operation is an abstraction of a function, described by declaring a \spadgloss{signature}. A function is created by providing an implementation of that operation by some piece of \Language{} code. Consider the example of defining a user-function \spad{fact} to compute the \spadfun{factorial} of a nonnegative integer. The \Language{} statement \spad{fact: Integer -> Integer} describes the operation, whereas the statement \spad{fact(n) = reduce(*,[1..n])} defines the functions. See also \spadgloss{generic function}.
1289`the part of a \spadgloss{function}\spad{'s} definition which is evaluated when the function is called at \spadgloss{run-time}; the part of the function definition to the right of the \spadSyntax{\spad{==}}.
1309`a system function that automatically recycles memory cells from the \spadgloss{heap}. \Language{} is built upon \spadgloss{Common LISP} which provides this facility.
1334`a mechanism for reclaiming storage in the \spadgloss{heap}.
1358`a complex-valued expression, \spadignore{e.g.} one with both a real and imaginary part; a member of a \spadtype{Complex} domain.
1373`A version of LISP formerly called AKCL, derived from \spad{KCL}. \Language{} originally run on top of \spad{GCL} and later was ported do different LISP implementations.
1383`the use of one function to operate on objects of different types; One might regard \Language{} as supporting generic \spadgloss{operations} but not generic functions. One operation \spad{+: (D,D) -> D} exists for adding elements in a ring; each ring however provides its own type-specific function for implementing this operation.
1406`A variable which can be referenced freely by functions. In \Language{}, all top-level user-defined variables defined during an interactive user session are global variables. \Language{} does not allow {\em fluid variables}, that is, variables \spadglossSee{bound}{binding} by functions which can be referenced by functions those functions call.
1428`{\em (algebra)} a special basis for a polynomial ideal that allows a simple test for membership. It is useful in solving systems of polynomial equations.
1449`{\em (algebra)} a monoid where every element has a multiplicative inverse.
1461`A data structure that efficiency maps a given object to another. A hash table consists of a set of {\em entries}, each of which associates a {\em key} with a {\em value}. Finding the object stored under a key can be very fast even if there are a large number of entries since keys are {\em hashed} into numerical codes for fast lookup.
1478`an area of storage used by data in programs. For example, \Language{} will use the heap to hold the partial results of symbolic computations. When cancellations occur, these results remain in the heap until \spadglossSee{garbage collected}{garbage collector}.
1489`a mechanism which records the results for an interactive computation. Using the history facility, users can save computations, review previous steps of a computation, and restore a previous interactive session at some later time. For details, issue the system command {\em )history ?} to the interpreter. See also \spadgloss{frame}.
1503`{\em (algebra)} a subset of a ring that is closed under addition and multiplication by arbitrary ring elements, \spadignore{i.e.} it\spad{'s} a module over the ring.
1515`{\em (syntax)} an \Language{} name; a \spadgloss{literal} of type \spadtype{Symbol}. An identifier begins with an alphabetical character or \% and may be followed by alphabetic characters, digits, ? or !. Certain distinguished \spadgloss{reserved words} are not allowed as identifiers but have special meaning in the \Language{}.
1532`an object is immutable if it cannot be changed by an \spadgloss{operation}; not a \spadglossSee{mutable object}{mutable}. Algebraic objects generally immutable: changing an algebraic expression involves copying parts of the original object. One exception is a matrix object of type \spadtype{Matrix}. Examples of mutable objects are data structures such as those of type \spadtype{List}. See also \spadgloss{pointer semantics}.
1548`(of a domain or category) any \spadgloss{attribute} or \spadgloss{operation} which is either an explicit export or else an explicit export of some category which an explicit category export \spadglossSee{extends}{category extension}.
1570`1. a variable that counts the number of times a \spadgloss{loop} is repeated. 2. the "address" of an element in a data structure (see also category \spadtype{LinearAggregate}).
1582`{\em (syntax)} an \spadgloss{operator} placed between two \spadgloss{operands}; also called a {\em binary operator}, \spadignore{e.g.} \spad{a + b}. An infix operator may also be used as a \spadgloss{prefix}, \spadignore{e.g.} \spad{+(a,b)} is also permissible in the \Language{} language. Infix operators have a relative \spadgloss{precedence}.
1594`a rectangular area on a \HyperName{} screen into which users can enter text.
1611`to build a \spadgloss{category}, \spadgloss{domain}, or \spadgloss{package} at run-time
1629`a \spadgloss{literal} object of domain \spadtype{Integer}, the class of integers with an unbounded number of digits. Integer literals consist of one or more consecutive digits (0-9) with no embedded blanks. Underscores can be used to separate digits in long integers if desirable.
1643`a system where the user interacts with the computer step-by-step
1661`the subsystem of \Language{} responsible for handling user input during an interactive session. The following somewhat simplified description of the typical action of the interpreter. The interpreter parses the user\spad{'s} input expression to create an expression tree then does a bottom-up traversal of the tree. Each subtree encountered which is not a value consists of a root node denoting an operation name and one or more leaf nodes denoting \spadgloss{operands}. The interpreter resolves type mismatches and uses type-inferencing and a library database to determine appropriate types of the operands and the result, and an operation to be performed. The interpreter then builds a domain to perform the indicated operation, then invokes a function from the domain to compute a value. The subtree is then replaced by that value and the process continues. Once the entire tree has been processed, the value replacing the top node of the tree is displayed back to the user as the value of the expression.
1679`(of a function) the run-time process involved in \spadglossSee{evaluating}{evaluation} a a \spadgloss{function} \spadgloss{application}. This process has two steps. First, a local \spadgloss{environment} is created where \spadgloss{formal arguments} are locally \spadglossSee{bound}{binding} by \spadgloss{assignment} to their respective actual \spadgloss{argument}. Second, the \spadgloss{function body} is evaluated in that local environment. The evaluation of a function is terminated either by completely evaluating the function body or by the evaluation of a \spadSyntax{return} expression.
1696`repeated evaluation of an expression or a sequence of expressions. Iterations use the reserved words \spadSyntax{for}, \spadSyntax{while}, and \spadSyntax{repeat}.
1712`a primitive \Language{} function taking two or more categories as arguments and producing a category containing all of the operations and attributes from the respective categories.
1723`In \Language{}, a collection of compiled modules representing the a \spadgloss{category} or \spadgloss{domain} constructor.
1737`acronym for List Processing Language, a language designed for the manipulation of nonnumerical data. The \Language{} library is translated into LISP then compiled into machine code by an underlying LISP.
1748`an object of a \spadtype{List} domain.
1759`an object with a special syntax in the language. In \Language{}, there are five types of literals: \spadgloss{booleans}, \spadgloss{integers}, \spadgloss{floats}, \spadgloss{strings}, and \spadgloss{symbols}.
1773`{\em (syntax)} A keyword used in user-defined functions to declare that a variable is a \spadgloss{local variable} of that function. Because of default assumptions on variables, such a declaration is not necessary but is available to the user for clarity when appropriate.
1785`(of a function) a variable \spadglossSee{bound}{binding} by that function and such that its binding is invisible to any function that function calls. Also called a {\em lexical} variable. By default in the interpreter:\begin{items} \item 1. any variable \spad{x} which appears on the left hand side of an assignment is regarded a local variable of that function. If the intention of an assignment is to change the value of a \spadgloss{global variable} \spad{x}, the body of the function must then contain the statement \spad{free x}. \item 2. any other variable is regarded as a \spadgloss{free variable}. \end{items} An optional declaration \spad{local x} is available to explicitly declare a variable to be a local variable. All \spadgloss{formal parameters} to the function can be regarded as local variables to the function.
1806`1. an expression containing a \spadSyntax{repeat} 2. a collection expression having a \spadSyntax{for} or a \spadSyntax{while}, \spadignore{e.g.} \spad{[f(i) for i in S]}.
1817`the part of a loop following the \spadSyntax{repeat} that tells what to do each iteration. For example, the body of the loop \spad{for x in S repeat B} is \spad{B}. For a collection expression, the body of the loop precedes the initial \spadSyntax{for} or \spadSyntax{while}.
1833`{\em (syntax)} 1. An expression of the form \spad{macro a == b} where \spad{a} is a \spadgloss{symbol} causes \spad{a} to be textually replaced by the expression \spad{b} at \spadgloss{parse} time. 2. An expression of the form \spad{macro f(a) == b} defines a parameterized macro expansion for a parameterized form \spad{f} This macro causes a form \spad{f}(\spad{x}) to be textually replaced by the expression \spad{c} at parse time, where \spad{c} is the expression obtained by replacing \spad{a} by \spad{x} everywhere in \spad{b}. See also \spadgloss{definition} where a similar substitution is done during \spadgloss{evaluation}.
1845`a type expression containing a question-mark ({\em ?}). For example, the mode {\em P ?} designates {\em the class of all polynomials over an arbitrary ring}.
1856`objects which contain \spadgloss{pointers} to other objects and which have operations defined on them which alter these pointers. Contrast \spadgloss{immutable}. \Language{} uses \spadgloss{pointer semantics} as does \spadgloss{LISP} in contrast with many other languages such as Pascal which use \spadgloss{copying semantics}. See \spadgloss{pointer semantics} for details.
1870`1. a \spadgloss{symbol} denoting a \spadgloss{variable}, \spadignore{i.e.} the variable \spad{x}. 2. a \spadgloss{symbol} denoting an \spadgloss{operation}, \spadignore{i.e.} the operation \spad{divide: (Integer,Integer) -> Integer}.
1881`a function with no arguments, \spadignore{e.g.} \spadfun{characteristic}.
1895`operation or function with \spadgloss{arity} 0
1909`a data entity created or manipulated by programs. Elements of domains, functions, and domains themselves are objects. Whereas categories are created by functions, they cannot be dynamically manipulated in the current system and are thus not considered as objects. The most basic objects are \spadgloss{literals}; all other objects must be created \spadgloss{functions}. Objects can refer to other objects using \spadgloss{pointers}. \Language{} language uses \spadgloss{pointer semantics} when dealing with \spadgloss{mutable} objects.
1922`code which can be directly executed by hardware; also known as {\em machine language}.
1940`an argument of an \spadgloss{operator} (regarding an operator as a \spadgloss{function}).
1954`an abstraction of a \spadgloss{function}, described by a \spadgloss{signature}. For example, \centerline{\spad{fact: NonNegativeInteger -> NonNegativeInteger}} describes an operation for "the factorial of a (non-negative) integer".
1970`special reserved words in the language such as \spadop{+} and \spadop{*}; operators can be either \spadgloss{prefix} or \spadgloss{infix} and have a relative \spadgloss{precedence}.
1985`the use of the same name to denote distinct functions; a function is identified by a \spadgloss{signature} identifying its name, the number and types of its arguments, and its return types. If two functions can have identical signatures, a \spadgloss{package call} must be made to distinguish the two.
2003`a domain whose exported operations depend solely on the parameters and other explicit domains, \spadignore{e.g.} a package for solving systems of equations of polynomials over any field, \spadignore{e.g.} floats, rational numbers, complex rational functions, or power series. Facilities for integration, differential equations, solution of linear or polynomial equations, and group theory are provided by "packages". Technically, a package is a domain which has no \spadgloss{signature} containing the symbol \%. While domains intuitively provide computational objects you can compute with, packages intuitively provide functions (\spadgloss{polymorphic} functions) which will work over a variety of datatypes.
2017`{\em (syntax)} an expression of the form \spad{e \$ D} where \spad{e} is an \spadgloss{application} and \spad{D} denotes some \spadgloss{package} (or \spadgloss{domain}).
2036`{\em (syntax)} an expression of the form \spad{f(x,y)\$D} used to identify that the function \spad{f} is to be one from \spad{D}.
2055`same as \spadgloss{domain constructor}.
2081`see \spadgloss{argument}
2097`a domain that is built on another, for example, polynomials with integer coefficients.
2126`a expression of the form \spad{f(x,y)}, an \spadgloss{application} of a function.
2151`(of a domain) a category which is explicitly declared in the source code definition for the domain to be an \spadgloss{export} of the domain.
2164`1. (verb) to produce an internal representation of a user input string; the resultant internal representation is then "interpreted" by \Language{} to perform some indicated action.
2176`the transformation of a user input string representing a valid \Language{} expression into an internal representation as a tree-structure.
2188`a set with a reflexive, transitive and antisymetric \spadgloss{binary} operation.
2216`1. (on expressions) Given a expression called a "subject" \spad{u}, the attempt to rewrite \spad{u} using a set of "rewrite rules". Each rule has the form \spad{A == B} where \spad{A} indicates a expression called a "pattern" and \spad{B} denotes a "replacement". The meaning of this rule is "replace \spad{A} by \spad{B"}. If a given pattern \spad{A} matches a subexpression of \spad{u}, that subexpression is replaced by \spad{B}. Once rewritten, pattern matching continues until no further changes occur. 2. (on strings) the attempt to match a string indicating a "pattern" to another string called a "subject", for example, for the purpose of identifying a list of names. In \Browse{}, users may enter \spadgloss{search strings} for the purpose of identifying constructors, operations, and attributes.
2236`alternate syntax for a block, using indentation and column alignment (see also \spadgloss{block}).
2247`a reference implemented by a link directed from one object to another in the computer memory. An object is said to {\em refer} to another if it has a pointer to that other object. Objects can also refer to themselves (cyclic references are legal). Also more than one object can refer to the same object. See also \spadgloss{pointer semantics}.
2261`the programming language semantics used in languages such as LISP which allow objects to be \spadgloss{mutable}. Consider the following sequence of \Language{} statements:\begin{items} \item \spad{x : Vector Integer := [1,4,7]} \item \spad{y := x} \item \spad{swap!(x,2,3)} \end{items} The function \spadfunFromX{swap}{Vector} is used to interchange the 2nd and 3rd value in the vector \spad{x} producing the value \spad{[1,7,4]}. What value does \spad{y} have after evaluation of the third statement? The answer is different in \Language{} than it is in a language with \spadgloss{copying semantics}. In \Language{}, first the vector [1,4,7] is created and the variable \spad{x} set to the \spadglossSee{point}{pointer} of this object. Let\spad{'s} call this object \spad{V}. Now \spad{V} refers to its \spadgloss{immutable} components 1,4, and 7. Next, the variable \spad{y} is made to point to \spad{V} just as \spad{x} does. Now the third statement interchanges the last 2 elements of \spad{V} (the {\em !} at the end of the name \spadfunFromX{swap}{Vector} tells you that this operation is destructive, that is, it changes the elements {\em in place}). Both \spad{x} and \spad{y} perceive this change to \spad{V}. Thus both \spad{x} and \spad{y} then have the value \spad{[1,7,4]}. In Pascal, the second statement causes a copy of \spad{V} to be stored under \spad{y}. Thus the change to \spad{V} made by the third statement does not affect \spad{y}.
2285`a \spadgloss{function} parameterized by one or more \spadgloss{domains}; a \spadgloss{algorithm} defined \spadglossSee{categorically}{category}. Every function defined in a domain or package constructor with a domain-valued parameter is polymorphic. For example, the same matrix \spadSyntax{*} function is used to multiply "matrices over integers" as "matrices over matrices over integers" Likewise, various \ignore{\spad{???}} in \ignore{\spad{???}} solves polynomial equations over any \spadgloss{field}.
2303`an \spadgloss{operator} that follows its single \spadgloss{operand}. Postfix operators are not available in \Language{}.
2317`{\em (syntax)} refers to the so-called {\em binding power} of an operator. For example, \spad{*} has higher binding power than \spad{+} so that the expression \spad{a + b * c} is equivalent to \spad{a + (b * c)}.
2334`the number of digits in the specification of a number, \spadignore{e.g.} as set by \spadfunFrom{precision}{Float}.
2350`1. a Boolean valued function, \spadignore{e.g.} \spad{odd: Integer -> Boolean}. 2. an Boolean valued expression
2366`{\em (syntax)} an \spadgloss{operator} such as \spad{-} and \spad{not} that is written {\em before} its single \spadgloss{operand}. Every function of one argument can be used as a prefix operator. For example, all of the following have equivalent meaning in \Language{}: \spad{f(x)}, \spad{f x}, and \spad{f.x}. See also \spadgloss{dot notation}.
2379`the prefix \spadgloss{operator} \spadSyntax{'} meaning {\em do not evaluate}.
2391`(basic domain constructor) a domain constructor used to create a inhomogeneous aggregate composed of pairs of "selectors" and \spadgloss{values}. A Record domain is written in the form \spad{Record(a1:D1,...,an:Dn)} (\spad{n} > 0) where \spad{a1},...,\spad{an} are identifiers called the {\em selectors} of the record, and \spad{D1},...,\spad{Dn} are domains indicating the type of the component stored under selector \spad{an}.
2404`A relation which can be expressed as a function \spad{f} with some argument \spad{n} which depends on the value of \spad{f} at \spad{k} previous values. In many cases, \Language{} will rewrite a recurrence relation on compilation so as to \spadgloss{cache} its previous \spad{k} values and therefore make the computation significantly more efficient.
2430`use of a self-reference within the body of a function. Indirect recursion is when a function uses a function below it in the call chain.
2446`1. A function that calls itself, either directly or indirectly through another function. 2. self-referential. See also \spadgloss{recursive}.
2462`see \spadgloss{pointer}
2478`a special identifier used as \spadgloss{local variable} of a domain constructor body to denote the representation domain for objects of a domain.
2488`a \spadgloss{domain} providing a data structure for elements of a domain; generally denoted by the special identifier \spadgloss{Rep} in the \Language{} programming language. As domains are \spadgloss{abstract datatypes}, this representation is not available to users of the domain, only to functions defined in the \spadgloss{function body} for a domain constructor. Any domain can be used as a representation.
2509`a special sequence of non-blank characters with special meaning in the \Language{} language. Examples of reserved words are names such as \spadSyntax{for}, \spadSyntax{if}, and \spadSyntax{free}, operator names such as \spadSyntax{+} and \spad{mod}, special character strings such as spadSyntax{\spad{==}} and spadSyntax{\spad{:=}}.
2529`to move an object in a parameterized domain back to the underlying domain, for example to move the object \spad{7} from a "fraction of integers" (domain \spadtype{Fraction Integer}) to "the integers" (domain \spadtype{Integer}).
2546`when leaving a function, the value of the expression following \spadSyntax{return} becomes the value of the function.
2559`a set with a commutative addition, associative multiplication, a unit element, and multiplication distributes over addition and subtraction.
2570`{\em (syntax)} 1. An expression of the form \spad{rule A == B} indicating a "rewrite rule". 2. An expression of the form \spad{rule (R1;...;Rn)} indicating a set of "rewrite rules" \spad{R1},...,\spad{Rn}. See \spadgloss{pattern matching} for details.
2581`the time of doing a computation. Contrast \spadgloss{compile-time}. rather than prior to it; \spadgloss{dynamic} as opposed to \spadgloss{static}. For example, the decision of the interpreter to build a structure such as "matrices with power series entries" in response to user input is made at run-time.
2596`an error-checking which can be done only when the program receives user input; for example, confirming that a value is in the proper range for a computation.
2617`Steel Bank Common LISP, an implementation of LISP featuring native compiler generating fast code. Currently the best LISP to run \Language{} on.
2628`the sequence of \spadgloss{default packages} for a given domain to be searched during \spadgloss{dynamic lookup}. This sequence is computed first by ordering the category \spadgloss{ancestors} of the domain according to their {\em level number}, an integer equal to to the minimum distance of the domain from the category. Parents have level 1, parents of parents have level 2, and so on. Among categories with equal level numbers, ones which appear in the left-most branches of {\em Join}\spad{s} in the source code come first. See also \spadgloss{dynamic lookup}.
2646`a string entered into an \spadgloss{input area} on a \HyperName{} screen
2666`an identifier used to address a component value of a gloss{Record} datatype.
2681`the relationships between symbols and their meanings. The rules for obtaining the {\em meaning} of any syntactically valid expression.
2697`{\em (algebra)} a \spadgloss{monoid} which need not have an identity; it is closed and associative.
2713`action which changes a component or structure of a value. See \spadgloss{destructive operation} for details.
2731`{\em (syntax)} an expression describing an \spadgloss{operation}. A signature has the form as \spad{name : source -> target}, where \spad{source} gives the type of the arguments of the operation, and \spad{target} gives the type of the result.
2747`the domain for hardware floating point arithmetic as provided by the computer hardware.
2765`the domain for hardware integer arithmetic. as provided by the computer hardware.
2785`the \spadgloss{type} of the argument of a \spadgloss{function}; the type expression before the \spad{->} in a \spadgloss{signature}. For example, the source of \spad{f : (Integer,Integer) -> Integer} is \spad{(Integer,Integer)}.
2798`data structure whose elements are mostly identical (a sparse matrix is one filled with mostly zeroes).
2811`that computation done before run-time, such as compilation. Contrast \spadgloss{dynamic}.
2824`the number which precedes user input lines in an interactive session; the output of user results is also labeled by this number.
2842`an object of \spadtype{Stream(R)}, a generalization of a \spadgloss{list} to allow an infinite number of elements. Elements of a stream are computed "on demand". Strings are used to implement various forms of power series (\ignore{\spad{???}}).
2855`an object of domain \spadtype{String}. Strings are \spadgloss{literals} consisting of an arbitrary sequence of \spadgloss{characters} surrounded by double-quotes (\spadSyntax{"}), \spadignore{e.g.} \spad{"Look here!"}.
2868`{\em (basic concept)} a \spadgloss{domain} together with a \spadgloss{predicate} characterizing which members of the domain belong to the subdomain. The exports of a subdomain are usually distinct from the domain itself. A fundamental assumption however is that values in the subdomain are automatically \spadglossSee{coerceable}{coercion} to values in the domain. For example, if \spad{n} and \spad{m} are declared to be members of a subdomain of the integers, then {\em any} \spadgloss{binary} operation from \spadtype{Integer} is available on \spad{n} and \spad{m}. On the other hand, if the result of that operation is to be assigned to, say, \spad{k}, also declared to be of that subdomain, a \spadgloss{run-time} check is generally necessary to ensure that the result belongs to the subdomain.
2884`the use of \spadSyntax{|} followed by an expression to filter an iteration.
2907`{\em (syntax)} an \spadgloss{operator} which placed after its operand. Suffix operators are not allowed in the \Language{} language.
2920`objects denoted by \spadgloss{identifier} \spadgloss{literals}; an element of domain \spadtype{Symbol}. The interpreter defaultly converts a symbol \spad{x} into \spadtype{Variable(x)}.
2933`rules of grammar, punctuation etc. for forming correct expressions.
2946`top-level \Language{} statements that begin with {\em )}. System commands allow users to query the database, read files, trace functions, and so on.
2968`an identifier used to discriminate a branch of a \spadgloss{Union} type.
2978`the \spadgloss{type} of the result of a \spadgloss{function}; the type expression following the \spad{->} in a \spadgloss{signature}.
2991`refers to direct user interactions with the \Language{} interpreter.
3007`{\em (algebra)} a partially ordered set where any two elements are comparable.
3033`use of system function \spadsys{)trace} to track the arguments passed to a function and the values returned.
3045`an expression of two or more other expressions separated by commas, \spadignore{e.g.} \spad{4,7,11}. Tuples are also used for multiple arguments both for \spadgloss{applications} (\spadignore{e.g.} \spad{f(x,y)}) and in \spadgloss{signatures} (\spadignore{e.g.} \spad{(Integer,Integer) -> Integer}). A tuple is not a data structure, rather a syntax mechanism for grouping expressions.
3057`a category with no operations or attributes, from which all categories in \Language{} are \spadglossSee{extensions}{category extension}.
3068`The type of any \spadgloss{subdomain} is the unique symbol {\em Category}. The type of a \spadgloss{domain} is any \spadgloss{category} that domain belongs to. The type of any other object is either the (unique) domain that object belongs to or any \spadgloss{subdomain} of that domain. The type of objects is in general not unique.
3079`a system function which determines whether the datatype of an object is appropriate for a given operation.
3099`a \spadgloss{domain constructor} or \spadgloss{category constructor}.
3122`when the interpreter chooses the type for an object based on context. For example, if the user interactively issues the definition \centerline{\spad{f(x) == (x + \%i)^2}} then issues \spad{f(2)}, the interpreter will infer the type of \spad{f} to be \spad{Integer -> Complex Integer}.
3143`operation or function with \spadgloss{arity} 1
3155`for a \spadgloss{domain} that has a single domain-valued parameter, the {\em underlying domain} refers to that parameter. For example, the domain "matrices of integers" (\spadtype{Matrix Integer}) has underlying domain \spadtype{Integer}.
3179`(basic domain constructor) a domain constructor used to combine any set of domains into a single domain. A Union domain is written in the form \spad{Union(a1:D1,...,an:Dn)} (\spad{n} > 0) where \spad{a1},...,\spad{an} are identifiers called the {\em tags} of the union, and \spad{D1},...,\spad{Dn} are domains called the {\em branches} of the union. The tags \spad{\spad{ai}} are optional, but required when two of the \spad{\spad{Di}} are equal, \spadignore{e.g.} \spad{Union(inches:Integer,centimeters:Integer)}. In the interpreter, values of union domains are automatically coerced to values in the branches and vice-versa as appropriate. See also \spadgloss{case}.
3191`{\em (algebra)} an invertible element.
3202`a function defined by a user during an interactive session. Contrast \spadgloss{built-in function}.
3222`a variable created by the user at top-level during an interactive session
3242`1. the result of \spadglossSee{evaluating}{evaluation} an expression. 2. a property associated with a \spadgloss{variable} in a \spadgloss{binding} in an \spadgloss{environment}.
3254`a means of referring to an object but itself {\spad{\bf} not} an object. A variable has a name and an associated \spadgloss{binding} created by \spadgloss{evaluation} of \Language{} expressions such as \spadgloss{declarations}, \spadgloss{assignments}, and \spadgloss{definitions}. In the top-level \spadgloss{environment} of the interpreter, variables are \spadgloss{global variables}. Such variables can be freely referenced in user-defined functions although a \spadgloss{free} declaration is needed to assign values to them. See \spadgloss{local variable} for details.
3269`the type given when the \spadgloss{value} and \spadgloss{type} of an expression are not needed. Also used when there is no guarantee at run-time that a value and predictable mode will result.
3280`a symbol which matches any substring including the empty string; for example, the search string {\em *an*} matches an word containing the consecutive letters {\em a} and {\em n}
3296`an interactive record of the user input and output held in an interactive history file. Each user input and corresponding output expression in the workspace has a corresponding \spadgloss{step number}. The current output expression in the workspace is referred to as \spad{\%}. The output expression associated with step number \spad{n} is referred to by \spad{\%\%(n)}. The \spad{k}-th previous output expression relative to the current step number \spad{n} is referred to by \spad{\%\%(- k)}. Each interactive \spadgloss{frame} has its own workspace.
