Provably Correct Control-Flow Graphs from Java Programs with Exceptions

نویسندگان

  • Afshin Amighi
  • Pedro de C. Gomes
  • Dilian Gurov
  • Marieke Huisman
چکیده

We present an algorithm to extract flow graphs from Java bytecode, including exceptional control flows. We prove its correctness, meaning that the behavior of the extracted control-flow graph is a sound over-approximation of the behavior of the original program. Thus any safety property that holds for the extracted control-flow graph also holds for the original program. This makes control-flow graphs suitable for performing various static analyses, such as model checking. The extraction is performed in 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 results in compact flow graphs, with provably correct exceptional control flow. To prove the correctness of the two-phase extraction, we also define an idealized extraction algorithm, whose correctness can be proven directly. Then we show that the behavior of the control-flow graph extracted via the intermediate representation is an over-approximation of the behavior of the directly extracted graphs, and thus of the original program. We implemented the indirect extraction as the CFGex tool and performed several test-cases to show the efficiency of the algorithm.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Sound Control Flow Graph Extraction from Incomplete Java Bytecode Programs

The modular analysis of control flow of incomplete Java bytecode programs is challenging, mainly because of the complex semantics of the language, and the unknown inter-dependencies between the available and unavailable components. In this paper we describe a technique for incremental, modular extraction of control flow graphs that are provably sound w.r.t. sequences of method invocations and e...

متن کامل

Sound Control-Flow Graph Extraction for Java Programs with Exceptions

We present an algorithm to extract control-flow graphs from Java bytecode, considering exceptional flows. We then establish its correctness: the behavior of the extracted graphs is shown to be a sound over-approximation of the behavior of the original programs. Thus, any temporal safety property that holds for the extracted control-flow graph also holds for the original program. This makes the ...

متن کامل

Toward a Provably-Correct Implementation of the JVM Bytecode Verifier

This paper reports on our ongoing efforts to realize a provably-correct implementation of the Java Virtual Machine bytecode verifier. We take the perspective that bytecode verification is a data flow analysis problem, or more generally, a constraint-solving problem on lattices. We employ SPECWARE, a system available from Kestrel Institute that supports the development of programs from specifica...

متن کامل

Exception Analysis for Multithreaded Java Programs

This paper presents a static analysis that estimates uncaught exceptions in multithreaded Java programs. In Java, throwing exceptions across threads is deprecated because of the safety problem. Instead of restricting programmers’ freedom, we extend Java language to support multithreaded exception handling and propose a tool to detect uncaught exceptions in the input programs. Our analysis consi...

متن کامل

Toward a Provably - Correct Implementation of the JVMBytecode Veri

This paper reports on our ongoing eeorts to realize a provably-correct implementation of the Java Virtual Machine bytecode veriier. We take the perspective that bytecode veriication is a dataaow analysis problem, or more generally, a constraint solving problem on lattices. We employ Specware, a system available from Kestrel Institute that supports the development of programs from speciications,...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2012