JavaGI [Elektronische Ressource] : a language with generalized interfaces / Stefan Wehr
428 pages
English

JavaGI [Elektronische Ressource] : a language with generalized interfaces / Stefan Wehr

Le téléchargement nécessite un accès à la bibliothèque YouScribe
Tout savoir sur nos offres
428 pages
English
Le téléchargement nécessite un accès à la bibliothèque YouScribe
Tout savoir sur nos offres

Description

JavaGIA Language with Generalized InterfacesStefan Wehr2010Dissertation zur Erlangung des Doktorgrades der Technischen Fakultat derAlbert-Ludwigs-Universitat Freiburg im BreisgauDekan der Technischen Fakultat: Prof. Dr. Hans Zappe1. Gutachter: Prof. Dr. Peter Thiemann, Albert-Ludwigs-Universitat Freiburg2. Gutachter: Prof. Dr. Ralf Lammel, Universitat Koblenz-Landau Tag der Disputation: 9. Juli 2010iiAbstractComponent-based software development in statically typed, object-oriented program-ming languages has proven successful in reducing development costs and raising softwarequality. However, this form of software development still poses many challenges and thusrequires better support on the programming language level.The language JavaGI, a conservative extension of Java 1.5, o ers generalized inter-faces as an e ective improvement. Generalized interfaces subsume retroactive and type-conditional interface implementations, binary methods, symmetric multiple dispatch,interfaces over families of types, and static interface methods. These features allownon-invasive and in-place object adaptation, thus enabling solutions to several softwareextension, adaptation, and integration problems with components in binary form. Fur-ther, they make certain coding patterns redundant and increase the expressiveness of thetype system.

Sujets

Informations

Publié par
Publié le 01 janvier 2010
Nombre de lectures 12
Langue English
Poids de l'ouvrage 3 Mo

Extrait

JavaGI
A Language with Generalized Interfaces
Stefan Wehr
2010
Dissertation zur Erlangung des Doktorgrades der Technischen Fakultat der
Albert-Ludwigs-Universitat Freiburg im BreisgauDekan der Technischen Fakultat: Prof. Dr. Hans Zappe
1. Gutachter: Prof. Dr. Peter Thiemann, Albert-Ludwigs-Universitat Freiburg
2. Gutachter: Prof. Dr. Ralf Lammel, Universitat Koblenz-Landau
Tag der Disputation: 9. Juli 2010
iiAbstract
Component-based software development in statically typed, object-oriented program-
ming languages has proven successful in reducing development costs and raising software
quality. However, this form of software development still poses many challenges and thus
requires better support on the programming language level.
The language JavaGI, a conservative extension of Java 1.5, o ers generalized inter-
faces as an e ective improvement. Generalized interfaces subsume retroactive and type-
conditional interface implementations, binary methods, symmetric multiple dispatch,
interfaces over families of types, and static interface methods. These features allow
non-invasive and in-place object adaptation, thus enabling solutions to several software
extension, adaptation, and integration problems with components in binary form. Fur-
ther, they make certain coding patterns redundant and increase the expressiveness of the
type system. The generalized interface mechanism o ers a unifying conceptual view on
these seemingly disparate concerns, for which previously unrelated extensions have been
suggested.
This dissertation introduces the language JavaGI by explaining its features and mo-
tivating its design. Technical contributions of the dissertation are the formalization of
a core calculus for JavaGI and a proof of type soundness, determinacy of evaluation,
and decidability of subtyping and typechecking. The formalization also includes a type-
and behavior-preserving translation from a signi cant subset of the core calculus to a
slightly extended version of Featherweight Java. Moreover, the dissertation explores two
extensions of the type system, which both have undecidable subtyping relations but for
which several decidable fragments exist. The undecidability result for one of the exten-
sions sheds light on the decidability of subtyping in Scala and of subtyping with Java
wildcards.
On the practical side, the dissertation presents the implementation of a JavaGI compiler
and an accompanying run-time system. The compiler is based on an industrial-strength
Java compiler and o ers mostly modular typechecking but fully modular code generation.
It defers certain well-formedness checks until load time to allow for greater exibility and
to enable full support for dynamic loading. Benchmarks show that the code generated
by the compiler o ers good performance. Several case studies demonstrate the practical
utility of the language and its implementation. The implementation also includes a
JavaGI plugin for the Eclipse IDE.
iiiZusammenfassung
Komponentenbasierte Softwareentwicklung in objektorientierten, statisch getypten Pro-
grammiersprachen hat sich als erfolgreich erwiesen, um Entwicklungskosten zu senken
und die Qualitat von Software zu erhohen. Dennoch ergeben sich bei dieser Art der Soft-
wareentwicklung noch immer viele Herausforderung, so dass eine bessere Unterstutzung
auf der Programmiersprachenebene gewunscht ist.
Die Sprache JavaGI, eine konservative Erweiterung von Java 1.5, bietet generalisierte
Interfaces als e ektive Verbesserung an. Generalisierte Interfaces umfassen retroaktive
und typbedingte Interface{Implementierungen, binare Methoden, symmetrischen Mehr-
fachdispatch, Interfaces uber Typfamilien und statische Interface{Methoden. Diese Ei-
genschaften erlauben nichtinvasive und direkte Objektanpassung und ermogl ichen da-
mit Problemlosungen im Bereich der Erweiterung, Anpassung und Integration von Soft-
ware mit Komponenten in binarer Form. Au erdem subsummieren die Eigenschaften
verschiedene Programmiermuster und erhohen die Ausdrucksfahigkeit des Typsystems.
Der Generalisierungsmechanismus fur Interfaces bietet einen einheitlichen Rahmen fur
diese scheinbar ungleichen Belange, welche in der Vergangenheit mit verschiedenen, nicht
miteinander in Beziehung stehenden Erweiterungen angegangen wurden.
Die vorliegende Dissertation prase ntiert die Sprache JavaGI, erklar t ihre Eigenschaf-
ten und motiviert das Sprachdesign. Technische Beitrage der Arbeit sind ein Kernkalkul
fur JavaGI und ein Beweis der Typkorrektheit, Eindeutigkeit der Auswertung und Ent-
scheidbarkeit der Subtyprelation sowie der Typuberprufung. Die Formalisierung beinhal-
tet auch eine typ- und verhaltenserhaltende Ubersetzung einer signikanten Teilmenge
des Kalkuls in eine leicht erweiterte Fassung von Featherweight Java. Desweiteren wer-
den zwei Erweiterungen des Typsystems untersucht. Die Subtyprelation ist fur beide
Erweiterungen unentscheidbar, allerdings existieren mehrere entscheidbare Fragmente.
Das Unentscheidbarkeitsresultat fur eine der Erweiterungen wirft neues Licht auf die
Frage der Entscheidbarkeit der Subtyprelationen von Scala und von Java mit Wildcards.
Auf der praktischen Seite prasentiert die Dissertation die Implementierung eines Com-
pilers und eines entsprechenden Laufzeitsystems fur JavaGI. Der Compiler basiert auf
einem industriell eingesetzten Java Compiler und unterstutzt eine gro tenteils modulare
Typuberprufung sowie vollstan dig modulare Codeerzeugung. Bestimmte Wohlgeformt-
heitsuberprufungen werden bis zur Linkzeit aufgeschoben, um gro ere Flexibilit at und
volle Unterstutzung fur dynamisches Laden bieten zu konnen. Benchmarks zeigen, dass
der Compiler Code mit guter Performanz erzeugt. Mehrere Fallstudien demonstrieren die
praktische Anwendbarkeit der Sprache und ihrer Implementierung. Die Implementierung
beinhaltet auch ein JavaGI Plugin fur die Entwicklungsumgebung Eclipse.
vAcknowledgments
Peter Thiemann sparked my interest in programming languages and their underlying
theory. I have learned a lot from him and many of the contributions in this dissertation
bene ted greatly from numerous discussions with him. Not only did he give me the
freedom to work on my own ideas but he also provided careful guidance to bring these
ideas into a polished and qualied form. Thank you, Peter!
Ralf Lammel contributed valuable ideas to the initial design of JavaGI and raised
questions that I addressed in later versions of the language. I would like to thank him
for fruitful discussions and for co-reviewing my dissertation.
Matthias Neubauer, Markus Degen, Phillip Heidegger, Annette Bieniusa, and Konrad
Anton (in order of their appearance) were great colleagues during my time at the Uni-
versity of Freiburg. Matthias, Phillip, and Annette provided useful feedback on previous
versions of this dissertation, and Konrad’s diploma thesis explored the design of Wait-
omo, a predecessor of JavaGI. I am also grateful to Alina Swiderska for developing the
Eclipse plugin for JavaGI. David Leuschner gave helpful feedback on an earlier draft of
this dissertation and confronted me with reality by asking the \what is this good for in
practice" question.
Last not least, I would like to thank all my friends and my whole family for their
support and for showing me that computer science is not the most important thing in
life.
Stefan Wehr
December, 2009
vii

  • Univers Univers
  • Ebooks Ebooks
  • Livres audio Livres audio
  • Presse Presse
  • Podcasts Podcasts
  • BD BD
  • Documents Documents