[Om] getting started with openMath

ken j609444 at gmail.com
Tue Oct 9 16:51:51 CEST 2012

Hello, Alberto

So I was thinking about using openMath so that I could swap out the CAS.
I figured I would write a wrapper for whatever CAS I used so that when I
found (if ever) I need some functionality it did not have, I could change it
by just writing a new wrapper for a different CAS. So I was hoping then
that all the input form my parser and GUI would be the same for the
second CAS. The idea was to make it essay to change CASs.

I understand I would have to write a new wrapper for a different CAS,
  but are you saying that even the openMath structure being passed in
would need to change?

Yacas was still on my list of possible CASs but I had been unable to
find documentation on how to use openMath with Yacas, so thanks
a lot for that link. I will read up on it.

I had found your web page and QMath, but had not downloaded it yet.
I think now I will give it a try.

Thanks so much for your reply.


On 10/09/2012 01:50 AM, Alberto González Palomo wrote:
> ken wrote: (09/10/12 05:16)
>> Hello,
>> I would like a simple introduction to openMath xml objects like <mo> (I
>> assume that stands for “math object” but have not yet been able to
>> verify that), and how they are used. I read the The OpenMath Standard
>> 2.0 pdf document but find it confusing.
>     Well, <mo> is MathML, not OpenMath. Let's see if I can help you out.
>> [...]
>> I was thinking about using openMath for the input format for a wrapper
>> for a Computer Algebra System that would then be used by a C++
>> application I am writing.
>     That's an advantage only if you want to be able to swap the CAS
> without modifying your application.
>     I wanted to do that some time ago, but it does not work well in
> practice: beyond trivial expressions, the differences among CASs are
> so serious that you end up having to create new OpenMath symbols for
> each CAS, at which point the only benefit left is that you need an XML
> parser instead of one for each of the CASs languages. That's valuable,
> but probably not worth the effort depending on what you want to do.
>     Maybe you know the Yacas CAS, to which I added OpenMath support
> years ago:
> http://yacas.sourceforge.net/
>     Yacas is written in C++, but the OpenMath parser/serializer are
> written in Yacas' script language. You can find the documentation
> for those functions (OMForm(), OMRead(), OMDef()) in the manual
> "Using Yacas, function reference", section "Input/output and plotting":
> http://yacas.sourceforge.net/refchapter28.html#OMForm
>     You can use it for learning about OpenMath by just using OMForm
> as shown in the manual.
>> Is there a very simple example or tutorial (preferable in a c like
>> language) that uses openMath for input or output, that I could use for
>> an example on how to construct or parse openMath structures?
>> I am looking for:
>> (1) a simple introduction to openMath and
>> (2) a simple C++ example
>     I did write a C++ application that outputs OpenMath: it's called
> QMath, available from my web site:
> http://matracas.org/qmath/
>     If you download the source code, the OpenMath object class is at:
> src/OpenMath/OpenMath_object/OpenMath_object.h
>     You can see how to create OpenMath objects in C++ at:
> test/example.cc
>     QMath can only produce OpenMath, not parse it.
>     Cheers,

More information about the Om mailing list