25 Aug 2002 12:19
puzzle with pattern matching
Zheng Yin <zyin <at> CSUA.Berkeley.EDU>
2002-08-25 10:19:45 GMT
2002-08-25 10:19:45 GMT
Hi, I noticed the following puzzling behavior when I do pattern matching
of a subscript construction and variables read from batch file.
Since I am new to maxima I am not sure if this is a bug or something
(un)documented in the Byzantine manual. It looks to me like the additional
information inserted during batch loading for source level debugging is
interfering with the pattern matcher:
(C106) batch ("matchmake.mac");
batching /tmp/matchmake.mac
(C107) DECLARE(myfeature, FEATURE)
(C108) DECLARE(she, myfeature)
(C109) myfeatureP(x) := FEATUREP(x, 'myfeature)
(C110) MATCHDECLARE([matchme, matchmetoo], myfeatureP)
(C111) DEFRULE(mymatch, matchme, matchme)
(C112) DEFRULE(mymatch2, matchme[matchmetoo], matchme)
(C113) heralias : she
(C114) heralias2 : she[she]
(C115) mymatch (heralias);
(D115) she
(C116) mymatch2 (heralias2);
*** - GET: 0 is not a symbol
1. Break [15]> :q
(C117) heralias2;
(D117) she
she
(C118) mymatch2 (she[she]);
(D118) she
(C119) heralias2_alt : she[she];
(Continue reading)
RSS Feed