On 5/17/2012 7:21 AM, Robert Dodier wrote:
> Rupert,
>
> Your general approach makes sense to me. A few comments.
>
> About CLOS objects, I don't see any problem with letting them float
> around in Maxima. Makes sense to me to patch DISPLA to print them.
> May as well use native Lisp objects whenever they're useful.
I think there is a potential problem, since CLOS objects will look like
atoms.
Every place that in the system in which there is an implicit assumption that
every expression E is either a lisp list with an operator found by (caar
E), or
an atom which is a number or a symbol, may need to be checked for
an atom which is a number or a symbol or a CLOS object.
I think it would be safer to introduce extra stuff via
((group_stuff simp) <clos-object>)
in which case the simplifier for group_stuff will know about the object,
and the display properties can use the regular dispatch mechanism.
Nuking defstruct seems like a bad idea: the substructures in defstruct
are maxima expressions, not CLOS objects. Unless everything in
Maxima is framed in terms of CLOS, (probably too much work !)
I think there is a problem.
>
> There is an existing structure scheme in Maxima which is essentially a
> reimplementation of similar stuff in Lisp. See defstruct, @, new.
> However that doesn't have any method stuff so it sounds like what you're
> doing is beyond its capabilities.
Probably some variant of methods could be introduced to defstruct with a
page or so of code;
Maybe using tellsimp, it would be only a few lines.
> It would probably be a good idea to
> nuke the existing structure implementation and punt directly to Lisp.
>
> There exists some code for finite groups in maxima/share -- I think it
> is called gf. Maybe you know about that already.
>
> Keep up the good work,& keep us posted. If you have a patch for the
> display code already, I am interested to see it.
>
> best
>
> Robert Dodier
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima