diff options
Diffstat (limited to 'src/algebra')
-rw-r--r-- | src/algebra/Makefile.in | 9 | ||||
-rw-r--r-- | src/algebra/Makefile.pamphlet | 9 | ||||
-rw-r--r-- | src/algebra/exposed.lsp.pamphlet | 5 | ||||
-rw-r--r-- | src/algebra/syntax.spad.pamphlet | 81 |
4 files changed, 84 insertions, 20 deletions
diff --git a/src/algebra/Makefile.in b/src/algebra/Makefile.in index df2fa13f..8f64184f 100644 --- a/src/algebra/Makefile.in +++ b/src/algebra/Makefile.in @@ -817,7 +817,7 @@ axiom_algebra_layer_23_objects = \ $(addprefix $(OUT)/, \ $(addsuffix .$(FASLEXT),$(axiom_algebra_layer_23))) axiom_algebra_layer_user = \ - RINTERP ASTCAT HEADAST + RINTERP ASTCAT ASTCAT- SASTCAT HEADAST LITERAL IDENT axiom_algebra_layer_user_nrlibs = \ $(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_user)) @@ -826,7 +826,10 @@ axiom_algebra_layer_user_objects = \ $(addprefix $(OUT)/, \ $(addsuffix .$(FASLEXT),$(axiom_algebra_layer_user))) -HEADAST.NRLIB/code.$(FASLEXT): $(OUT)/ASTCAT.$(FASLEXT) +SASTCAT.NRLIB/code.$(FASLEXT): $(OUT)/ASTCAT.$(FASLEXT) +LITERAL.NRLIB/code.$(FASLEXT): $(OUT)/SASTCAT.$(FASLEXT) +IDENT.NRLIB/code.$(FASLEXT): $(OUT)/SASTCAT.$(FASLEXT) +HEADAST.NRLIB/code.$(FASLEXT): $(OUT)/SASTCAT.$(FASLEXT) .PHONY: all all-algebra mkdir-output-directory all: all-ax @@ -1129,7 +1132,7 @@ bootstrap-stamp: 23-stamp $(axiom_algebra_bootstrap_objects) @ echo === algebra complete ====== @ echo ================================== -user-stamp: bootstrap-stamp $(axiom_algebra_layer_user_objects) +user-stamp: $(axiom_algebra_layer_user_objects) @ rm -f user-stamp @ $(STAMP) user-stamp diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet index b5236fdb..974fc4c6 100644 --- a/src/algebra/Makefile.pamphlet +++ b/src/algebra/Makefile.pamphlet @@ -1244,7 +1244,7 @@ Rather than classify newly created algebra into the existing type lattice we add it here. <<USERLAYER>>= axiom_algebra_layer_user = \ - RINTERP ASTCAT HEADAST + RINTERP ASTCAT ASTCAT- SASTCAT HEADAST LITERAL IDENT axiom_algebra_layer_user_nrlibs = \ $(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_user)) @@ -1253,7 +1253,10 @@ axiom_algebra_layer_user_objects = \ $(addprefix $(OUT)/, \ $(addsuffix .$(FASLEXT),$(axiom_algebra_layer_user))) -HEADAST.NRLIB/code.$(FASLEXT): $(OUT)/ASTCAT.$(FASLEXT) +SASTCAT.NRLIB/code.$(FASLEXT): $(OUT)/ASTCAT.$(FASLEXT) +LITERAL.NRLIB/code.$(FASLEXT): $(OUT)/SASTCAT.$(FASLEXT) +IDENT.NRLIB/code.$(FASLEXT): $(OUT)/SASTCAT.$(FASLEXT) +HEADAST.NRLIB/code.$(FASLEXT): $(OUT)/SASTCAT.$(FASLEXT) @ \section{Broken Files} @@ -2170,7 +2173,7 @@ bootstrap-stamp: 23-stamp $(axiom_algebra_bootstrap_objects) @ echo === algebra complete ====== @ echo ================================== -user-stamp: bootstrap-stamp $(axiom_algebra_layer_user_objects) +user-stamp: $(axiom_algebra_layer_user_objects) @ rm -f user-stamp @ $(STAMP) user-stamp diff --git a/src/algebra/exposed.lsp.pamphlet b/src/algebra/exposed.lsp.pamphlet index d11a0bbd..1e2df82c 100644 --- a/src/algebra/exposed.lsp.pamphlet +++ b/src/algebra/exposed.lsp.pamphlet @@ -173,8 +173,9 @@ (|Heap| . HEAP) (|HexadecimalExpansion| . HEXADEC) (|Hostname| . HOSTNAME) - (|IndexCard| . ICARD) (|IdealDecompositionPackage| . IDECOMP) + (|Identifier| . IDENT) + (|IndexCard| . ICARD) (|InfiniteProductCharacteristicZero| . INFPROD0) (|InfiniteProductFiniteField| . INPRODFF) (|InfiniteProductPrimeField| . INPRODPF) @@ -213,6 +214,7 @@ (|ListFunctions2| . LIST2) (|ListFunctions3| . LIST3) (|ListToMap| . LIST2MAP) + (|Literal| . LITERAL) (|MakeFloatCompiledFunction| . MKFLCFN) (|MakeFunction| . MKFUNC) (|MakeRecord| . MKRECORD) @@ -707,6 +709,7 @@ (|SetAggregate| . SETAGG) (|SetCategory| . SETCAT) (|SExpressionCategory| . SEXCAT) + (|SpadSyntaxCategory| . SASTCAT) (|SpecialFunctionCategory| . SPFCAT) (|SquareFreeNormalizedTriangularSetCategory| . SNTSCAT) (|SquareFreeRegularTriangularSetCategory| . SFRTCAT) diff --git a/src/algebra/syntax.spad.pamphlet b/src/algebra/syntax.spad.pamphlet index c6640500..ad742ab8 100644 --- a/src/algebra/syntax.spad.pamphlet +++ b/src/algebra/syntax.spad.pamphlet @@ -261,28 +261,32 @@ ConstructorCall(): Public == Private where <<domain SIG Signature>>= import SetCategory -import ConstructorCall +import CoercibleTo +import List +import Syntax )abbrev domain SIG Signature ++ Author: Gabriel Dos Reis ++ Date Created: January 10, 2008 -++ Date Last Updated: July 14, 2008 +++ Date Last Updated: August 30, 2008 ++ Description: This is the datatype for operation signatures as -++ used by the compiler and the interpreter. +++ used by the compiler and the interpreter. Note that this domain +++ differs from SignatureAst. ++ See also: ConstructorCall, Domain. Signature(): Public == Private where Public == SetCategory with - target: % -> ConstructorCall + signature: (List Syntax,Syntax) -> % + ++ signature(s,t) constructs a Signature object with parameter + ++ types indicaded by `s', and return type indicated by `t'. + target: % -> Syntax ++ target(s) returns the target type of the signature `s'. - source: % -> List ConstructorCall + source: % -> List Syntax ++ source(s) returns the list of parameter types of `s'. Private == add - Rep == List ConstructorCall - target x == - first rep x - source x == - rest rep x - x = y == - rep x = rep y + Rep == List Syntax + signature(s,t) == per cons(t,s) + target x == first rep x + source x == rest rep x + x = y == rep x = rep y coerce(x: %): OutputForm == rarrow([s::OutputForm for s in source x]::OutputForm, target(x)::OutputForm)$OutputForm @@ -375,6 +379,54 @@ AbstractSyntaxCategory(): Category == x::Syntax::OutputForm @ +\section{The SpadSyntaxCategory category} + +<<category SASTCAT SpadSyntaxCategory>>= +)abbrev category SASTCAT SpadSyntaxCategory +++ Author: Gabriel Dos Reis +++ Date Created: July 5, 2008 +++ Date Last Modified: September 1, 2008 +++ Description: This is the category of Spad syntax objects. +SpadSyntaxCategory(): Category == AbstractSyntaxCategory + -- for the moment. + +@ + +\subsection{The Literal domain} + +<<domain LITERAL Literal>>= +)abbrev domain LITERAL Literal +++ Author: Gabriel Dos Reis +++ Date Created: July 5, 2008 +++ Date Last Modified: September 1, 2008 +++ Description: This domain represents AST for Spad literals. +Literal(T: SetCategory): Public == Private where + Public == Join(SpadSyntaxCategory, CoercibleTo T) + Private == add + Rep == T + coerce(x: %): T == rep x + coerce(x: %): OutputForm == x::T::OutputForm + +@ + +\subsection{The Identifier domain} + +<<domain IDENT Identifier>>= +++ Author: Gabriel Dos Reis +++ Date Created: July 5, 2008 +++ Date Last Modified: September 1, 2008 +++ Description: This domain represents identifer AST. +)abbrev domain IDENT Identifier +Identifier(): Public == Private where + Public == Join(SpadSyntaxCategory, CoercibleTo Symbol) + Private == add + Rep == Symbol + coerce(x: %): Symbol == rep x + coerce(x: %): OutputForm == x::Symbol::OutputForm + +@ + + \subsection{The HeadAst domain} <<domain HEADAST HeadAst>>= @@ -387,7 +439,7 @@ import List Symbol ++ Date Last Modified: July 2008 ++ Description: This domain represents the header of a definition. HeadAst(): Public == Private where - Public == AbstractSyntaxCategory with + Public == SpadSyntaxCategory with headAst: List Symbol -> % ++ headAst [f,x1,..,xn] constructs a function definition header. name: % -> Symbol @@ -444,6 +496,9 @@ HeadAst(): Public == Private where <<domain ELABEXPR ElaboratedExpression>> <<category ASTCAT AbstractSyntaxCategory>> +<<category SASTCAT SpadSyntaxCategory>> + +<<domain LITERAL Literal>> <<domain HEADAST HeadAst>> @ |