Ralf Hemmecke wrote:
>
> I've put a partial translation of i-output here.
>
> https://github.com/hemmecke/fricas/blob/i-output-to-spad/src/algebra/outboot.spad.pamphlet
>
Thanks.
> Obviously my knowledge of BOOT is pretty bad. It took me quite a long
> time to get only this far. And without someone else checking my code, it
> shouldn't go in.
>
> I have not even tried to compile it, since I'm currently pretty much
> bored. :-(
>
> Anyway... is this the way you think that the translation should be done?
In general yes. Quick look at the code shows reversed parenthesis
in 'obj2String', there are probably more typos. Some remarks:
- boot code in comments should be just temporary help and gone
in final translation
- instead of 'pretend' to SExpression it seems better to define
accessors for OutputForm and use them
- in case of outputTran it is clear that it performs two separate
functions. One is convertion of interpreter trees to OutputForm.
The second is general flattening + some substitutions. The
general transforms are useful to all formaters, while the first
transform is only useful to interpreter. I would separate those
transformations. It requies some effort to find all places where
interpreter trees are passed to mathprint, but I think it is
reasonably well localized, so we can find them and apply convertion
there. That way we will decouple OutputForm from interpreter
trees.
In general, it makes sense to do some cleanups during translation.
One needs to be careful, but if translation is verified incrementally,
then we should be OK.
--
Waldek Hebisch
[email protected]
--
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.