[Aldor-l] Ann: ALLPROSE / Suggestions
Christian Aistleitner
tmgisi at gmx.at
Thu Nov 17 04:50:02 EST 2005
Hello,
> > However, there is one bit missing: it is necessary that we
>> have an environment that contains Axiom/Aldor commands which are then
>> sent to
>> the Axiom/Aldor interpreter and the result gets then set in verbatim.
>> Would
>> this be a lot of work?
>
> Well, the aldordoc.sty is basically an agreement between Christian
> Aistleitner and me in order to introduce some kind of standard for the
> +++ comments that are possible in Aldor. As you see, the +++
> environments are translated into +++ comments and put into the .as
> files. So the Aldor compiler actually sees them and puts them into the
> corresponding .ao file. Unfortunately there is not yet a program which
> extracts these comments form the .ao file (or the .al library). This
> would be on my wishlist.
However, I have to add, that there is a tool extracting the +++ comments
of Aldor's source files (.as). It is a shell script included in my
LibModel project. This script can be found as
scripts/generate_documentation_aldordoc.sh in LibModel. LibModel can be
found under
http://www.risc.uni-linz.ac.at/software/aldor/project.php?id=LibModel
.
> There were, in fact, several codesnippet environments planned. Christian
> came also up with "adprogram" which was meant to contain a complete
> Aldor program that could be fed to the compiler. Actually, there were
> even 3 similar environments for similar purposes. Only "adsnippet"
> survived.
>
> I decided for simplicity (in the first ALLPROSE release). A second
> reason is that currently the Aldor compiler is NOT needed to produce the
> .dvi file. I could relax this if, for example, the computation of the
> dependencies would be easier with the compiler. Of course it would not
> be a big deal to introduce a new environment that would contain Aldor
> programs which would be fed to the compiler and show the results.
> However, I believe that needs a bit of discussion because in order to
> run something one must make sure that the appropriate libraries are
> installed.
There is actually a big problem is lurking 'round the corner. I do not
know about Axiom, but it is not trivial to pass a piece of code to the
Aldor interpreter.
You might have to specify the paths for libraries and include files.
Of course, you can create an environment like
\begin{adinterprete}{options passed to the interpreter}
\end{adinterprete}
but this does not solve the problem. For Aldor, there are no standard
directories for libraries, include files, and the like. Therefore, you
cannot simply pass the approriate directories once and for all. For every
target system, these paths might be completly different. As Aldor does not
integrate well into the Linux environment, there is not even a standard
way to generate these paths. Generally speaking, you do nat have any clue,
where these files are. As a result it is not too easy to include automatic
interpretation of source code in LaTeX.
Currently, I guess it is best to interprete files via a Makefile. There,
these things can easily be settled.
There, you can set these directories either automatically or manually. You
can adjust all the necessary flags and options. Making the appropriate
targets captures the output to a file.
Then, the source is available as file and the output is available as file.
These two files can be included in the LaTeX document wherever you like.
This behaviour is actually already realized in the libraries using
LibModel. Take for example ExtIO
http://www.risc.uni-linz.ac.at/software/aldor/project.php?id=ExtIO
. The doc/src/examples directory contains all the given source code and
the output of executing this code.
The documentation writer only has to specify, where the source and output
has to be included in the LaTeX files.
--
Kind regards,
Christian
More information about the Aldor-l
mailing list