### Abstract

We introduce Jinja, a Java-like programming language with a formal semantics designed to exhibit core features of the Java language architecture. Jinja is a compromise between realism of the language and tractability and clarity of the formal semantics. The following aspects are formalised: a big and a small step operational semantics for Jinja and a proof of their equivalence; a type system and a definite initialisation analysis; a type safety proof of the small step semantics; a virtual machine (JVM), its operational semantics and its type system; a type safety proof for the JVM; a bytecode verifier, i.e. data flow analyser for the JVM; a correctness proof of the bytecode verifier w.r.t. the type system; a compiler and a proof that it preserves semantics and well-typedness. The emphasis of this work is not on particular language features but on providing a unified model of the source language, the virtual machine and the compiler. The whole development has been carried out in the theorem prover Isabelle/HOL.

### License

BSD License

### Topics

- Computer science/Programming languages/Language definitions

### Related publications

- Klein, G., & Nipkow, T. (2006). A machine-checked model for a Java-like language, virtual machine, and compiler. ACM Transactions on Programming Languages and Systems, 28(4), 619–695. https://doi.org/10.1145/1146809.1146811
- Alternate versions

### Session Jinja

- Auxiliary
- Type
- Decl
- TypeRel
- Value
- Objects
- Exceptions
- Expr
- State
- BigStep
- SmallStep
- SystemClasses
- WellForm
- WWellForm
- Equivalence
- WellType
- WellTypeRT
- DefAss
- Conform
- Progress
- JWellForm
- TypeSafe
- Annotate
- Examples
- execute_Bigstep
- execute_WellType
- JVMState
- JVMInstructions
- JVMExecInstr
- JVMExceptions
- JVMExec
- JVMDefensive
- JVMListExample
- Semilat
- Err
- Opt
- Product
- Listn
- Semilattices
- Typing_Framework_1
- SemilatAlg
- Typing_Framework_err
- Kildall_1
- Kildall_2
- LBVSpec
- LBVCorrect
- LBVComplete
- Abstract_BV
- SemiType
- JVM_SemiType
- Effect
- EffectMono
- BVSpec
- TF_JVM
- Typing_Framework_2
- BVExec
- LBVJVM
- BVConform
- BVSpecTypeSafe
- BVNoTypeError
- BVExample
- J1
- J1WellForm
- PCompiler
- Hidden
- Compiler1
- Correctness1
- Compiler2
- Correctness2
- Compiler
- TypeComp
- Jinja

### Depends on

- List Index

### Used by

- A data flow analysis algorithm for computing dominators
- JinjaDCI: a Java semantics with dynamic class initialization
- Backing up Slicing: Verifying the Interprocedural Two-Phase Horwitz-Reps-Binkley Slicer
- Towards Certified Slicing

### Auto-related entries

- CoreC++

## Cite

×

Jinja-AFP

    @article{Jinja-AFP,
      author  = {Gerwin Klein and Tobias Nipkow},
      title   = {Jinja is not Java},
      journal = {Archive of Formal Proofs},
      month   = {June},
      year    = {2005},
      note    = {\url{https://isa-afp.org/entries/Jinja.html},
                 Formal proof development},
      ISSN    = {2150-914x},
    }

Download

## Download

× Download latest

Older releases:

- Sep 13, 2023 : Isabelle2023
- Oct 27, 2022 : Isabelle2022
- Dec 14, 2021 : Isabelle2021-1
- Feb 23, 2021 : Isabelle2021
- Apr 18, 2020 : Isabelle2020
- Jun 11, 2019 : Isabelle2019
- Aug 16, 2018 : Isabelle2018
- Oct 10, 2017 : Isabelle2017
- Dec 17, 2016 : Isabelle2016-1
- Feb 22, 2016 : Isabelle2016
- May 27, 2015 : Isabelle2015
- Aug 28, 2014 : Isabelle2014
- Dec 11, 2013 : Isabelle2013-2
- Nov 17, 2013 : Isabelle2013-1
- Feb 16, 2013 : Isabelle2013
- May 24, 2012 : Isabelle2012
- Oct 11, 2011 : Isabelle2011-1
- Feb 11, 2011 : Isabelle2011
- Jul 1, 2010 : Isabelle2009-2
- Dec 12, 2009 : Isabelle2009-1
- Apr 29, 2009 : Isabelle2009
- Jun 10, 2008 : Isabelle2008
- Nov 27, 2007 : Isabelle2007
- Aug 8, 2006 : Isabelle2005
- Oct 14, 2005 : Isabelle2005