Epsilon Generation Language

EGL is a template-based model-to-text language for generating code, documentation and other textual artefacts from models. EGL supports content-destination decoupling, protected regions for mixing generated with hand-written code, and provides a rule-based template coordination language (EGX).


  • Decouple content from destination (can be used to generate text to files, to the clipboard, or as a server-side scripting language etc.)
  • Call templates (with parameters) from other templates
  • Define and call sub-templates
  • Mix generated with hand-written code
  • Coordinate template execution using a rule-based sub-language (EGX)
  • Support for simultaneously accessing/modifying many models of (potentially) different metamodels
  • All the usual programming constructs (while and for loops, statement sequencing, variables etc.)
  • Support for those convenient first-order logic OCL operations (select, reject, collect etc.)
  • Ability to create and call methods of Java objects
  • Support for dynamically attaching operations to existing meta-classes and types at runtime
  • Support for cached operations
  • Support for extended properties
  • Support for user interaction
  • Ability to create reusable libraries of operations and import them from different Epsilon (not only EOL) modules

Examples and Screencasts


Chapter 7 of the Epsilon book provides a complete reference of the syntax and semantics of EGL and its rule-based template coordination language.