Hello,
Yes that's the problem. Where can I get the solution to this ?
To who should I write to ?
Thank you for your answer.
Marc GILG
Le mar 10/12/2002 à 18:35, go_furuya@infoseek.jp a écrit :
> hi Marc
>
> This is the same problem as Aug 27 :RE puzzle with pattern matching.(MAXIMA ML)
>
> As Valerij's mail,if all cords are inputed from console,everything goes well.
> But from a file,not well.
> see from file,function e(x,y)
>
> >:lisp(symbol-plist '|$e|)
> (MPROPS
> (NIL MEXPR
> ((LAMBDA) ((MLIST) |$x| |$y|)
> ((|$f| ARRAY (24 "pb2.mac" SRC |$e| 24)) |$x| |$y|)))
> LINEINFO ((|$f| ARRAY (24 "pb2.mac" SRC |$e| 24)) |$x| |$y|))
> by gcl
> if from console
> (MPROPS
> (NIL MEXPR
> ((LAMBDA) ((MLIST) |$x| |$y|)
> ((|$f| ARRAY) |$x| |$y|)))
> LINEINFO ((|$f| ARRAY) |$x| |$y|))
>
> So at patern matching ,(24 ......24) prevent MAXIMA from matching right way .
> I think such additional info may be not need for us?
>
> Gosei Furuya (go_furuya@infoseek.jp)
>
>
> > Hello,
> >
> > Thank you for your answer.
> > I'm using maxima on Linux.
> >
> > I try what you say ,
> > and I get :
> > for APPLYB1(f[x,y],LIN) I get the fonction calls.
> > For APPLYB1(a,LIN) where a:e(x,y); I get :
> > Error: Caught fatal error [memory may be damaged]
> > Fast links are on: do (si::use-fast-links nil) for debugging
> > Error signalled by COND.
> > Broken at IS. Type :H for Help.
> > MAXIMA>>
> >
> > How can I disable Fast links ?
> > si::use-fast-links nil make an error.
> >
> > Thank you for your help,
> >
> > Marc
> >
> > Le lun 09/12/2002 � 16:57, Richard Fateman a �rit :
> > > Your program works in commercial macsyma on windows.
> > >
> > >
> > > You could read about declare(f,linear) to see if that
> > > can help.
> > > Also you can do this:
> > > testfonc(x):=is (member(x,Fonc));
> > >
> > > and testsum(x):= is ( not(atom(x)) or (part(x,0)="+"))
> > >
> > > what did you want to do if the expression is 3*z ??
> > > If you set
> > > debugmode:true
> > >
> > > and trace(is)
> > >
> > > you might get more information.
> > > RJF
> > >
> > >
> > > Marc GILG wrote:
> > > > Hello,,
> > > >
> > > > I have create a file with some rules definitions, for exemple :
> > > > LIN : f[x+y,z]->f[x,z]+f[y,z]
> > > > A have also define a fonction in this file :
> > > > e(x,y):=f[x,y];
> > > > Now a load the file with BATCHLOAD("pb.mac");
> > > > Now if I do APPLYB1(f[x,y],LIN); then OK
> > > > If I do APPLYB1(e(x,y),LIN); then mistake !!!
> > > >
> > > > What happed ?
> > > >
> > > > Thank you for your help.
> > > >
> > > > Marc GILG
> > > > PS: I joint a copy of the file and the output from xmaxima.
> > > >
> > > >
> > > >
> > > >
> > > > ------------------------------------------------------------------------
> > > >
> > > >
> > > > PARTSWITCH:TRUE$
> > > >
> > > > PART2SUM(x):=BLOCK([rep:0,i],FOR i:2 STEP 1 UNLESS PART(x,i)=END DO
> > > > rep:rep+PART(x,i),rep)$
> > > >
> > > > /* Definition des noms de fonction */
> > > > Fonc : [f,g]$
> > > > /* Test si x est une fonction */
> > > > TESTFONC(x):=IF MEMBER(x,Fonc) THEN TRUE ELSE FALSE$
> > > >
> > > > /* Teste si x est une somme */
> > > > TESTSUM(x):=IF ATOM(x) THEN FALSE ELSE IF PART(x,0)="+" THEN TRUE ELSE FALSE$
> > > >
> > > >
> > > > /* Declaration de modeles */
> > > > MATCHDECLARE(f,TESTFONC)$
> > > > MATCHDECLARE(A,TRUE)$
> > > >
> > > > /* Declaration de la regle LIN */
> > > > MATCHDECLARE(B,TESTSUM)$
> > > > DEFRULE(LIN,f[A,B],f[A,PART(B,1)]+f[A,PART2SUM(B)])$
> > > >
> > > > e(x,y):=f[x,y];
> > > >
> > > >
> > > > ------------------------------------------------------------------------
> > > >
> > > > (C1)
> > > >
> > > > batching #p/home/gilg/maxima/pb.mac
> > > > (C2) PARTSWITCH : TRUE
> > > > (C3) PART2SUM(x) := BLOCK([rep : 0, i], FOR i FROM 2 UNLESS PART(x, i) = END DO rep : PART(x, i) + rep, rep)
> > > > (C4) Fonc : [f, g]
> > > > (C5) TESTFONC(x) := IF MEMBER(x, Fonc) THEN TRUE ELSE FALSE
> > > > (C6) TESTSUM(x) := IF ATOM(x) THEN FALSE ELSE (IF PART(x, 0) = "+" THEN TRUE ELSE FALSE)
> > > > (C7) MATCHDECLARE(f, TESTFONC)
> > > > (C8) MATCHDECLARE(A, TRUE)
> > > > (C9) MATCHDECLARE(B, TESTSUM)
> > > > (C10) DEFRULE(LIN, f , f + f )
> > > > A, B A, PART2SUM(B) A, PART(B, 1)
> > > > (C11) e(x, y) := f
> > > > x, y
> > > > (D11) e(x, y) := f
> > > > x, y
> > > > (C12) APPLYB1(f[x,y],LIN);
> > > > (D12) f
> > > > x, y
> > > > (C13) APPLYB1(e(x,y),LIN);
> > > >
> > > > Error: Caught fatal error [memory may be damaged]
> > > > Fast links are on: do (si::use-fast-links nil) for debugging
> > > > Error signalled by COND.
> > > > Broken at IS. Type :H for Help.
> > > > MAXIMA>>
> > > >
> > >
> > >
> > > _______________________________________________
> > > Maxima mailing list
> > > Maxima@www.math.utexas.edu
> > > http://www.math.utexas.edu/mailman/listinfo/maxima
> >
> >
> > _______________________________________________
> > Maxima mailing list
> > Maxima@www.math.utexas.edu
> > http://www.math.utexas.edu/mailman/listinfo/maxima
> >
> >
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima