diff options
author | dos-reis <gdr@axiomatics.org> | 2009-06-07 04:39:45 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2009-06-07 04:39:45 +0000 |
commit | 03ca123dfb990c5ea8dde05b6f10902e4a4019b9 (patch) | |
tree | 68c3a7460fc599833cb259a3709564160d43afcd /src/algebra/domain.spad.pamphlet | |
parent | 569c20a430023be60c2b38f47bccc5810c6980aa (diff) | |
download | open-axiom-03ca123dfb990c5ea8dde05b6f10902e4a4019b9.tar.gz |
* algebra/domain.spad.pamphlet (DomainTemplate): New.
(FunctorData): Likewise.
(functorData$DomainConstructor): Likewise.
Diffstat (limited to 'src/algebra/domain.spad.pamphlet')
-rw-r--r-- | src/algebra/domain.spad.pamphlet | 77 |
1 files changed, 75 insertions, 2 deletions
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>> @ |