Sle1415 Assignment3

SLE WS 2014/15 Assignment 2

Analyzing metaprogramming systems (and language workbenches)

Preparation

Skim through the paper on the notion of the linguistic architecture. The idea is to apply this notion in the assignment to metaprogramming systems.

Skim through the paper on language workbenches. This is one category of SLE-related software systems that are to be analyzed in the assignment. "Metaprogramming system" is less ambitious term. See Sebastian Erdweg's PhD thesis, if you'd like to take a deeper look.

Metaprogramming systems (and language workbenches)

Each student picks one metaprogramming system.

Use the Google doc for sync-ing on your choice.

You must claim your technology by email to ed.znelbok-inu|gnaltfos#ed.znelbok-inu|gnaltfos; use "sle1415 in the subject line.

If you pick a more complex technology and manage to demonstrate the technology by running an example, then a team of 2 students is justified.

General metaprogramming system or language workbench

MDE and model transformation

  • A model-transformation language - ATL
  • The Eclipse Modeling Framework - EMF
  • The Query/View/Transformation language for MDE - QVT
  • A non-standard MDE framework - Ensō
  • Grammars and parsing for EMF - Xtext

Language-specific metaprogramming support

  • Bytecode reverse/re-engineering for Java platform - ASM
  • Attribute grammar framework on top of Java - JastAdd
  • Metaprogramming extension for OCaml - MetaOCaml
  • Syntax-extension framework for Haskell - Sugar/Haskell
  • Syntax extension framework for Java - Sugar/J
  • Infrastructure for analysis and transformation of Java programs - Recoder
  • A Python-like language with metaprogramming facilities - Converge
  • Metaprogramming for Java in Eclipse - Eclipse Java development tools (JDT)

Compiler-backend framework

Specific use cases of metaprogramming

Others

Any system from the linked paper on language workbenches that you prefer?

Any technology you want to find?

Actual assignment

Develop a megamodel for an interesting use-case of the technology.

Deliver your megamodel as a list of entity and relationship declarations.

Examples of an entity declarations:

  • Java6 : Language // The entity Java is of type Language
  • Java7 : Language // Likewise …
  • JavaBytecode : Language // Likewise …
  • HelloWorld.java : Artifact // The entity HelloWorld.java is of type Artifact
  • HelloWorld.class : Artifact // Likewise …
  • MakefileFormat : Language
  • Makefile : Artifact
  • JDK : Technology // The entity JDK (Java Development Kit) is of type Technology
  • javac : Technology // The entity javac (the Java compiler) is of type Technology
  • compilation : Function // A compilation function
  • compApp : Application // The application of a function
  • Compiler : Concept // Compiler is a concept
  • ModelViewController : Concept // MVC is a concept
  • PartialEvaluation : Concept // Another concept, use Google
  • QuasiQuotation : Concept // Another concept, use Google

Valid types of entity are these:

  • Language
  • Technology
  • Artifact (such as files)
  • Function (as the "meaning" of a technology)
  • Application (of a technology)
  • Concept

Concept is somehow special. Let's view like the universe of tags that we can use to tag all the other entities.

Examples of relationship declarations:

  • Java6 subsetOf Java7
  • HelloWorld.java elementOf Java6
  • HelloWorld.class elementOf JavaBytecode
  • javac partOf JDK
  • javac instanceOf Compiler
  • javac defines compilation
  • Java7 domainOf compilation
  • JavaBytecode rangeOf compilation
  • compApp elementOf compilation
  • HelloWorld.java inputOf compApp
  • HelloWorld.class outputOf compApp
  • Makefile elementOf MakefileFormat
  • Makefile defines compApp
  • Makefile refersTo HelloWorld.java
  • Makefile refersTo HelloWorld.class

Valid types of relationship are these:

  • "Language" subsetOf "Language" // e.g., Java6 subsetOf Java7
  • "Artifact" elementOf "Language" // e.g., a file written in a language
  • "Artifact" conformsTo "Artifact" // e.g., a model conforms to its metamodel
  • "Artifact" partOf "Artifact" // e.g., some annotation being part of a Java class
  • "Technology" partOf "Technology" // e.g., some compiler is part of some development kit
  • "Language" partOf "Technology" // Perhaps justifiable
  • "Technology" defines "Function" // some functionality provided by a technology
  • "Artifact" defines "Function" // some functionality provided by an artifact
  • "Language" domainOf "Function" // typing of function
  • "Language" rangeOf "Function" // typing of function
  • "Application" elementOf "Function" // a particular application of functionality
  • "Artifact" inputOf "Application" // specific input of an application
  • "Artifact" outputOf "Application" // specific output of an application
  • "Artifact" refersTo "Artifact" // There is a "reference" from one to another artifact
  • "Technology" dependsOn "Language"
  • "Technology" dependsOn "Technology"

(The quoted strings are meant as placeholders for the entities.)

Advice

  • Your megamodel should probably exercise all entity and relationship types.
  • Your megamodel should have between 5-15 entities and 7-25 relationships in total.
  • You should search for 2+ nontrivial key concepts (entity type Concept) relevant to your technology. For instance, "Grammar" wouldn't be nontrivial for ANTLR and "Template" wouldn't be nontrivial for StringTemplate. You need to explain / define all these concepts separately.
  • Any technology gives rise to several use cases. Thus, select a use case that is manageable and understandable.

Deliverables

  • Prepare a slide deck that presents your entity and relationship declarations.
  • If possible, prepare a demonstration of the technology.

This is going to be your third presentation in this course. If you are doing too much stuff, including too much text, or your approach is not clear, I might just stop your talk and ask you to try again in the next session :-) (Also, running a spellchecker on your text is appreciated.