Results 1 - 10
of
11
A machine-checked model for a Java-like language, virtual machine and compiler
- ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS
, 2004
"... We introduce Jinja, a Java-like programming language with a formal semantics designed to exhibit core features of the Java language architecture. Jinja is a compromise between realism of the language and tractability and clarity of the formal semantics. The following aspects are formalised: a big an ..."
Abstract
-
Cited by 80 (7 self)
- Add to MetaCart
We introduce Jinja, a Java-like programming language with a formal semantics designed to exhibit core features of the Java language architecture. Jinja is a compromise between realism of the language and tractability and clarity of the formal semantics. The following aspects are formalised: a big and a small step operational semantics for Jinja and a proof of their equivalence; a type system and a definite initialisation analysis; a type safety proof of the small step semantics; a virtual machine (JVM), its operational semantics and its type system; a type safety proof for the JVM; a bytecode verifier, i.e. data flow analyser for the JVM; a correctness proof of the bytecode verifier w.r.t. the type system; a compiler and a proof that it preserves semantics and well-typedness. The emphasis of this work is not on particular language features but on providing a unified model of the source language, the virtual machine and the compiler. The whole development has been carried out in the theorem prover Isabelle/HOL.
Java Bytecode Verification: Algorithms and Formalizations
- Journal of Automated Reasoning
, 2003
"... Bytecode verification is a crucial security component for Java applets, on the Web and on embedded devices such as smart cards. This paper reviews the various bytecode verification algorithms that have been proposed, recasts them in a common framework of dataflow analysis, and surveys the use of pro ..."
Abstract
-
Cited by 68 (0 self)
- Add to MetaCart
Bytecode verification is a crucial security component for Java applets, on the Web and on embedded devices such as smart cards. This paper reviews the various bytecode verification algorithms that have been proposed, recasts them in a common framework of dataflow analysis, and surveys the use of proof assistants to specify bytecode verification and prove its correctness.
A Type System for the Java Bytecode Language and Verifier
, 2003
"... The Java Virtual Machine executes bytecode programs that may have been sent from other, possibly untrusted, locations on the network. Since the transmitted code may be written by a malicious party or corrupted during network transmission, the Java Virtual Machine contains a bytecode verifier to chec ..."
Abstract
-
Cited by 18 (0 self)
- Add to MetaCart
The Java Virtual Machine executes bytecode programs that may have been sent from other, possibly untrusted, locations on the network. Since the transmitted code may be written by a malicious party or corrupted during network transmission, the Java Virtual Machine contains a bytecode verifier to check the code for type errors before it is run. As illustrated by reported attacks on Java run-time systems, the verifier is essential for system security. However, no formal specification of the bytecode verifier exists in the Java Virtual Machine Specification published by Sun. In this paper, we develop such a specification in the form of a type system for a subset of the bytecode language. The subset includes classes, interfaces, constructors, methods, exceptions, and bytecode subroutines. We also present a type checking algorithm and prototype bytecode verifier implementation, and we conclude by discussing other applications of this work. For example, we show how to extend our formal system to check other program properties, such as the correct use of object locks.
Verified Bytecode Subroutines
- JOURNAL OF AUTOMATED REASONING
, 2003
"... Bytecode subroutines are a major complication for Java bytecode verification: they are difficult to fit into the data flow analysis that the JVM specification suggests. Because of that, subroutines are left out or are restricted in most formalizations of the bytecode verifier. We examine the problem ..."
Abstract
-
Cited by 12 (1 self)
- Add to MetaCart
Bytecode subroutines are a major complication for Java bytecode verification: they are difficult to fit into the data flow analysis that the JVM specification suggests. Because of that, subroutines are left out or are restricted in most formalizations of the bytecode verifier. We examine the problems that occur with subroutines and give an overview of the most prominent solutions in the literature. Using the theorem prover Isabelle/HOL, we have extended our substantial formalization of the JVM and the bytecode verifier with its proof of correctness by the most general solution for bytecode subroutines.
Improving the Official Specification of Java Bytecode Verification
, 2001
"... Bytecode verification is the main mechanism to enforce type safety in the Java Virtual Machine. Since Java security is based on type safety, inadequacies and ambiguities in the official specification of bytecode verification can lead to incorrect implementations where security can be broken. This pa ..."
Abstract
-
Cited by 8 (2 self)
- Add to MetaCart
Bytecode verification is the main mechanism to enforce type safety in the Java Virtual Machine. Since Java security is based on type safety, inadequacies and ambiguities in the official specification of bytecode verification can lead to incorrect implementations where security can be broken. This paper analyzes the specification and proposes concrete improvements. The goal of this work is to increase the understanding, assurance, and usability of the Java platform.
Bytecode Verification by Model Checking
- JOURNAL OF AUTOMATED REASONING. SPECIAL
, 2003
"... Java bytecode verification is traditionally performed using dataflow analysis. We investigate an alternative based on reducing bytecode verification to model checking. First, we analyze the complexity and scalability of this approach. We show experimentally that, despite an exponential worst-case ti ..."
Abstract
-
Cited by 8 (0 self)
- Add to MetaCart
Java bytecode verification is traditionally performed using dataflow analysis. We investigate an alternative based on reducing bytecode verification to model checking. First, we analyze the complexity and scalability of this approach. We show experimentally that, despite an exponential worst-case time complexity, model checking type-correct bytecode using an explicit-state on-the-fly model checker is feasible in practice, and we give a theoretical account why this is the case. Second, we formalize our approach using Isabelle/HOL and prove its correctness. In doing so we build on the formalization of the Java Virtual Machine and dataflow analysis framework of Pusch and Nipkow and extend it to a more general framework for reasoning about model-checking based analysis. Overall, our work constitutes the first comprehensive investigation of the theory and practice of bytecode verification by model checking.
Verified Bytecode Verification and Type-Certifying Compilation
- Journal of Logic and Algebraic Programming
, 2003
"... This article presents a type certifying compiler for a subset of Java and proves the type correctness of the bytecode it generates in the proof assistant Isabelle. The proof is performed by defining a type compiler that emits a type certificate and by showing a correspondence between bytecode and th ..."
Abstract
-
Cited by 5 (1 self)
- Add to MetaCart
This article presents a type certifying compiler for a subset of Java and proves the type correctness of the bytecode it generates in the proof assistant Isabelle. The proof is performed by defining a type compiler that emits a type certificate and by showing a correspondence between bytecode and the certificate which entails welltyping. The basis for this work is an extensive formalization of the Java bytecode type system, which is first presented in an abstract, lattice-theoretic setting and then instantiated to Java types.
Completeness of a bytecode verifier and a certifying Java-to-JVM compiler
, 2003
"... During an attempt to prove that the Java-to-JVM compiler generates code that is accepted by the Bytecode Verifier we found examples of legal Java programs that are rejected by the verifier. We propose therefore to restrict the socalled rules of definite assignment for the try-finally statement as we ..."
Abstract
-
Cited by 5 (0 self)
- Add to MetaCart
During an attempt to prove that the Java-to-JVM compiler generates code that is accepted by the Bytecode Verifier we found examples of legal Java programs that are rejected by the verifier. We propose therefore to restrict the socalled rules of definite assignment for the try-finally statement as well as for the labeled statement such that the example programs are no longer allowed. Then we can prove, using the framework of Abstract State Machines, that each program from the slightly restricted Java language is accepted by the Bytecode Verifier. In the proof we use a new notion of bytecode type assignment without subroutine call stacks.
Interprocedural analysis for JVML verification
- Proceedings of the 4th ECOOP Workshop on Formal Techniques for Java-like Programs
, 2002
"... Abstract. Some of the problems encountered in the verification of subroutines in the Java Virtual Machine Language (JVML) are similar to problems already solved for interprocedural analysis in high level languages. This naturally leads to the question of whether techniques for the latter may be succ ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
Abstract. Some of the problems encountered in the verification of subroutines in the Java Virtual Machine Language (JVML) are similar to problems already solved for interprocedural analysis in high level languages. This naturally leads to the question of whether techniques for the latter may be successfully applied to the former. To this end, we apply a general framework for interprocedural abstract interpretation to JVML0, a subset of JVML that isolates subroutines. 1
An approach to the generation of high-assurance Java Card applets
- In Proc. 2nd NSA Conference on High Con Software and Systems (HCSS'02
, 2002
"... ..."

