Menu

#3247 Maxima's trace and timer handle rules incorrectly

None
closed
None
5
2018-05-31
2016-11-17
No
(%i1) defrule(r, a, b); defrule(r1, a, b);
(%i2) trace(r)$
(%i3) to_lisp();

MAXIMA> (setf (values expr flag) ($r '$a))
1 Enter r [a]
1 Exit  r b
$B
NIL
MAXIMA> (setf (values expr flag) ($r1 '$a))

$B
T

A rule returns (values result hit), where hit is true when the rule hits given expression. It seems that trace can't handle multiple return values.

As a result, apply* family of functions don't work with the traced rule.

Note that the lisp built-in trace works like a charm, at least on GCL.

Discussion

  • Kris Katterjohn

    Kris Katterjohn - 2018-05-30
    • summary: Maxima's trace handles rules incorrectly --> Maxima's trace and timer handle rules incorrectly
    • assigned_to: Kris Katterjohn
     
  • Kris Katterjohn

    Kris Katterjohn - 2018-05-30

    Thanks for the report. Timing functions with timer also causes the same problem.

    I have a fix that I'll commit soon.

     
  • Kris Katterjohn

    Kris Katterjohn - 2018-05-31
    • status: open --> closed
     
  • Kris Katterjohn

    Kris Katterjohn - 2018-05-31

    This has been fixed by commit [721457].

    Thanks again for the report.

     

    Related

    Commit: [721457]


Log in to post a comment.