Results 1 -
9 of
9
Practical pluggable types for Java
, 2008
"... This paper introduces the Checker Framework, which supports adding pluggable type systems to the Java language in a backward-compatible way. A type system designer defines type qualifiers and their semantics, and a compiler plug-in enforces the semantics. Programmers can write the type qualifiers in ..."
Abstract
-
Cited by 67 (16 self)
- Add to MetaCart
(Show Context)
This paper introduces the Checker Framework, which supports adding pluggable type systems to the Java language in a backward-compatible way. A type system designer defines type qualifiers and their semantics, and a compiler plug-in enforces the semantics. Programmers can write the type qualifiers in their programs and use the plug-in to detect or prevent errors. The Checker Framework is useful both to programmers who wish to write error-free code, and to type system designers who wish to evaluate and deploy their type systems. The Checker Framework includes new Java syntax for expressing type qualifiers; declarative and procedural mechanisms for writing type-checking rules; and support for flowsensitive local type qualifier inference and for polymorphism over types and qualifiers. The Checker Framework is well-integrated with the Java language and toolset. We have evaluated the Checker Framework by writing five checkers and running them on over 600K lines of existing code. The checkers found real errors, then confirmed the absence
Object and reference immutability using Java generics
- In ESEC/FSE
, 2007
"... A compiler-checked immutability guarantee provides useful documentation, facilitates reasoning, and enables optimizations. This paper presents Immutability Generic Java (IGJ), a novel language extension that expresses immutability without changing Java’s syntax by building upon Java’s generics and a ..."
Abstract
-
Cited by 46 (19 self)
- Add to MetaCart
(Show Context)
A compiler-checked immutability guarantee provides useful documentation, facilitates reasoning, and enables optimizations. This paper presents Immutability Generic Java (IGJ), a novel language extension that expresses immutability without changing Java’s syntax by building upon Java’s generics and annotation mechanisms. In IGJ, each class has one additional type parameter that is Mutable, Immutable, or ReadOnly. IGJ guarantees both reference immutability (only mutable references can mutate an object) and object immutability (an immutable reference points to an immutable object). IGJ is the first proposal for enforcing object immutability within Java’s syntax and type system, and its reference immutability is more expressive than previous work. IGJ also permits covariant changes of type parameters in a type-safe manner, e.g., a readonly list of integers is a subtype of a readonly list of numbers. IGJ extends Java’s type system with a few simple rules. We formalize this type system and prove it sound. Our IGJ compiler works by typeerasure and generates byte-code that can be executed on any JVM without runtime penalty.
Recrash: Making software failures reproducible by preserving object states
- In ECOOP 2008 - Object-Oriented Programming, 22nd European Conference
"... Abstract. It is very hard to fix a software failure without being able to reproduce it. However, reproducing a failure is often difficult and time-consuming. This paper proposes a novel technique, ReCrash, that generates multiple unit tests that reproduce a given program failure. During every execu ..."
Abstract
-
Cited by 33 (2 self)
- Add to MetaCart
(Show Context)
Abstract. It is very hard to fix a software failure without being able to reproduce it. However, reproducing a failure is often difficult and time-consuming. This paper proposes a novel technique, ReCrash, that generates multiple unit tests that reproduce a given program failure. During every execution of the target program, ReCrash stores partial copies of method arguments in memory. If the program fails (e.g., crashes), ReCrash uses the saved information to create unit tests reproducing the failure. We present ReCrashJ, an implementation of ReCrash for Java. ReCrashJ reproduced real crashes from Javac, SVNKit, Eclipsec, and BST. ReCrashJ is efficient, incurring 13%-64% performance overhead. If this overhead is unacceptable, then ReCrashJ has another mode that has negligible overhead until a crash occurs and 0%-1.7% overhead until the crash occurs for a second time, at which point the test cases are generated.
Inference of Reference Immutability
"... Abstract. Javari is an extension of Java that supports reference immutability constraints. Programmers write readonly type qualifiers and other constraints, and the Javari typechecker detects mutation errors (incorrect side effects) or verifies their absence. While case studies have demonstrated the ..."
Abstract
-
Cited by 15 (4 self)
- Add to MetaCart
(Show Context)
Abstract. Javari is an extension of Java that supports reference immutability constraints. Programmers write readonly type qualifiers and other constraints, and the Javari typechecker detects mutation errors (incorrect side effects) or verifies their absence. While case studies have demonstrated the practicality and value of Javari, a barrier to usability remains. A Javari program will not typecheck unless all the references in the APIs of libraries it uses are annotated with Javari type qualifiers. Manually converting existing Java libraries to Javari is tedious and error-prone. We present an algorithm for inferring reference immutability in Javari. The flow-insensitive and context-sensitive algorithm is sound and produces a set of qualifiers that typecheck in Javari. The algorithm is precise in that it infers the most readonly qualifiers possible; adding any additional readonly qualifiers will cause the program to not typecheck. We have implemented the algorithm in a tool, Javarifier, that infers the Javari type qualifiers over a set of class files. Javarifier automatically converts Java libraries to Javari. Additionally, Javarifier eases the task of converting legacy programs to Javari by inferring the mutability of every reference in a program. In case studies, Javarifier correctly inferred mutability over Java programs of up to 110 KLOC. 1
Javarifier: Inference of reference immutability in Java
, 2008
"... Javari is an extension of Java that supports reference immutability constraints. Pro-grammers write Javari type qualifiers, such as the readonly type qualifier, in their programs, and the Javari typechecker detects mutation errors (incorrect side effects) or verifies their absence. While case studie ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
(Show Context)
Javari is an extension of Java that supports reference immutability constraints. Pro-grammers write Javari type qualifiers, such as the readonly type qualifier, in their programs, and the Javari typechecker detects mutation errors (incorrect side effects) or verifies their absence. While case studies have demonstrated the practicality and value of Javari, a barrier to usability remains in the development process. A Javari program will not typecheck unless all the references in the APIs of libraries it uses are annotated with Javari type qualifiers. Manually converting existing Java libraries to Javari is both tedious and error-prone; the development process requires an auto-mated solution. This thesis presents an algorithm for statically inferring reference immutability in Javari. The flow-insensitive and context-sensitive algorithm is sound and produces a set of qualifiers that typecheck in Javari. The algorithm is precise in that it infers the most readonly qualifiers possible; adding any additional readonly qualifiers will cause
Certified by..........................................................
, 2008
"... Javari is an extension of Java that supports reference immutability constraints. Programmers write Javari type qualifiers, such as the readonly type qualifier, in their programs, and the Javari typechecker detects mutation errors (incorrect side effects) or verifies their absence. While case studies ..."
Abstract
- Add to MetaCart
(Show Context)
Javari is an extension of Java that supports reference immutability constraints. Programmers write Javari type qualifiers, such as the readonly type qualifier, in their programs, and the Javari typechecker detects mutation errors (incorrect side effects) or verifies their absence. While case studies have demonstrated the practicality and value of Javari, a barrier to usability remains in the development process. A Javari program will not typecheck unless all the references in the APIs of libraries it uses are annotated with Javari type qualifiers. Manually converting existing Java libraries to Javari is both tedious and error-prone; the development process requires an automated solution. This thesis presents an algorithm for statically inferring reference immutability in Javari. The flow-insensitive and context-sensitive algorithm is sound and produces a set of qualifiers that typecheck in Javari. The algorithm is precise in that it infers the most readonly qualifiers possible; adding any additional readonly qualifiers will cause the program to not typecheck. A tool, Javarifier, implements this algorithm in order
Semantic lifting and active libraries
, 2008
"... An active library is a software library that can optimise itself to its environment. This report describes semantic lifting, essentially the extraction of high-level semantic information from a low-level process description by means of program analysis, and discusses how we may use this idea to exte ..."
Abstract
- Add to MetaCart
An active library is a software library that can optimise itself to its environment. This report describes semantic lifting, essentially the extraction of high-level semantic information from a low-level process description by means of program analysis, and discusses how we may use this idea to extend the concept of active libraries to include program analysis and verification capabilities. We give two case studies that show our preliminary research results in this field and discuss
Annotation File Specification JSR 308 Team
, 2008
"... Java annotations are meta-data about Java program elements, as in “@Deprecated class Date {...}”. Ordinarily, Java annotations are written in the source code of a.java Java source file. When javac compiles the source code, it inserts the annotations in the resulting.class file (as “attributes”). Som ..."
Abstract
- Add to MetaCart
(Show Context)
Java annotations are meta-data about Java program elements, as in “@Deprecated class Date {...}”. Ordinarily, Java annotations are written in the source code of a.java Java source file. When javac compiles the source code, it inserts the annotations in the resulting.class file (as “attributes”). Sometimes, it is convenient to specify the annotations outside the source code or the.class file. • When source code is not available, a textual file provides a format for writing and storing annotations that is much easier to read and modify than a.class file. Even if the eventual purpose is to insert the annotations in the.class file, the annotations must be specified in some textual format first. • Even when source code is available, sometimes it should not be changed, yet annotations must be stored somewhere for use by tools. • A textual file for annotations can eliminate code clutter. A developer performing some specialized task (such as code verification, parallelization, etc.) can store annotations in an annotation file without changing the main version of the source code. (The developer’s private version of the code could contain the annotations, but the developer could copy them to the separate file before committing changes.) • Tool writers may find it more convenient to use a textual file, rather than writing a Java or.class file parser.