Provably correct control flow graphs from Java']Java bytecode programs with exceptions

被引:1
|
作者
Amighi, Afshin [1 ]
Gomes, Pedro de Carvalho [2 ]
Gurov, Dilian [2 ]
Huisman, Marieke [1 ]
机构
[1] Univ Twente, Enschede, Netherlands
[2] KTH Royal Inst Technol, Stockholm, Sweden
关键词
Software verification; Static analysis; Program models;
D O I
10.1007/s10009-015-0375-0
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页码:653 / 684
页数:32
相关论文
共 50 条
  • [1] Provably correct control flow graphs from Java bytecode programs with exceptions
    Afshin Amighi
    Pedro de Carvalho Gomes
    Dilian Gurov
    Marieke Huisman
    [J]. International Journal on Software Tools for Technology Transfer, 2016, 18 : 653 - 684
  • [2] A Provably Correct Stackless Intermediate Representation for Java']Java Bytecode
    Demange, Delphine
    Jensen, Thomas
    Pichardie, David
    [J]. PROGRAMMING LANGUAGES AND SYSTEMS, 2010, 6461 : 97 - +
  • [3] Sound Control Flow Graph Extraction from Incomplete Java']Java Bytecode Programs
    Gomes, Pedro de Carvalho
    Picoco, Attilio
    Gurov, Dilian
    [J]. FUNDAMENTAL APPROACHES TO SOFTWARE ENGINEERING, FASE 2014, 2014, 8411 : 215 - 229
  • [4] Provably correct inline monitoring for multithreaded Java']Java-like programs
    Dam, Mads
    Jacobs, Bart
    Lundblad, Andreas
    Piessens, Frank
    [J]. JOURNAL OF COMPUTER SECURITY, 2010, 18 (01) : 37 - 59
  • [5] Data flow analysis of Java']Java programs in the presence of exceptions
    Shelekhov, VI
    Kuksenko, SV
    [J]. PERSPECTIVES OF SYSTEM INFORMATICS, 2000, 1755 : 389 - 395
  • [6] Path Executions of Java']Java Bytecode Programs
    Soomro, Safeeullah
    Alansari, Zainab
    Belgaum, Mohammad Riyaz
    [J]. PROGRESS IN ADVANCED COMPUTING AND INTELLIGENT ENGINEERING, VOL 2, 2018, 564 : 261 - 271
  • [7] A Framework for Debugging Java']Java Programs in a Bytecode
    Soomro, Safeeullah
    Belgaum, Mohammad Riyaz
    Alansari, Zainab
    Miraz, Mahdi H.
    [J]. 2018 INTERNATIONAL CONFERENCE ON COMPUTING, ELECTRONICS & COMMUNICATIONS ENGINEERING (ICCECE), 2018, : 317 - 322
  • [8] Control flow analysis in the presence of exceptions for Java']Java
    Yahyaoui, H
    Tawbi, N
    Rodrigue, JF
    [J]. CCECE 2003: CANADIAN CONFERENCE ON ELECTRICAL AND COMPUTER ENGINEERING, VOLS 1-3, PROCEEDINGS: TOWARD A CARING AND HUMANE TECHNOLOGY, 2003, : 1363 - 1368
  • [9] Dynamic slicing of Java']Java bytecode programs
    Szegedi, A
    Gyimóthy, T
    [J]. FIFTH IEEE INTERNATIONAL WORKSHOP ON SOURCE CODE ANALYSIS AND MANIPULATION, PROCEEDINGS, 2005, : 35 - 44
  • [10] A programming logic for Java']Java bytecode programs
    Quigley, CL
    [J]. THEOREM PROVING IN HIGHER ORDER LOGICS, PROCEEDINGS, 2003, 2758 : 41 - 54