Extending Operational Semantics of the Java Bytecode

  • Patryk Czarnik
  • Aleksy Schubert
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4912)


A proof-carrying code infrastructure can ensure safety of global computers. Such an infrastructure requires sound and complete semantics of the global computing platform. Bicolano is an operational semantics of the major part of the Java bytecode language. We present here two extension frameworks for the semantics and discuss their different features. Both frameworks are made in a modular fashion. The first one, so called horizontal, allows to extend states with additional information that traces a running program behaviour (e.g. memory consumption). The second one, so called vertical, additionally allows an extension to supplement the behaviour specified in the original semantics. A comparison of these frameworks is presented. In particular, we prove that the horizontal framework can be simulated by the vertical one and show an example of an extension which cannot be realised in the horizontal one, but can be realised in the vertical one. However, extensions in the horizontal framework are less memory consuming and conceptually simpler. In this light, the choice of the framework to use should depend on a particular application.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [AF00]
    Appel, A.W., Felty, A.P.: A semantic model of types and machine instructions for proof-carrying code. In: Principles of Programming Languages. Association of Computing Machinery Press (2000)Google Scholar
  2. [BC04]
    Bertot, Y., Castéran, P.: Interactive Theorem Proving and Program Development. Coq’Art: The Calculus of Inductive Constructions. In: Texts in Theoretical Computer Science, Springer, Heidelberg (2004)Google Scholar
  3. [BH06]
    Beringer, L., Hofmann, M.: A bytecode logic for JML and types. In: Kobayashi, N. (ed.) APLAS 2006. LNCS, vol. 4279, pp. 389–405. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  4. [Chr04]
    Chrząszcz, J.: Modules in Type Theory with Generative Definitions. PhD thesis, Warsaw University and University of Paris-Sud (January 2004)Google Scholar
  5. [Con06]
    Mobius Consortium. Deliverable 3.1: Bytecode specification language and program logic (2006),
  6. [Coq04]
    Coq development team. The Coq proof assistant reference manual V8.0. Technical Report 255, INRIA, France, mars (2004),
  7. [KN06]
    Klein, G., Nipkow, T.: A machine-checked model for a Java-like language, virtual machine and compiler. ACM Transactions on Programming Languages and Systems 28(4), 619–695 (2006)CrossRefGoogle Scholar
  8. [LH96]
    Liang, S., Hudak, P.: Modular Denotational Semantics for Compiler Construction. In: Riis Nielson, H. (ed.) ESOP 1996. LNCS, vol. 1058, pp. 219–234. Springer, Heidelberg (1996)Google Scholar
  9. [LY99]
    Lindholm, T., Yellin, F.: The JavaTM Virtual Machine Specification, 2nd edn. Sun Microsystems, Inc. (1999),
  10. [Mos92]
    Mosses, P.D.: Action Semantics. Cambridge Tracts in Theoretical Computer Science, vol. 26. Cambridge University Press, Cambridge (1992)zbMATHGoogle Scholar
  11. [Nec97]
    Necula, G.C.: Proof-carrying code. In: Principles of Programming Languages, pp. 106–119. Association of Computing Machinery Press, New York, NY, USA (1997)Google Scholar
  12. [NN99]
    Nielson, F., Nielson, H.R.: Type and effect systems. In: Olderog, E.-R., Steffen, B. (eds.) Correct System Design. LNCS, vol. 1710, pp. 114–136. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  13. [Pic06]
    Pichardie, D.: Bicolano – Byte Code Language in Coq (2006),
  14. [SS04]
    Skalka, C., Smith, S.F.: History effects and verification. In: Chin, W.-N. (ed.) APLAS 2004. LNCS, vol. 3302, pp. 107–128. Springer, Heidelberg (2004)Google Scholar
  15. [Sun03]
    Sun Microsystems Inc., 4150 Network Circle, Santa Clara, California 95054. Connected Limited Device Configuration. Specification Version 1.1. JavaTM 2 Platform, Micro Edition (J2METM) (March 2003),
  16. [Tof90]
    Tofte, M.: Type Inference for Polymorphic References. Information and Computation 89(1), 1–34 (1990)zbMATHCrossRefMathSciNetGoogle Scholar
  17. [TT97]
    Tofte, M., Talpin, J.-P.: Region-Based Memory Management. IC 132(2), 109–176 (1997)zbMATHMathSciNetGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2008

Authors and Affiliations

  • Patryk Czarnik
    • 1
  • Aleksy Schubert
    • 1
  1. 1.Institute of InformaticsUniversity of WarsawWarsawPoland

Personalised recommendations