aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-11-18 18:03:21 +0000
committerdos-reis <gdr@axiomatics.org>2008-11-18 18:03:21 +0000
commite8fa0a31f5e1ec2f3269cd2cd5cd18a78fd60a4a (patch)
tree0cc962f9987ca386384cf131e2f49bdc8a0e4d18
parent8af9359051b3b2493ef3b9d06b8fe26f2a645a06 (diff)
downloadopen-axiom-e8fa0a31f5e1ec2f3269cd2cd5cd18a78fd60a4a.tar.gz
* interp/nrunfast.boot (resolveNiladicConstructors): New.
(newHasTest): Use it to handle signature export test. * testsuite/interpreter/has.input: New.
-rwxr-xr-xconfigure18
-rw-r--r--configure.ac2
-rw-r--r--configure.ac.pamphlet2
-rw-r--r--src/ChangeLog6
-rw-r--r--src/interp/nrunfast.boot22
-rw-r--r--src/testsuite/interpreter/has.input18
6 files changed, 57 insertions, 11 deletions
diff --git a/configure b/configure
index 04549eda..a7cd700e 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-11-15.
+# Generated by GNU Autoconf 2.60 for OpenAxiom 1.3.0-2008-11-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-11-15'
-PACKAGE_STRING='OpenAxiom 1.3.0-2008-11-15'
+PACKAGE_VERSION='1.3.0-2008-11-18'
+PACKAGE_STRING='OpenAxiom 1.3.0-2008-11-18'
PACKAGE_BUGREPORT='open-axiom-bugs@lists.sf.net'
ac_unique_file="src/Makefile.pamphlet"
@@ -1405,7 +1405,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-11-15 to adapt to many kinds of systems.
+\`configure' configures OpenAxiom 1.3.0-2008-11-18 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1475,7 +1475,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of OpenAxiom 1.3.0-2008-11-15:";;
+ short | recursive ) echo "Configuration of OpenAxiom 1.3.0-2008-11-18:";;
esac
cat <<\_ACEOF
@@ -1579,7 +1579,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-OpenAxiom configure 1.3.0-2008-11-15
+OpenAxiom configure 1.3.0-2008-11-18
generated by GNU Autoconf 2.60
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1593,7 +1593,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-11-15, which was
+It was created by OpenAxiom $as_me 1.3.0-2008-11-18, which was
generated by GNU Autoconf 2.60. Invocation command line was
$ $0 $@
@@ -26424,7 +26424,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-11-15, which was
+This file was extended by OpenAxiom $as_me 1.3.0-2008-11-18, which was
generated by GNU Autoconf 2.60. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -26473,7 +26473,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-OpenAxiom config.status 1.3.0-2008-11-15
+OpenAxiom config.status 1.3.0-2008-11-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 e7ea6fe6..7f4a1db4 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-11-15],
+AC_INIT([OpenAxiom], [1.3.0-2008-11-18],
[open-axiom-bugs@lists.sf.net])
AC_CONFIG_AUX_DIR(config)
diff --git a/configure.ac.pamphlet b/configure.ac.pamphlet
index c82719b1..52cb2464 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-11-15],
+AC_INIT([OpenAxiom], [1.3.0-2008-11-18],
[open-axiom-bugs@lists.sf.net])
@
diff --git a/src/ChangeLog b/src/ChangeLog
index 53ea2f32..f9328308 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2008-11-18 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * interp/nrunfast.boot (resolveNiladicConstructors): New.
+ (newHasTest): Use it to handle signature export test.
+ * testsuite/interpreter/has.input: New.
+
2008-11-17 Gabriel Dos Reis <gdr@cs.tamu.edu>
* interp/lisplib.boot (compDefineExports): Now take operation
diff --git a/src/interp/nrunfast.boot b/src/interp/nrunfast.boot
index 2f419f37..b7ee04da 100644
--- a/src/interp/nrunfast.boot
+++ b/src/interp/nrunfast.boot
@@ -591,6 +591,19 @@ lazyDomainSet(lazyForm,thisDomain,slot) ==
name := CAR form
setShellEntry(thisDomain,slot,slotDomain)
+
+++ `type' is a type form constructed by the new parser.
+++ Return a type form where all niladic constructors are
+++ resolved to constructor calls. Note: it is assumed that no
+++ such resolution has already occured.
+resolveNiladicConstructors type ==
+ atom type =>
+ IDENTP type and niladicConstructorFromDB type => [type]
+ type
+ for args in tails rest type repeat
+ rplac(first args, resolveNiladicConstructors first args)
+ type
+
--=======================================================
-- HasCategory/Attribute
--=======================================================
@@ -637,6 +650,15 @@ newHasTest(domform,catOrAtt) ==
null isAtom and constructor? op =>
domain := eval mkEvalable domform
newHasCategory(domain,catOrAtt)
+ catOrAtt is [":",op,type] =>
+ sig :=
+ type is ["Mapping",:sig'] =>
+ for ts in tails sig' repeat
+ rplac(first ts, resolveNiladicConstructors first ts)
+ sig'
+ -- a constant; make it look like op: () -> type
+ [resolveNiladicConstructors type]
+ HasSignature(evalDomain domform, [op,sig])
newHasAttribute(eval mkEvalable domform,catOrAtt)
lazyMatchAssocV(x,auxvec,catvec,domain) == --new style slot4
diff --git a/src/testsuite/interpreter/has.input b/src/testsuite/interpreter/has.input
new file mode 100644
index 00000000..7eb29272
--- /dev/null
+++ b/src/testsuite/interpreter/has.input
@@ -0,0 +1,18 @@
+-- Test for `T has sig'
+--
+
+-- expected: true
+Integer has random: Integer -> Integer
+
+-- expected: false
+Float has random: Float -> Float
+
+-- expected: true
+Boolean has true: Boolean
+
+
+-- expected: true
+Boolean has false: Boolean
+
+-- expected: false
+Boolean has fals: Boolean