Stefan Wehr
University of Freiburg
Network
Latest external collaboration on country level. Dive into details by clicking on the dots.
Publication
Featured researches published by Stefan Wehr.
european conference on object-oriented programming | 2007
Stefan Wehr; Ralf Lämmel; Peter Thiemann
JavaGI is an experimental language that extends Java 1.5 by generalizing the interface concept to incorporate the essential features of Haskells type classes. In particular, generalized interfaces cater for retroactive and constrained interface implementations, binary methods, static methods in interfaces, default implementations for interface methods, interfaces over families of types, and existential quantification for interface-bounded types. As a result, many anticipatory uses of design patterns such as Adapter, Factory, and Visitor become obsolete; several extension and integration problems can be solved more easily. JavaGIs interface capabilities interact with subtyping (and subclassing) in interesting ways that go beyond type classes. JavaGI can be translated to Java 1.5. Its formal type system is derived from Featherweight GJ.
european conference on object-oriented programming | 2007
Markus Degen; Peter Thiemann; Stefan Wehr
Java(X) is a framework for type refinement. It extends Javas type language with annotations drawn from an algebra X and structural subtyping in terms of the annotations. Each instantiation of X yields a different refinement type system with guaranteed soundness. The paper presents some applications, formalizes a core language, states a generic type soundness result, and sketches the extensions required for the full Java language (without generics). The main technical innovation of Java(X) is its concept of activity annotations paired with the notion of droppability. An activity annotation is a capability which can grant exclusive write permission for a field in an object and thus facilitates a typestate change (strong update). Propagation of capabilities is either linear or affine (if they are droppable). Thus, Java(X) can perform protocol checking as well as refinement typing. Aliasing is addressed with a novel splitting relation on types.
The Journal of Logic and Algebraic Programming | 2010
Markus Degen; Peter Thiemann; Stefan Wehr
Abstract Contracts are a proven tool in software development. They provide specifications for operations that may be statically verified or dynamically validated by contract monitoring. We investigate the properties of contract monitoring for languages with contracts and effects using a monadic semantics. We study three combinations of evaluation orders and contract monitoring styles: call-by-value and call-by-name with eager monitoring and call-by-name with delayed monitoring. In each case, an effect system ensures that contract monitoring does not change the meaning of a program and guarantees that contract monitoring is idempotent. The monadic semantics enables us to study design choices, to formalize implementations, to pinpoint the differences between contracts in the three combinations, and to verify algebraic laws.
asian symposium on programming languages and systems | 2008
Stefan Wehr; Manuel M. T. Chakravarty
Researchers repeatedly observed that the module system of ML and the type class mechanism of Haskell are related. So far, this relationship has received little formal investigation. The work at hand fills this gap: It introduces type-preserving translations from modules to type classes and vice versa, which enable a thorough comparison of the two concepts.
asian symposium on programming languages and systems | 2009
Stefan Wehr; Peter Thiemann
Bounded existential types are a powerful language feature for modeling partial data abstraction and information hiding. However, existentials do not mingle well with subtyping as found in current object-oriented languages: the subtyping relation is already undecidable for very restrictive settings. This paper considers two subtyping relations defined by extracting the features specific to existentials from current language proposals (JavaGI, WildFJ, and Scala) and shows that both subtyping relations are undecidable. One of the two subtyping relations remains undecidable even if bounded existential types are removed. With the goal of regaining decidable type checking for the JavaGI language, the paper also discusses various restrictions including the elimination of bounded existentials from the language as well as possible amendments to regain some of their features.
Proceedings of the 2008 international workshop on Functional and declarative programming in education | 2008
Annette Bieniusa; Markus Degen; Phillip Heidegger; Peter Thiemann; Stefan Wehr; Martin Gasbichler; Michael Sperber; Marcus Crestani; Herbert Klaeren; Eric Knauel
Teaching the introductory course on programming is hard, even with well-proven didactic methods and material. This is a report on the first-year programming course taught at Tübingen and Freiburg universities. The course builds on the well-developed systematic approaches using functional programming, pioneered by the PLT group. In recent years, we have introduced novel approaches to the teaching process itself. In particular, assisted programming sessions gave the students a solid basis for developing their programming skills. In this paper we trace the development of our approach. Furthermore, we have collected information on how well our course had worked, and how the results together with our experience gained over years have lead to substantial, measurable improvements.
generative programming and component engineering | 2009
Stefan Wehr; Peter Thiemann
Generalized interfaces are an extension of the interface concept found in object-oriented languages such as Java or C#. The extension is inspired by Haskells type classes. It supports retroactive and type-conditional interface implementations, binary methods, symmetric multimethods, interfaces over families of types, and static interface methods. This article reports practical experience with generalized interfaces as implemented in the JavaGI language. Several real-world case studies demonstrate how generalized interfaces provide solutions to extension and integration problems with components in binary form, how they make certain design patterns redundant, and how they eliminate various run-time errors. In each case study, the use of JavaGI results in elegant and highly readable code. Furthermore, the article discusses the implementation of a compiler and a run-time system for JavaGI. Benchmarks show that our implementation offers acceptable performance.
partial evaluation and semantic-based program manipulation | 2012
Markus Degen; Peter Thiemann; Stefan Wehr
Contract monitoring for strict higher-order functional languages has an intuitive meaning, an established theoretical basis, and a standard implementation. For lazy functional languages, the situation is less clear-cut. There is no agreed-upon intended meaning or theory, and there are competing implementations with subtle semantic differences. This paper proposes meaning preservation and completeness as formally defined properties for evaluating implementations of contract monitoring. Both properties have simple definitions that are straightforward to check. A survey of existing implementations reveals that some are meaning preserving, some are complete, and some have neither property. The main result is that contract monitoring for lazy functional languages cannot be complete and meaning preserving at the same time, although both properties can be achieved in isolation.
computer science and software engineering | 2008
Annette Bieniusa; Peter Thiemann; Stefan Wehr
Version control helps coordinating a group of people that work concurrently to achieve a shared objective. Concurrency control helps coordinating a group of threads that work concurrently to achieve a shared objective. The seemingly superficial analogy between version control and concurrency control is deeper than expected. A comparison of three major flavors of version control systems with three influential and representative approaches to concurrency control exhibits a surprisingly close correspondences in terms of mechanism and workflow. The correspondence yields new perspectives on both, version control and concurrency control.
asian symposium on programming languages and systems | 2008
Peter Thiemann; Stefan Wehr
Interface types are a useful concept in object-oriented programming languages like Java or C#. A clean programming style advocates relying on interfaces without revealing their implementation. Haskells type classes provide a closely related facility for stating an interface separately from its implementation. However, there are situations in which no simple mechanism exists to hide the identity of the implementation type of a type class. This work provides such a mechanism through the integration of lightweight interface types into Haskell. The extension is non-intrusive as no additional syntax is needed and no existing programs are affected. The implementation extends the treatment of higher-rank polymorphism in production Haskell compilers.