SLE WS 2012/13 Assignment 1


Implement a program analysis


For a given language of your choice, implement a relevant program analysis of your choice. You can use a concrete or an abstract syntax. Your choice though is constrained such that your language-analysis couple should be on the scale of complexity demonstrated by the following samples. You can actually pick any of the examples listed, subject to locking it through email to ed.znelbok-inu|gnaltfos#ed.znelbok-inu|gnaltfos such that we make sure that all teams perform different enough exercises. If you have an idea for a language-analysis couple, and you want feedback, then, also, contact softlang. You are welcome!

Illustrative options

  • Develop an abstract syntax for super-simplified UML sequence diagrams. A diagram would be represented in abstract syntax by declarations for names and class types of interacting objects (as in "klaus : Customer"), class declarations (as simple as lists of method names), and the actual interaction sequence where each interaction consists of source, target, and message (method name). Implement a name analysis for sequence diagrams such that the sources and targets of interactions are resolved to the corresponding object declarations and it is checked that the message corresponds to one of the methods from the source class.
  • Sketch a super-simplified subset of Java, MicroJava, just enough to have classes with fields and simple instance methods with simple expressions as bodies. There is no need to bother with inheritance, interfaces, statements, and most other aspects of real Java. Implement a name analysis for MicroJava such that all class references (e.g., in constructor calls), all field references (in expressions including assignments), all method references (in method calls) are resolved to the corresponding declarations of classes, fields, or methods respectively.

Technology options

  • JastAdd
  • Prolog
  • Haskell

General logistics

See the course page for deadlines and conditions on successfully completing the assignments.