Adaptive Model

Arrange blocks of code in a data structure to implement an alternative computational model.

Programming languages are designed with a particular computational model in mind. For mainstream languages, this model is an imperative model with code organized in an object-oriented way. This approach is currently favored because it's worked out to be a suitable compromise between power and understandability. However, this model isn't always the best one for a particular problem. Indeed, often the desire to use a DSL comes with a desire to use a different computational model.

Adaptive Model allows you to implement alternative computational models within an imperative language. You do this by defining a model where the links between elements represent the behavioral relationships of the computational model. This model usually needs references to sections of imperative code. You then run the model either by executing code over it (procedural style) or by executing code within the model itself (object-oriented style).

For more details see chapter 47 of the DSL book

DSL Catalog