[Paper Review] Super-Languages: Developing Languages and Applications with XMF (Second Edition)
This paper introduces XMF, a super-language framework that enables the development of domain-specific languages (DSLs) and applications through a unified, executable meta-modeling approach. It combines a powerful object-oriented language (XOCL) with a declarative grammar system (XBNF) to define and manipulate language constructs, enabling seamless parsing, transformation, and execution of DSLs, with key contributions in language extensibility, reference resolution, and executable modeling via meta-circular execution.
The aim of this book is to introduce the language XMF. This is done by defining the language, providing some examples of applications that can be written directly in the XOCL language that comes with XMF, and then by showing how XMF can be used for language engineering. The main focus of this book is on language engineering by example.
Motivation & Objective
- To address the representation chasm between high-level domain models and low-level implementation code by enabling direct executable modeling.
- To provide a unified framework for defining and executing domain-specific languages (DSLs) with full support for syntax, semantics, and transformation.
- To enable extensible, composable, and maintainable language engineering through a meta-circular, executable environment.
- To solve the challenge of resolving symbolic references in parsed DSLs by integrating a declarative reference resolution mechanism within the execution model.
Proposed method
- XMF uses a core language, XOCL (Executable Object Command Language), to define and manipulate language elements as first-class objects with full support for collections, operations, and control flow.
- Grammars are defined using XBNF, a declarative language for specifying syntax and semantics, with pattern matching and embedded expressions for flexible parsing.
- The system employs a meta-circular execution model where language constructs are defined as executable objects, enabling direct manipulation and transformation of language elements.
- Reference resolution is achieved via a walker pattern (ResolveRefs) that traverses parsed values and replaces symbolic references with their bound values using a lookup table.
- Parsing is implemented as a recursive descent process with success and failure continuations, enabling non-deterministic and backtracking behavior.
- XML data is modeled as first-class objects (XML::Element, XML::Text), and parsing is defined via pattern-matching operations that bind attributes and children.
Experimental results
Research questions
- RQ1How can a single, unified language environment support the full lifecycle of DSL development, from syntax definition to execution and transformation?
- RQ2How can symbolic references in parsed DSLs be resolved efficiently and safely within a meta-circular execution model?
- RQ3What mechanisms enable extensibility and composition in language definitions without sacrificing performance or type safety?
- RQ4How can a language be both human-readable and machine-executable through a consistent, executable meta-model?
- RQ5What is the role of declarative pattern matching and continuations in enabling powerful, composable language processing?
Key findings
- XMF enables the definition of full-featured DSLs with embedded syntax, semantics, and transformation logic all within a single executable framework.
- The integration of XOCL and XBNF allows for the creation of extensible, composable, and maintainable language definitions that can be executed directly.
- Reference resolution is achieved efficiently via a walker pattern that traverses the abstract syntax tree and replaces symbolic references using a pre-built identifier table.
- The use of continuations and pattern matching in parsing enables non-deterministic, backtracking behavior essential for complex language recognition.
- XML data can be natively modeled and parsed using first-class language constructs, with attribute defaults and nested patterns handled declaratively.
- The meta-circular execution model allows for self-hosting and reflection, enabling the language to manipulate its own syntax and semantics as data.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.