aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-10-19 00:02:42 +0000
committerdos-reis <gdr@axiomatics.org>2008-10-19 00:02:42 +0000
commitb1c72c39b960f8b0ad6471d331ff23f94bdfb6c1 (patch)
tree06bfbfcddd69640d00cd42048d5cc00320a7d2bd
parent55322fdb5d4cdf67644b3cc0d9930511e1abe80a (diff)
downloadopen-axiom-b1c72c39b960f8b0ad6471d331ff23f94bdfb6c1.tar.gz
* algebra/syntax.spad.pamphlet (Syntax): Simplify.
-rwxr-xr-xconfigure18
-rw-r--r--configure.ac2
-rw-r--r--configure.ac.pamphlet2
-rw-r--r--src/ChangeLog4
-rw-r--r--src/algebra/syntax.spad.pamphlet78
5 files changed, 51 insertions, 53 deletions
diff --git a/configure b/configure
index 1a231708..aa64c625 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.60 for OpenAxiom 1.3.0-2008-10-16.
+# Generated by GNU Autoconf 2.60 for OpenAxiom 1.3.0-2008-10-18.
#
# Report bugs to <open-axiom-bugs@lists.sf.net>.
#
@@ -713,8 +713,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='OpenAxiom'
PACKAGE_TARNAME='openaxiom'
-PACKAGE_VERSION='1.3.0-2008-10-16'
-PACKAGE_STRING='OpenAxiom 1.3.0-2008-10-16'
+PACKAGE_VERSION='1.3.0-2008-10-18'
+PACKAGE_STRING='OpenAxiom 1.3.0-2008-10-18'
PACKAGE_BUGREPORT='open-axiom-bugs@lists.sf.net'
ac_unique_file="src/Makefile.pamphlet"
@@ -1404,7 +1404,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures OpenAxiom 1.3.0-2008-10-16 to adapt to many kinds of systems.
+\`configure' configures OpenAxiom 1.3.0-2008-10-18 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1474,7 +1474,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of OpenAxiom 1.3.0-2008-10-16:";;
+ short | recursive ) echo "Configuration of OpenAxiom 1.3.0-2008-10-18:";;
esac
cat <<\_ACEOF
@@ -1578,7 +1578,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-OpenAxiom configure 1.3.0-2008-10-16
+OpenAxiom configure 1.3.0-2008-10-18
generated by GNU Autoconf 2.60
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1592,7 +1592,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by OpenAxiom $as_me 1.3.0-2008-10-16, which was
+It was created by OpenAxiom $as_me 1.3.0-2008-10-18, which was
generated by GNU Autoconf 2.60. Invocation command line was
$ $0 $@
@@ -26097,7 +26097,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by OpenAxiom $as_me 1.3.0-2008-10-16, which was
+This file was extended by OpenAxiom $as_me 1.3.0-2008-10-18, which was
generated by GNU Autoconf 2.60. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -26146,7 +26146,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-OpenAxiom config.status 1.3.0-2008-10-16
+OpenAxiom config.status 1.3.0-2008-10-18
configured by $0, generated by GNU Autoconf 2.60,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/configure.ac b/configure.ac
index e09ffafa..5a8164ac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
sinclude(config/open-axiom.m4)
sinclude(config/aclocal.m4)
-AC_INIT([OpenAxiom], [1.3.0-2008-10-16],
+AC_INIT([OpenAxiom], [1.3.0-2008-10-18],
[open-axiom-bugs@lists.sf.net])
AC_CONFIG_AUX_DIR(config)
diff --git a/configure.ac.pamphlet b/configure.ac.pamphlet
index 5631cbcf..3deb4496 100644
--- a/configure.ac.pamphlet
+++ b/configure.ac.pamphlet
@@ -1126,7 +1126,7 @@ information:
<<Autoconf init>>=
sinclude(config/open-axiom.m4)
sinclude(config/aclocal.m4)
-AC_INIT([OpenAxiom], [1.3.0-2008-10-16],
+AC_INIT([OpenAxiom], [1.3.0-2008-10-18],
[open-axiom-bugs@lists.sf.net])
@
diff --git a/src/ChangeLog b/src/ChangeLog
index fa693bce..8cd268ff 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2008-10-18 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * algebra/syntax.spad.pamphlet (Syntax): Simplify.
+
2008-10-17 Gabriel Dos Reis <gdr@cs.tamu.edu>
* interp/debug.lisp (WHOCALLED): Add dummy definition.
diff --git a/src/algebra/syntax.spad.pamphlet b/src/algebra/syntax.spad.pamphlet
index 963e841b..380748d8 100644
--- a/src/algebra/syntax.spad.pamphlet
+++ b/src/algebra/syntax.spad.pamphlet
@@ -24,18 +24,19 @@ import SExpression
)abbrev domain SYNTAX Syntax
++ Author: Gabriel Dos Reis
++ Date Created: November 10, 2007
-++ Date Last Updated: December 05, 2007
+++ Date Last Updated: October 18, 2008
++ Description: This domain provides a simple domain, general enough for
-++ building complete representation of Spad programs as objects
-++ of a term algebra built from ground terms of type integers, foats,
-++ symbols, and strings.
-++ This domain differs from InputForm in that it represents
-++ any entity in a Spad program, not just expressions.
+++ building complete representation of Spad programs as objects
+++ of a term algebra built from ground terms of type integers, foats,
+++ symbols, and strings.
+++ This domain differs from InputForm in that it represents
+++ any entity in a Spad program, not just expressions. Furthermore,
+++ while InputForm may contain atoms like vectors and other Lisp
+++ objects, the Syntax domain is supposed to contain only that
+++ initial algebra build from the primitives listed above.
++ Related Constructors: Boolean, Integer, Float, Symbol, String, SExpression.
-++ See Also: SExpression, SetCategory.
+++ See Also: SExpression.
++ The equality supported by this domain is structural.
-++ Fixme: Provide direct support for boolean values, arbritrary
-++ precision float point values.
Syntax(): Public == Private where
Public == Join(UnionType, SetCategory) with
convert: % -> SExpression
@@ -118,32 +119,30 @@ Syntax(): Public == Private where
++ x case String is true if `x' really is a String
Private == add
- Rep == SExpression
x = y ==
EQUAL(x,y)$Lisp
-
+
s case Integer ==
- integer? rep s
+ INTEGERP(s)$Lisp
s case DoubleFloat ==
- float? rep s
+ FLOATP(s)$Lisp
s case String ==
- string? rep s
+ STRINGP(s)$Lisp
s case Symbol ==
- symbol? rep s
+ IDENTP(s)$Lisp
coerce(x: %): OutputForm ==
- x' := rep x
- string? x' => outputForm(x' : String)
- x'::OutputForm
+ x case String => outputForm(x : String)
+ x pretend OutputForm
convert(x: %): SExpression ==
- rep x
+ x : SExpression
convert(x: SExpression): % ==
- per x
+ x pretend %
coerce(i: Integer): % ==
i pretend %
@@ -158,7 +157,7 @@ Syntax(): Public == Private where
coerce(f: DoubleFloat): % ==
f pretend %
- autoCoerce(f: %): DoubleFloat == -- used for hard coercion
+ autoCoerce(f: %): DoubleFloat == -- used for hard coercion
f : DoubleFloat
coerce(f: %): DoubleFloat ==
@@ -186,37 +185,32 @@ Syntax(): Public == Private where
userError "invalid conversion target type"
buildSyntax(s: Symbol, l: List %): % ==
- -- ??? ideally we should have overloaded operator `per' that convert
- -- from list of syntax to syntax. But the compiler is at the
- -- moment defective for non-exported overloaded operations.
- -- Furthermore, this direct call to `CONS' is currently necessary
- -- in order to have the Syntax domain compiled as early as possible
- -- in algebra boostrapping process. It should be removed once
- -- the bootstrap process is improved.
- CONS(s,l)$Lisp @ %
+ CONS(s,l)$Lisp
buildSyntax(op: %, l: List %): % ==
- CONS(op,l)$Lisp @ %
+ CONS(op,l)$Lisp
nil? x ==
- null? rep x
+ NULL(x)$Lisp
+
+ atom?(x: %): Boolean ==
+ ATOM(x)$Lisp
getOperator x ==
- atom? rep x => userError "atom as operand to getOperator"
- op := car rep x
- symbol? op => symbol op
- integer? op => integer op
- float? op => float op
- string? op => string op
- convert op
+ atom? x => userError "atom as operand to getOperator"
+ op: % := CAR(x)$Lisp
+ op case Symbol => op pretend Symbol
+ op case Integer => op pretend Integer
+ op case DoubleFloat => op pretend DoubleFloat
+ op case String => op pretend String
+ op
compound? x ==
- pair? rep x
+ CONSP(x)$Lisp
getOperands x ==
- s := rep x
- atom? s => []
- [per t for t in destruct cdr s]
+ atom? x => []
+ CDR(x)$Lisp
@