skip to main content
research-article
Free Access

Java bytecode verification via static single assignment form

Published:01 August 2008Publication History
Skip Abstract Section

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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Davey, B. A. and Priestley, H. A. 1990. Introduction to Lattices and Order. Cambridge University Press.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Freund, S. N. 1998. The costs and benefits of java bytecode subroutines. In Proceedings of the Formal Underpinnings of Java Workshop at OOPSLA.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  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.Google ScholarGoogle Scholar
  10. Leroy, X. 2003. Java bytecode verification: Algorithms and formalizations. J. Automat. Reason. 30, 3/4, 235--269. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Lindholm, T. and Yellin, F. 1996. The Java Virtual Machine Specification. Addison Wesley, Reading, MA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  13. Stärk, R., Schmid, J., and Börger, E. 2001. Java and the Java Virtual Machine: Definition, Verification, Validation. Springer-Verlag, Berlin, Germany. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Stata, R. and Abadi, M. 1999. A type system for Java bytecode subroutines. ACM Trans. Program. Lang. Syst. 21, 1, 90--137. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Java bytecode verification via static single assignment form

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in

          Full Access

          • 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

            Copyright © 2008 ACM

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 1 August 2008
            • Accepted: 1 March 2007
            • Revised: 1 December 2006
            • Received: 1 September 2006
            Published in toplas Volume 30, Issue 4

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article
            • Research
            • Refereed

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader
          About Cookies On This Site

          We use cookies to ensure that we give you the best experience on our website.

          Learn more

          Got it!