Results 1 -
4 of
4
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
Compile-time type-checking for custom type qualifiers in Java
- In OOPSLA Companion
, 2007
"... We have created a system that enables programmers to add custom type qualifiers to the Java language in a backwardcompatible way. The system allows programmers to write type qualifiers in their programs and to create compiler plugins that enforce the semantics of these qualifiers at compile time. Th ..."
Abstract
-
Cited by 9 (5 self)
- Add to MetaCart
(Show Context)
We have created a system that enables programmers to add custom type qualifiers to the Java language in a backwardcompatible way. The system allows programmers to write type qualifiers in their programs and to create compiler plugins that enforce the semantics of these qualifiers at compile time. The system builds on existing Java tools and APIs, and on JSR 308. As an example, we introduce a plug-in to Sun’s Java compiler that uses our system to type-check the NonNull qualifier. Programmers can use the @NonNull annotation to prohibit an object reference from being null; then, by invoking a Java compiler with the NonNull plug-in, they can check for NonNull errors at compile time and rid their programs of null-pointer exceptions.
Inference of field initialization
, 2010
"... A raw object is partially initialized, with only some of its fields set to legal values. A raw object may violate its object invariants, such as that a given field is non-null. Programs often need to manipulate partially-initialized objects, but they must do so with care. Furthermore, analyses must ..."
Abstract
-
Cited by 6 (3 self)
- Add to MetaCart
(Show Context)
A raw object is partially initialized, with only some of its fields set to legal values. A raw object may violate its object invariants, such as that a given field is non-null. Programs often need to manipulate partially-initialized objects, but they must do so with care. Furthermore, analyses must be aware of rawness. For instance, software verification cannot depend on object invariants for raw objects. We present a static analysis that infers a safe over-approximation of the program variables, fields, or array elements that, at runtime, might hold non-fully initialized objects. Our formalization is flow-sensitive and considers the exception flow in the analyzed programs. We have proved the analysis to be sound. We have also implemented our analysis, in a tool called JULIA that computes both nullness and rawness information. We have evaluated JULIA on over 50K lines of code. We have compared its output to manually-written nullness and rawness information, and to an independently-written type-checking tool that checks nullness and rawness. JULIA’s output is accurate and, we believe, useful both to programmers and to static analyses.