aboutsummaryrefslogtreecommitdiff
path: root/src/algebra
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-08-10 20:07:45 +0000
committerdos-reis <gdr@axiomatics.org>2008-08-10 20:07:45 +0000
commitc9623290591d36710b6abea5f71962366d287335 (patch)
treebe07a5f897d788f4b8d34bf8641b12317c6240e7 /src/algebra
parent24a3196e17dc9792891c284c67d6dbe2171fd2d8 (diff)
downloadopen-axiom-c9623290591d36710b6abea5f71962366d287335.tar.gz
* algebra/syntax.spad.pamphlet (AbstractSyntaxCategory): New.
(HeadAst): Likewise.
Diffstat (limited to 'src/algebra')
-rw-r--r--src/algebra/Makefile.in29
-rw-r--r--src/algebra/Makefile.pamphlet29
-rw-r--r--src/algebra/exposed.lsp.pamphlet2
-rw-r--r--src/algebra/syntax.spad.pamphlet45
4 files changed, 75 insertions, 30 deletions
diff --git a/src/algebra/Makefile.in b/src/algebra/Makefile.in
index 93dd4d36..f230c252 100644
--- a/src/algebra/Makefile.in
+++ b/src/algebra/Makefile.in
@@ -819,7 +819,8 @@ axiom_algebra_layer_23_nrlibs = \
axiom_algebra_layer_23_objects = \
$(addprefix $(OUT)/, \
$(addsuffix .$(FASLEXT),$(axiom_algebra_layer_23)))
-axiom_algebra_layer_user = RINTERP
+axiom_algebra_layer_user = \
+ RINTERP ASTCAT HEADAST
axiom_algebra_layer_user_nrlibs = \
$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_user))
@@ -828,13 +829,15 @@ axiom_algebra_layer_user_objects = \
$(addprefix $(OUT)/, \
$(addsuffix .$(FASLEXT),$(axiom_algebra_layer_user)))
+HEADAST.NRLIB/code.$(FASLEXT): $(OUT)/ASTCAT.$(FASLEXT)
+
.PHONY: all all-algebra mkdir-output-directory
all: all-ax
all-ax all-algebra: stamp
@ echo finished $(builddir)
-stamp: mkdir-output-directory ${SPADFILES} bootstrap-stamp ${TESTS}
+stamp: mkdir-output-directory ${SPADFILES} user-stamp ${TESTS}
-rm -f stamp
$(STAMP) stamp
@@ -946,8 +949,8 @@ $(axiom_algebra_layer_20_objects): 19-stamp
$(axiom_algebra_layer_21_objects): 20-stamp
$(axiom_algebra_layer_22_objects): 21-stamp
$(axiom_algebra_layer_23_objects): 22-stamp
-$(axiom_algebra_layer_user_objects): 23-stamp
-$(axiom_algebra_bootstrap_objects): user-stamp
+$(axiom_algebra_bootstrap_objects): 23-stamp
+$(axiom_algebra_layer_user_objects): bootstrap-stamp
strap-stamp: $(axiom_algebra_layer_strap_objects)
@ rm -f strap-stamp
@@ -1124,23 +1127,19 @@ strap-stamp: $(axiom_algebra_layer_strap_objects)
@ echo === layer 23 of 23 complete ======
@ echo ==================================
-user-stamp: 23-stamp $(axiom_algebra_layer_user_objects)
- @ rm -f user-stamp
- @ $(STAMP) user-stamp
-
-
-# bootstrap-pre: user-stamp $(axiom_algebra_bootstrap_nrlibs)
-# $(axiom_algebra_bootstrap_nrlibs): user-stamp
-
-# bootstrap-post: bootstrap-pre $(axiom_algebra_bootstrap_objects)
-
-bootstrap-stamp: $(axiom_algebra_bootstrap_objects)
+bootstrap-stamp: 23-stamp $(axiom_algebra_bootstrap_objects)
@ rm -f bootstrap-stamp
@ $(STAMP) bootstrap-stamp
@ echo ==================================
@ echo === algebra complete ======
@ echo ==================================
+user-stamp: bootstrap-stamp $(axiom_algebra_layer_user_objects)
+ @ rm -f user-stamp
+ @ $(STAMP) user-stamp
+
+
+
mostlyclean-local:
@rm -f $(OUT)/*.$(FASLEXT) $(OUT)/*.daase
@rm -rf *.NRLIB
diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet
index 84eca427..45536ced 100644
--- a/src/algebra/Makefile.pamphlet
+++ b/src/algebra/Makefile.pamphlet
@@ -1243,7 +1243,8 @@ axiom_algebra_layer_23_objects = \
Rather than classify newly created algebra into the existing type lattice
we add it here.
<<USERLAYER>>=
-axiom_algebra_layer_user = RINTERP
+axiom_algebra_layer_user = \
+ RINTERP ASTCAT HEADAST
axiom_algebra_layer_user_nrlibs = \
$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_user))
@@ -1251,6 +1252,8 @@ axiom_algebra_layer_user_nrlibs = \
axiom_algebra_layer_user_objects = \
$(addprefix $(OUT)/, \
$(addsuffix .$(FASLEXT),$(axiom_algebra_layer_user)))
+
+HEADAST.NRLIB/code.$(FASLEXT): $(OUT)/ASTCAT.$(FASLEXT)
@
\section{Broken Files}
@@ -2019,8 +2022,8 @@ $(axiom_algebra_layer_20_objects): 19-stamp
$(axiom_algebra_layer_21_objects): 20-stamp
$(axiom_algebra_layer_22_objects): 21-stamp
$(axiom_algebra_layer_23_objects): 22-stamp
-$(axiom_algebra_layer_user_objects): 23-stamp
-$(axiom_algebra_bootstrap_objects): user-stamp
+$(axiom_algebra_bootstrap_objects): 23-stamp
+$(axiom_algebra_layer_user_objects): bootstrap-stamp
strap-stamp: $(axiom_algebra_layer_strap_objects)
@ rm -f strap-stamp
@@ -2197,22 +2200,18 @@ strap-stamp: $(axiom_algebra_layer_strap_objects)
@ echo === layer 23 of 23 complete ======
@ echo ==================================
-user-stamp: 23-stamp $(axiom_algebra_layer_user_objects)
- @ rm -f user-stamp
- @ $(STAMP) user-stamp
-
-
-# bootstrap-pre: user-stamp $(axiom_algebra_bootstrap_nrlibs)
-# $(axiom_algebra_bootstrap_nrlibs): user-stamp
-
-# bootstrap-post: bootstrap-pre $(axiom_algebra_bootstrap_objects)
-
-bootstrap-stamp: $(axiom_algebra_bootstrap_objects)
+bootstrap-stamp: 23-stamp $(axiom_algebra_bootstrap_objects)
@ rm -f bootstrap-stamp
@ $(STAMP) bootstrap-stamp
@ echo ==================================
@ echo === algebra complete ======
@ echo ==================================
+
+user-stamp: bootstrap-stamp $(axiom_algebra_layer_user_objects)
+ @ rm -f user-stamp
+ @ $(STAMP) user-stamp
+
+
@
\section{The Makefile}
@@ -2256,7 +2255,7 @@ all: all-ax
all-ax all-algebra: stamp
@ echo finished $(builddir)
-stamp: mkdir-output-directory ${SPADFILES} bootstrap-stamp ${TESTS}
+stamp: mkdir-output-directory ${SPADFILES} user-stamp ${TESTS}
-rm -f stamp
$(STAMP) stamp
diff --git a/src/algebra/exposed.lsp.pamphlet b/src/algebra/exposed.lsp.pamphlet
index b2037c58..2dec4c37 100644
--- a/src/algebra/exposed.lsp.pamphlet
+++ b/src/algebra/exposed.lsp.pamphlet
@@ -168,6 +168,7 @@
(|GroebnerPackage| . GB)
(|GroebnerFactorizationPackage| . GBF)
(|HallBasis| . HB)
+ (|HeadAst| . HEADAST)
(|Heap| . HEAP)
(|HexadecimalExpansion| . HEXADEC)
(|IndexCard| . ICARD)
@@ -539,6 +540,7 @@
(|AbelianMonoid| . ABELMON)
(|AbelianMonoidRing| . AMR)
(|AbelianSemiGroup| . ABELSG)
+ (|AbstractSyntaxCategory| . ASTCAT)
(|Aggregate| . AGG)
(|Algebra| . ALGEBRA)
(|AlgebraicallyClosedField| . ACF)
diff --git a/src/algebra/syntax.spad.pamphlet b/src/algebra/syntax.spad.pamphlet
index 939d040b..04f666e4 100644
--- a/src/algebra/syntax.spad.pamphlet
+++ b/src/algebra/syntax.spad.pamphlet
@@ -335,7 +335,49 @@ ElaboratedExpression(): Public == Private where
@
+\section{SpadAbstractSyntaxCategory}
+
+<<category ASTCAT AbstractSyntaxCategory>>=
+)abbrev category ASTCAT AbstractSyntaxCategory
+++ Author: Gabriel Dos Reis
+++ Date Created: July 5, 2008
+++ Date Last Modified: July 5, 2008
+++ Description: This is the category of Spad abstract syntax trees.
+AbstractSyntaxCategory(): Category ==
+ Join(SetCategory, CoercibleTo Syntax)
+ add
+ coerce(x: %): Syntax ==
+ x pretend Syntax
+ coerce(x: %): OutputForm ==
+ x::Syntax::OutputForm
+@
+
+\subsection{The HeadAst domain}
+
+<<domain HEADAST HeadAst>>=
+)abbrev domain HEADAST HeadAst
+++ Author: Gabriel Dos Reis
+++ Date Created: November 10, 2007
+++ Date Last Modified: July 2008
+++ Description: This domain represents the header of a definition.
+HeadAst(): Public == Private where
+ Public == AbstractSyntaxCategory with
+ headAst: List Symbol -> %
+ ++ headAst [f,x1,..,xn] constructs a function definition header.
+ name: % -> Symbol
+ ++ name(h) returns the name of the operation defined defined.
+ parameters: % -> List Symbol
+ ++ parameters(h) gives the parameters specified in the
+ ++ definition header `h'.
+ Private == add
+ Rep == List Symbol
+ headAst h == per h
+ name h == first rep h
+ parameters h == rest rep h
+@
+
\section{License}
+
<<license>>=
--Copyright (C) 2007-2008, Gabriel Dos Reis.
--All rights reserved.
@@ -374,6 +416,9 @@ ElaboratedExpression(): Public == Private where
<<domain SYNTAX Syntax>>
<<domain CTORCALL ConstructorCall>>
<<domain ELABEXPR ElaboratedExpression>>
+
+<<category ASTCAT AbstractSyntaxCategory>>
+<<domain HEADAST HeadAst>>
@
\end{document}