Coqa: Concurrent Objects with Quantized Atomicity

Coqa is a new object-oriented language, (for Concurrent objects with quantized atomicity), which builds concurrency and atomicity-by-design deeply into the object model. This ongoing project aims to reconsider of the "right" concurrency model for tightly-coupled computations that can be easily deployable on multi-core CPUs. This project is now a joint collaboration between JHU and SUNY Binghamton.

The design of Coqa follows six principles that we believe are crucial for a concurrent programming language:

  • Good Concurrency Properties Preserved by Default
  • Always En Guarde While Sharing
  • The Importance of Being Ubiquitously Atomic
  • Atomicity is Not Necessarily All or Nothing
  • Optimistic Atomicity is Not Always the Best Policy
  • Put OO-Style Concurrency in OO Languages
From a programming perspective, Coqa has three desirable properties, from higher- to lower-level as follows:
  • Quantized atomicity -- Each method is composed of several discrete quanta, and execution of each quantum is serializable regardless of the interleaving of the actual execution.
  • Mutual exclusion within tasks -- Our language guarantees state change happens in a predictable way, even across different quanta of a task.
  • Race freedom -- No race conditions ever arise in object field access.
Coqa currently consists of a formal system, KernelCoqa and a prototype implementation CoqaJava.

Publications

  • Yu David Liu, Xiaoqi Lu, and Scott Smith. Coqa: Concurrent Objects with Quantized Atomicity. Compiler Construction (CC), 2008. slides

    Abstract: This paper introduces a new language model, Coqa, for deeply embedding concurrent programming into objects. Every program written in our language has the desirable behaviors of atomicity, mutual exclusion, and race freedom automatically built in. A key property of our model is the notion of quantized atomicity: every concurrent program execution can be viewed as being divided into quantum regions of atomic execution, greatly reducing the number of interleavings to consider. So rather than building atomicity locally, with small declared zones, we build it globally, down from the top. We justify our approach both from a theoretical basis by showing that a formal representation, KernelCoqa, has provable quantized atomicity properties, and by implementing CoqaJava, a Java extension incorporating all of the Coqa features.

  • Xiaoqi Lu. Coqa: a Concurrent Programming Model with Ubiquitous Atomicity. PhD Thesis, The Johns Hopkins University, November 2007.