diff options
Diffstat (limited to 'src/algebra')
-rw-r--r-- | src/algebra/Makefile.in | 6 | ||||
-rw-r--r-- | src/algebra/Makefile.pamphlet | 6 | ||||
-rw-r--r-- | src/algebra/any.spad.pamphlet | 24 | ||||
-rw-r--r-- | src/algebra/exposed.lsp.pamphlet | 2 | ||||
-rw-r--r-- | src/algebra/syntax.spad.pamphlet | 64 |
5 files changed, 83 insertions, 19 deletions
diff --git a/src/algebra/Makefile.in b/src/algebra/Makefile.in index 1812268d..baf81660 100644 --- a/src/algebra/Makefile.in +++ b/src/algebra/Makefile.in @@ -377,7 +377,7 @@ axiom_algebra_layer_0 = \ KOERCE.o KONVERT.o MSYSCMD.o ODEIFTBL.o \ OM.o OMCONN.o OMDEV.o OUT.o \ PRIMCAT.o PRINT.o PTRANFN.o SPFCAT.o \ - TYPE.o UTYPE.o PROPLOG.o OBJPROP.o \ + TYPE.o UTYPE.o PROPLOG.o PROPERTY.o \ SYNTAX.o axiom_algebra_layer_0_nrlibs = \ @@ -434,7 +434,7 @@ axiom_algebra_layer_4 = \ REPDB.o RFDIST.o RIDIST.o RMODULE.o \ SEXCAT.o SGROUP.o SGROUP-.o SPACEC.o \ SPLNODE.o STEP.o SUCH.o TEX1.o \ - UDVO.o YSTREAM.o PAIR.o ENV.o + UDVO.o YSTREAM.o PAIR.o ENV.o axiom_algebra_layer_4_nrlibs = \ $(axiom_algebra_layer_4:.$(OBJEXT)=.NRLIB/code.$(OBJEXT)) @@ -454,7 +454,7 @@ axiom_algebra_layer_5 = \ ODVAR.o OPQUERY.o ORDFIN.o ORDMON.o \ PATMATCH.o PERMCAT.o PDRING.o PDRING-.o \ SDVAR.o SUP2.o TRIGCAT.o TRIGCAT-.o \ - ULS2.o UP2.o + ULS2.o UP2.o ELABEXPR.o axiom_algebra_layer_5_nrlibs = \ $(axiom_algebra_layer_5:.$(OBJEXT)=.NRLIB/code.$(OBJEXT)) diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet index 53ee408b..114935b0 100644 --- a/src/algebra/Makefile.pamphlet +++ b/src/algebra/Makefile.pamphlet @@ -205,7 +205,7 @@ axiom_algebra_layer_0 = \ KOERCE.o KONVERT.o MSYSCMD.o ODEIFTBL.o \ OM.o OMCONN.o OMDEV.o OUT.o \ PRIMCAT.o PRINT.o PTRANFN.o SPFCAT.o \ - TYPE.o UTYPE.o PROPLOG.o OBJPROP.o \ + TYPE.o UTYPE.o PROPLOG.o PROPERTY.o \ SYNTAX.o axiom_algebra_layer_0_nrlibs = \ @@ -309,7 +309,7 @@ axiom_algebra_layer_4 = \ REPDB.o RFDIST.o RIDIST.o RMODULE.o \ SEXCAT.o SGROUP.o SGROUP-.o SPACEC.o \ SPLNODE.o STEP.o SUCH.o TEX1.o \ - UDVO.o YSTREAM.o PAIR.o ENV.o + UDVO.o YSTREAM.o PAIR.o ENV.o axiom_algebra_layer_4_nrlibs = \ $(axiom_algebra_layer_4:.$(OBJEXT)=.NRLIB/code.$(OBJEXT)) @@ -340,7 +340,7 @@ axiom_algebra_layer_5 = \ ODVAR.o OPQUERY.o ORDFIN.o ORDMON.o \ PATMATCH.o PERMCAT.o PDRING.o PDRING-.o \ SDVAR.o SUP2.o TRIGCAT.o TRIGCAT-.o \ - ULS2.o UP2.o + ULS2.o UP2.o ELABEXPR.o axiom_algebra_layer_5_nrlibs = \ $(axiom_algebra_layer_5:.$(OBJEXT)=.NRLIB/code.$(OBJEXT)) diff --git a/src/algebra/any.spad.pamphlet b/src/algebra/any.spad.pamphlet index d86a0cd4..56da387a 100644 --- a/src/algebra/any.spad.pamphlet +++ b/src/algebra/any.spad.pamphlet @@ -189,14 +189,14 @@ AnyFunctions1(S:Type): with @ -\section{domain OBJPROP ObjectProperty} -<<domain OBJPROP ObjectProperty>>= -)abbrev domain OBJPROP ObjectProperty +\section{domain PROPERTY Property} +<<domain PROPERTY Property>>= +)abbrev domain PROPERTY Property ++ Author: Gabriel Dos Reis ++ Date Created: October 24, 2007 ++ Date Last Modified: January 18, 2008. -++ An `ObjectProperty' is a pair of name and value. -ObjectProperty(): Public == Private where +++ An `Property' is a pair of name and value. +Property(): Public == Private where Public ==> CoercibleTo(OutputForm) with name: % -> Symbol ++ name(p) returns the name of property p @@ -249,9 +249,9 @@ Binding(): Public == Private where Public ==> CoercibleTo(OutputForm) with name: % -> Symbol ++ name(b) returns the name of binding b - properties: % -> List ObjectProperty + properties: % -> List Property ++ properties(b) returns the properties associated with binding b. - binding: (Symbol, List ObjectProperty) -> % + binding: (Symbol, List Property) -> % ++ binding(n,props) constructs a binding with name `n' and ++ property list `props'. @@ -268,7 +268,7 @@ Binding(): Public == Private where symbol car rep b properties b == - (cdr rep b) pretend List(ObjectProperty) + (cdr rep b) pretend List(Property) binding(n,props) == per CONS(n,props)$Lisp @@ -382,10 +382,10 @@ Environment(): Public == Private where setProperty!: (Symbol, Symbol, SExpression, %) -> % ++ setProperty!(n,p,v,e) binds the property `(p,v)' to `n' ++ in the topmost scope of `e'. - getProperties: (Symbol, %) -> Union(List ObjectProperty, "failed") + getProperties: (Symbol, %) -> Union(List Property, "failed") ++ getBinding(n,e) returns the list of properties of `n' in ++ e; otherwise `failed'. - setProperties!: (Symbol, List ObjectProperty, %) -> % + setProperties!: (Symbol, List Property, %) -> % ++ setBinding!(n,props,e) set the list of properties of `n' ++ to `props' in `e'. currentEnv: () -> % @@ -411,7 +411,7 @@ Environment(): Public == Private where getProperties(n,e) == b: SExpression := getProplist(n,e)$Lisp null? b => "failed" - b pretend List(ObjectProperty) + b pretend List(Property) setProperties!(n,b,e) == addBinding(n,b,e)$Lisp @ % @@ -475,7 +475,7 @@ Environment(): Public == Private where <<domain ANY Any>> <<package ANY1 AnyFunctions1>> -<<domain OBJPROP ObjectProperty>> +<<domain PROPERTY Property>> <<domain BINDING Binding>> <<domain CONTOUR Contour>> <<domain SCOPE Scope>> diff --git a/src/algebra/exposed.lsp.pamphlet b/src/algebra/exposed.lsp.pamphlet index 2b0aab86..810b8ea7 100644 --- a/src/algebra/exposed.lsp.pamphlet +++ b/src/algebra/exposed.lsp.pamphlet @@ -236,7 +236,7 @@ (|NumericComplexEigenPackage| . NCEP) (|NumericRealEigenPackage| . NREP) (|NumericContinuedFraction| . NCNTFRAC) - (|ObjectProperty| . OBJPROP) + (|Property| . PROPERTY) (|Octonion| . OCT) (|OctonionCategoryFunctions2| . OCTCT2) (|OneDimensionalArray| . ARRAY1) diff --git a/src/algebra/syntax.spad.pamphlet b/src/algebra/syntax.spad.pamphlet index e7c2b50b..4b3ce07f 100644 --- a/src/algebra/syntax.spad.pamphlet +++ b/src/algebra/syntax.spad.pamphlet @@ -241,6 +241,69 @@ ConstructorCall(): Public == Private where outputDomainConstructor(x)$Lisp @ +\section{domain ElaboratedExpression} +<<domain ELABEXPR ElaboratedExpression>>= +)abbrev domain ELABEXPR ElaboratedExpression +++ Author: Gabriel Dos Reis +++ Date Created: January 19, 2008 +++ Date Last Updated: January 20, 2008 +++ Description: This domains an expresion as elaborated by the interpreter. +++ See Also: +ElaboratedExpression(): Public == Private where + Public ==> CoercibleTo OutputForm with + type: % -> ConstructorCall + ++ type(e) returns the type of the expression as computed by + ++ the interpreter. + constant?: % -> Boolean + ++ constant?(e) returns true if `e' is a constant. + getConstant: % -> Union(SExpression,"failed") + ++ getConstant(e) retrieves the constant value of `e'e. + variable?: % -> Boolean + ++ variable?(e) returns true if `e' is a variable. + getVariable: % -> Union(Symbol,"failed") + ++ getVariable(e) retrieves the name of the variable `e'. + callForm?: % -> Boolean + ++ callForm?(e) is true when `e' is a call expression. + getOperator: % -> Union(Symbol, "failed") + ++ getOperator(e) retrieves the operator being invoked in `e', + ++ when `e' is an expression. + getOperands: % -> Union(List %, "failed") + ++ getOperands(e) returns the of operands in `e'e, assuming it + ++ is a call form. + + Private ==> add + immediateDataTag := INTERN("--immediateData--")$Lisp + + isAtomic(x: %): Boolean == + ATOM(x)$Lisp @ Boolean + + type x == + getMode(x)$Lisp @ ConstructorCall + + callForm? x == + CONSP(x)$Lisp @ Boolean + + getOperator x == + op: SExpression := getUnnameIfCan(x)$Lisp + null? op => "failed" + op pretend Symbol + + constant? x == + isAtomic x and + EQ(getUnnameIfCan(x)$Lisp, immediateDataTag)$Lisp : Boolean + + getConstant x == + constant? x => getValue(x)$Lisp @ SExpression + "failed" + + variable? x == + isAtomic x and not constant? x + + getVariable x == + variable? x => symbol (getUnname(x)$Lisp@SExpression) + "failed" +@ + \section{License} <<license>>= @@ -280,6 +343,7 @@ ConstructorCall(): Public == Private where <<license>> <<domain SYNTAX Syntax>> <<domain CTORCALL ConstructorCall>> +<<domain ELABEXPR ElaboratedExpression>> @ \end{document} |