Results 1 -
4 of
4
Semantic Predicate Types and Approximation for Class-based Object Oriented Programming
"... Abstract. We define a small functional calculus that expresses class-based object oriented features and is modelled on the similar calculi of Featherweight Java [34] and Middleweight Java [15], which are ultimately based upon the Java programming language. We define a predicate system, similar to th ..."
Abstract
-
Cited by 2 (2 self)
- Add to MetaCart
Abstract. We define a small functional calculus that expresses class-based object oriented features and is modelled on the similar calculi of Featherweight Java [34] and Middleweight Java [15], which are ultimately based upon the Java programming language. We define a predicate system, similar to the one defined in [10], and show subject reduction and expansion, and argue that program analysis systems can be built on top of this system. Generalising the concept of approximant from the Lambda Calculus, we show that all expressions that we can assign a predicate to have an approximant that satisfies the same predicate. From this, a characterisation of (head-)normalisation follows. 1
Flattening versus direct semantics for Featherweight Jigsaw
- In FOOL'09 - Intl. Workshop on Foundations of Object Oriented Languages, 2009. To appear. Gary T. Leavens. Tutorial on JML, the
, 2007
"... Inheritance in object-oriented languages allows, roughly, to obtain the same effect one would get by duplicating the methods of the parent class in the heir. However, the key advantage is that source code duplication is avoided, and the code of the parent is, instead, found on demand, through a runt ..."
Abstract
-
Cited by 2 (2 self)
- Add to MetaCart
Inheritance in object-oriented languages allows, roughly, to obtain the same effect one would get by duplicating the methods of the parent class in the heir. However, the key advantage is that source code duplication is avoided, and the code of the parent is, instead, found on demand, through a runtime procedure called method lookup. In other words, two different semantics of inheritance can be given: flattening semantics, that is, by translation into a language with no inheritance, and direct semantics, that is, by formalizing dynamic method look-up. Analogously, many other composition mechanisms which have been proposed for enhancing the objectoriented paradigm, such as mixins and traits, can be formally defined either by translation into standard inheritance, or by a providing a direct execution model. Flattening semantics generally provides a simpler model and can be used as a guide in language design. However, it is not adequate for compositional analysis since the binary code for each code fragment, say, a class, can be generated only when all used fragments are available. In this paper we define both semantics and prove their equivalence for Featherweight Jigsaw, a class-based language providing a very general framework for software composition, subsuming, besides other mechanisms, standard inheritance, mixins, and traits.
LDTA 2008 Tickling Java with a Feather
"... Fragments of mainstream programming languages are formalised in order to show desirable properties of their static semantics. We ask if said formalisms could also be used to define a test suite for the mainstream programming language in question, and what the utility of such a suite would be. In thi ..."
Abstract
- Add to MetaCart
Fragments of mainstream programming languages are formalised in order to show desirable properties of their static semantics. We ask if said formalisms could also be used to define a test suite for the mainstream programming language in question, and what the utility of such a suite would be. In this work, we present our findings from testing Java with Featherweight Java (FJ). We take the syntax and binding structure of FJ to define an instance space of non-isomorphic test programs and implementations of FJ type checkers to provide oracles for our tests, to ensure the mainstream implementation conforms with the expectations of FJ. Using these, we evaluate (using code coverage techniques) how much of the Sun OpenJDK javac can be tested by FJ. Key words:
Semantic Predicate Types and Approximation for Class-based Object Oriented Programming
"... We apply the principles of the intersection type discipline to the study of class-based object oriented programs and; our work follows from a similar approach (in the context of Abadi and Cardelli’s ς-object calculus) taken by van Bakel and de’Liguoro. We define an extension of Featherweight Java, p ..."
Abstract
- Add to MetaCart
We apply the principles of the intersection type discipline to the study of class-based object oriented programs and; our work follows from a similar approach (in the context of Abadi and Cardelli’s ς-object calculus) taken by van Bakel and de’Liguoro. We define an extension of Featherweight Java, pFJ, and present a predicate system which we show to be sound and expressive. We also show that our system provides a semantic underpinning for the object oriented paradigm by generalising the concept of approximant from the Lambda Calculus and demonstrating an approximation result: all expressions to which we can assign a predicate have an approximant that satisfies the same predicate. Crucial to this result is the notion of predicate language, which associates a family of predicates with a class. 1.

