A Termination Analyzer for Java Bytecode Based on Path-Length
It is important to prove that supposedly terminating programs actually terminate, particularly if those programs must be run on critical systems or downloaded into a client such as a mobile phone. Although termination of computer programs is generally undecidable, it is possible and useful to prove...
Saved in:
Published in | ACM transactions on programming languages and systems Vol. 32; no. 3; pp. 1 - 70 |
---|---|
Main Authors | , , |
Format | Journal Article |
Language | English |
Published |
New York, NY
Association for Computing Machinery
01.03.2010
ACM Press ACM |
Series | ACM Transactions on Programming Languages and Systems |
Subjects | |
Online Access | Get full text |
Cover
Loading…
Summary: | It is important to prove that supposedly terminating programs actually terminate, particularly if those programs must be run on critical systems or downloaded into a client such as a mobile phone. Although termination of computer programs is generally undecidable, it is possible and useful to prove termination of a large, nontrivial subset of the terminating programs. In this article, we present our termination analyzer for sequential Java bytecode, based on a program property called path-length. We describe the analyses which are needed before the path-length can be computed such as sharing, cyclicity, and aliasing. Then we formally define the path-length analysis and prove it correct with respect to a reference denotational semantics of the bytecode. We show that a constraint logic program PCLP can be built from the result of the path-length analysis of a Java bytecode program P and formally prove that if PCLP terminates, then P also terminates. Hence a termination prover for constraint logic programs can be applied to prove the termination of P. We conclude with some discussion of the possibilities and limitations of our approach. Ours is the first existing termination analyzer for Java bytecode dealing with any kind of data structures dynamically allocated on the heap and which does not require any help or annotation on the part of the user. |
---|---|
Bibliography: | ObjectType-Article-1 SourceType-Scholarly Journals-1 ObjectType-Feature-2 content type line 23 ObjectType-Article-2 ObjectType-Feature-1 |
ISSN: | 0164-0925 1558-4593 |
DOI: | 10.1145/1709093.1709095 |