Results 1 - 10
of
23
On Validity of Program Transformations in the Java Memory Model
"... Abstract. We analyse the validity of several common program transformations in multi-threaded Java, as defined by the Java Memory Model (JMM) section of Chapter 17 of the Java Language Specification. The main design goal of the JMM was to allow as many optimisations as possible. However, we find tha ..."
Abstract
-
Cited by 23 (0 self)
- Add to MetaCart
Abstract. We analyse the validity of several common program transformations in multi-threaded Java, as defined by the Java Memory Model (JMM) section of Chapter 17 of the Java Language Specification. The main design goal of the JMM was to allow as many optimisations as possible. However, we find that commonly used optimisations, such as common subexpression elimination, can introduce new behaviours and so are invalid for Java. In this paper, we describe several kinds of transformations and explain the problems with a number of counterexamples. More positively, we also examine some valid transformations, and prove their validity. Our study contributes to the understanding of the JMM, and has the practical impact of revealing some cases where the Sun Hotspot JVM does not comply with the Java Memory Model. 1
Java Jr.: A fully abstract trace semantics for a core Java language
- In ESOP, volume 3444 of LNCS
, 2005
"... Abstract. We introduce an expressive yet semantically clean core Java-like language, Java Jr., and provide it with a formal operational semantics based on traces of observable actions which represent interaction across package boundaries. A detailed example based on the Observer Pattern is used to d ..."
Abstract
-
Cited by 19 (0 self)
- Add to MetaCart
Abstract. We introduce an expressive yet semantically clean core Java-like language, Java Jr., and provide it with a formal operational semantics based on traces of observable actions which represent interaction across package boundaries. A detailed example based on the Observer Pattern is used to demonstrate the intuitive character of the semantic model. We also show that our semantic trace equivalence is fully-abstract with respect to a natural notion of testing equivalence for object systems. This is the first such result for a full class-based OO-language with inheritance. 1
A Concurrent Lambda Calculus with Futures
- THEORETICAL COMPUTER SCIENCE
, 2006
"... We introduce a new lambda calculus with futures, λ(fut), to model the operational semantics of concurrent extensions of ML. λ(fut) can safely express a variety of high-level concurrency constructs, including channels, semaphores, or ports. Safe implementations of these constructs in (fut) cannot be ..."
Abstract
-
Cited by 19 (4 self)
- Add to MetaCart
We introduce a new lambda calculus with futures, λ(fut), to model the operational semantics of concurrent extensions of ML. λ(fut) can safely express a variety of high-level concurrency constructs, including channels, semaphores, or ports. Safe implementations of these constructs in (fut) cannot be corrupted in any well-typed context. We prove safety on basis of a linear type system.
Object connectivity and full abstraction for a concurrent calculus of classes
- In Proc. ICTAC 2004, vol 3704 of LNCS
, 2005
"... Abstract. The concurrent object calculus has been investigated as a core calculus for imperative, object-oriented languages with multithreading and heap-allocated objects. The combination of this form of concurrency with objects corresponds to features known from the popular language Java. One disti ..."
Abstract
-
Cited by 12 (7 self)
- Add to MetaCart
Abstract. The concurrent object calculus has been investigated as a core calculus for imperative, object-oriented languages with multithreading and heap-allocated objects. The combination of this form of concurrency with objects corresponds to features known from the popular language Java. One distinctive feature, however, of the concurrent object calculus is that it is object-based, whereas the mainstream of objectoriented languages is class-based. This work explores the semantical consequences of introducing classes to the calculus. Considering classes as part of a component makes instantiation a possible interaction between component and environment. A striking consequence is that in order to characterize the observable behavior we must take connectivity information into account, i.e., the way objects may have knowledge of each other. In particular, unconnected environment objects can neither determine the absolute order of interaction and furthermore cannot exchange information to compare object identities. We formulate an operational semantics that incorporates the connectivity information into the scoping mechanism of the calculus. As instantiation itself is unobservable, objects are instantiated only when accessed for the first time (“lazy instantiation”). Furthermore we use a corresponding trace semantics for full abstraction wrt. a may-testing based notion of observability.
How to Cook a Complete Hoare Logic for Your Pet OO Language
- In Formal Methods for Components and Objects (FMCO’03), volume 3188 of Lecture Notes in Computer Science
, 2004
"... Abstract. This paper introduces a general methodology for obtaining complete Hoare logics for object-oriented languages. The methodology is based on a new completeness result of a Hoare logic for a procedural language with dynamically allocated variables. This new result involves a generalization of ..."
Abstract
-
Cited by 8 (1 self)
- Add to MetaCart
Abstract. This paper introduces a general methodology for obtaining complete Hoare logics for object-oriented languages. The methodology is based on a new completeness result of a Hoare logic for a procedural language with dynamically allocated variables. This new result involves a generalization of Gorelick’s seminal completeness result of the standard Hoare logic for recursive procedures with simple variables. We show how this completeness result can be generalized to existing Hoare logics for typical object-oriented concepts like method calls, sub-typing and inheritance, and dynamic binding, by transforming an encoding of these concepts into this procedural language with dynamically allocated variables. 1
A Model of Cooperative Threads
"... We develop a model of concurrent imperative programming with threads. We focus on a small imperative language with cooperative threads which execute without interruption until they terminate or explicitly yield control. We define and study a trace-based denotational semantics for this language; this ..."
Abstract
-
Cited by 7 (2 self)
- Add to MetaCart
We develop a model of concurrent imperative programming with threads. We focus on a small imperative language with cooperative threads which execute without interruption until they terminate or explicitly yield control. We define and study a trace-based denotational semantics for this language; this semantics is fully abstract but mathematically elementary. We also give an equational theory for the computational effects that underlie the language, including thread spawning. We then analyze threads in terms of the free algebra monad for this theory. 1
Reasoning about class behavior
- In FOOL/WOOD
, 2007
"... We present a sound and complete method for reasoning about contextual equivalence between different implementations of classes in an imperative subset of Java. To the extent of our knowledge this is the first such method for a language with unrestricted inheritance, where the context can arbitrarily ..."
Abstract
-
Cited by 7 (3 self)
- Add to MetaCart
We present a sound and complete method for reasoning about contextual equivalence between different implementations of classes in an imperative subset of Java. To the extent of our knowledge this is the first such method for a language with unrestricted inheritance, where the context can arbitrarily extend classes to distinguish otherwise equivalent implementations. Similar reasoning techniques for class-based languages [1, 12] don’t consider inheritance at all, or forbid the context from extending related classes. Other techniques that do consider inheritance [3] study whole-program equivalence. Our technique also handles public, private, and protected interfaces of classes, imperative fields, and invocations of callbacks. Using our technique we were able to prove equivalences in examples with higher-order behavior, where previous methods for functional calculi admit limitations [21, 24]. Adding inheritance to a class-based language increases the distinguishing power of the context. Here we show how this extra distinguishing power is reflected in the conditions for equivalence of our technique. Furthermore we show that adding a cast operator is a conservative extension of the language. 1.
Abstract interface behavior of object-oriented languages with monitors
- FMOODS ’06, volume 4037 of Lecture Notes in Computer Science
, 2006
"... Abstract. We characterize the observable behavior of multi-threaded, object-oriented components with re-entrant monitors. We show that a compositional approach leads to observable uncertainty wrt. monitor operations at the interface which we capture by may- and must-approximations for potential, res ..."
Abstract
-
Cited by 4 (3 self)
- Add to MetaCart
Abstract. We characterize the observable behavior of multi-threaded, object-oriented components with re-entrant monitors. We show that a compositional approach leads to observable uncertainty wrt. monitor operations at the interface which we capture by may- and must-approximations for potential, resp. necessary lock ownership. The concepts are formalized in an object calculus. We show the soundness of the abstractions.

