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 条
  • [31] Checking secure information flow in Java']Java bytecode by code transformation and standard bytecode verification
    Bernardeschi, C
    De Francesco, N
    Lettieri, G
    Martini, L
    [J]. SOFTWARE-PRACTICE & EXPERIENCE, 2004, 34 (13): : 1225 - 1255
  • [32] Obfuscating Java']Java Programs by Translating Selected Portions of Bytecode to Native Libraries
    Pizzolotto, Davide
    Ceccato, Mariano
    [J]. 2018 IEEE 18TH INTERNATIONAL WORKING CONFERENCE ON SOURCE CODE ANALYSIS AND MANIPULATION (SCAM), 2018, : 40 - 49
  • [33] On-Device Control Flow Verification for Java']Java Programs
    Fontaine, Arnaud
    Hym, Samuel
    Simplot-Ryl, Isabelle
    [J]. ENGINEERING SECURE SOFTWARE AND SYSTEMS, 2011, 6542 : 43 - 57
  • [34] Modular Termination Proofs of Recursive Java']Java Bytecode Programs by Term Rewriting
    Brockschmidt, Marc
    Otto, Carsten
    Giesl, Juergen
    [J]. 22ND INTERNATIONAL CONFERENCE ON REWRITING TECHNIQUES AND APPLICATIONS (RTA'11), 2011, 10 : 155 - 170
  • [35] Test Case Generation for Java']Java Bytecode Programs Annotated with BML Specifications
    Achour, Safaa
    Benattou, Mohammed
    [J]. PROCEEDINGS OF 2016 5TH INTERNATIONAL CONFERENCE ON MULTIMEDIA COMPUTING AND SYSTEMS (ICMCS), 2016, : 605 - 610
  • [36] From finite state machines to provably correct java card applets
    Hubbers, Engelbert
    Oostdijk, Martijn
    Poll, Erik
    [J]. IFIP Advances in Information and Communication Technology, (465-470):
  • [37] Data-flow based vulnerability analysis and Java']Java bytecode
    Chen, Hua
    Zou, Tao
    Wang, Dongxia
    [J]. PROCEEDINGS OF THE 7TH WSEAS INTERNATIONAL CONFERENCE ON APPLIED COMPUTER SCIENCE: COMPUTER SCIENCE CHALLENGES, 2007, : 201 - +
  • [38] Using compressed bytecode traces for slicing java programs
    School of Computing, National University of Singapore, 3 Science Drive 2, Singapore 117543
    [J]. Institution of Electrical Engineers, IEE; British Computer Society, BCS; Association for Computing Machinery, ACM SIGSOFT; Association for Computing Machinery, ACM SIGPLAN; IEEE Computer Society Technical Council on Software Engineering, 1600, 512-521 (2004):
  • [39] Multithreaded dependence graphs for concurrent Java']Java programs
    Zhao, JJ
    [J]. INTERNATIONAL SYMPOSIUM ON SOFTWARE ENGINEERING FOR PARALLEL AND DISTRIBUTED SYSTEMS, PROCEEDINGS, 1999, : 13 - 23
  • [40] From Specification to Optimisation: An Architecture for Optimisation of Java']Java Bytecode
    Warburton, Richard
    Kalvala, Sara
    [J]. COMPILER CONSTRUCTION, PROCEEDINGS, 2009, 5501 : 17 - 31