Re: Using content-MathML for computation and analysis in Science and Engineering

Andreas,
This is REALLY helpful

On Tue, Mar 20, 2012 at 7:12 AM, Andreas Strotmann <
andreas.strotmann@gmail.com> wrote:

> Sorry to butt in so late, but I think we would be remiss not to point out
> the rather obvious- namely, that MathML Content is fully equipped natively
> to support the functional programming style, but no other style.
>

This was my first reall involvement with content MathML2.0 and it wasn't
obvious to me! I don't read docs sequentially so may have missed something
at the start but it's probably a good idea to reiterate it in the docs
elsewhere.

I am assuming that there will be an increasing number of people like me -
who want to use MathML2.0 for computation. (I know a lot of them use other
packages to help writing code). Whether we are enough to be a special case
that now needs support I don't know.

> More to the point, a sequence of assignments would therefore 'naturally'
> be expressed as nested lambda expressions in MathML to preserve semantics.
>
> - Andreas
> Am 15.03.2012 15:47 schrieb "Bruce Miller" <bruce.miller@nist.gov>:
>
> On 03/15/2012 10:24 AM, Peter Murray-Rust wrote:
>>
>>> Many thanks to all of you (happy to have more comments, of course, but
>>> you have
>>> answered my concerns).  There's always a requirement for *some* implicit
>>> semantics and I think I can see a fairly clear intuitive boundary now.
>>>
>>> Clearly scope is important and my current implementation uses a symbol
>>> table in
>>> the immediate parent <mathml/> (I assume that <mathml/> is not nestable,
>>> but in
>>> case it was this defines a scope.
>>>
>>> My other question is whether I can include foreign namespaces. I can see
>>> things
>>> like:
>>>
>>
>> You can, but it's not (purely) MathML anymore...
>> if that matters.
>>
>> As you said earlier in the thread: MathML has good
>> declarative power. But to express programming or
>> computations, you'll need imperative.
>> At least simple things like distinguishing
>> the declarative relationship k=0.1 from the
>> imperative assignment k=0.1.
>>
>> It isn't that MML or OM can't do that, but the
>> content dictionaries don't provide much.
>>
>> You'll have an easier time declaring the relationships
>> in MathML than expressing the demand for their computations
>> --- assuming your computational engine can figure out
>> what to do.  However, if you do want to express the computations,
>> I would encourage you to at least consider how those could
>> be cast in MathML using apply, csymbol etc.  and in particular
>> using a content dictionary with symbols for expressing those
>> imperatives.  Could be useful to others!
>>
>> bruce
>>
>>
>>> <apply><eq/><ci>atomSet</ci><**apply><cml:getatoms/><cml:**molecule
>>> id="m3"/></apply>
>>> <foreach>
>>> <!-- iterate through the set -->
>>> <apply><eq/><cn>aw</cn><apply>**<cml:getMass/><cml:atom></**
>>> apply><apply>
>>> </foreach>
>>>
>>
>>


-- 
Peter Murray-Rust
Reader in Molecular Informatics
Unilever Centre, Dep. Of Chemistry
University of Cambridge
CB2 1EW, UK
+44-1223-763069

Received on Tuesday, 20 March 2012 08:29:35 UTC