A Programmer Friendly Modular Definition of the Semantics of Java

  • Egon Börger
  • Wolfram Schulte
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1523)


We propose in this paper a definition of the semantics of Java programs which can be used as a basis for the standardization of the language and of its implementation on the Java Virtual Machine. The definition provides a machine and system independent view of the language as it is seen by the Java programmer. It takes care to directly reflect the description in the Java language reference manual so that the basic design decisions can be checked by standardizers and implementors against a mathematical model.

Our definition is the basis for a related definition we give in a sequel to this paper for the implementation of Java on the Java Virtual Machine as described in the language and in the Virtual Machine reference manuals.


Main Memory Transition Rule Dynamic Function Abstract Syntax Static Block 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    G. Bella and E. Riccobene. Formal analysis of the Kerberos authentification system. Journal of Universal Computer Science (J.UCS), 1997.Google Scholar
  2. 2.
    E. Börger. Why use evolving algebras for hardware and software engineering. In SOFSEM’95 22nd Seminar on Current Trends in Theory and Practice of Informatics, Springer LNCS 1012, 1995.Google Scholar
  3. 3.
    E. Börger, C. Beierle, I. Durdanovic, U. GlÄsser, and E. Riccobene. Refining abstract machine specifications of the steam boiler control to well documented executable code. In Formal Methods for Industrial Applications. Specifying and Programming the Steam-Boiler Control, Springer LNCS State-of-the-Art Survey 1165, 1996.Google Scholar
  4. 4.
    E. Börger and G. Del Castillo. A formal method for provably correct composition of a real-life processor out of basic components (the APE100 reverse engineering project). In Proc. First IEEE International Conference on Engineering of Complex Computer Systems (ICECCS’95). IEEE Computer Society Press, 1995.Google Scholar
  5. 5.
    E. Börger and I. Durdanovic. Correctness of compiling Occam to transputer code. The Computer Journal, 39, 1996.Google Scholar
  6. 6.
    E. Börger, I. Durdanovic, and D. Rosenzweig. Occam: Specification and compiler correctness. Part I: Simple mathematical interpreters. In E.-R. Olderog, editor, Proc. PROCOMET’94 (IFIP Working Conference on Programming Concepts, Methods and Calculi), 1994.Google Scholar
  7. 7.
    E. Börger, U. GlÄsser, and W. Müller. Formal definition of an abstract VHDL’93 simulator by EA-machines. In C. Delgado Kloos and P.T. Breuer, editors, Formal Semantics for VHDL. Kluwer Academic Publishers, 1995.Google Scholar
  8. 8.
    E. Börger and S. Mazzanti. A practical method for rigorously controllable hardware design. In ZUM’97: The Z Formal Specification Notation, Springer LNCS 1212, 1997.CrossRefGoogle Scholar
  9. 9.
    E. Börger and L. Mearelli. Integrating ASMs into the software development lifecycle. Journal of Universal Computer Science, Special ASM Issue, 3.5, 1997.Google Scholar
  10. 10.
    E. Börger and D. Rosenzweig. A mathematical definition of full Prolog. Science of Computer Programming, 24, 1995.Google Scholar
  11. 11.
    E. Börger and D. Rosenzweig. The WAM-definition and compiler correctness. In L. Plümer C. Beierle, editor, Logic Programming: Formal Methods and Practical Applications. Elsevier Science B.V./North-Holland, 1995.Google Scholar
  12. 12.
    E. Börger and W. Schulte. A programmer friendly modular definition of the semantics of Java. In R. Berghammer and F. Simon, editors, Programming Languages and Fundamentals of Programming. Technical report, Christian Albrechts Universit Ät Kiel, Institut für Informatik und Praktische Mathematik, 1997.Google Scholar
  13. 13.
    E. Börger and W. Schulte. Defining the Java Virtual Machine as platform for provably correct Java compilation. In J. Gruska, editor, 23rd International Symposium on Mathematical Foundations of Computer Science, Brno, Czech Republic, August 24–28, 1998, Springer LNCS, to appear, 1998.Google Scholar
  14. 14.
    E. Börger and W. Schulte. A modular design for the Java VM architecture. In E. Börger, editor, Architecture Design and Validation Methods. Springer Verlag, to appear, 1998.Google Scholar
  15. 15.
    P. Cenciarelli, A. Knapp, B. Reus, and M. Wirsing. An event-based structural operational semantics of multi-threaded Java. 1998. This volume.Google Scholar
  16. 16.
    R. M. Cohen. Defensive Java virtual machine version 0.5 alpha release. manuscript, Computer Logic International.Google Scholar
  17. 17.
    G. Del Castillo, I. DurdanoviÇ, and U. GlÄsser. An Evolving Algebra abstract machine. In H. Kleine Büning, editor, Computer Science Logic (CSL’95), Springer LNCS 1092, 1996.Google Scholar
  18. 18.
    S. Drossopoulou and S. Eisenbach. Java is type safe-probably. 1998. This volume.Google Scholar
  19. 19.
    J. Gosling, B. Joy, and G. Steele. The Java(tm) Language Specification. Addison Wesley, 1996.Google Scholar
  20. 20.
    Y. Gurevich. Evolving algebras 1993: Lipari guide. In E. Börger, editor, Specification and Validation Methods. Oxford University Press, 1995.Google Scholar
  21. 21.
    J. Huggins. Kermit: Specification and verification. In E. Börger, editor, Specification and Validation Methods. Oxford University Press, 1995.Google Scholar
  22. 22.
    G. Kahn. Natural semantics. Technical report, INRIA Rapport de Recherche No. 601, Février 1987.Google Scholar
  23. 23.
    T. Lindholm and F. Yellin. The Java(tm) Virtual Machine Specification. Addison Wesley, 1996.Google Scholar
  24. 24.
    B. Meyer. Object-oriented Software Construction. Prentice Hall, 1988.Google Scholar
  25. 25.
    P. D. Mosses. Action Semantics. Cambridge University Press, 1992.Google Scholar
  26. 26.
    Th. Nipkow and D. von Oheimb. Javalight is type-safe-definitely. 1998. This volume.Google Scholar
  27. 27.
    G. Plotkin. A structural approach to operational semantics. Technical report, Internal Report, CS Department, Aarhus University, DAIMI FN-19, 1997.Google Scholar
  28. 28.
    A. Poetzsch-Heffter. Prototyping realistic programming languages based on formal specifications. Acta Informatica, 34, 1997.Google Scholar
  29. 29.
    K. Popper. Logik der Forschung. 1935.Google Scholar
  30. 30.
    Z. Qian. A formal specification of Java(tm) Virtual Machine for objects, methods and subroutines. This volume, 1998.Google Scholar
  31. 31.
    V. Saraswat. Java is not type-safe. manuscript, AT& Research, New York, 1997.Google Scholar
  32. 32.
    G. Schellhorn and W. Ahrendt. Reasoning about Abstract State Machines: The WAM Case Study. Journal of Universal Computer Science (J.UCS), 1997.Google Scholar
  33. 33.
    E.G. Sirer, S. McDirmid, and B. Bershad. Kimera: A Java system security architecture. Web pages at:, 1997.
  34. 34.
    R. Stata and M. Abadi. A type system for Java bytecode subroutines. In Proceedings of the 25th Annual SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 1998.Google Scholar
  35. 35.
    D. Syme. Proving Java type soundness. 1998. This volume.Google Scholar
  36. 36.
    Ch. Wallace. The semantics of the C++ programming language. In E. örger, editor, Specification and Validation Methods. Oxford University Press, 1995.Google Scholar
  37. 37.
    Ch. Wallace. The semantics of the Java programming language: Preliminary version. Technical report, University of Michigan, Electrical Engineering and Computer Science, Ann Arbor, 1997.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1999

Authors and Affiliations

  • Egon Börger
    • 1
  • Wolfram Schulte
    • 2
  1. 1.Dipartimento di Informatica, IUniversità di PisaPisaItaly
  2. 2.FakultÄt für Informatik, DUniversitÄt UlmUlmGermany

Personalised recommendations