You are here

Vensim to Simile conversion using XSugar and Prolog

The main aim of this project is to make it possible to run Vensim models in Simile.   This involves writing a converter from Vensim syntax to Simile syntax.   A subsidiary aim is develop the converter so that it can work in the reverse direction: i.e. that Simile models (at least, that subset of models which conform to Vensim's limited expressiveness) can be converted into Vensim syntax using the same converter run backwards.

This method for converting Vensim MDL files into Simile Prolog is based on 3 steps:

  1. converting the Vensim MDL to a corresponding XML format ("Vensim XML") using an XSugar stylesheet;
  2. converting the Vensim XML into a corresponding Prolog format ("Vensim Prolog") using an XSugar stylesheet;
  3. converting the Vensim Prolog into Simile Prolog using a Prolog program.

To most readers this will seem like a fairly complicated way of undertaking this task, all the more so because of unfamiliarity with the two technologies used (XSugar and Prolog).  The aim of this section is to explain how this approach works, and why it was adopted.