aboutsummaryrefslogtreecommitdiff
path: root/src/interp/database.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-12-26 00:48:34 +0000
committerdos-reis <gdr@axiomatics.org>2008-12-26 00:48:34 +0000
commitfb209a840dc764bdfa285ad3cb7575df21a43289 (patch)
tree22c5f97139814096d211f26b4daa059b0d85d10b /src/interp/database.boot
parenta4c3f01ad687e6b8a29db845f725c00b06016f36 (diff)
downloadopen-axiom-fb209a840dc764bdfa285ad3cb7575df21a43289.tar.gz
r12485@gauss: gdr | 2008-12-17 16:26:21 -0600
Branch to improve reflection. r12493@gauss: gdr | 2008-12-20 23:29:51 -0600 Add domain representations for constructors. r12494@gauss: gdr | 2008-12-21 14:27:37 -0600 Consolidate constructor domains. r12502@gauss: gdr | 2008-12-22 20:36:21 -0600 Constructors are values. r12504@gauss: gdr | 2008-12-25 13:58:01 -0600 r12505@gauss: gdr | 2008-12-25 18:48:04 -0600 Commit ChangeLog.
Diffstat (limited to 'src/interp/database.boot')
-rw-r--r--src/interp/database.boot35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/interp/database.boot b/src/interp/database.boot
index 1b957c45..31daea4b 100644
--- a/src/interp/database.boot
+++ b/src/interp/database.boot
@@ -153,6 +153,21 @@ getOperationModemapsFromDB: %Symbol -> %List
getOperationModemapsFromDB op ==
GETDATABASE(op,"MODEMAPS")
+
+getConstructorArity: %Symbol -> %Short
+getConstructorArity ctor ==
+ sig := getConstructorSignature ctor => #rest sig
+ -1
+
+getConstructorKind: %Symbol -> %Maybe %ConstructorKind
+getConstructorKind ctor ==
+ kind := getConstructorKindFromDB ctor =>
+ kind = "domain" and isDefaultPackageName ctor => "package"
+ kind
+ ctor in $DomainNames => "domain"
+ ctor in $CategoryNames => "category"
+ nil
+
--% Functions for manipulating MODEMAP DATABASE
augLisplibModemapsFromCategory(form is [op,:argl],body,signature) ==
@@ -788,6 +803,26 @@ displayHiddenConstructors() ==
centerAndHighlight c
+
+--%
+
+
+++ Return the list of modemaps exported by the category object `c'.
+++ The format of modemap is as found in category objects.
+getCategoryExports: %Shell -> %List
+getCategoryExports c == c.1
+
+++ Return the list of category attribute info for the category object `c'.
+++ A category attribute info is pair of attribute-predicate.
+getCategoryAttributes: %Shell -> %List
+getCategoryAttributes c == c.2
+
+
+getCategoryPrincipalAncestors c == c.4.0
+
+getCategoryParents c == c.4.1
+
+
--%
squeezeAll: %List -> %List
squeezeAll x ==