A type system for Java bytecode subroutines
- 1 January 1999
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Programming Languages and Systems
- Vol. 21 (1) , 90-137
- https://doi.org/10.1145/314602.314606
Abstract
Java is typically compiled into an intermediate language, JVML, that is interpreted by the Java Virtual Machine. Because mobile JVML code is not always trusted, a bytecode verifier enforces static constraints that prevent various dynamic errors. Given the importance of the bytecode verifier for security, its current descriptions are inadequate. This article proposes using typing rules to describe the bytecode verifier because they are more precise than prose, clearer than code, and easier to reason about than either. JVML has a subroutine construct which is used for the compilation of Java's try-finally statement. Subroutines are a major source of complexity for the bytecode verifier because they are not obviously last-in/first-out and because they require a kind of polymorphism. Focusing on subroutines, we isolate an interesting, small subset of JVML. We give typing rules for this subset and prove their correctness. Our type system constitutes a sound basis for bytecode verification and a rational reconstruction of a delicate part of Sun's bytecode verifier.Keywords
This publication has 4 references indexed in Scilit:
- A specification of Java loading and bytecode verificationPublished by Association for Computing Machinery (ACM) ,1998
- A type system for object initialization in the Java bytecode languagePublished by Association for Computing Machinery (ACM) ,1998
- Javalight is type-safe---definitelyPublished by Association for Computing Machinery (ACM) ,1998
- Java is type safe — ProbablyPublished by Springer Nature ,1997