aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/algebra/aggcat.spad.pamphlet94
-rw-r--r--src/algebra/any.spad.pamphlet35
-rw-r--r--src/algebra/equation1.spad.pamphlet15
-rw-r--r--src/algebra/equation2.spad.pamphlet31
-rw-r--r--src/algebra/grdef.spad.pamphlet9
-rw-r--r--src/algebra/ituple.spad.pamphlet14
-rw-r--r--src/algebra/list.spad.pamphlet29
-rw-r--r--src/algebra/retract.spad.pamphlet24
-rw-r--r--src/algebra/seg.spad.pamphlet47
-rw-r--r--src/algebra/stream.spad.pamphlet21
-rw-r--r--src/algebra/syntax.spad.pamphlet26
-rw-r--r--src/algebra/void.spad.pamphlet15
-rw-r--r--src/interp/define.boot22
13 files changed, 357 insertions, 25 deletions
diff --git a/src/algebra/aggcat.spad.pamphlet b/src/algebra/aggcat.spad.pamphlet
index 39ddc2d5..12fa9485 100644
--- a/src/algebra/aggcat.spad.pamphlet
+++ b/src/algebra/aggcat.spad.pamphlet
@@ -1,7 +1,7 @@
\documentclass{article}
\usepackage{axiom}
\begin{document}
-\title{\$SPAD/src/algebra aggcat.spad}
+\title{src/algebra aggcat.spad}
\author{Michael Monagan, Manuel Bronstein, Richard Jenks, Stephen Watt}
\maketitle
@@ -12,7 +12,9 @@
\eject
\section{category AGG Aggregate}
+
<<category AGG Aggregate>>=
+import Type
import Boolean
import NonNegativeInteger
)abbrev category AGG Aggregate
@@ -863,8 +865,12 @@ KeyedDictionary(Key:SetCategory, Entry:SetCategory): Category ==
keys t == [x.key for x in parts t]
@
+
\section{category ELTAB Eltable}
+
<<category ELTAB Eltable>>=
+import Type
+import SetCategory
)abbrev category ELTAB Eltable
++ Author: Michael Monagan; revised by Manuel Bronstein and Manuel Bronstein
++ Date Created: August 87 through August 88
@@ -886,8 +892,12 @@ Eltable(S:SetCategory, Index:Type): Category == with
++ Error: if i is not an index of u.
@
+
\section{category ELTAGG EltableAggregate}
+
<<category ELTAGG EltableAggregate>>=
+import Type
+import SetCategory
)abbrev category ELTAGG EltableAggregate
++ Author: Michael Monagan; revised by Manuel Bronstein and Richard Jenks
++ Date Created: August 87 through August 88
@@ -937,8 +947,15 @@ EltableAggregate(Dom:SetCategory, Im:Type): Category ==
qsetelt_!(a, x, y) == (a.x := y)
@
+
\section{category IXAGG IndexedAggregate}
+
<<category IXAGG IndexedAggregate>>=
+import Type
+import SetCategory
+import HomogeneousAggregate
+import EltableAggregate
+import List
)abbrev category IXAGG IndexedAggregate
++ Author: Michael Monagan; revised by Manuel Bronstein and Richard Jenks
++ Date Created: August 87 through August 88
@@ -1026,8 +1043,13 @@ IndexedAggregate(Index: SetCategory, Entry: Type): Category ==
void
@
+
\section{category TBAGG TableAggregate}
+
<<category TBAGG TableAggregate>>=
+import SetCategory
+import KeyedDictionary
+import IndexedAggregate
)abbrev category TBAGG TableAggregate
++ Author: Michael Monagan, Stephen Watt; revised by Manuel Bronstein and Richard Jenks
++ Date Created: August 87 through August 88
@@ -1150,8 +1172,14 @@ TableAggregate(Key:SetCategory, Entry:SetCategory): Category ==
tally
@
+
\section{category RCAGG RecursiveAggregate}
+
<<category RCAGG RecursiveAggregate>>=
+import Type
+import SetCategory
+import List
+import Boolean
)abbrev category RCAGG RecursiveAggregate
++ Author: Michael Monagan; revised by Manuel Bronstein and Richard Jenks
++ Date Created: August 87 through August 88
@@ -1217,7 +1245,10 @@ RecursiveAggregate(S:Type): Category == HomogeneousAggregate(S) with
@
\section{category BRAGG BinaryRecursiveAggregate}
+
<<category BRAGG BinaryRecursiveAggregate>>=
+import Type
+import RecursiveAggregate
)abbrev category BRAGG BinaryRecursiveAggregate
++ Author: Michael Monagan; revised by Manuel Bronstein and Richard Jenks
++ Date Created: August 87 through August 88
@@ -1331,8 +1362,12 @@ BinaryRecursiveAggregate(S:Type):Category == RecursiveAggregate S with
setelt(x,"right",b) == setright_!(x,b)
@
+
\section{category DLAGG DoublyLinkedAggregate}
+
<<category DLAGG DoublyLinkedAggregate>>=
+import Type
+import RecursiveAggregate
)abbrev category DLAGG DoublyLinkedAggregate
++ Author: Michael Monagan; revised by Manuel Bronstein and Richard Jenks
++ Date Created: August 87 through August 88
@@ -1377,8 +1412,13 @@ DoublyLinkedAggregate(S:Type): Category == RecursiveAggregate S with
++ setnext!(u,v) destructively sets the next node of doubly-linked aggregate u to v, returning v.
@
+
\section{category URAGG UnaryRecursiveAggregate}
+
<<category URAGG UnaryRecursiveAggregate>>=
+import Type
+import RecursiveAggregate
+import NonNegativeInteger
)abbrev category URAGG UnaryRecursiveAggregate
++ Author: Michael Monagan; revised by Manuel Bronstein and Richard Jenks
++ Date Created: August 87 through August 88
@@ -1644,7 +1684,12 @@ UnaryRecursiveAggregate(S:Type): Category == RecursiveAggregate S with
@
\section{category STAGG StreamAggregate}
+
<<category STAGG StreamAggregate>>=
+import Type
+import UnaryRecursiveAggregate
+import LinearAggregate
+import Boolean
)abbrev category STAGG StreamAggregate
++ Author: Michael Monagan; revised by Manuel Bronstein and Richard Jenks
++ Date Created: August 87 through August 88
@@ -1736,7 +1781,13 @@ StreamAggregate(S:Type): Category ==
@
\section{category LNAGG LinearAggregate}
+
<<category LNAGG LinearAggregate>>=
+import Type
+import Collection
+import IndexedAggregate
+import NonNegativeInteger
+import Integer
)abbrev category LNAGG LinearAggregate
++ Author: Michael Monagan; revised by Manuel Bronstein and Richard Jenks
++ Date Created: August 87 through August 88
@@ -1822,7 +1873,14 @@ LinearAggregate(S:Type): Category ==
@
\section{category FLAGG FiniteLinearAggregate}
+
<<category FLAGG FiniteLinearAggregate>>=
+import Type
+import SetCategory
+import OrderedSet
+import LinearAggregate
+import Boolean
+import Integer
)abbrev category FLAGG FiniteLinearAggregate
++ Author: Michael Monagan; revised by Manuel Bronstein and Richard Jenks
++ Date Created: August 87 through August 88
@@ -1904,8 +1962,12 @@ FiniteLinearAggregate(S:Type): Category == LinearAggregate S with
sort_! l == sort_!(_<$S, l)
@
+
\section{category A1AGG OneDimensionalArrayAggregate}
+
<<category A1AGG OneDimensionalArrayAggregate>>=
+import Type
+import FiniteLinearAggregate
)abbrev category A1AGG OneDimensionalArrayAggregate
++ Author: Michael Monagan; revised by Manuel Bronstein and Richard Jenks
++ Date Created: August 87 through August 88
@@ -2157,8 +2219,14 @@ OneDimensionalArrayAggregate(S:Type): Category ==
@
+
\section{category ELAGG ExtensibleLinearAggregate}
+
<<category ELAGG ExtensibleLinearAggregate>>=
+import Type
+import LinearAggregate
+import OrderedSet
+import Integer
)abbrev category ELAGG ExtensibleLinearAggregate
++ Author: Michael Monagan; revised by Manuel Bronstein and Richard Jenks
++ Date Created: August 87 through August 88
@@ -2225,8 +2293,14 @@ ExtensibleLinearAggregate(S:Type):Category == LinearAggregate S with
merge_!(x, y) == merge_!(_<$S, x, y)
@
+
\section{category LSAGG ListAggregate}
+
<<category LSAGG ListAggregate>>=
+import Type
+import StreamAggregate
+import FiniteLinearAggregate
+import ExtensibleLinearAggregate
)abbrev category LSAGG ListAggregate
++ Author: Michael Monagan; revised by Manuel Bronstein and Richard Jenks
++ Date Created: August 87 through August 88
@@ -2449,7 +2523,11 @@ ListAggregate(S:Type): Category == Join(StreamAggregate S,
@
\section{category ALAGG AssociationListAggregate}
+
<<category ALAGG AssociationListAggregate>>=
+import SetCategory
+import TableAggregate
+import ListAggregate
)abbrev category ALAGG AssociationListAggregate
++ Author: Michael Monagan; revised by Manuel Bronstein and Richard Jenks
++ Date Created: August 87 through August 88
@@ -2473,7 +2551,14 @@ AssociationListAggregate(Key:SetCategory,Entry:SetCategory): Category ==
@
\section{category SRAGG StringAggregate}
+
<<category SRAGG StringAggregate>>=
+import OneDimensionalArrayAggregate Character
+import UniversalSegment
+import Boolean
+import Character
+import CharacterClass
+import Integer
)abbrev category SRAGG StringAggregate
++ Author: Stephen Watt and Michael Monagan. revised by Manuel Bronstein and Richard Jenks
++ Date Created: August 87 through August 88
@@ -2574,8 +2659,13 @@ StringAggregate: Category == OneDimensionalArrayAggregate Character with
elt(s:%, t:%): % == concat(s,t)$%
@
+
\section{category BTAGG BitAggregate}
+
<<category BTAGG BitAggregate>>=
+import OrderedSet
+import Logic
+import OneDimensionalArrayAggregate Boolean
)abbrev category BTAGG BitAggregate
++ Author: Michael Monagan; revised by Manuel Bronstein and Richard Jenks
++ Date Created: August 87 through August 88
@@ -2623,7 +2713,9 @@ BitAggregate(): Category ==
nor(v, u) == map(nor, v, u)
@
+
\section{License}
+
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
diff --git a/src/algebra/any.spad.pamphlet b/src/algebra/any.spad.pamphlet
index e832356e..0854e8e4 100644
--- a/src/algebra/any.spad.pamphlet
+++ b/src/algebra/any.spad.pamphlet
@@ -12,7 +12,10 @@
\eject
\section{domain NONE None}
+
<<domain NONE None>>=
+import SetCategory
+import OutputForm
)abbrev domain NONE None
++ Author:
++ Date Created:
@@ -36,7 +39,11 @@ None():SetCategory == add
\section{The Maybe domain}
+
<<domain MAYBE Maybe>>=
+import UnionType
+import CoercibleTo OutputForm
+import Boolean
)abbrev domain MAYBE Maybe
++ Author: Gabriel Dos Reis
++ Date Created: August 20, 2008
@@ -107,7 +114,14 @@ NoneFunctions1(S:Type): Exports == Implementation where
@
\section{domain ANY Any}
+
<<domain ANY Any>>=
+import SetCategory
+import Boolean
+import String
+import OutputForm
+import SExpression
+import None
)abbrev domain ANY Any
++ Author: Robert S. Sutor
++ Date Created:
@@ -191,6 +205,7 @@ Any(): SetCategory with
\section{package ANY1 AnyFunctions1}
<<package ANY1 AnyFunctions1>>=
+import Type
import Boolean
import Any
)abbrev package ANY1 AnyFunctions1
@@ -245,6 +260,7 @@ AnyFunctions1(S:Type): with
\section{domain PROPERTY Property}
<<domain PROPERTY Property>>=
+import CoercibleTo OutputForm
import Symbol
import SExpression
)abbrev domain PROPERTY Property
@@ -295,7 +311,11 @@ Property(): Public == Private where
@
\section{domain BINDING Binding}
+
<<domain BINDING Binding>>=
+import CoercibleTo OutputForm
+import Symbol
+import List Property
)abbrev domain BINDING Binding
++ Author: Gabriel Dos Reis
++ Date Created: October 24, 2007
@@ -335,7 +355,12 @@ Binding(): Public == Private where
@
\section{domain CONTOUR Contour}
+
<<domain CONTOUR Contour>>=
+import CoercibleTo OutputForm
+import Symbol
+import Binding
+import List Binding
)abbrev domain CONTOUR Contour
++ Author: Gabriel Dos Reis
++ Date Created: October 24, 2007
@@ -368,7 +393,11 @@ Contour(): Public == Private where
@
\section{domain SCOPE Scope}
+
<<domain SCOPE Scope>>=
+import CoercibleTo OutputForm
+import Binding
+import List Contour
)abbrev domain SCOPE Scope
++ Author: Gabriel Dos Reis
++ Date Created: October 24, 2007
@@ -421,7 +450,12 @@ Scope(): Public == Private where
@
\section{domain ENV Environment}
+
<<domain ENV Environment>>=
+import CoercibleTo OutputForm
+import Symbol
+import List Scope
+import List Property
)abbrev domain ENV Environment
++ Author: Gabriel Dos Reis
++ Date Created: October 24, 2007
@@ -486,6 +520,7 @@ Environment(): Public == Private where
\section{License}
+
<<license>>=
--Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd.
--All rights reserved.
diff --git a/src/algebra/equation1.spad.pamphlet b/src/algebra/equation1.spad.pamphlet
index a147e689..92c0e02d 100644
--- a/src/algebra/equation1.spad.pamphlet
+++ b/src/algebra/equation1.spad.pamphlet
@@ -4,13 +4,18 @@
\title{\$SPAD/src/algebra equation1.spad}
\author{The Axiom Team}
\maketitle
+
\begin{abstract}
\end{abstract}
-\eject
\tableofcontents
\eject
+
\section{category IEVALAB InnerEvalable}
+
<<category IEVALAB InnerEvalable>>=
+import SetCategory
+import Type
+import List
)abbrev category IEVALAB InnerEvalable
-- FOR THE BENEFIT OF LIBAX0 GENERATION
++ Author:
@@ -39,8 +44,14 @@ InnerEvalable(A:SetCategory, B:Type): Category == with
eval(f:$, x:A, v:B) == eval(f, [x], [v])
@
+
\section{category EVALAB Evalable}
+
<<category EVALAB Evalable>>=
+import SetCategory
+import InnerEvalable
+import Equation
+import List
)abbrev category EVALAB Evalable
++ Author:
++ Date Created:
@@ -66,7 +77,9 @@ Evalable(R:SetCategory): Category == InnerEvalable(R,R) with
eval(f:$, xs:List R,vs:List R) == eval(f,[x=v for x in xs for v in vs])
@
+
\section{License}
+
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
diff --git a/src/algebra/equation2.spad.pamphlet b/src/algebra/equation2.spad.pamphlet
index 25a5f2cf..4079a096 100644
--- a/src/algebra/equation2.spad.pamphlet
+++ b/src/algebra/equation2.spad.pamphlet
@@ -4,13 +4,30 @@
\title{\$SPAD/src/algebra equation2.spad}
\author{Stephen M. Watt, Johannes Grabmeier}
\maketitle
+
\begin{abstract}
\end{abstract}
-\eject
\tableofcontents
\eject
+
\section{domain EQ Equation}
+
<<domain EQ Equation>>=
+import Type
+import SetCategory
+import AbelianSemiGroup
+import AbelianGroup
+import SemiGroup
+import Monoid
+import CoercibleTo Boolean
+import InnerEvalable
+import CommutativeRing
+import PartialDifferentialRing
+import Field
+import VectorSpace
+import Symbol
+import OutputForm
+import List
)abbrev domain EQ Equation
--FOR THE BENEFIT OF LIBAX0 GENERATION
++ Author: Stephen M. Watt, enhancements by Johannes Grabmeier
@@ -227,6 +244,7 @@ Equation(S: Type): public == private where
\section{package EQ2 EquationFunctions2}
<<package EQ2 EquationFunctions2>>=
+import Type
import Equation
)abbrev package EQ2 EquationFunctions2
++ Author:
@@ -248,8 +266,17 @@ EquationFunctions2(S: Type, R: Type): with
map(fn, eqn) == equation(fn lhs eqn, fn rhs eqn)
@
+
\section{category FEVALAB FullyEvalableOver}
+
<<category FEVALAB FullyEvalableOver>>=
+import SetCategory
+import Eltable
+import Evalable
+import InnerEvalable
+import Symbol
+import List
+import Equation
)abbrev category FEVALAB FullyEvalableOver
++ Author:
++ Date Created:
@@ -281,7 +308,9 @@ FullyEvalableOver(R:SetCategory): Category == with
eval(x:$, ls:List Symbol, lv:List R) == map(eval(#1, ls, lv), x)
@
+
\section{License}
+
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
diff --git a/src/algebra/grdef.spad.pamphlet b/src/algebra/grdef.spad.pamphlet
index bfcdf379..bbb3d049 100644
--- a/src/algebra/grdef.spad.pamphlet
+++ b/src/algebra/grdef.spad.pamphlet
@@ -4,13 +4,18 @@
\title{\$SPAD/src/algebra grdef.spad}
\author{Clifton J. Williamson}
\maketitle
+
\begin{abstract}
\end{abstract}
-\eject
\tableofcontents
\eject
+
\section{package GRDEF GraphicsDefaults}
+
<<package GRDEF GraphicsDefaults>>=
+import Boolean
+import Integer
+import DoubleFloat
)abbrev package GRDEF GraphicsDefaults
++ Author: Clifton J. Williamson
++ Date Created: 8 January 1990
@@ -98,7 +103,9 @@ GraphicsDefaults(): Exports == Implementation where
screenResolution n == setScreenResolution(n)$Plot
@
+
\section{License}
+
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
diff --git a/src/algebra/ituple.spad.pamphlet b/src/algebra/ituple.spad.pamphlet
index 3d62dfc6..7e18b0ba 100644
--- a/src/algebra/ituple.spad.pamphlet
+++ b/src/algebra/ituple.spad.pamphlet
@@ -1,16 +1,22 @@
\documentclass{article}
\usepackage{axiom}
\begin{document}
-\title{\$SPAD/src/algebra ituple.spad}
+\title{src/algebra ituple.spad}
\author{Clifton J. Williamson}
\maketitle
+
\begin{abstract}
\end{abstract}
-\eject
\tableofcontents
\eject
+
\section{domain ITUPLE InfiniteTuple}
+
<<domain ITUPLE InfiniteTuple>>=
+import Type
+import CoercibleTo OutputForm
+import Boolean
+import Stream
)abbrev domain ITUPLE InfiniteTuple
++ Infinite tuples for the interpreter
++ Author: Clifton J. Williamson
@@ -52,6 +58,7 @@ InfiniteTuple(S:Type): Exports == Implementation where
\section{package ITFUN2 InfiniteTupleFunctions2}
<<package ITFUN2 InfiniteTupleFunctions2>>=
+import Type
import InfiniteTuple
)abbrev package ITFUN2 InfiniteTupleFunctions2
InfiniteTupleFunctions2(A:Type,B:Type): Exports == Implementation where
@@ -72,6 +79,7 @@ InfiniteTupleFunctions2(A:Type,B:Type): Exports == Implementation where
\section{package ITFUN3 InfiniteTupleFunctions3}
<<package ITFUN3 InfiniteTupleFunctions3>>=
+import Type
import InfiniteTuple
import Stream
)abbrev package ITFUN3 InfiniteTupleFunctions3
@@ -100,7 +108,9 @@ InfiniteTupleFunctions3(A:Type, B:Type,C:Type): Exports
map(f, s1 pretend Stream(A), s2)$SF3
@
+
\section{License}
+
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
diff --git a/src/algebra/list.spad.pamphlet b/src/algebra/list.spad.pamphlet
index 3db78db6..57fabad7 100644
--- a/src/algebra/list.spad.pamphlet
+++ b/src/algebra/list.spad.pamphlet
@@ -1,16 +1,20 @@
\documentclass{article}
\usepackage{axiom}
\begin{document}
-\title{\$SPAD/src/algebra list.spad}
+\title{src/algebra list.spad}
\author{Michael Monagon, Manuel Bronstein}
\maketitle
+
\begin{abstract}
\end{abstract}
-\eject
\tableofcontents
\eject
+
\section{domain ILIST IndexedList}
+
<<domain ILIST IndexedList>>=
+import Type
+import ListAggregate
)abbrev domain ILIST IndexedList
++ Author: Michael Monagan
++ Date Created: Sep 1987
@@ -204,6 +208,8 @@ IndexedList(S:Type, mn:Integer): Exports == Implementation where
\section{domain LIST List}
<<domain LIST List>>=
+import Type
+import ListAggregate
)abbrev domain LIST List
++ Author: Michael Monagan
++ Date Created: Sep 1987
@@ -340,7 +346,10 @@ List(S:Type): Exports == Implementation where
@
\section{package LIST2 ListFunctions2}
+
<<package LIST2 ListFunctions2>>=
+import Type
+import FiniteLinearAggregateFunctions2
)abbrev package LIST2 ListFunctions2
++ Author:
++ Date Created:
@@ -387,8 +396,12 @@ ListFunctions2(A:Type, B:Type): public == private where
reduce(f, l, b) == reduce(f, l, b)$O2
@
+
\section{package LIST3 ListFunctions3}
+
<<package LIST3 ListFunctions3>>=
+import Type
+import Type
)abbrev package LIST3 ListFunctions3
++ Author:
++ Date Created:
@@ -423,8 +436,13 @@ ListFunctions3(A:Type, B:Type, C:Type): public == private where
concat(fn(first la, first lb), map(fn, rest la, rest lb))
@
+
\section{package LIST2MAP ListToMap}
+
<<package LIST2MAP ListToMap>>=
+import Type
+import SetCategory
+import List
)abbrev package LIST2MAP ListToMap
++ Author: Manuel Bronstein
++ Date Created: 22 Mar 1988
@@ -513,8 +531,13 @@ ListToMap(A:SetCategory, B:Type): Exports == Implementation where
lb.p
@
+
\section{domain ALIST AssociationList}
+
<<domain ALIST AssociationList>>=
+import SetCategory
+import List
+import Reference
)abbrev domain ALIST AssociationList
++ Author:
++ Date Created:
@@ -596,7 +619,9 @@ AssociationList(Key:SetCategory, Entry:SetCategory):
first(curr).entry
@
+
\section{License}
+
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
diff --git a/src/algebra/retract.spad.pamphlet b/src/algebra/retract.spad.pamphlet
index 8738f2cf..ac466e52 100644
--- a/src/algebra/retract.spad.pamphlet
+++ b/src/algebra/retract.spad.pamphlet
@@ -1,16 +1,23 @@
\documentclass{article}
\usepackage{axiom}
\begin{document}
-\title{\$SPAD/src/algebra retract.spad}
+\title{src/algebra retract.spad}
\author{Manuel Bronstein}
+
\maketitle
+
\begin{abstract}
\end{abstract}
-\eject
\tableofcontents
\eject
+
\section{category FRETRCT FullyRetractableTo}
+
<<category FRETRCT FullyRetractableTo>>=
+import Type
+import RetractableTo
+import Integer
+import Fraction
)abbrev category FRETRCT FullyRetractableTo
++ Author: Manuel Bronstein
++ Description:
@@ -45,8 +52,13 @@ FullyRetractableTo(S: Type): Category == RetractableTo(S) with
retractIfCan(u::S)
@
+
\section{package INTRET IntegerRetractions}
+
<<package INTRET IntegerRetractions>>=
+import RetractableTo
+import Boolean
+import Integer
)abbrev package INTRET IntegerRetractions
++ Author: Manuel Bronstein
++ Description: Provides integer testing and retraction functions.
@@ -67,8 +79,14 @@ IntegerRetractions(S:RetractableTo(Integer)): with
integerIfCan s == retractIfCan s
@
+
\section{package RATRET RationalRetractions}
+
<<package RATRET RationalRetractions>>=
+import RetractableTo
+import Boolean
+import Integer
+import Fraction
)abbrev package RATRET RationalRetractions
++ Author: Manuel Bronstein
++ Description: rational number testing and retraction functions.
@@ -90,7 +108,9 @@ RationalRetractions(S:RetractableTo(Fraction Integer)): with
rationalIfCan s == retractIfCan s
@
+
\section{License}
+
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
diff --git a/src/algebra/seg.spad.pamphlet b/src/algebra/seg.spad.pamphlet
index 935c8794..ac65684b 100644
--- a/src/algebra/seg.spad.pamphlet
+++ b/src/algebra/seg.spad.pamphlet
@@ -4,13 +4,17 @@
\title{\$SPAD/src/algebra seg.spad}
\author{Stephen M. Watt, Robert Sutor}
\maketitle
+
\begin{abstract}
\end{abstract}
-\eject
\tableofcontents
\eject
+
\section{category SEGCAT SegmentCategory}
+
<<category SEGCAT SegmentCategory>>=
+import Type
+import Integer
)abbrev category SEGCAT SegmentCategory
++ Author: Stephen M. Watt
++ Date Created: December 1986
@@ -54,8 +58,13 @@ SegmentCategory(S:Type): Category == Type with
++ convert(i) creates the segment \spad{i..i}.
@
+
\section{category SEGXCAT SegmentExpansionCategory}
+
<<category SEGXCAT SegmentExpansionCategory>>=
+import OrderedRing
+import StreamAggregate
+import List
)abbrev category SEGXCAT SegmentExpansionCategory
++ Author: Stephen M. Watt
++ Date Created: June 5, 1991
@@ -87,8 +96,16 @@ SegmentExpansionCategory(S: OrderedRing, L: StreamAggregate(S)): Category ==
++ \spad{[f(l), f(l+k), ..., f(lN)]}, where \spad{lN <= h < lN+k}.
@
+
\section{domain SEG Segment}
+
<<domain SEG Segment>>=
+import Type
+import SetCategory
+import SegmentCategory
+import SegmentExpansionCategory
+import Integer
+import List
)abbrev domain SEG Segment
++ Author: Stephen M. Watt
++ Date Created: December 1986
@@ -165,8 +182,14 @@ Segment(S:Type): SegmentCategory(S) with
reverse_! lr
@
+
\section{package SEG2 SegmentFunctions2}
+
<<package SEG2 SegmentFunctions2>>=
+import Type
+import OrderedRing
+import Segment
+import List
)abbrev package SEG2 SegmentFunctions2
++ Author:
++ Date Created:
@@ -215,8 +238,13 @@ SegmentFunctions2(R:Type, S:Type): public == private where
reverse_! lr
@
+
\section{domain SEGBIND SegmentBinding}
+
<<domain SEGBIND SegmentBinding>>=
+import Type
+import SetCategory
+import Segement
)abbrev domain SEGBIND SegmentBinding
++ Author:
++ Date Created:
@@ -264,6 +292,7 @@ SegmentBinding(S:Type): Type with
\section{package SEGBIND2 SegmentBindingFunctions2}
<<package SEGBIND2 SegmentBindingFunctions2>>=
+import Type
import SegmentBinding
)abbrev package SEGBIND2 SegmentBindingFunctions2
++ Author:
@@ -287,8 +316,13 @@ SegmentBindingFunctions2(R:Type, S:Type): with
equation(variable b, map(f, segment b)$SegmentFunctions2(R, S))
@
+
\section{domain UNISEG UniversalSegment}
+
<<domain UNISEG UniversalSegment>>=
+import Type
+import SegmentCategory
+import Segment
)abbrev domain UNISEG UniversalSegment
++ Author: Robert S. Sutor
++ Date Created: 1987
@@ -414,8 +448,13 @@ UniversalSegment(S: Type): SegmentCategory(S) with
concat(construct expand(lb), st)
@
+
\section{package UNISEG2 UniversalSegmentFunctions2}
+
<<package UNISEG2 UniversalSegmentFunctions2>>=
+import Type
+import OrderedRing
+import UniversalSegment
)abbrev package UNISEG2 UniversalSegmentFunctions2
++ Author:
++ Date Created:
@@ -451,8 +490,12 @@ UniversalSegmentFunctions2(R:Type, S:Type): with
map(f, expand u)$StreamFunctions2(R, S)
@
+
\section{package INCRMAPS IncrementingMaps}
+
<<package INCRMAPS IncrementingMaps>>=
+import Monoid
+import AbelianSemiGroup
)abbrev package INCRMAPS IncrementingMaps
++ Author:
++ Date Created:
@@ -481,7 +524,9 @@ IncrementingMaps(R:Join(Monoid, AbelianSemiGroup)): with
incrementBy n == n + #1
@
+
\section{License}
+
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
diff --git a/src/algebra/stream.spad.pamphlet b/src/algebra/stream.spad.pamphlet
index 0cb271b5..ea503c3d 100644
--- a/src/algebra/stream.spad.pamphlet
+++ b/src/algebra/stream.spad.pamphlet
@@ -4,13 +4,18 @@
\title{\$SPAD/src/algebra stream.spad}
\author{Clifton J. Williamson, William Burge, Stephen M. Watt}
\maketitle
+
\begin{abstract}
\end{abstract}
-\eject
+
\tableofcontents
\eject
+
\section{category LZSTAGG LazyStreamAggregate}
<<category LZSTAGG LazyStreamAggregate>>=
+import Type
+import Boolean
+import NonNegativeInteger
)abbrev category LZSTAGG LazyStreamAggregate
++ Category of streams with lazy evaluation
++ Author: Clifton J. Williamson
@@ -486,8 +491,13 @@ LazyStreamAggregate(S:Type): Category == StreamAggregate(S) with
x
@
+
\section{package CSTTOOLS CyclicStreamTools}
+
<<package CSTTOOLS CyclicStreamTools>>=
+import Type
+import NonNegativeInteger
+import LazyStreamAggregate
)abbrev package CSTTOOLS CyclicStreamTools
++ Functions for dealing with cyclic streams
++ Author: Clifton J. Williamson
@@ -540,6 +550,12 @@ CyclicStreamTools(S,ST): Exports == Implementation where
@
\section{domain STREAM Stream}
<<domain STREAM Stream>>=
+import Type
+import Boolean
+import Integer
+import NonNegativeInteger
+import UniversalSegment
+import List
)abbrev domain STREAM Stream
++ Implementation of streams via lazy evaluation
++ Authors: Burge, Watt; updated by Clifton J. Williamson
@@ -1132,6 +1148,7 @@ Stream(S): Exports == Implementation where
\section{package STREAM1 StreamFunctions1}
<<package STREAM1 StreamFunctions1>>=
+import Type
import Stream
)abbrev package STREAM1 StreamFunctions1
++ Authors: Burge, Watt; updated by Clifton J. Williamson
@@ -1159,6 +1176,7 @@ StreamFunctions1(S:Type): Exports == Implementation where
\section{package STREAM2 StreamFunctions2}
<<package STREAM2 StreamFunctions2>>=
+import Type
import Stream
)abbrev package STREAM2 StreamFunctions2
++ Authors: Burge, Watt; updated by Clifton J. Williamson
@@ -1221,6 +1239,7 @@ StreamFunctions2(A:Type,B:Type): Exports == Implementation where
\section{package STREAM3 StreamFunctions3}
<<package STREAM3 StreamFunctions3>>=
+import Type
import Stream
)abbrev package STREAM3 StreamFunctions3
++ Authors: Burge, Watt; updated by Clifton J. Williamson
diff --git a/src/algebra/syntax.spad.pamphlet b/src/algebra/syntax.spad.pamphlet
index 04f666e4..c6640500 100644
--- a/src/algebra/syntax.spad.pamphlet
+++ b/src/algebra/syntax.spad.pamphlet
@@ -12,7 +12,15 @@
\eject
\section{domain Syntax}
+
<<domain SYNTAX Syntax>>=
+import UnionType
+import SetCategory
+import Boolean
+import Integer
+import DoubleFloat
+import Symbol
+import SExpression
)abbrev domain SYNTAX Syntax
++ Author: Gabriel Dos Reis
++ Date Created: November 10, 2007
@@ -213,7 +221,11 @@ Syntax(): Public == Private where
\section{domain ConstructorCall}
+
<<domain CTORCALL ConstructorCall>>=
+import SetCategory
+import Symbol
+import List Syntax
)abbrev domain CTORCALL ConstructorCall
++ Author: Gabriel Dos Reis
++ Date Created: January 19, 2008
@@ -246,7 +258,10 @@ ConstructorCall(): Public == Private where
@
\section{The Signature domain}
+
<<domain SIG Signature>>=
+import SetCategory
+import ConstructorCall
)abbrev domain SIG Signature
++ Author: Gabriel Dos Reis
++ Date Created: January 10, 2008
@@ -274,7 +289,13 @@ Signature(): Public == Private where
@
\section{domain ElaboratedExpression}
+
<<domain ELABEXPR ElaboratedExpression>>=
+import Boolean
+import Symbol
+import ConstructorCall
+import List
+import SExpression
)abbrev domain ELABEXPR ElaboratedExpression
++ Author: Gabriel Dos Reis
++ Date Created: January 19, 2008
@@ -338,6 +359,8 @@ ElaboratedExpression(): Public == Private where
\section{SpadAbstractSyntaxCategory}
<<category ASTCAT AbstractSyntaxCategory>>=
+import SetCategory
+import CoercibleTo Syntax
)abbrev category ASTCAT AbstractSyntaxCategory
++ Author: Gabriel Dos Reis
++ Date Created: July 5, 2008
@@ -355,6 +378,9 @@ AbstractSyntaxCategory(): Category ==
\subsection{The HeadAst domain}
<<domain HEADAST HeadAst>>=
+import AbstractSyntaxCategory
+import Symbol
+import List Symbol
)abbrev domain HEADAST HeadAst
++ Author: Gabriel Dos Reis
++ Date Created: November 10, 2007
diff --git a/src/algebra/void.spad.pamphlet b/src/algebra/void.spad.pamphlet
index 1a27a5fb..890b854b 100644
--- a/src/algebra/void.spad.pamphlet
+++ b/src/algebra/void.spad.pamphlet
@@ -1,15 +1,17 @@
\documentclass{article}
\usepackage{axiom}
\begin{document}
-\title{\$SPAD/src/algebra void.spad}
+\title{src/algebra void.spad}
\author{Stephen M. Watt}
\maketitle
+
\begin{abstract}
\end{abstract}
-\eject
\tableofcontents
\eject
+
\section{domain VOID Void}
+
<<domain VOID Void>>=
)abbrev domain VOID Void
-- These types act as the top and bottom of the type lattice
@@ -39,8 +41,11 @@ Void: with
coerce(v:%) == coerce(v)$Rep
@
+
\section{domain EXIT Exit}
+
<<domain EXIT Exit>>=
+import SetCategory
)abbrev domain EXIT Exit
++ Author: Stephen M. Watt
++ Date Created: 1986
@@ -64,8 +69,12 @@ Exit: SetCategory == add
n1 = n2 == error "Cannot use an Exit value."
@
+
\section{package RESLATC ResolveLatticeCompletion}
+
<<package RESLATC ResolveLatticeCompletion>>=
+import Void
+import Exit
)abbrev package RESLATC ResolveLatticeCompletion
++ Author: Stephen M. Watt
++ Date Created: 1986
@@ -98,7 +107,9 @@ ResolveLatticeCompletion(S: Type): with
error "Bug: Should not be able to obtain value of type Exit"
@
+
\section{License}
+
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
diff --git a/src/interp/define.boot b/src/interp/define.boot
index 5b017517..ea1e1f91 100644
--- a/src/interp/define.boot
+++ b/src/interp/define.boot
@@ -1508,7 +1508,7 @@ compCategory(x,m,e) ==
$sigList: local := nil
$atList: local := nil
$sigList:= $atList:= nil
- for x in l repeat compCategoryItem(x,nil)
+ for x in l repeat compCategoryItem(x,nil,e)
rep:= mkExplicitCategoryFunction(domainOrPackage,$sigList,$atList)
--if inside compDefineCategory, provide for category argument substitution
[rep,m,e]
@@ -1567,41 +1567,41 @@ DomainSubstitutionFunction(parameters,body) ==
body:= ["COND",[name],['(QUOTE T),['SETQ,name,body]]]
body
-compCategoryItem(x,predl) ==
+compCategoryItem(x,predl,env) ==
x is nil => nil
--1. if x is a conditional expression, recurse; otherwise, form the predicate
x is ["COND",[p,e]] =>
predl':= [p,:predl]
- e is ["PROGN",:l] => for y in l repeat compCategoryItem(y,predl')
- compCategoryItem(e,predl')
+ e is ["PROGN",:l] => for y in l repeat compCategoryItem(y,predl',env)
+ compCategoryItem(e,predl',env)
x is ["IF",a,b,c] =>
predl':= [a,:predl]
if b^="%noBranch" then
- b is ["PROGN",:l] => for y in l repeat compCategoryItem(y,predl')
- compCategoryItem(b,predl')
+ b is ["PROGN",:l] => for y in l repeat compCategoryItem(y,predl',env)
+ compCategoryItem(b,predl',env)
c="%noBranch" => nil
predl':= [["not",a],:predl]
- c is ["PROGN",:l] => for y in l repeat compCategoryItem(y,predl')
- compCategoryItem(c,predl')
+ c is ["PROGN",:l] => for y in l repeat compCategoryItem(y,predl',env)
+ compCategoryItem(c,predl',env)
pred:= (predl => MKPF(predl,"AND"); true)
--2. if attribute, push it and return
x is ["ATTRIBUTE",y] => PUSH(MKQ [y,pred],$atList)
--3. it may be a list, with PROGN as the CAR, and some information as the CDR
- x is ["PROGN",:l] => for u in l repeat compCategoryItem(u,predl)
+ x is ["PROGN",:l] => for u in l repeat compCategoryItem(u,predl,env)
-- 4. otherwise, x gives a signature for a
-- single operator name or a list of names; if a list of names,
-- recurse
["SIGNATURE",op,:sig]:= x
null atom op =>
- for y in op repeat compCategoryItem(["SIGNATURE",y,:sig],predl)
+ for y in op repeat compCategoryItem(["SIGNATURE",y,:sig],predl,env)
op in '(per rep) =>
stackSemanticError(['"cannot export signature for", :bright op],nil)
nil
--4. branch on a single type or a signature %with source and target
for t in first sig repeat
- diagnoseUknownType(t,e)
+ diagnoseUknownType(t,env)
PUSH(MKQ [rest x,pred],$sigList)