ArnoutEngelenScriptie

- Nullness Analysis of Java Source Code Master's thesis Arnout F.M Engelen<[email protected]> Research number 548 10th August 2006 2 Contents

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Nullness Analysis of Java Source Code Master's thesis Arnout F.M. Engelen <[email protected]> Research number: 548 10th August 2006 2 Contents 1 Introduction 7 2 Background 11 2.1 Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.1.1 Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.1.2 Bias and propagation . . . . . . . . . . . . . . . . . . . . 12 2.1.3 Assumptions about external code . . . . . . . . . . . . . . 12 2.2 Java Modeling Language . . . . . . . . . . . . . . . . . . . . . . . 12 2.2.1 Nullity modi ers and invariants . . . . . . . . . . . . . . . 13 2.2.2 More complicated speci cations . . . . . . . . . . . . . . . 14 2.2.3 Non-null by default . . . . . . . . . . . . . . . . . . . . . . 14 2.3 Type systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.3.1 Di erent approaches to possibly-null values . . . . . . . . 15 2.3.1.1 Traditional (nullable) pointers . . . . . . . . . . 15 2.3.1.2 References with nullness information . . . . . . . 15 2.3.1.3 Functional `Maybe' types . . . . . . . . . . . . . 18 2.3.2 Type Inference . . . . . . . . . . . . . . . . . . . . . . . . 19 2.4 Program Veri cation . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.4.1 Program Veri cation and Type Systems . . . . . . . . . . 20 2.4.2 Program Veri cation and Testing . . . . . . . . . . . . . . 20 3 Existing nullness analysis tools 21 3.1 Nullness checkers . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.1.1 Eclipse and IntelliJ IDEA . . . . . . . . . . . . . . . . . . 22 3.1.2 JastAdd Non-Null Checker . . . . . . . . . . . . . . . . . 23 3.1.3 ESC/Java . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.1.4 Spec# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 3.1.5 FindBugs . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 3.2 Annotation Assistants . . . . . . . . . . . . . . . . . . . . . . . . 27 3.2.1 JastAdd Nullness Inferrer . . . . . . . . . . . . . . . . . . 27 3.2.1.1 Example . . . . . . . . . . . . . . . . . . . . . . 29 3.2.2 Houdini . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.2.2.1 Example . . . . . . . . . . . . . . . . . . . . . . 34 3.2.3 CANAPA . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 3.2.3.1 Example . . . . . . . . . . . . . . . . . . . . . . 37 3.2.4 Julia . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 3.2.5 Daikon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 3 4 CONTENTS 4 Requirements and design considerations 41 4.1 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 4.2 Design considerations . . . . . . . . . . . . . . . . . . . . . . . . 42 4.2.1 Code external to the analysis . . . . . . . . . . . . . . . . 42 4.2.2 Limits of type-based approaches . . . . . . . . . . . . . . 42 4.2.2.1 Combining type- and logic-based analysis . . . . 44 4.2.2.2 Nullness type inference . . . . . . . . . . . . . . 45 4.2.3 Impact of incorrectly inferred annotations . . . . . . . . .Impact of incorrectly inferred annotations ....
View Full Document

This note was uploaded on 02/24/2012 for the course CSE 503 taught by Professor Davidnotikin during the Spring '11 term at University of Washington.

Page1 / 80

- Nullness Analysis of Java Source Code Master's thesis Arnout F.M Engelen<[email protected]> Research number 548 10th August 2006 2 Contents

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online