diff options
author | dos-reis <gdr@axiomatics.org> | 2008-10-09 18:40:38 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2008-10-09 18:40:38 +0000 |
commit | 9d577a9fe12067a41ed4e60adb7edfba30996788 (patch) | |
tree | f8d95a5e091e45502a2bfeb22847d244cbc84fed /src/algebra | |
parent | 1e509eda4fa81af3f5954f50345dd3bc88c9252c (diff) | |
download | open-axiom-9d577a9fe12067a41ed4e60adb7edfba30996788.tar.gz |
* algebra/domain.spad.pamphlet (ConstructorKinid): New domain.
(Constructor): Likewise.
* algebra/Makefile.pamphlet (axiom_algebra_layer_0): Include
CTORKIND.
(axiom_algebra_layer_user): Include CTOR.
Diffstat (limited to 'src/algebra')
-rw-r--r-- | src/algebra/Makefile.in | 7 | ||||
-rw-r--r-- | src/algebra/Makefile.pamphlet | 7 | ||||
-rw-r--r-- | src/algebra/domain.spad.pamphlet | 59 |
3 files changed, 68 insertions, 5 deletions
diff --git a/src/algebra/Makefile.in b/src/algebra/Makefile.in index 28d59a89..46e59144 100644 --- a/src/algebra/Makefile.in +++ b/src/algebra/Makefile.in @@ -363,7 +363,7 @@ axiom_algebra_layer_0 = \ ABELSG- ORDSET ORDSET- FNCAT FILECAT SEXCAT \ MKBCFUNC MKRECORD MKUCFUNC DROPT1 PLOT1 ITFUN2 \ ITFUN3 STREAM1 STREAM2 STREAM3 ANY1 SEGBIND2 \ - COMBOPC EQ2 NONE1 CONDUIT IOMODE + COMBOPC EQ2 NONE1 CONDUIT IOMODE CTORKIND axiom_algebra_layer_0_nrlibs = \ $(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_0)) @@ -826,7 +826,7 @@ axiom_algebra_layer_user = \ LETAST SUCHAST RDUCEAST COLONAST ADDAST CAPSLAST \ CASEAST HASAST ISAST CATAST WHEREAST COMMAAST \ QQUTAST DEFAST MACROAST SPADXPT SPADAST \ - INBFILE OUTBFILE RGBCMDL RGBCSPC + INBFILE OUTBFILE RGBCMDL RGBCSPC CTORKIND CTOR axiom_algebra_layer_user_nrlibs = \ $(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_user)) @@ -886,6 +886,9 @@ INBFILE.NRLIB/code.$(FASLEXT): $(OUT)/FNAME.$(FASLEXT) \ OUTBFILE.NRLIB/code.$(FASLEXT): $(OUT)/FNAME.$(FASLEXT) \ $(OUT)/OUTBCON.$(FASLEXT) $(OUT)/STRING.$(FASLEXT) +CTOR.NRLIB/code.$(FASLEXT): $(OUT)/CTORKIND.$(FASLEXT) \ + $(OUT)/IDENT.$(FASLEXT) + .PHONY: all all-algebra mkdir-output-directory all: all-ax diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet index 53ce4b35..63c8c402 100644 --- a/src/algebra/Makefile.pamphlet +++ b/src/algebra/Makefile.pamphlet @@ -192,7 +192,7 @@ axiom_algebra_layer_0 = \ ABELSG- ORDSET ORDSET- FNCAT FILECAT SEXCAT \ MKBCFUNC MKRECORD MKUCFUNC DROPT1 PLOT1 ITFUN2 \ ITFUN3 STREAM1 STREAM2 STREAM3 ANY1 SEGBIND2 \ - COMBOPC EQ2 NONE1 CONDUIT IOMODE + COMBOPC EQ2 NONE1 CONDUIT IOMODE CTORKIND axiom_algebra_layer_0_nrlibs = \ $(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_0)) @@ -1253,7 +1253,7 @@ axiom_algebra_layer_user = \ LETAST SUCHAST RDUCEAST COLONAST ADDAST CAPSLAST \ CASEAST HASAST ISAST CATAST WHEREAST COMMAAST \ QQUTAST DEFAST MACROAST SPADXPT SPADAST \ - INBFILE OUTBFILE RGBCMDL RGBCSPC + INBFILE OUTBFILE RGBCMDL RGBCSPC CTORKIND CTOR axiom_algebra_layer_user_nrlibs = \ $(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_user)) @@ -1312,6 +1312,9 @@ INBFILE.NRLIB/code.$(FASLEXT): $(OUT)/FNAME.$(FASLEXT) \ $(OUT)/INBCON.$(FASLEXT) $(OUT)/STRING.$(FASLEXT) OUTBFILE.NRLIB/code.$(FASLEXT): $(OUT)/FNAME.$(FASLEXT) \ $(OUT)/OUTBCON.$(FASLEXT) $(OUT)/STRING.$(FASLEXT) + +CTOR.NRLIB/code.$(FASLEXT): $(OUT)/CTORKIND.$(FASLEXT) \ + $(OUT)/IDENT.$(FASLEXT) @ \section{Broken Files} diff --git a/src/algebra/domain.spad.pamphlet b/src/algebra/domain.spad.pamphlet index e4f11843..6619feb0 100644 --- a/src/algebra/domain.spad.pamphlet +++ b/src/algebra/domain.spad.pamphlet @@ -11,6 +11,61 @@ \tableofcontents \eject +\section{The Constructor domain} + +<<domain CTORKIND ConstructorKinid>>= +)abbrev domain CTORKIND ConstructorKind +++ Author: Gabriel Dos Reis +++ Date Create: October 07, 2008. +++ Date Last Updated: October 07, 2008. +++ Related Constructors: +++ Description: +++ This domain enumerates the three kinds of constructors +++ available in OpenAxiom: category constructors, domain +++ constructors, and package constructors. +ConstructorKind(): Public == Private where + Public == SetCategory with + category: % ++ `category' designates category constructors + domain: % ++ `domain' designates domain constructors + package: % ++ `package' designates package constructors. + Private == add + category == INTERN("category","KEYWORD")$Lisp + domain == INTERN("domain","KEYWORD")$Lisp + package == INTERN("package","KEYWORD")$Lisp + k1 = k2 == EQ(k1,k2)$Lisp + coerce(k: %): OutputForm == + k = category => outputForm 'category + k = domain => outputForm 'domain + outputForm 'package +@ + +<<domain CTOR Constructor>>= +)abbrev domain CTOR Constructor +++ Author: Gabriel Dos Reis +++ Date Create: October 07, 2008. +++ Date Last Updated: October 07, 2008. +++ Related Constructors: Domain, Category +++ Basic Operations: name, kind, arity. +++ Description: +++ This domain provides implementations for constructors. +Constructor(): Public == Private where + Public == SetCategory with + name: % -> Identifier + ++ name(ctor) returns the name of the constructor `ctor'. + kind: % -> ConstructorKind + ++ kind(ctor) returns the kind of the constructor `ctor'. + arity: % -> SingleInteger + ++ arity(ctor) returns the arity of the constructor `ctor'. + ++ A negative value means that the ctor takes a variable + ++ length argument list, e.g. Mapping, Record, etc. + Private == add + Rep == Identifier + name x == rep x + x = y == rep x = rep y + coerce(x: %): OutputForm == rep(x)::OutputForm +@ + + \section{domain Category} <<domain CATEGORY Category>>= import CoercibleTo OutputForm @@ -28,7 +83,6 @@ Category(): Public == Private where outputDomainConstructor(x)$Lisp @ - \section{domain Domain} <<domain DOMAIN Domain>>= import SetCategory @@ -111,6 +165,9 @@ Domain(): Public == Private where <<*>>= <<license>> + +<<domain CTORKIND ConstructorKinid>> + <<domain CATEGORY Category>> <<domain DOMAIN Domain>> @ |