The task of translating one language to another, as is the case of our OpenMath/MathML interface, can be compared to the task performed by a compiler when passing from a programming language to a computer executable representation.
We will need to lex and parse an expression, represent it in some intermediate language which allows a certain degree of freedom for manipulation, and then from there an expression can be generated in the target language.
Following this approach, the architecture of the REDUCE OpenMath to MathML interface is going to be composed of four independent modules. One for each of the following tasks:
Dividing the interface into these separate modules gives us the possibility to better understand the overall process of translation. It has the advantage of permitting efficient modifications to the system.
If MathML syntax were to change, for instance, it would only be necessary to modify two of the four modules. This separation also makes it easy to add extensions. By implementing a module going from the intermediate representation to LATEX , it is possible to extend the interface's capabilities to offer OpenMath to LATEX or MathML to LATEX translations.