axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] Re: [Stratego] New user introduction, a question about


From: Martin Bravenboer
Subject: [Axiom-developer] Re: [Stratego] New user introduction, a question about GraphXML2dot
Date: Wed, 09 Feb 2005 13:50:44 +0000
User-agent: Mozilla Thunderbird 0.8 (X11/20040915)

Hi Bill,

First of all, sorry for not replying earlier. Some questions take some time ;) , which will become clear later.

My interest in Stratego stems from the desire to find new high-
level tools to help maintain and extend the Axiom algebra
library. The initial goals are graphical visualization of the
library structure, optimization of the system build process
(which is complicated by cyclic dependencies (mutual recursion)
between the modules), and possibly rewriting of selected modules
from spad into Aldor.

Interesting!

In some ways Aldor is similar to Haskell, therefore I am quite
interested in how Stratego is being applied in that project.

What do you mean by 'that project'? The developers of Haskell compilers and interpreters (GHC, Hugs, Helium, EHC) are not using Stratego afaik.

One of the things that lead me to Stratego happened to be a
quick search for a simple tool to convert a large GraphXML file
containing the Axiom algebra dependency graph into graphviz
(dot) format, hence GraphXML2dot.

Are you sure that you are using GraphXML and not GraphML? GraphXML is not really in widespread use: it is even quite hard to find any documentation about it.

> Of course since GraphXML2dot
is one of the programs in the collection Stratego utilities,
it turned out that this was not quite the "simple" tool that
I was hoping for.

Indeed, it was. Graph-tools has been developed a few years ago when the first work on GraphXML was done, but GraphXML hasn't really been applied in the Stratego/XT project and the developers of graph-tools did not maintain the package anymore. In fact, graph-tools wasn't in usable state at all. For example, an installation of the strategoxt-utils was not even able to parse GraphXML.

I've updated the tool last night and it is now available in the latest unstable release (you also need a the latest unstable Stratego/XT for that: Stratego/XT 0.13 will not do).

http://catamaran.labs.cs.uu.nl/dist/stratego/strategoxt-utils-unstable-latest/
http://catamaran.labs.cs.uu.nl/dist/stratego/strategoxt-unstable-latest/

For an overview of all available distributions:
http://catamaran.labs.cs.uu.nl/dist/stratego/

The new tool is now called 'graphxml2dot' and implements the whole XML -> Dot pipeline, so it is very easy to invoke. You don't have to know about all the internal formats being used in Stratego/XT to use this tool. The tool is now also more XML compliant, since it uses an XML parser instead of a GraphXML syntax definition.

However, I have to warn you: it only implements a subset of GraphXML (basically just graphs, nodes and edges and some attributes) and therefore your input graph should not use the more fancy features of GraphXML. Fortunately, extending the implementation is very easy: the current conversion only takes about 100 lines of code. If you miss some feature, then I (or you self) should be able to add it very quickly.

I've also updates the GraphXML and graph-tools web pages:

   * http://www.strategoxt.org/Tools/GraphTools
   * http://www.program-transformation.org/Transform/GraphXML
     (there is now a direct link to a paper: all links where dead)

So first, are such tutorials available? Could someone provide
references?

Documentation is our weak spot. We are mostly working on academic papers and these are not really useful for more practical users. Therefore, we started working on a manual for using Stratego/XT in practice. It's still under heavy construction, but it is a start. For an overview of the available documentation see:

   * http://www.strategoxt.org/Stratego/StrategoDocumentation

Second, I would be very interested in suggestions on how to go
about using Stratego in a more relevant manner. For example,
my understanding is that a necessary first step would be to
formally define the syntax of the spad language and if the
target is Aldor, then something similar is needed to generate
Aldor code output. Any suggestions and references related to
how to proceed with something like this would be very much
appreciated.

You can use Stratego for transformation, compilation, analysis and much more (see 'applications' at the Stratego website for an overview). Of course I don't know the internal of your project, but indeed the usual starting place is to find or define a syntax for the language your using in SDF, the Syntax Definition Formalism. For large languages this can take quite some time, but fortunately SDF is such an attractive language for syntax definition that this time is well spend ;) .

An alternative is to use your existing tools. You probably already have a parser and the only requirement for using Stratego is that your programs are represented in the ATerm format. So, often the quickest way to start using Stratego in an existing project is to implement a converter that outputs an ATerm from your existing internal representation produced by the parser.

Feel free to ask more question about the options for using Stratego in your project. I will answer much quicker if you don't ask questions about tools that need to be fixed ;) .

Cheers,
--
Martin Bravenboer
---------------------------------------------------------------------
Center for Software Technology
Institute of Information and Computing Sciences
Utrecht University




reply via email to

[Prev in Thread] Current Thread [Next in Thread]