On 2006-06-07, Akim Demaille <akim(a)lrde.epita.fr> wrote:
>>
"SIGOURE" == SIGOURE Benoit <sigoure.benoit(a)lrde.epita.fr> writes:
Use libstratego-gpp for direct pretty printing.
This is a brand new way of pretty-printing. It relies on a very
recent version of libstratego-gpp and thus requires a very recent
installation of Stratego/XT 0.17M1.
Instead of calling prism-to-abox and Abox-2-text (which implies
creating several temporary files under /tmp) pp-{prism,xrm} do the
pretty-printing themselves and then use libstratego-gpp to transform
the boxed AST into text. This is much more efficient.
The point is only speed?
Mostly yeah.
But isn't it a sufficient reason? :)
It saves several temporary files under /tmp which can be several Mb (or even
Gb if Micha is around) large which require a lot of time to be
written/read/parsed.
Generally speaking, the whole Stratego/XT bundle is going to work this way.
ATM, pipelines in Stratego/XT are made using XTC, which is all about gluing
components together. Basically, we have several tools designed to perform a
very well defined task and these tools are called one after the other.
However, for the time being, XTC components don't use real pipes (I mean:
UNIX pipes), instead they use temporary files. So once a tool has finished
its work, its output is written in a /tmp file which will be read by the next
tool in the pipeline. That's the whole problem. These files under /tmp can be
quite large and it's useless to have to write/read/parse them all over again
many times in the pipeline.
Instead what they're going to do from now on is that, each XTC tool will be
self-contained in a separate library so that you can invoke them directly
from your program. No more temporary files. And you will also benefit from
all the strategies defined in these libraries.
That's it.
--
SIGOURE Benoit aka Tsuna
_____
/EPITA\ Promo 2008.CSI Rock & tRoll