aboutsummaryrefslogtreecommitdiff
path: root/src/algebra
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2009-06-07 04:39:45 +0000
committerdos-reis <gdr@axiomatics.org>2009-06-07 04:39:45 +0000
commit03ca123dfb990c5ea8dde05b6f10902e4a4019b9 (patch)
tree68c3a7460fc599833cb259a3709564160d43afcd /src/algebra
parent569c20a430023be60c2b38f47bccc5810c6980aa (diff)
downloadopen-axiom-03ca123dfb990c5ea8dde05b6f10902e4a4019b9.tar.gz
* algebra/domain.spad.pamphlet (DomainTemplate): New.
(FunctorData): Likewise. (functorData$DomainConstructor): Likewise.
Diffstat (limited to 'src/algebra')
-rw-r--r--src/algebra/Makefile.in5
-rw-r--r--src/algebra/Makefile.pamphlet5
-rw-r--r--src/algebra/domain.spad.pamphlet77
3 files changed, 83 insertions, 4 deletions
diff --git a/src/algebra/Makefile.in b/src/algebra/Makefile.in
index db050ac9..47010830 100644
--- a/src/algebra/Makefile.in
+++ b/src/algebra/Makefile.in
@@ -423,12 +423,15 @@ axiom_algebra_layer_1_objects = \
$(addsuffix .$(FASLEXT),$(axiom_algebra_layer_1)))
axiom_algebra_layer_2 = \
SYNTAX INTRET SEGXCAT CONTOUR LIST3 MKFUNC \
- COMMONOP KTVLOGIC FNCAT SCACHE BOP BOP1
+ COMMONOP KTVLOGIC FNCAT SCACHE BOP BOP1 \
+ DOMTMPLT FCTRDATA
$(OUT)/FNCAT.$(FASLEXT): $(OUT)/HOMOTOP.$(FASLEXT) $(OUT)/SETCAT.$(FASLEXT)
$(OUT)/SYNTAX.$(FASLEXT): $(OUT)/IDENT.$(FASLEXT)
$(OUT/KTVLOGIC.$(FASLEXT): $(OUT)/PROPLOG.$(FASLEXT)
$(OUT)/COMMONOP.$(FASLEXT): $(OUT)/BOP.$(FASLEXT)
+$(OUT)/DOMTMPLT.$(FASLEXT): $(OUT)/SYNTAX.$(FASLEXT)
+$(OUT)/FCTRDATA.$(FASLEXT): $(OUT)/DOMTMPLT.$(FASLEXT)
axiom_algebra_layer_2_nrlibs = \
$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_2))
diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet
index 1d0e4a83..d8ee249a 100644
--- a/src/algebra/Makefile.pamphlet
+++ b/src/algebra/Makefile.pamphlet
@@ -387,12 +387,15 @@ axiom_algebra_layer_1_objects = \
<<layer2>>=
axiom_algebra_layer_2 = \
SYNTAX INTRET SEGXCAT CONTOUR LIST3 MKFUNC \
- COMMONOP KTVLOGIC FNCAT SCACHE BOP BOP1
+ COMMONOP KTVLOGIC FNCAT SCACHE BOP BOP1 \
+ DOMTMPLT FCTRDATA
$(OUT)/FNCAT.$(FASLEXT): $(OUT)/HOMOTOP.$(FASLEXT) $(OUT)/SETCAT.$(FASLEXT)
$(OUT)/SYNTAX.$(FASLEXT): $(OUT)/IDENT.$(FASLEXT)
$(OUT/KTVLOGIC.$(FASLEXT): $(OUT)/PROPLOG.$(FASLEXT)
$(OUT)/COMMONOP.$(FASLEXT): $(OUT)/BOP.$(FASLEXT)
+$(OUT)/DOMTMPLT.$(FASLEXT): $(OUT)/SYNTAX.$(FASLEXT)
+$(OUT)/FCTRDATA.$(FASLEXT): $(OUT)/DOMTMPLT.$(FASLEXT)
axiom_algebra_layer_2_nrlibs = \
$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_2))
diff --git a/src/algebra/domain.spad.pamphlet b/src/algebra/domain.spad.pamphlet
index ba2bd7be..acaed108 100644
--- a/src/algebra/domain.spad.pamphlet
+++ b/src/algebra/domain.spad.pamphlet
@@ -194,17 +194,87 @@ CategoryConstructor(): Public == Private where
@
+<<domain DOMTMPLT DomainTemplate>>=
+)abbrev domain DOMTMPLT DomainTemplate
+++ Author: Gabriel Dos Reis
+++ Date Created: June 06, 2009
+++ Date Last Updated: June 06, 2009
+++ Description:
+++ Represntation of domain templates resulting from
+++ compiling a domain constructor
+DomainTemplate(): Public == Private where
+ Public == SetCategory with
+ #: % -> NonNegativeInteger
+ ++ \spad{# x} returns the length of the domain template \spad{x}.
+ elt: (%,NonNegativeInteger) -> Syntax
+ ++ \spad{x.i} yields the entry at slot \spad{i} in \spad{x}.
+ Private == add
+ Rep == PrimitiveArray Syntax
+ #x == # rep x
+ elt(x,i) == rep(x).i
+ x = y == rep x = rep y
+ coerce(x: %): OutputForm ==
+ rep(x)::OutputForm
+
+@
+
+
+<<domain FCTRDATA FunctorData>>=
+)abbrev domain FCTRDATA FunctorData
+++ Author: Gabriel Dos Reis
+++ Date Created: June 06, 2009
+++ Date Last Updated: June 06, 2009
+++ Description:
+++ Represntation of data needed to instantiate a domain constructor.
+FunctorData(): Public == Private where
+ Public == SetCategory with
+ domainTemplate: % -> DomainTemplate
+ ++ \spad{domainTemplate x} returns the domain template vector
+ ++ associated with the functor data \spad{x}.
+ attributeData: % -> List Pair(Syntax, NonNegativeInteger)
+ ++ \spad{attributeData x} returns the list of attribute-predicate
+ ++ bit vector index pair associated with the functor data \spad{x}.
+ encodingDirectory: % -> PrimitiveArray NonNegativeInteger
+ ++ \spad{encodintDirectory x} returns the directory of domain-wide
+ ++ entity description.
+ categories: % -> PrimitiveArray ConstructorCall
+ ++ \spad{categories x} returns the list of categories forms
+ ++ each domain object obtained from the domain data \spad{x}
+ ++ belongs to.
+ lookupFunction: % -> Identifier
+ ++ \spad{lookupFunction x} returns the name of the lookup
+ ++ function associated with the functor data \spad{x}.
+ Private == add
+ domainTemplate x == CAR(x)$Foreign(Builtin)
+ attributeData x == CADDR(x)$Foreign(Builtin)
+
+ part3Data(x: %): SExpression == CADDDR(x)$Foreign(Builtin)
+
+ categories x == CADDR(part3Data x)$Foreign(Builtin)
+ encodingDirectory x == CDDDR(part3Data x)$Foreign(Builtin)
+ lookupFunction x == CADDDDR(x)$Foreign(Builtin)
+
+ x = y == EQUAL(x,y)$Foreign(Builtin)
+ coerce(x: %): OutputForm ==
+ import SExpression
+ (x pretend SExpression)::OutputForm
+@
+
<<domain DOMCTOR DomainConstructor>>=
)abbrev domain DOMCTOR DomainConstructor
++ Author: Gabriel Dos Reis
++ Date Create: December 17, 2008.
-++ Date Last Updated: December 20, 2008.
+++ Date Last Updated: June 06, 2009.
++ Related Constructors: Domain, Category
++ Description:
++ This domain provides representations for domains constructors.
DomainConstructor(): Public == Private where
- Public == Join(ConstructorCategory, CoercibleTo Constructor)
+ Public == Join(ConstructorCategory, CoercibleTo Constructor) with
+ functorData: % -> FunctorData
+ ++ \spad{functorData x} returns the functor data associated
+ ++ with the domain constructor \spad{x}.
Private == Constructor add
+ functorData x == GET(x,'infovec)$Foreign(Builtin)
coerce(x: %): Constructor == rep x
@
@@ -436,6 +506,9 @@ Domain(): Public == Private where
<<domain SIG Signature>>
<<domain OPSIG OperatorSignature>>
+<<domain DOMTMPLT DomainTemplate>>
+<<domain FCTRDATA FunctorData>>
+
<<domain CATEGORY Category>>
<<domain DOMAIN Domain>>
@