[PATCH] bug in f43e35ef, DELASC in trace.boot

1 view
Skip to first unread message

Qian Yun

unread,
Apr 16, 2026, 11:32:36 PM (4 hours ago) Apr 16
to fricas-devel
diff --git a/src/interp/trace.boot b/src/interp/trace.boot
index 05463eef..36326b95 100644
--- a/src/interp/trace.boot
+++ b/src/interp/trace.boot
@@ -982,7 +983,7 @@ spadUntrace(domain,options) ==
rplac(first domain.n, bpiPointer)
rplac(CDDDR pair, nil)
if assocPair:= assoc(BPINAME bpiPointer,$letAssoc) then
- $letAssoc := REMOVER($letAssoc,assocPair)
+ $letAssoc := DELASC($letAssoc, assocPair)
newSigSlotNumberAlist:= [x for x in sigSlotNumberAlist | CDDDR x]
newSigSlotNumberAlist => rplac(rest pair, newSigSlotNumberAlist)
$trace_names := DELASC(domain, $trace_names)

(Disclaimer: this issue is found by LLM, but the analysis and patch
is thoroughly reviewed by me.)

For "DELASC", the order of argument is opposite of "REMOVER", also
"DELASC" takes key while "REMOVER" takes pair.

(defun DELASC (u v) "Returns a copy of a-list V in which any pair
with key U is deleted."

Patch:

diff --git a/src/interp/trace.boot b/src/interp/trace.boot
index d750f37c..2ae5d8a2 100644
--- a/src/interp/trace.boot
+++ b/src/interp/trace.boot
@@ -986,8 +986,8 @@ spadUntrace(domain,options) ==
anyifTrue or MEMQ(op,listOfOperations) repeat
rplac(first domain.n, bpiPointer)
rplac(CDDDR pair, nil)
- if assocPair:= assoc(BPINAME bpiPointer,$letAssoc) then
- $letAssoc := DELASC($letAssoc, assocPair)
+ if assoc(key := BPINAME bpiPointer, $letAssoc) then
+ $letAssoc := DELASC(key, $letAssoc)
newSigSlotNumberAlist:= [x for x in sigSlotNumberAlist | CDDDR x]
newSigSlotNumberAlist => rplac(rest pair, newSigSlotNumberAlist)
$trace_names := DELASC(domain, $trace_names)


- Qian

Waldek Hebisch

unread,
12:37 AM (3 hours ago) 12:37 AM
to fricas...@googlegroups.com
Thanks, please commit. There is one little thing: I would prefer to have
four space indent per level, this line is fourth level, so the first
non-blank character should be in column 17.

--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages