Jinja with Threads

Andreas Lochbihler 🌐

December 3, 2007

Abstract

We extend the Jinja source code semantics by Klein and Nipkow with Java-style arrays and threads. Concurrency is captured in a generic framework semantics for adding concurrency through interleaving to a sequential semantics, which features dynamic thread creation, inter-thread communication via shared memory, lock synchronisation and joins. Also, threads can suspend themselves and be notified by others. We instantiate the framework with the adapted versions of both Jinja source and byte code and show type safety for the multithreaded case. Equally, the compiler from source to byte code is extended, for which we prove weak bisimilarity between the source code small step semantics and the defensive Jinja virtual machine. On top of this, we formalise the JMM and show the DRF guarantee and consistency. For description of the different parts, see Lochbihler's papers at FOOL 2008, ESOP 2010, ITP 2011, and ESOP 2012.

License

BSD License

History

October 20, 2017
add an atomic compare-and-swap operation for volatile fields (revision a6189b1d6b30)
May 16, 2013
support for non-deterministic memory allocators (revision cc3344a49ced)
November 21, 2012
type safety proof for the Java memory model, allow spurious wake-ups (revision 76063d860ae0)
February 16, 2012
added example programs (revision bf0b06c8913d)
July 21, 2011
new interruption model, generalized JMM proof of DRF guarantee, allow class Object to declare methods and fields, simplified subtyping relation, corrected division and modulo implementation (revision 46e4181ed142)
February 2, 2011
simplified code generator setup new random scheduler (revision 3059dafd013f)
December 16, 2010
improved version of the Java memory model, also for bytecode executable scheduler for source code semantics (revision 1f41c1842f5a)
October 15, 2010
preliminary version of the Java memory model for source code (revision 02fee0ef3ca2)
June 28, 2010
new thread interruption model (revision c0440d0a1177)
June 8, 2010
added thread interruption; new abstract memory model with sequential consistency as implementation (revision 0cb9e8dbd78d)
November 30, 2009
extended compiler correctness proof to infinite and deadlocking computations (revision e50282397435)
April 27, 2009
added verified compiler from source code to bytecode; encapsulate native methods in separate semantics (revision e4f26541e58a)
April 23, 2008
added bytecode formalisation with arrays and threads, added thread joins (revision f74a8be156a7)

Topics

Session JinjaThreads