EN FR
EN FR


Section: New Results

Formal Proofs about Explicitly Parallel Programs with Clocks

Participants : Alain Ketterlin, Éric Violard, Tomofumi Yuki, Paul Feautrier.

We have continued this year our work on formalizing the happens-before relation in explicitly parallel programs of the X10 family. Our goal is to define, for certain classes of programs, a relation between instances of elementary instructions that guarantees that one instance necessarily executes before another. Our toy language includes static-control counted loops and conditionals, as well as the usual finish and async parallel constructs. Moreover, parallel activities can synchronize though the use of clocks, which are barriers with dynamic membership. Clocks partition the execution into phases, and profoundly modify the happens-before relation.

This year's work has focused on correctly accounting for the possibility to define specific activities that execute irrespective of the discipline of the clock in scope, so-called detached activities. The presence of such activities modifies the notion of phase number, because they let their instructions execute across a range of clock-phases. Our generic notion of phase ranking had to be modified. Similarly, the natural semantics we defined had to be slightly modified to correctly represent the parallel execution of both clocked and detached activities. In practice, almost every lemma of the Coq proof has changed, and new definitions were introduced. The new definition of happens-before preserves all desirable properties: it is correct and complete, and is a strict partial order. There is one unpleasant aspect of detached activities that had a strong impact on happens-before: the possibility of deadlocks. A significant part of new definitions and lemmas are devoted to explicit the conditions under which programs terminate. A useful outcome of this part of the mechanization is a static, compile-time deadlock detection criterion.

Most of this work has been described in a paper currently under submission (this paper will be on HAL as soon as anonymity constraints permit). However, the diversity of themes covered in this research (compilation of static-control programs, especially those that fit the polyhedral model, but also semantic modeling of explicitly parallel programs, and formal proofs) make us contemplate the redaction of a much longer paper, which we plan to start at the beginning of next year. At the same time, this work (especially the part about deadlocks) led us to start designing an happens-before relation for a language where multiple clocks can share (part of) their scopes. We hope to be able to advance the formalization of this new family of languages in the near future.