Introduction to MxL

The model-based expression language (MxL) is a domain-specific language inspired by OCL and Microsoft’s LINQ. It builds on the SocioCortex data model, and thus is predistined to enable the end-user-driven definition of queries, business rules, or constraints.

Originally designed for the definition of KPIs in Enterprise Architecture Management, MxL can be and already was applied in a much broader context. For example, the SC Visualizer uses MxL to bind SocioCortex’s data to generic visualizations.

The basic features of MxL are:

  • Functional: In contrast to monolithic query languages like SQL, MxL is a purely functional language, i.e., users apply common query operators (e.g., select, where, etc.) by invoking respective functions (e.g., a select-function, or a where-function).
  • Sequence-oriented: MxL focuses on sequences (compares to Lists, Collections, Arrays, etc.) of data items, and thus provides a plethora of built-in functions for those sequences (e.g., query functions, set functions, quantifier functions, etc.)
  • Object-oriented: By interpreting SocioCortex entities as objects, and SocioCortex entity types as classes, MxL and its object-orientation allows for a convient access of the SocioCortex data and the corresponding data model.
  • Statically type-safe: The static semantics of an MxL expression is validated at “compile-time”, i.e., as soon as a user enters an expression. The static type-safety enables SocioCortex to analyze semantic dependencies, which in turn allows for automated refactoring (e.g., when renaming attributes an expression refers to) or for the automated generation of information flow graphs.