diff options
author | dos-reis <gdr@axiomatics.org> | 2008-01-20 01:02:10 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2008-01-20 01:02:10 +0000 |
commit | 8559362639b3460afb49ed8c32dba0a75b9bab71 (patch) | |
tree | 29e821f843095ea33dfa61c2568d18077ef3fb7b /src/algebra | |
parent | 2546c17a213f87b5a3cd66b58faf84ac6b6186b0 (diff) | |
download | open-axiom-8559362639b3460afb49ed8c32dba0a75b9bab71.tar.gz |
* algebra/syntax.spad.pamphlet: Rename from algebra/syntax.spad.
Add a new domain for constructor instantiation form.
* algebra/Makefile.pamphlet (axiom_algebra_layer_1): Include
CTORCALL.o
(SYNTAX.NRLIB/code.$(FASLEXT)): Remove rule. Now implicit.
* share/algebra: Update databases.
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/domain.spad | 16 | ||||
-rw-r--r-- | src/algebra/syntax.spad.pamphlet (renamed from src/algebra/syntax.spad) | 120 |
4 files changed, 104 insertions, 44 deletions
diff --git a/src/algebra/Makefile.in b/src/algebra/Makefile.in index 0877c436..1812268d 100644 --- a/src/algebra/Makefile.in +++ b/src/algebra/Makefile.in @@ -392,7 +392,7 @@ axiom_algebra_layer_1 = \ PATAB.o PLOT1.o PPCURVE.o PSCURVE.o \ REAL.o RESLATC.o RETRACT.o RETRACT-.o \ SEGBIND2.o SEGCAT.o STREAM1.o STREAM2.o \ - STREAM3.o BINDING.o + STREAM3.o BINDING.o CTORCALL.o axiom_algebra_layer_1_nrlibs = \ $(axiom_algebra_layer_1:.$(OBJEXT)=.NRLIB/code.$(OBJEXT)) @@ -902,10 +902,6 @@ $(builddir)/%.tex: $(srcdir)/%.pamphlet $(axiom_build_texdir)/diagrams.tex: $(axiom_src_docdir)/diagrams.tex $(INSTALL_DATA) $< $@ -SYNTAX.NRLIB/code.$(FASLEXT): syntax.spad - @ rm -rf SYNTAX.NRLIB - echo ")co $(srcdir)/syntax.spad" | ${INTERPSYS} - SPADPRSR.NRLIB/code.$(FASLEXT): spad-parser.spad @ rm -rf SPADPRSR.NRLIB echo ")co $(srcdir)/spad-parser.spad" | ${INTERPSYS} diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet index 0beef0b8..53ee408b 100644 --- a/src/algebra/Makefile.pamphlet +++ b/src/algebra/Makefile.pamphlet @@ -234,7 +234,7 @@ axiom_algebra_layer_1 = \ PATAB.o PLOT1.o PPCURVE.o PSCURVE.o \ REAL.o RESLATC.o RETRACT.o RETRACT-.o \ SEGBIND2.o SEGCAT.o STREAM1.o STREAM2.o \ - STREAM3.o BINDING.o + STREAM3.o BINDING.o CTORCALL.o axiom_algebra_layer_1_nrlibs = \ $(axiom_algebra_layer_1:.$(OBJEXT)=.NRLIB/code.$(OBJEXT)) @@ -1855,10 +1855,6 @@ $(axiom_build_texdir)/diagrams.tex: $(axiom_src_docdir)/diagrams.tex <<genericSPADfiles>> <<genericDOCfiles>> -SYNTAX.NRLIB/code.$(FASLEXT): syntax.spad - @ rm -rf SYNTAX.NRLIB - echo ")co $(srcdir)/syntax.spad" | ${INTERPSYS} - SPADPRSR.NRLIB/code.$(FASLEXT): spad-parser.spad @ rm -rf SPADPRSR.NRLIB echo ")co $(srcdir)/spad-parser.spad" | ${INTERPSYS} diff --git a/src/algebra/domain.spad b/src/algebra/domain.spad index 6d30ab18..64247670 100644 --- a/src/algebra/domain.spad +++ b/src/algebra/domain.spad @@ -33,14 +33,19 @@ )abbrev domain DOMAIN Domain ++ Author: Gabriel Dos Reis ++ Date Create: October 18, 2007. -++ Date Last Updated: December 12, 2007. +++ Date Last Updated: January 19, 2008. ++ Basic Operations: coerce, reify ++ Related Constructors: Type, Syntax, OutputForm -++ Also See: Type +++ Also See: Type, ConstructorCall Domain(): Public == Private where Public ==> CoercibleTo(OutputForm) with - reify: % -> Syntax + reify: % -> ConstructorCall ++ reify(d) returns the abstract syntax for the domain `x'. + + reflect: ConstructorCall -> % + ++ reflect cc returns the domain object designated by the + ++ ConstructorCall syntax `cc'. The constructor implied + ++ by `cc' must be known to the system since it is instantiated. showSummary: % -> Void ++ showSummary(d) prints out implementation detail information @@ -51,7 +56,10 @@ Domain(): Public == Private where outputDomainConstructor(x)$Lisp reify x == - convert(devaluate(x)$Lisp@SExpression)$Syntax + devaluate(x)$Lisp @ ConstructorCall + + reflect cc == + evalDomain(cc)$Lisp @ % showSummary x == showSummary(x)$Lisp diff --git a/src/algebra/syntax.spad b/src/algebra/syntax.spad.pamphlet index f6d0719e..e7c2b50b 100644 --- a/src/algebra/syntax.spad +++ b/src/algebra/syntax.spad.pamphlet @@ -1,34 +1,18 @@ ---Copyright (C) 2007, Gabriel Dos Reis. ---All rights reserved. --- ---Redistribution and use in source and binary forms, with or without ---modification, are permitted provided that the following conditions are ---met: --- --- - Redistributions of source code must retain the above copyright --- notice, this list of conditions and the following disclaimer. --- --- - Redistributions in binary form must reproduce the above copyright --- notice, this list of conditions and the following disclaimer in --- the documentation and/or other materials provided with the --- distribution. --- --- - Neither the name of The Numerical Algorithms Group Ltd. nor the --- names of its contributors may be used to endorse or promote products --- derived from this software without specific prior written permission. --- ---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +\documentclass{article} +\usepackage{axiom} + +\author{Gabriel Dos~Reis} +\begin{document} + +\begin{abstract} +\end{abstract} + +\tableofcontents +\eject + +\section{domain Syntax} +<<domain SYNTAX Syntax>>= )abbrev domain SYNTAX Syntax ++ Author: Gabriel Dos Reis ++ Date Created: November 10, 2007 @@ -223,3 +207,79 @@ Syntax(): Public == Private where s := rep x atom? s => [] [per t for t in destruct cdr s] +@ + + +\section{domain ConstructorCall} +<<domain CTORCALL ConstructorCall>>= +)abbrev domain CTORCALL ConstructorCall +++ Author: Gabriel Dos Reis +++ Date Created: January 19, 2008 +++ Date Last Updated: January 19, 2008 +++ Description: This domains represents a syntax object that +++ designates a category, domain, or a package. +++ See Also: Syntax, Domain +ConstructorCall(): Public == Private where + Public ==> CoercibleTo OutputForm with + constructorName: % -> Symbol + ++ constructorName c returns the name of the constructor + arguments: % -> List Syntax + ++ arguments returns the list of syntax objects for the + ++ arguments used to invoke the constructor. + + Private ==> add + rep(x: %): List Syntax == + x pretend List(Syntax) + + constructorName x == + (first rep x)::Symbol + + arguments x == + rest rep x + + coerce x == + outputDomainConstructor(x)$Lisp +@ + + +\section{License} +<<license>>= +--Copyright (C) 2007, Gabriel Dos Reis. +--All rights reserved. +-- +--Redistribution and use in source and binary forms, with or without +--modification, are permitted provided that the following conditions are +--met: +-- +-- - Redistributions of source code must retain the above copyright +-- notice, this list of conditions and the following disclaimer. +-- +-- - Redistributions in binary form must reproduce the above copyright +-- notice, this list of conditions and the following disclaimer in +-- the documentation and/or other materials provided with the +-- distribution. +-- +-- - Neither the name of The Numerical Algorithms Group Ltd. nor the +-- names of its contributors may be used to endorse or promote products +-- derived from this software without specific prior written permission. +-- +--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +--IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +--TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +--PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +--OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +--EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +--PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +--PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +--LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +--NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +--SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +@ + +<<*>>= +<<license>> +<<domain SYNTAX Syntax>> +<<domain CTORCALL ConstructorCall>> +@ + +\end{document} |