Wednesday, 16 June 2010

Modular Interpreters

As part of the Language Factories work that Laurie Tratt and I started a while back, I have done some experiments to see whether a language family can be implemented using XPL and how far the differences between members of the family can be hidden. My experiment involved defining a language factory for state-machine languages. Such a factory is shown on the right where syntactic variations include the rules for the transition labels, and semantic variations include whether machine execution is single-threaded or multi-threaded and whether the labels are processed. I was particularly interested in designing a single machine interpreter that works with many different implementations. This turns out to have some relationship with monads and modular interpreters although I have not developed this with any rigour. A short article describing how this is implemented is here.

No comments:

Post a Comment