To validate the core principles of Language of Languages, we built our initial bootstrap environment inside Squeak Smalltalk using OMeta pattern-matching extensions.
Smalltalk provided an ideal foundation for rapid language experimentation due to its live environment and metacircularity, which allows LoLs to be defined and explored in terms of itself. To support graphical notations alongside textual syntax, we leveraged Squeak’s Morphic graphics system.
The core architecture
Every notation in LoLs is supported through a minimalist paradigm composed of three primary building blocks:
- Language Elements and Element Trees: Structural representations where every token or graphical shape has a corresponding node.
- Concepts: Notation-agnostic semantic anchors (for example, an Addition concept) that bind across representations.
- Language Definitions: Operational bindings for a Concept that implement three fundamental operations:
- Parsing: Recognizing textual or graphical constructs (using OMeta) to build a Language Element Tree.
- Context checking: Validating whether a definition applies in the current context.
- Projecting: Transforming or interpreting the tree into executable values, alternative text, or Morphic graphical shapes.
This Smalltalk and OMeta prototype proved that complex DSLs, mathematical expressions, and graphical state machines could map back to shared underlying concepts.
Next in the series: Language of Languages at SPLASH 2011.
Jamie