Design and Implementation of Programming Languages
17 April 2009 | Software Technology Group | 1
Overview of Language Implementation
Industrial-strength implementations typically split into front-endand back-endFront-end: compiler
Parses source codeAnalyses source codeApplies transformationsEmits target code (bytecode or machine code)
Back-end: virtual machineReads intermediate representation (bytecode)Abstracts over hardware: memory, I/OProvides services: garbage collection, dynamic linkingExecutes program (interpretation or just-in-time compilation)Applies (adaptive) optimizations
17 April 2009 | Software Technology Group | 2
Grading & Deliverables
Term Paper (40%)1 paper per groups of 1, 2, or 3 students4, 6, or 8 pages, respectively (ACM SIGPLAN style)Collectively graded
Reviews (20%)2 reviews per student500 words minimum per reviewIndividually graded
Talk (40%)1 talk per group15, 25, or 35 minutes of uninterrupted talk, respectively5-15 minutes questions & answersIndividually graded
17 April 2009 | Software Technology Group | 3
Hints
Term PaperCorrect?Comprehensible? (Background, figures, examples)Well-structured? (Few, if any, forward-references)Meaningful references?Never commit plagiarism!
17 April 2009 | Software Technology Group | 4
Hints (cont’d)
ReviewsConstructive?Summary (short?)Names The good, the bad, and the ugly?Discusses details(structural issues, missing references, spelling, etc.)?
TalkUsed PowerPoint to good (rather than ill) effect?Well-structured?Level of detail appropriate for target audience?No superfluous “5 seconds” slides?Too long? Too short?
17 April 2009 | Software Technology Group | 5
The Good, the Bad, and the Ugly
Research:“I’ve used all my initial references. That should be about enough.”“I have googled a bit to find further relevant sources.”“First, I have used Google to get an overview. Then, I have consulted the websites of publishers, conferences, and individual authors. Here, I have followed both forward- and backward-references.”
Structure:“Structure? The one used by the original authors should’ve survived copy-and-paste just fine.”“Each topic covered gets a section of its own.”“The structure builds upon the similarities I have identified in the various sources. (I’ve also pointed out differences where necessary.)”
17 April 2009 | Software Technology Group | 6
The Good, the Bad, and the Ugly (cont‘t)
Style:“All sentence consist of subject, verb, and object.”“I’ve written the paper just like my high school essays.”“I know how the papers I’ve read are structured; I will do likewise. Others have helped my to eliminate mistakes and ambiguities.”
Scientific Contribution:“Wikipedia in LaTeX doesn’t look so bad!”“I’ve read a number of papers and summarized them for my fellow students.”“I’ve found all truly relevant sources to my topic, which I have then categorized. This process also led to some new insights, which I have presented in the paper.”
17 April 2009 | Software Technology Group | 7
Resources
ACM Digital Library<http://portal.acm.org/dl.cfm/>Springer Link<http://www.springerlink.de/>IEEE<http://elib.tu-darmstadt.de/ieee/>Citeseer<http://citeseer.ist.psu.edu/>Google Scholar<http://scholar.google.com/>
17 April 2009 | Software Technology Group | 8
Important Dates
Today: assignment of topicsNext week: detailed task descriptions (from your advisors)~30 May: initial submission of paper~15 June: submission of reviews~30 June: final submission of paper~7 July: draft of presentation~15 July: presentation (blockseminar)Any time: questions
17 April 2009 | Software Technology Group | 9
#1: Languages for Information-Flow Control
Background:Language-based security aims to ensure confidentiality/integrityProgramming language (Java) have been extended to track information flow (JFlow, Jif)These languages use type systems to statically enforce policies
Assignment:Survey of practical, full-featured languages for information flow control
Initial References:Myers, JFlow: Practical Mostly-Static Information Flow Control, 1999Sabelfeld & Myers, Language-Based Information-Flow Security, 2003
Andreas Sewe <[email protected]>
17 April 2009 | Software Technology Group | 10
#2: VM-based Information Information-Flow Tracking
Background:Static enforcement of information flow policies difficult or impossibleInformation-flow tracking can be perform at run-timeVM-integration can reduce overhead
Assignment:Survey of (efficient?) VMs which track information-flow control
Initial References:Chandra & Franz, Fine-Grained Information Flow Analysis and Enforcement in a Java Virtual Machine, 2007Haldar et. al., Dynamic Taint Propagation for Java, 2005Nair et. al., A Virtual Machine Based Information Flow Control System for Policy Enforcement, 2008
Andreas Sewe <[email protected]>
17 April 2009 | Software Technology Group | 11
#3: Implementing Path-dependent Types
Background:In general, type systems ensure that a program is free of a specific class of errors. However, at the same time type systems restrict the expressiveness when developing programs. Hence, using type systems can lead to code that is harder to understand and maintain.Path-dependent types (PDTs) help to alleviate this problem.
Assignment:Since Scala, a new OOP and FP language, compiles for the JVM (which does not natively support PDTs) and offers path-dependent types, it is an interesting question how PDTs are realized.
Initial References:Odersky, Zenger. Scalable Component Abstractions, 2005Gasiunas, Mezini, Ostermann. Dependent classes, 2007
Michael Eichberg <[email protected]>
17 April 2009 | Software Technology Group | 12
#4: Pegasus – natürlichsprach-liche Programmierung
Der Hintergrund:Bestehende Programmiersprachen weisen erhebliche Nachteile auf: Insbesondere müssen die natürlichsprachlichen eigentlichen Programmideen der Entwickler verlustreich in das Denkmodell einer spezifischen Programmiersprache überführt werdenDurch die Programmierung in natürlicher (oder einer formalisierten „naturalistischen“) Sprache können Entwickler ihre Ideen sehr viel direkter abbilden.
Die Aufgabe:Du entwickelst mit Hilfe der Artikel und in Interviews mit dem Team einen Eindruck der naturalistischen Programmiersprache „pegasus_f“.
Referenzen:Knöll, Mezini, Pegasus – First Steps Toward a NaturalisticProgramming Language, 2006, <http://www.pegasus-project.org/>
Roman Knöll <[email protected]>
17 April 2009 | Software Technology Group | 13
#5: π - eine syntaktisch erweiterbare Patternsprache
Der Hintergrund:Theoretisch sind Pattern eine Abstraktion verschiedenster Konstrukte derzeitiger Programmiersprachen.Praktisch stellen sie ein Mittel dar, um neue Programmiersprachen sowohl syntaktisch als auch semantisch zu entwickeln. Insbesondere, die domänenspezifische Modellierung benötigt solch ein Werkzeug.
Die Aufgabe:Du entwickelst mit Hilfe das Artikels and verwandter Arbeiten einen Eindruck unserer Patternsprache „π“.
Referenzen:Knöll, Mezini, π – A Pattern Language, 2009,<http://www.pi-programming.org/>
Roman Knöll <[email protected]>
17 April 2009 | Software Technology Group | 14
#6: Context-oriented Programming
Background:In programming languages (e.g. Java) behaviour of objects is defined through its class (i.e. static/dynamic type)But: behaviour of objects can depend on different contexts they are used in (e.g. security conditions during the execution)=> Language extensions declared for context-oriented programming
Assignment:Introduction to Context-oriented Programming and selected language extensions
Initial Reference:Hirschfeld, Costanza, Nierstrasz: Context-oriented Programming, in Journal of Object Technology, vol.7, no. 3, 2008
Ralf Mitschke <[email protected]>
17 April 2009 | Software Technology Group | 15
#7: Environmental Acquisistion
Background:In programming languages behaviour of objects is defined through its class (i.e. static/dynamic type)But: behaviour of objects can depend on object aggregation=>”inheritance-like” sharing of features with enclosing environment
Assignment:Overview of Environmental Acquisition and underlying theory of object acquisition
Initial Reference:Gil, Lorenz: Environmental Acquisition, in: OOPSLA '96. Proceedings, 1996
Ralf Mitschke <[email protected]>Andreas Sewe <[email protected]>
17 April 2009 | Software Technology Group | 16
#8: Typestate Patterns
Background:Additional specification for types to ensure correctness of programsModel protocols; e.g. Illegal to read from closed InputStream
Assignment:Introduction to Typestate patterns and selected language extension
Initial Reference:Bierhoff, Aldrich: Lightweight Object Specification with Typestates, in ACM SIGSOFT Software Engineering Notes, vol. 30, no. 5, 2005
Ralf Mitschke <[email protected]>
17 April 2009 | Software Technology Group | 17
class InputStreamint read() // read from streamvoid close() // close the stream
close()
#9: Mining Typestate Patterns
Background:Mining specifications for typestates from large code examples
Assignment:Techniques for mining typestate patterns and their applications in software development tools
Initial Reference:Henzinger, Jhala, and Majumdar, Permissive Interfaces, ESEC/FSE 2005.Weimer and Necula, Mining Temporal Specifications for Error Detection, TACAS 2005.Alur, Cerny, Gupta, Madhusudan, Nam, and Srivastava, Synthesis of Interface Specifications for Java Classes, POPL 2005.
Marcel Bruch <[email protected]>
17 April 2009 | Software Technology Group | 18
#10: Dataflow Pointcuts in AOP
Background:Tracking dataflow is inherently a cross-cutting concern; wherever the data flows, tracking logic has to follow.Consequently, aspect-oriented programming has been propose for this domain as well, most notably in the form of the dataflow pointcut.
Assignment:Detailed analysis of the pointcut, its semantics and implementation.
Initial References:Masuhara, Kawauchi, Dataflow Pointcut in Aspect-Oriented Programming, 2003Alhadidi et. al., The Dataflow Pointcut - A Formal and Practical Framework, 2009
Andreas Sewe <[email protected]>
17 April 2009 | Software Technology Group | 19
#11: The Java Universal Virtual Machine
Background:The Java Virtual Machine (JVM) is arguably one of the most wide-spread execution environments.Targeting the JVM gives access to both industrial strength VMs and libraries......and a growing number of languages implementations does so.
Assignment:Investigation how key concepts of such languages (duck-typing, first-class functions) are translated into Java (bytecode).
Initial References (Not papers, but languages):Jython, JRuby, Groovy, Scala, ...
Andreas Sewe <[email protected]>
17 April 2009 | Software Technology Group | 20