Developer Tools

Models as Values in a Model Expression Algebra: A Functional Approach to Model Driven Engineering

A new functional approach treats models as values, unifying construction, templates, and transformations under one formalism.

Deep Dive

A team from the IT University of Copenhagen and the University of Belgrade has published a paper proposing a foundational shift in Model-Driven Engineering (MDE). Their 'Model Expression Algebra' introduces a functional approach where models are treated as values, and operations on them are expressed as terms in an algebra. This single formalism elegantly unifies the traditionally separate concepts of model construction, metamodels (type schemas), templates (parameterized expressions), and transformations. The algebra is built from just four core operators: creation, reference, and computation operators, with transformations emerging naturally as templates that take a source model as input.

The researchers prove key properties like type preservation and safety for transformations. A significant practical outcome is the realization of this algebra as an embedded Domain-Specific Language (DSL). This demonstrates that a single mainstream programming language, leveraging its own type system, can simultaneously serve as the language for metamodeling, constructing models, and writing transformations, eliminating the need for multiple specialized tools. The approach also inherently supports advanced MDE concepts like megamodels and weaving models without requiring additional mechanisms, promising more robust and formally verifiable software development workflows.

Key Points
  • Proposes a 'Model Expression Algebra' where models are values and operations are algebraic terms, unifying MDE concepts.
  • Formalizes model templates as open terms and transformations as templates with a model input, proving type safety.
  • Implemented as an embedded DSL, enabling one mainstream language to handle all MDE tasks with formal guarantees.

Why It Matters

This could streamline complex enterprise software development by providing a single, type-safe framework for all modeling tasks.