Abstract | ||
---|---|---|
In this paper, we present an efficient and practical algorithm for inferring static types for local variables in a 3-address, stackless, representation of Java bytecode. By decoupling the type inference problem from the low level bytecode representation, and abstracting it into a constraint system, we show that there exists verifiable bytecode that cannot be statically typed. Further, we show that, without transforming the program, the static typing problem is NP-hard. In order to get a practical approach we have developed an algorithm that works efficiently for the usual cases and then applies efficient program transformations to simplify the hard cases. We have implemented this algorithm in the Soot framework. Our experimental results show that all of the 17,000 methods used in our tests were successfully typed, 99.8% of those required only the first stage, 0.2% required the second stage, and no methods required the third stage. |
Year | DOI | Venue |
---|---|---|
2000 | 10.1007/978-3-540-45099-3_11 | SAS |
Keywords | Field | DocType |
type inference | Program optimization,Programming language,Object-oriented programming,Computer science,Inference,Theoretical computer science,Real-time computing,Optimizing compiler,Java bytecode,Program analysis,Rule of inference,Local variable | Conference |
Volume | ISSN | ISBN |
1824 | 0302-9743 | 3-540-67668-6 |
Citations | PageRank | References |
24 | 2.46 | 11 |
Authors | ||
3 |
Name | Order | Citations | PageRank |
---|---|---|---|
Etienne Gagnon | 1 | 488 | 33.42 |
Laurie Jane Hendren | 2 | 2617 | 199.08 |
Guillaume Marceau | 3 | 363 | 46.04 |