[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] RE: More AxiomUI
From: |
Page, Bill |
Subject: |
[Axiom-developer] RE: More AxiomUI |
Date: |
Wed, 22 Jun 2005 01:45:59 -0400 |
Martin,
As you know, on MathAction we can write a pseudo-environment
\begin{axiom}
guess([1,1+q,1+q+q^2])
$GUESS(n,FRAC POLY INT,i+->q^i,FRAC POLY INT, EXPR INT, i+->i, i+->i)
\end{axiom}
to achieve the kind of output you describe below.
It would not be difficult at all to achieve this same result with
Axiom documentation written in pamphlet format. The command
$ noweave guess.pamphlet
just creates the LaTeX output from the pamphlet file. This file can
contain the same Axiom pseudo-environments as on MathAction. But
before it can be processed by the latex command it would first have
to be pre-processed by Axiom to convert the \begin{axiom} sections
to actual latex. The process would be like this:
$ noweave example.pamphlet > example.axiom
$ runaxiom < example.axiom > example.tex
$ latex example.tex
This could be make part of the existing `document' script.
Your example file would then look like this:
% ------------------------ example.pamphlet -------------------------
The exported function takes a list of elements of [[F]] and returns a
list of expressions over [[R]] that seem to fit the data. For example,
<<inputfile>>=
guess([1,1+q,1+q+q^2])
$GUESS(n,FRAC POLY INT,i+->q^i,FRAC POLY INT, EXPR INT, i+->i, i+->i)
@
returns
\begin{axiom}
<<inputfile>>
\end{axiom}
% ---------------------------end of example --------------------------
If this is really of interest to you, I can provide the `runaxiom'
script based on a simplified version of the Python code that we
use on MathAction.
Having it "compare Axiom's output with a given result and raise a
warning if the two differ" is certainly possible. This is often
called regression testing. Tim Daly has discussed it several times
before on this list (see CATS computer algebra test suite). There
already some provision for this in the current Axiom makefiles but
it is not yet fully functional.
Implementing this properly still requires a bit more design of how
to document the expected results and how to perform the comparison.
For example: should the comparison be based on the LaTeX generated
or just on text output? Is a simple `diff' of the output and expected
result adequate?
Regards,
Bill Page.
On Tuesday, June 21, 2005 5:39 AM you wrote:
> ...
> I think that the pamphlet file syntax we currently have is not too
> bad (as "external representation"), but I wouldn't mind if it were
> replaced by something else.
>
> One thing I dislike about it is the following: Currently I have to
> write:
>
> % --------------------------------- example -------------------------
>
> The exported function takes a list of elements of [[F]] and returns a
> list of expressions over [[R]] that seem to fit the data. For example,
>
> <<inputfile>>=
> guess([1,1+q,1+q+q^2])
> $GUESS(n,FRAC POLY INT,i+->q^i,FRAC POLY INT, EXPR INT, i+->i, i+->i)
> @
>
> returns
>
> [[ n
> q - 1
> (1) [------]
> q - 1
> Type: List Expression Integer
>]]
>
> % ---------------------------end of example --------------------------
>
> However, I'd really like to have axiom compute the result. The best
> thing would be, if axiom computes the result and, if present, it
> compares it with the given result and raises a warning if the two differ.
- [Axiom-developer] Re: More AxiomUI, Bob McElrath, 2005/06/21
- [Axiom-developer] RE: More AxiomUI, Page, Bill, 2005/06/21
- [Axiom-developer] Re: More AxiomUI, Bob McElrath, 2005/06/21
- Re: [Axiom-developer] RE: More AxiomUI, Martin Rubey, 2005/06/22
- Re: [Axiom-developer] RE: More AxiomUI, Martin Rubey, 2005/06/22
- Re: [Axiom-developer] RE: More AxiomUI, William Sit, 2005/06/22
- [Axiom-developer] Aldor/Axiom convergence, Ralf Hemmecke, 2005/06/22
- Re: [Axiom-developer] RE: More AxiomUI, Martin Rubey, 2005/06/22
- Re: [Axiom-developer] RE: More AxiomUI, Vanuxem GrĂ©gory, 2005/06/22
- [Axiom-developer] RE: More AxiomUI, Page, Bill, 2005/06/21
- [Axiom-developer] RE: More AxiomUI,
Page, Bill <=