compiler-constructioninterpretermdsd

How compares MDSD to model interpretation coding-style


Hopefully, this question isn't too generic:

Conventionally, MDSD is defined as the conversion of model specifications into sources of compilable programs.

Besides this, one could interpret a model.

While interpretation typically tends to be slower, the deployment of an updated model could be simpler.

In general: Why would one compile a model using MDSD? When should one interpret models?


Solution

  • What you are talking about is "executable specifications". This works when your specification is complete (e.g., covers all the cases; many current "models" aren't complete, or are complete only by virtue of additional Java source code text in the middle of it, which isn't easily interpreted), and your interpreter is fast enough so the user base doesn't care.

    But that's the rub. The whole reason compilers exist is because interpreting specifications is usually 100x slower than a compiled equivalent. (Ever seen or used a C interpreter for real?).

    I don't know of many people that execute "models". I think they all believe that an interpreter would be too slow, or they get hung on the model incompleteness/low level source code impedance mismatch.