diff options
-rwxr-xr-x | configure | 18 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | configure.ac.pamphlet | 2 | ||||
-rw-r--r-- | src/ChangeLog | 4 | ||||
-rw-r--r-- | src/algebra/strap/VECTOR.lsp | 65 | ||||
-rw-r--r-- | src/algebra/vector.spad.pamphlet | 10 |
6 files changed, 60 insertions, 41 deletions
@@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for OpenAxiom 1.4.0-2010-02-27. +# Generated by GNU Autoconf 2.63 for OpenAxiom 1.4.0-2010-03-01. # # Report bugs to <open-axiom-bugs@lists.sf.net>. # @@ -745,8 +745,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='OpenAxiom' PACKAGE_TARNAME='openaxiom' -PACKAGE_VERSION='1.4.0-2010-02-27' -PACKAGE_STRING='OpenAxiom 1.4.0-2010-02-27' +PACKAGE_VERSION='1.4.0-2010-03-01' +PACKAGE_STRING='OpenAxiom 1.4.0-2010-03-01' PACKAGE_BUGREPORT='open-axiom-bugs@lists.sf.net' ac_unique_file="src/Makefile.pamphlet" @@ -1511,7 +1511,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.4.0-2010-02-27 to adapt to many kinds of systems. +\`configure' configures OpenAxiom 1.4.0-2010-03-01 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1581,7 +1581,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of OpenAxiom 1.4.0-2010-02-27:";; + short | recursive ) echo "Configuration of OpenAxiom 1.4.0-2010-03-01:";; esac cat <<\_ACEOF @@ -1688,7 +1688,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -OpenAxiom configure 1.4.0-2010-02-27 +OpenAxiom configure 1.4.0-2010-03-01 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1702,7 +1702,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.4.0-2010-02-27, which was +It was created by OpenAxiom $as_me 1.4.0-2010-03-01, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -21165,7 +21165,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.4.0-2010-02-27, which was +This file was extended by OpenAxiom $as_me 1.4.0-2010-03-01, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -21228,7 +21228,7 @@ Report bugs to <bug-autoconf@gnu.org>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -OpenAxiom config.status 1.4.0-2010-02-27 +OpenAxiom config.status 1.4.0-2010-03-01 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/configure.ac b/configure.ac index b6b2a1c8..62d940f5 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ sinclude(config/open-axiom.m4) sinclude(config/aclocal.m4) -AC_INIT([OpenAxiom], [1.4.0-2010-02-27], +AC_INIT([OpenAxiom], [1.4.0-2010-03-01], [open-axiom-bugs@lists.sf.net]) AC_CONFIG_AUX_DIR(config) diff --git a/configure.ac.pamphlet b/configure.ac.pamphlet index 9c354e35..a544c0c6 100644 --- a/configure.ac.pamphlet +++ b/configure.ac.pamphlet @@ -1200,7 +1200,7 @@ information: <<Autoconf init>>= sinclude(config/open-axiom.m4) sinclude(config/aclocal.m4) -AC_INIT([OpenAxiom], [1.4.0-2010-02-27], +AC_INIT([OpenAxiom], [1.4.0-2010-03-01], [open-axiom-bugs@lists.sf.net]) @ diff --git a/src/ChangeLog b/src/ChangeLog index 3b5cef38..e5f8d552 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2010-03-01 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * algebra/vector.spad.pamphlet (maxIndex$Vector): Define. + 2010-02-28 Gabriel Dos Reis <gdr@cs.tamu.edu> * algebra/boolean.spad.pamphlet diff --git a/src/algebra/strap/VECTOR.lsp b/src/algebra/strap/VECTOR.lsp index 6b8ecf36..e6ac08f8 100644 --- a/src/algebra/strap/VECTOR.lsp +++ b/src/algebra/strap/VECTOR.lsp @@ -4,23 +4,32 @@ (DECLAIM (FTYPE (FUNCTION (|%List| |%Shell|) |%Thing|) |VECTOR;vector;L$;1|)) +(DECLAIM (FTYPE (FUNCTION (|%Thing| |%Shell|) |%Integer|) + |VECTOR;maxIndex;$I;2|)) + +(PUT '|VECTOR;maxIndex;$I;2| '|SPADreplace| '|sizeOfSimpleArray|) + (DECLAIM (FTYPE (FUNCTION (|%Thing| |%Shell|) |%Thing|) - |VECTOR;convert;$If;2|)) + |VECTOR;convert;$If;3|)) (DEFUN |VECTOR;vector;L$;1| (|l| $) (SPADCALL |l| (|getShellEntry| $ 10))) -(DEFUN |VECTOR;convert;$If;2| (|x| $) +(DEFUN |VECTOR;maxIndex;$I;2| (|x| $) + (DECLARE (IGNORE $)) + (|sizeOfSimpleArray| |x|)) + +(DEFUN |VECTOR;convert;$If;3| (|x| $) (SPADCALL - (LIST (SPADCALL '|vector| (|getShellEntry| $ 14)) - (SPADCALL (SPADCALL |x| (|getShellEntry| $ 15)) - (|getShellEntry| $ 16))) - (|getShellEntry| $ 18))) + (LIST (SPADCALL '|vector| (|getShellEntry| $ 15)) + (SPADCALL (SPADCALL |x| (|getShellEntry| $ 16)) + (|getShellEntry| $ 17))) + (|getShellEntry| $ 19))) -(DEFUN |Vector| (#0=#:G1406) +(DEFUN |Vector| (#0=#:G1407) (PROG () (RETURN - (PROG (#1=#:G1407) + (PROG (#1=#:G1408) (RETURN (COND ((LETT #1# @@ -40,7 +49,7 @@ (PROGN (LETT |dv$1| (|devaluate| |#1|) . #0=(|Vector|)) (LETT |dv$| (LIST '|Vector| |dv$1|) . #0#) - (LETT $ (|newShell| 35) . #0#) + (LETT $ (|newShell| 36) . #0#) (|setShellEntry| $ 0 |dv$|) (|setShellEntry| $ 3 (LETT |pv$| @@ -89,22 +98,24 @@ (|setShellEntry| $ 6 |#1|) (COND ((|testBitVector| |pv$| 3) - (|setShellEntry| $ 19 - (CONS (|dispatchFunction| |VECTOR;convert;$If;2|) $)))) + (|setShellEntry| $ 20 + (CONS (|dispatchFunction| |VECTOR;convert;$If;3|) $)))) $)))) (MAKEPROP '|Vector| '|infovec| (LIST '#(NIL NIL NIL NIL NIL (|IndexedVector| 6 (NRTEVAL 1)) (|local| |#1|) (|Integer|) (0 . |One|) (|List| 6) - (4 . |construct|) |VECTOR;vector;L$;1| (|OutputForm|) - (|InputForm|) (9 . |convert|) (14 . |parts|) - (19 . |convert|) (|List| $) (24 . |convert|) - (29 . |convert|) (|Mapping| 6 6 6) (|Boolean|) - (|NonNegativeInteger|) (|Equation| 6) (|List| 23) - (|Mapping| 21 6) (|Mapping| 21 6 6) (|UniversalSegment| 7) - (|Void|) (|Mapping| 6 6) (|Matrix| 6) (|SingleInteger|) - (|String|) (|Union| 6 '"failed") (|List| 7)) - '#(|vector| 34 |parts| 39 |convert| 44 |construct| 49) + (4 . |construct|) |VECTOR;vector;L$;1| + |VECTOR;maxIndex;$I;2| (|OutputForm|) (|InputForm|) + (9 . |convert|) (14 . |parts|) (19 . |convert|) (|List| $) + (24 . |convert|) (29 . |convert|) (|Mapping| 6 6 6) + (|Boolean|) (|NonNegativeInteger|) (|Equation| 6) + (|List| 24) (|Mapping| 22 6) (|Mapping| 22 6 6) + (|UniversalSegment| 7) (|Void|) (|Mapping| 6 6) + (|Matrix| 6) (|SingleInteger|) (|String|) + (|Union| 6 '"failed") (|List| 7)) + '#(|vector| 34 |parts| 39 |maxIndex| 44 |convert| 49 + |construct| 54) '((|shallowlyMutable| . 0) (|finiteAggregate| . 0)) (CONS (|makeByteWordVec2| 5 '(0 0 0 0 0 0 0 5 0 0 1 4 0 0 1 2 3 4)) @@ -126,11 +137,11 @@ (|OrderedSet|) (|Aggregate|) (|EltableAggregate| 7 6) (|Evalable| 6) (|SetCategory|) (|Type|) (|Eltable| 7 6) - (|InnerEvalable| 6 6) (|CoercibleTo| 12) - (|ConvertibleTo| 13) (|BasicType|)) - (|makeByteWordVec2| 19 - '(0 7 0 8 1 0 0 9 10 1 13 0 12 14 1 0 9 - 0 15 1 9 13 0 16 1 13 0 17 18 1 0 13 - 0 19 1 0 0 9 11 1 0 9 0 15 1 3 13 0 - 19 1 0 0 9 10))))) + (|InnerEvalable| 6 6) (|CoercibleTo| 13) + (|ConvertibleTo| 14) (|BasicType|)) + (|makeByteWordVec2| 20 + '(0 7 0 8 1 0 0 9 10 1 14 0 13 15 1 0 9 + 0 16 1 9 14 0 17 1 14 0 18 19 1 0 14 + 0 20 1 0 0 9 11 1 0 9 0 16 1 6 7 0 12 + 1 3 14 0 20 1 0 0 9 10))))) '|lookupIncomplete|)) diff --git a/src/algebra/vector.spad.pamphlet b/src/algebra/vector.spad.pamphlet index 292a8a01..e11e41e9 100644 --- a/src/algebra/vector.spad.pamphlet +++ b/src/algebra/vector.spad.pamphlet @@ -140,14 +140,18 @@ IndexedVector(R:Type, mn:Integer): ++ and indexed by a finite segment of integers starting at 1. Vector(R:Type): Exports == Implementation where - VECTORMININDEX ==> 1 -- if you want to change this, be my guest - Exports ==> VectorCategory R with vector: List R -> % ++ vector(l) converts the list l to a vector. Implementation ==> - IndexedVector(R, VECTORMININDEX) add + IndexedVector(R, 1) add vector l == construct l + -- We want maxIndex to be inlined. Ideally, the definition should + -- read + -- maxIndex x == # rep x + -- However, there is currently an infelicity in the compiler that + -- prevents good uses of dependent domains. So, we fall back to + maxIndex x == sizeOfSimpleArray(x)$Foreign(Builtin) if R has ConvertibleTo InputForm then convert(x:%):InputForm == convert [convert('vector)@InputForm, |