EEMCS

Home > Publications
Home University of Twente
Education
Research
Prospective Students
Jobs
Publications
Intranet (internal)
 
 Nederlands
 Contact
 Search
 Organisation

EEMCS EPrints Service


27673 Provably correct control flow graphs from Java bytecode programs with exceptions
Home Policy Brochure Browse Search User Area Contact Help

Amighi, A. and Gomes, P. and Gurov, D. and Huisman, M. (2016) Provably correct control flow graphs from Java bytecode programs with exceptions. International journal on software tools for technology transfer, 18 (6). pp. 653-684. ISSN 1433-2779

Full text available as:

PDF
- Univ. of Twente only
2733 Kb

Official URL: http://dx.doi.org/10.1007/s10009-015-0375-0

Abstract

We present an algorithm for extracting control flow graphs from Java bytecode that captures normal as well as exceptional control flow. We prove its correctness, in the sense that the behaviour of the extracted control flow graph is a sound over-approximation of the behaviour of the original program. This makes control flow graphs suitable for performing various static analyses, such as model checking of temporal safety properties. Analysing exceptional control flow for Java bytecode is difficult because of the stack-based nature of the language. We therefore develop the extraction in two stages. In the first, we abstract away from the complications arising from exceptional flows, and relativize the extraction on an oracle that is able to look into the stack and predict the exceptions that can be raised at each instruction. This idealized algorithm provides a specification for concrete extraction algorithms, which have to provide a suitable implementation for the oracle. We prove correctness of the idealized algorithm by means of behavioural simulation. In the second stage, we develop a concrete extraction algorithm that consists of two phases. In the first phase, the program is transformed into a BIR program, a stack-less intermediate representation of Java bytecode, from which the control flow graph is extracted in the second phase. We use this intermediate format because it provides the information needed to implement the oracle, and since it gives rise to more compact graphs. We show that the behaviour of the control flow graph extracted via the intermediate representation is a sound over-approximation of the behaviour of the graph extracted by the direct, idealized algorithm, and thus of the original program. The concrete extraction algorithm is implemented as the ConFlEx tool. A number of test cases are performed to evaluate the efficiency of the algorithm.

Item Type:Article
Research Group:EWI-FMT: Formal Methods and Tools
Research Program:CTIT-General
Research Project:VerCors: Verification of Concurrent Data Structures
ID Code:27673
Status:Published
Deposited On:15 March 2017
Refereed:Yes
International:Yes
More Information:statistics

Export this item as:

To request a copy of the PDF please email us request copy

To correct this item please ask your editor

Repository Staff Only: edit this item