skip to main content
research-article
Open access

Java bytecode verification via static single assignment form

Published: 01 August 2008 Publication History

Abstract

Java Virtual Machines (JVMs) traditionally perform bytecode verification by way of an iterative dataflow analysis. Bytecode verification is necessary to ensure type safety because temporary variables in the JVM are not statically typed. We present an alternative verification mechanism that transforms JVM bytecode into Static Single Assignment Form (SSA) and thereby propagates definitions directly to uses. Type checking at control flow merge points can then be performed in a single pass.
Our prototype implementation of the new algorithm is faster than the standard JVM bytecode verifier. It has the additional benefit of generating SSA as a side effect, which may be immediately useful for a subsequent dynamic compilation stage.

References

[1]
Amme, W., Dalton, N., von Ronne, J., and Franz, M. 2001. SafeTSA: A type safe and referentially secure mobile-code representation based on static single assignment form. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM Press, New York, NY, 137--147.
[2]
Davey, B. A. and Priestley, H. A. 1990. Introduction to Lattices and Order. Cambridge University Press.
[3]
Fitzgerald, R., Knoblock, T. B., Ruf, E., Steensgaard, B., and Tarditi, D. 2000. Marmot: An optimizing compiler for Java. Softw. Prac. Exper. 30, 3, 199--232.
[4]
Freund, S. N. 1998. The costs and benefits of java bytecode subroutines. In Proceedings of the Formal Underpinnings of Java Workshop at OOPSLA.
[5]
Freund, S. N. and Mitchell, J. C. 1999a. A formal specification of the Java bytecode language and bytecode verifier. In Proceeings of the ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages & Applications (OOPSLA'99). ACM Press, NY, NY, 147--166.
[6]
Freund, S. N. and Mitchell, J. C. 1999b. Specification and verification of Java bytecode subroutines and exceptions. Tech. rep. CS-TN-99-91, Stanford University.
[7]
Freund, S. N. and Mitchell, J. C. 2003. A type system for the Java bytecode language and verifier. J. Automa. Reason. 30, 3-4, 271--321.
[8]
Gal, A., Probst, C. W., and Franz, M. 2005. Structural encoding of static single assignment form. In Proceedings of the 4th International Workshop on Compiler Optimization Meets Compiler Verification (COCV'05). Elsevier Science Publishers, Amsterdam, The Netherlands.
[9]
League, C., Trifonov, V., and Shao, Z. 2001. Functional Java Bytecode. In Proceedings of the 5th World Conference on Systemics, Cybernetics, and Informatics Workshop on Intermediate Representation Engineering for the Java Virtual Machine.
[10]
Leroy, X. 2003. Java bytecode verification: Algorithms and formalizations. J. Automat. Reason. 30, 3/4, 235--269.
[11]
Lindholm, T. and Yellin, F. 1996. The Java Virtual Machine Specification. Addison Wesley, Reading, MA.
[12]
Stärk R. and Schmid, J. 2001. Java bytecode verification is not possible (extended abstract). In Proceedings of Eurocast'01 Formal Methods and Tools for Computer Science, R. Moreno-Díaz and A. Quesada-Arencibia, Eds. 232--234.
[13]
Stärk, R., Schmid, J., and Börger, E. 2001. Java and the Java Virtual Machine: Definition, Verification, Validation. Springer-Verlag, Berlin, Germany.
[14]
Stata, R. and Abadi, M. 1999. A type system for Java bytecode subroutines. ACM Trans. Program. Lang. Syst. 21, 1, 90--137.

Cited By

View all
  • (2023)Experimental design and analysis of polyhedral optimization algorithm based on LoongArch64 architectureProceedings of the 2023 2nd International Conference on Algorithms, Data Mining, and Information Technology10.1145/3625403.3626204(212-217)Online publication date: 15-Sep-2023
  • (2023)Unveiling Vulnerable Smart Contracts: Toward Profiling Vulnerable Smart Contracts using Genetic Algorithm and Generating Benchmark DatasetBlockchain: Research and Applications10.1016/j.bcra.2023.100171(100171)Online publication date: Nov-2023
  • (2019)Using abstract interpretation to add type checking for interfaces in Java bytecode verificationTheoretical Computer Science10.1016/j.tcs.2010.01.026411:22-24(2174-2201)Online publication date: 5-Jan-2019

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Transactions on Programming Languages and Systems
ACM Transactions on Programming Languages and Systems  Volume 30, Issue 4
July 2008
358 pages
ISSN:0164-0925
EISSN:1558-4593
DOI:10.1145/1377492
Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 August 2008
Accepted: 01 March 2007
Revised: 01 December 2006
Received: 01 September 2006
Published in TOPLAS Volume 30, Issue 4

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Java bytecode verification
  2. dataflow analysis
  3. static single assignment form

Qualifiers

  • Research-article
  • Research
  • Refereed

Funding Sources

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)58
  • Downloads (Last 6 weeks)8
Reflects downloads up to 02 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2023)Experimental design and analysis of polyhedral optimization algorithm based on LoongArch64 architectureProceedings of the 2023 2nd International Conference on Algorithms, Data Mining, and Information Technology10.1145/3625403.3626204(212-217)Online publication date: 15-Sep-2023
  • (2023)Unveiling Vulnerable Smart Contracts: Toward Profiling Vulnerable Smart Contracts using Genetic Algorithm and Generating Benchmark DatasetBlockchain: Research and Applications10.1016/j.bcra.2023.100171(100171)Online publication date: Nov-2023
  • (2019)Using abstract interpretation to add type checking for interfaces in Java bytecode verificationTheoretical Computer Science10.1016/j.tcs.2010.01.026411:22-24(2174-2201)Online publication date: 5-Jan-2019

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Full Access

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media