abstract-type-issta2006

abstract-type-issta2006 - Dynamic Inference of Abstract...

Info iconThis preview shows pages 1–2. 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
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Dynamic Inference of Abstract Types Philip J. Guo Jeff H. Perkins Stephen McCamant Michael D. Ernst MIT Computer Science and Artificial Intelligence Lab Cambridge, MA, USA { pgbovine,jhp,smcc,mernst } @csail.mit.edu Abstract An abstract type groups variables that are used for related purposes in a program. We describe a dynamic unification-based analysis for inferring abstract types. Initially, each run-time value gets a unique abstract type. A run-time interaction among values indi- cates that they have the same abstract type, so their abstract types are unified. Also at run time, abstract types for variables are ac- cumulated from abstract types for values. The notion of interac- tion may be customized, permitting the analysis to compute finer or coarser abstract types; these different notions of abstract type are useful for different tasks. We have implemented the analysis for compiled x86 binaries and for Java bytecodes. Our experiments indicate that the inferred abstract types are useful for program com- prehension, improve both the results and the run time of a follow-on program analysis, and are more precise than the output of a com- parable static analysis, without suffering from overfitting. Categories and Subject Descriptors D.2.3 [ Software Engineering ]: Coding Tools and Techniques General Terms Languages, Experimentation Keywords abstract types, type inference, dynamic analysis, C, C++, Java, in- teraction, mixed-level analysis, units, values and variables 1. Introduction Even in explicitly-typed languages, the declared types capture only a portion of the programmer’s intent and knowledge about variable values. For example, a programmer may use the int type to represent array indices, sensor measurements, the current time, file descriptors, counts, memory addresses, and a host of other un- related quantities. The type Pair<int,int> can represent the co- ordinates of a point, a Celsius/Fahrenheit conversion, a quotient and remainder returned from a division procedure, etc. Different strings or files can represent distinct concepts. Regular expressions can be applicable to different contents. Variables declared with the same generic type, such as Object or Comparable , need not hold related values. Figure 1 contains an example. Use of a single programming language type obscures the dif- ferences among conceptually distinct values. This can hinder pro- grammers in understanding, using, and modifying the code, and can Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee....
View Full Document

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

Page1 / 11

abstract-type-issta2006 - Dynamic Inference of Abstract...

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

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