Bi-directional conversion between plain text equations and Content MathML

Hello,

I've been involved in the development of Simile, a visual modelling 
environment for continuous systems modelling (http://www.simulistics.com/).

Simile uses Prolog as its native model-representation format, but we 
have a corresponding XML Schema which has a close, more-or-less 
one-to-one mapping with the Prolog syntax.   This uses Content MathML 
for representing the model equations.

Rather than having two converters (say, Prolog for converting from the 
Prolog to the XML syntax, and XSLT for going in the other direction), I 
have explored the possibility of having a single set of conversion rules 
which can be used in either direction.  This has a clear advantage in 
that there is only one body of code to maintain.

I have worked on two quite different technologies for doing this.  One 
is XSugar (http://www.brics.dk/xsugar/), which allows the user to define 
a grammar in which the right-hand side of each production has two parts 
- one for a plain-text syntax, the other for the corresponding XML 
syntax.   The XSugar engine then allows the user to provide a file in 
either syntax, and generates the other.   The other is Prolog, and 
exploits the fact that one argument in a binary Prolog rule can be 
instantiated, and the Prolog engine will then try to instantiate the 
other.   Both approaches are working, and include the ability to convert 
fairly complex equations to/from Content MathML.

I would appreciate hearing whether this endeavour is of interest to the 
members of this mailing list, and whether you are aware of other 
initiatives which are tackling bi-directional conversion between 
plain-text equations and Content MathML using a single set of mapping 
rules.

Many thanks,
Robert Muetzelfeldt






-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

Received on Friday, 14 January 2011 11:50:29 UTC