[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problems with "map"
- To: clisp-list@ma2s2.mathematik.uni-karlsruhe.de
- Subject: Problems with "map"
- From: Warren Lucas <w.k.lucas@worldnet.att.net>
- Date: Tue, 02 Dec 1997 21:14:06 -0600
- Reply-to: w.k.lucas@worldnet.att.net
CLISP Users:
I am using the latest version of CLISP for Win32s on Win95, and
encounter a small problem that I think may be a bug. It centers around
use of the "map" function the following way.
File: COMPONENT-PREPARATION.LISP
(defun set-avariable-constraint (csp c)
;; Set avariable, iv1 and iv2 slots
(with-struct (constraint- variables arity) c
(let ((vs (map '(simple-array subscript 1) <---- problem here
#'(lambda (v) (position1 v (csp-variables csp)))
variables)))
(setf (constraint-avariable c) vs)
(case arity
(1 (setf (constraint-iv1 c) (aref vs 0)))
(2 (setf (constraint-iv1 c) (aref vs 0))
(setf (constraint-iv2 c) (aref vs 1)))))))
File: CONSTRAINT.LISP
(defstruct (constraint ...
;; For binary and n-ary constraints : array of variable subscripts for
variables on
;; which the constraint holds. Analogous to the `variables' slot but
array instead of
;; list, and subscripts instead of structures.
(avariable (make-array 1 :element-type 'subscript) :type (simple-array
subscript 1))
This is part of a system written by Michel Lemaitre and is available
from http://news.cert.fr/anglais/deri/lemaitre/
This software is written in (ANSI) Common Lisp.
When I run (small-demo), the program progresses through "component
Preparation" and stops with an error about "(SIMPLE-ARRAY SUBSCRIPT 1)
not an available type".
Is there some way I can get around this if it is a ANSI non-compliance
issue?
Thanks,
Warren Lucas