This is what I wrote back then. The code snippet seems to have been part of this:
http://axiom-wiki.newsynthesis.org/SandBoxGrassmannIsometry (see early revisions of this page) The bug was apparently triggered in the application of a rule but the code itself does not call applyQuote directly. ---------- Forwarded message ---------- From: Bill Page <[email protected]> Date: 12 September 2009 at 00:06 Subject: nasty little bug in pattern matching To: fricas-devel <[email protected]> The following code: -- K:=SparseMultivariatePolynomial(Fraction Integer,Symbol) E:=Expression K a:=a::Symbol::K; b:=b::Symbol::K; c:=c::Symbol::K; P:=P::Symbol::E; Q:=Q::Symbol::E; R:=R::Symbol::E; idot:=display(operator('dot,2), (x:List OutputForm):OutputForm +-> hconcat([x.1,_{_\cdot_} ,x.2])); dot(A:E,B:E):E == (smaller?(A,B)=>idot(A,B);idot(B,A)) dot(P, Q)=dot(Q,P) ihat:=display(operator('hat,2), (x:List OutputForm):OutputForm +-> hconcat([x.1,_{_\wedge_} ,x.2])); hat(A:E,B:E):E == (smaller?(A,B)=>ihat(A,B);-ihat(B,A)) hat(P, Q)=-hat(Q,P) simplifyHat:=rule dot(P, Q)^2-dot(P,P)*dot(Q,Q) == hat(P,Q)^2 -dot(P,Q)^2+dot(P,P)*dot(Q,Q) == -hat(P,Q)^2 dot(Q,R)*dot(P,R)-dot(R,R)*dot(P,Q) == dot(hat(R,Q),hat(R,P)) -- Triggers the bug: >> Error detected within library code: Unknown operator Here is a patch to correct the problem. The operative part is this change: - opquote := operator('applyQuote)$CommonOperators + opquote := operator('%quote)$CommonOperators Later in the code it checks for '%quote, not 'applyQuote. wspage@debian:~/fricas-src/src/algebra$ svn diff fspace.spad.pamphlet Index: fspace.spad.pamphlet =================================================================== --- fspace.spad.pamphlet (revision 666) +++ fspace.spad.pamphlet (working copy) @@ -220,7 +220,7 @@ operator op == is?(op, PAREN) => oppren is?(op, BOX) => opbox - error "Unknown operator" + error concat("Unknown operator 1: ",string(name(op)))$String mainKernel x == empty?(l := kernels x) => "failed" @@ -250,14 +250,14 @@ s kernel(op:OP, args:List %) == - not belong? op => error "Unknown operator" + not belong? op => error concat("Unknown operator 2: ",string(name(op)))$String okkernel(op, args) okkernel(op, l) == kernel(op, l, 1 + reduce("max", [height f for f in l], 0))$K :: % elt(op:OP, args:List %) == - not belong? op => error "Unknown operator" + not belong? op => error concat("Unknown operator 3: ",string(name(op)))$String ((u := arity op) case N) and (#args ~= u::N) => error "Wrong number of arguments" (v := evaluate(op,args)$BasicOperatorFunctions1(%)) case % => v::% @@ -556,7 +556,7 @@ equaldiff : (K,K)->Boolean debugA: (List % ,List %,Boolean) -> Boolean opdiff := operator('%diff)$CommonOperators() - opquote := operator('applyQuote)$CommonOperators + opquote := operator('%quote)$CommonOperators ground? x == retractIfCan(x)@Union(R,"failed") case R ground x == retract x @@ -573,7 +573,7 @@ operator op == is?(op, '%diff) => opdiff is?(op, '%quote) => opquote - error "Unknown operator" + error concat("Unknown operator 4: ",string(name(op)))$String if R has ConvertibleTo InputForm then INP==>InputForm wspage@debian:~/fricas-src/src/algebra$ svn diff fspace.spad.pamphlet > fspace-applyQuote.patch If there are no objections, I will commit this change. Regards, Bill Page. On 28 September 2015 at 04:04, Ralf Hemmecke <[email protected]> wrote: > On 09/28/2015 02:18 AM, Waldek Hebisch wrote: > > AFAICS applyQuote function from FunctionSpace is unused in > > algebra and not tested at all. I wonder if anyone makes > > use of it? > > I don't. > > According to to ChangeLog, Bill made some change in connection to > applyQuote. > > > 2009-10-10 Bill Page <[email protected]> > > * Fix bug: Error detected within library code: Unknown operator > * change 'applyQuote to '%quote > > > Other than that there must have been a reason, why it was introduced in > the first place. Anyone on this list who would know? > > Ralf > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/fricas-devel. > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/fricas-devel. For more options, visit https://groups.google.com/d/optout.
