1 Dec 2010 19:12
Re: rtests in Maxima problem
Chris Sangwin <sangwinc <at> for.mat.bham.ac.uk>
2010-12-01 18:12:05 GMT
2010-12-01 18:12:05 GMT
Dear Richard, I'm sorry and I certainly don't wish to be obscure. I am using Maxima to automatically assess student's work. I have a large code base in Maxima to support this which I wish to factor out into an "assessment package" for Maxima. Other colleagues are interested in using these functions in their own projects. So, I'm trying to convert my own extensive set of unit tests into Maxima's rtest format. I've attached a *draft* description of the package, and what it can be used for. I intend to create full documentation for this in due course, so I'm sorry that many details are currently missing. I hope this gives you a good idea of what I'm using Maxima for, and why simp:false is probably necessary for me. Chris On Wed, 1 Dec 2010, Richard Fateman wrote: > On 12/1/2010 8:51 AM, Chris Sangwin wrote: >> >> Thank you Richard, >> >> Yes, I'm sure my example isn't strictly minimal, but it does illustrate the >> problem in one line... >> >> I know this is an unusual thing to want to do. > Requests about using simp:false occur from time to time. They are almost > always resolved by doing something else. > >> Indeed, the who point of what I'm doing is to implement functions which >> will distinguish between expressions such as x-x and 0. So, I really need >> simp:false. > Perhaps, but you should not expect Maxima to do anything useful when > simp:false is the global setting. > >> >> The problem seems to reside in the internals of Maxima, in particualar the >> flags such as (mplus SIMP) and (mplus RATSIMP) which are added to >> operators. My understanding of these flags is that they indicate that >> sub-expressions have already been simplified. Is that correct? > That is what the flags mean, but that is not the problem, I think. >> >> I'm no Maxima expert, but I would like to be able to create automatic tests >> using the current system. How can I encode an answer as a potential output >> to one of these tests which has the right flags in it? > What flags do you want? If you insert a SIMP flag in an unsimplified > expression, all that means is you are > breaking the data abstraction. > > You haven't described your actual need, just the "derived" need which is > probably off track. so here > are 2 guesses. > > 1. You can store anything as a string: m: "x-x" > 2. You can store stuff inside a function. > foo():=block([simp:off],define(ans(),read())); > x-x; > > returns ans():=x-x > > Also, you can, if you wish, insert a simp flag. in wxmaxima type > :lisp (defun $hack(r)(cons (append (head r)'(simp)) (rest r))) > > but as I said, I doubt that this is really what will help you. > > rjf > > > > > >
_______________________________________________ Maxima mailing list Maxima <at> math.utexas.edu http://www.math.utexas.edu/mailman/listinfo/maxima
RSS Feed