On Mon, Apr 28, 2025 at 11:25:37AM -0400, Camm Maguire wrote:
> Greetings, and thanks so much for this very helpful report!  I've found
> the cause and am testing the fix now.

Good, thanks.

> Alas, this does not fix the other issue:
> 
> > > 2) The FriCAS snippet below in final step gives old (stale) output
> > >    corresponding to n==10, instead of output corresponding to n==15:
> > >
> > > )set functions cache all
> > > n==10
> > > v==[i for i in 0..n]
> > > v
> > > n==15
> > > v
> 
> You probably already know what with a second
> 
> n==15
> v
> 
> we get the expected results.  Might you isolate this one as well as you
> did with the last?

AFAICS the attached Lisp file is doing the same sequence of Lisp
operations and exhibits the same problem.  It depends on FriCAS
macros, run via

)read ttt3b.lisp

at FriCAS prompt.

-- 
                              Waldek Hebisch

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/fricas-devel/aA_toUbahz2PulHJ%40fricas.org.
(EVAL '(DEFUN |*0;n;1;frame1| (|envArg|)
    (PROG (XG1)
        (RETURN
            (COND ((LETT XG1
                   (HGET BOOT::|*0;n;1;frame1;AL| NIL)) XG1)
                  ((QUOTE T)
                    (HPUT |*0;n;1;frame1;AL| NIL
                         (|*0;n;1;frame1;AUX| |envArg|))))))))
(COMPILE '|*0;n;1;frame1|)
(EVAL '(DEFUN |*0;n;1;frame1;AUX| (|envArg|) 10))
(COMPILE '|*0;n;1;frame1;AUX|)
(EVAL '(SETQ |*0;n;1;frame1;AL| (MAKE_HASHTABLE (QUOTE EQUAL))))

(EVAL '(DEFUN |*0;v;1;frame1| (|envArg|)
    (PROG (XG3)
        (RETURN (COND ((LETT XG3
                       (HGET |*0;v;1;frame1;AL| NIL)) XG3)
                ((QUOTE T) (HPUT |*0;v;1;frame1;AL| NIL
                           (|*0;v;1;frame1;AUX| |envArg|))))))))
(COMPILE '|*0;v;1;frame1|)

(EVAL '(DEFUN |*0;v;1;frame1;AUX| (|envArg|)
    (LET ((XG5 NIL) (|i| NIL) (XG4 NIL))
        (SEQ
            (PROGN
               (LETT |i| (QUOTE UNINITIALIZED_VARIABLE) |v|)
               (APPEND (|asTupleAsList|
                           (|asTupleNew0|
                         (PROGN (LETT XG4 NIL)
                            (SEQ (LETT |i| 0)
                            (LETT XG5 (|*0;n;1;frame1| NIL)) G190 (COND 
((|greater_SI| |i| XG5) (GO G191))) (SEQ (EXIT (LETT XG4 (CONS (|unwrap| |i|) 
XG4))))
  (LETT |i| (|inc_SI| |i|)) (GO G190) G191 (EXIT (NREVERSE XG4))))))))))))
(COMPILE '|*0;v;1;frame1;AUX|)
(EVAL '(SETQ |*0;v;1;frame1;AL| (MAKE_HASHTABLE (QUOTE EQUAL))))
(PRETTYPRINT (EVAL '(|*0;v;1;frame1| NIL)))
; EVAL returned (0 1 2 3 4 5 6 7 8 9 10)

(EVAL '(DEFUN |*0;n;1;frame1| (|envArg|) (PROG (XG7) (RETURN (COND ((LETT XG7 
(HGET |*0;n;1;frame1;AL| NIL)) XG7) ((QUOTE T) (HPUT |*0;n;1;frame1;AL| NIL 
(|*0;n;1;frame1;AUX| |envArg|))))))))
(COMPILE '|*0;n;1;frame1|)
(EVAL '(DEFUN |*0;n;1;frame1;AUX| (|envArg|) 15))
(COMPILE '|*0;n;1;frame1;AUX|)
(EVAL '(SETQ |*0;n;1;frame1;AL| (MAKE_HASHTABLE (QUOTE EQUAL))))

(EVAL '(DEFUN |*0;v;1;frame1| (|envArg|) (PROG (XG9) (RETURN (COND ((LETT XG9 
(HGET |*0;v;1;frame1;AL| NIL)) XG9) ((QUOTE T) (HPUT |*0;v;1;frame1;AL| NIL 
(|*0;v;1;frame1;AUX| |envArg|))))))))
(COMPILE '|*0;v;1;frame1|)

(EVAL '(DEFUN |*0;v;1;frame1;AUX| (|envArg|) (LET ((XG11 NIL) (|i| NIL) (XG10 
NIL)) (SEQ (PROGN (LETT |i| (QUOTE UNINITIALIZED_VARIABLE) |v|) (APPEND 
(|asTupleAsList| (|asTupleNew0| (PROGN (LETT XG10 NIL) (SEQ (LETT |i| 0) (LETT 
XG11 (|*0;n;1;frame1| NIL)) BOOT::G190 (COND ((|greater_SI| |i| XG11) (GO 
G191))) (SEQ (EXIT (LETT XG10 (CONS (|unwrap| |i|) XG10)))) (LETT BOOT::|i| 
(|inc_SI| |i|)) (GO G190) G191 (EXIT (NREVERSE XG10))))))))))))
(COMPILE '|*0;v;1;frame1;AUX|)
(EVAL '(SETQ |*0;v;1;frame1;AL| (MAKE_HASHTABLE (QUOTE EQUAL))))
(PRETTYPRINT (EVAL '(|*0;v;1;frame1| NIL)))

Reply via email to