This section discusses the current approach to implementing DML. On one hand, the logical types of the language serve to encode the logical structure of the text and as a result, the logical markup is document-centric XML. However, the logical markup formally encodes the language of Archimedes, Euclid, or Ptolemy, all of whom describe a logic chain for the reader to follow. Since this logic has now been encoded, one can view it as a program for a machine to execute during a process. Therefore, machines actually process the construction of the diagram.
Languages are implemented using compilers. The front end of the compiler takes a DML program and transforms it into a tree. Walking this tree, symbols such as variables are found and recorded in a symbol table. With this information in hand, the back end of the compiler can generate code and emit instructions to the target language, usually assembly code. The dmlc does not want to emit assembly but rather images of the state of the diagram at a point in the construction. Of course, it might also be possible to emit simple text by just walking the logic tree. In the pages that follow, we walk through the architecture of the compiler's front and back ends. Along the way the process of how diagram markup is converted into SVG images should become clear. The DML compiler is based upon the xcom compiler written in MATLAB.