CellML Discussion List

Text archives Help


[cellml-discussion] Representing derivatives in plain-text content MathML input languages


Chronological Thread 
  • From: ak.miller at auckland.ac.nz (Andrew Miller)
  • Subject: [cellml-discussion] Representing derivatives in plain-text content MathML input languages
  • Date: Tue, 28 Nov 2006 15:40:37 +1300

Shane Blackett wrote:
> Hi,
>
> I think I prefer option four, although I am worried that
> this is an uncommon syntax and that if our error parser isn't good
> that things could easily get confusing.
>
The other problem which has arisen is what to do with degree qualifiers.
e.g. do we represent...
<apply><diff/>
<bvar><ci>x</ci></bvar>
<degree><cn units="dimensionless">2</ci></degree>
<ci>y</ci>
</apply>
as
1) d(y, 2)/d(x)
2) d^(2)(y)/d(x)^(2)
3) d(y, degree(2))/d(x)
4) d(y)/d(x, degree(2))
5) d(y)/d(x, 2)

Note that degree could theoretically be a complicated expression
(although I doubt any integrators would be able to deal with the model
in this case, e.g. PCEnv can only integrate for constant degree
derivatives), and this language needs to be parsed back to MathML, so it
needs to be unambiguous.

2 is the most similar to what people would write on paper, but it is
very verbose, as you have to repeat the same expression twice (and we
would have to compare the expressions and give an error if they were
different, which seems silly).

I personally am leaning towards just letting the degrees get written out
with the qualifier tag (this could produce either 3 or d(degree(2),
y)/d(x), depending on the order in the MathML).

Best regards,
Andrew





Archive powered by MHonArc 2.6.18.

Top of page