aboutsummaryrefslogtreecommitdiff
path: root/src/algebra
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2009-02-02 13:16:02 +0000
committerdos-reis <gdr@axiomatics.org>2009-02-02 13:16:02 +0000
commitc0ab2c253aed35314d7cab2d68165268840dcb83 (patch)
treeeb11ffbb1141209f6ec6732b027d623f7eebce57 /src/algebra
parent472141e074a2028f72b59ec1fb18c64da2b7cb36 (diff)
downloadopen-axiom-c0ab2c253aed35314d7cab2d68165268840dcb83.tar.gz
* algebra/domain.spad.pamphlet (FunctionDescriptor): New.
(OverloadSet): Likewise. (operations$ConstructorCategory): Likewise. * share/algebra: Update databases.
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.pamphlet63
3 files changed, 68 insertions, 5 deletions
diff --git a/src/algebra/Makefile.in b/src/algebra/Makefile.in
index 3921b396..c6ec6cfb 100644
--- a/src/algebra/Makefile.in
+++ b/src/algebra/Makefile.in
@@ -557,7 +557,8 @@ axiom_algebra_layer_10 = \
STACK STTAYLOR TABLBUMP TABLEAU \
TOPSP TRANFUN TRANFUN- TUBE \
UDPO UNISEG VIEW VSPACE \
- VSPACE- XPOLYC XPR BTAGG BTAGG-
+ VSPACE- XPOLYC XPR BTAGG BTAGG- \
+ FUNDESC
axiom_algebra_layer_10_nrlibs = \
@@ -694,7 +695,7 @@ axiom_algebra_layer_15 = \
FRAMALG FRAMALG- MDAGG ODPOL \
PLOT RMCAT2 ROIRC SDPOL \
SMATCAT SMATCAT- TUBETOOL UPXSCCA \
- UPXSCCA- JAVACODE POLY BYTEBUF
+ UPXSCCA- JAVACODE POLY BYTEBUF OVERSET
axiom_algebra_layer_15_nrlibs = \
$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_15))
diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet
index 207cee78..84d13dfd 100644
--- a/src/algebra/Makefile.pamphlet
+++ b/src/algebra/Makefile.pamphlet
@@ -510,7 +510,8 @@ axiom_algebra_layer_10 = \
STACK STTAYLOR TABLBUMP TABLEAU \
TOPSP TRANFUN TRANFUN- TUBE \
UDPO UNISEG VIEW VSPACE \
- VSPACE- XPOLYC XPR BTAGG BTAGG-
+ VSPACE- XPOLYC XPR BTAGG BTAGG- \
+ FUNDESC
axiom_algebra_layer_10_nrlibs = \
@@ -825,7 +826,7 @@ axiom_algebra_layer_15 = \
FRAMALG FRAMALG- MDAGG ODPOL \
PLOT RMCAT2 ROIRC SDPOL \
SMATCAT SMATCAT- TUBETOOL UPXSCCA \
- UPXSCCA- JAVACODE POLY BYTEBUF
+ UPXSCCA- JAVACODE POLY BYTEBUF OVERSET
axiom_algebra_layer_15_nrlibs = \
$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_15))
diff --git a/src/algebra/domain.spad.pamphlet b/src/algebra/domain.spad.pamphlet
index 4d0cb784..47679554 100644
--- a/src/algebra/domain.spad.pamphlet
+++ b/src/algebra/domain.spad.pamphlet
@@ -34,6 +34,55 @@ ConstructorKind(): Public == Private where
package == 'package : %
k1 = k2 == EQ(k1,k2)$Lisp
coerce(k: %): OutputForm == k : OutputForm
+
+@
+
+<<domain FUNDESC FunctionDescriptor>>=
+)abbrev domain FUNDESC FunctionDescriptor
+++ Author: Gabriel Dos Reis
+++ Date Created: February 01, 2009
+++ Date Last Modified:
+++ Description:
+++ This is the datatype for exported function descriptor.
+++ A function descriptor consists of: (1) a signature;
+++ (2) a predicate; and (3) a slot into the scope object.
+FunctionDescriptor(): Public == Private where
+ Public == SetCategory with
+ signature: % -> Signature
+ ++ \spad{signature(x)} returns the signature of function
+ ++ described by \spad{x}.
+ Private == add
+ signature x == CAR(x)$Lisp
+ x = y == EQUAL(x,y)$Lisp
+ coerce x == (x : Syntax)::OutputForm
+
+@
+
+
+<<domain OVERSET OverloadSet>>=
+)abbrev domain OVERSET OverloadSet
+++ Author: Gabriel Dos Reis
+++ Date Created: February 01, 2009
+++ Date Last Modified:
+++ Description:
+++ This domain represents set of overloaded operators (in fact
+++ operator descriptors).
+OverloadSet(): Public == Private where
+ Public == SetCategory with
+ name: % -> Identifier
+ ++ \spad{name(x)} returns the name of the overload set \spad{x}.
+ members: % -> List FunctionDescriptor
+ ++ \spad{members(x)} returns the list of operator descriptors,
+ ++ e.g. signature and implementation slots, of the
+ ++ overload set \spad{x}.
+ Private == add
+ Rep == Pair(Identifier, List FunctionDescriptor)
+ name x == first rep x
+ members x == second rep x
+ x = y == rep x = rep y
+ coerce x ==
+ rarrow(name(x)::OutputForm, members(x)::OutputForm)
+
@
<<category CTORCAT ConstructorCategory>>=
@@ -54,10 +103,16 @@ ConstructorCategory(): Category == OperatorCategory Identifier with
++ l.(i+1) holds when the constructor takes a domain object
++ as the `i'th argument. Otherwise the argument
++ must be a non-domain object.
+ operations: % -> List OverloadSet
+ ++ \spad{operations(c)} returns the list of all operator
+ ++ exported by instantiations of constructor \spad{c}.
+ ++ The operators are partitioned into overload sets.
add
kind x == getConstructorKind(x)$Lisp
arity x == getConstructorArity(x)$Lisp
dualSignature x == getDualSignatureFromDB(x)$Lisp
+ operations x == getConstructorOperationsFromDB(x)$Lisp
+
@
@@ -83,6 +138,7 @@ Constructor(): ConstructorCategory with
findConstructor s ==
isConstructorName(s)$Lisp => just per(s pretend Identifier)
nothing
+
@
@@ -120,6 +176,7 @@ ConstructorCall(): Public == Private where
coerce(x: %): OutputForm ==
outputDomainConstructor(x)$Lisp
+
@
@@ -188,6 +245,7 @@ Signature(): Public == Private where
rarrow(printType first source x, printType target x)
rarrow(paren [printType s for s in source x],
printType target x)$OutputForm
+
@
\section{A domain for operator signatures}
@@ -230,6 +288,7 @@ SystemPredicate(): Public == Private where
NOT(x)$Lisp => '_false::OutputForm
EQ(x,'T)$Lisp => '_true::OutputForm
EQCAR(x,'NOT)$Lisp => not(CADR(x)$Lisp : % :: OutputForm)
+
@
@@ -330,7 +389,7 @@ Domain(): Public == Private where
\section{License}
<<license>>=
---Copyright (C) 2007-2008, Gabriel Dos Reis.
+--Copyright (C) 2007-2009, Gabriel Dos Reis.
--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
@@ -367,6 +426,8 @@ Domain(): Public == Private where
<<license>>
<<domain CTORKIND ConstructorKinid>>
+<<domain FUNDESC FunctionDescriptor>>
+<<domain OVERSET OverloadSet>>
<<category CTORCAT ConstructorCategory>>
<<domain CTOR Constructor>>
<<domain CTORCALL ConstructorCall>>