## Section: New Results

### Static Analysis of OpenStream Programs

Participants : Albert Cohen [Inria Parkas team] , Alain Darte, Paul Feautrier.

In the context of the ManycoreLabs project (see
Section
8.1 ), we also studied the
applicability of polyhedral techniques to the parallel language
OpenStream [31] . When applicable, polyhedral techniques are indeed
invaluable for compile-time debugging and for generating efficient code well
suited to a target architecture. OpenStream is a two-level language in which a
control program directs the initialization of parallel task instances that
communicate through *streams*, with possibly multiple writers and readers.
It has a fairly complex semantics in its most general setting, but we
restricted ourselves to the case where the control program is sequential, which
is representative of the majority of the OpenStream applications.

In contrast to X10, this restriction offers deterministic concurrency by construction, but deadlocks are still possible. We showed that, if the control program is polyhedral, one may statically compute, for each task instance, the read and write indices to each of its streams, and thus reason statically about the dependences among task instances (the only scheduling constraints in this polyhedral subset). If the control program has nested loops, communications use one-dimensional channels in a form of linearization, and these indices may be polynomials of arbitrary degree, thus requiring to extend to polynomials the standard polyhedral techniques for dependence analysis, scheduling, and deadlock detection. Modern SMT allow to solve polynomial problems, albeit with no guarantee of success; the approach previously developed by P. Feautrier [6] may offer an alternative solution.

The usual way of disproving deadlocks is by exhibiting a schedule for the program operations, a well-known problem for polyhedral programs where dependences can be described by affine constraints. In the case of OpenStream, we established two important results related to deadlocks: 1) a characterization of deadlocks in terms of dependence paths, which implies that streams can be safely bounded as soon as a schedule exists with such sizes, 2) the proof that deadlock detection is undecidable, even for polyhedral OpenStream.

Details of this work are available in a research report [10] . It will be presented at the international workshop IMPACT'16 [2] . Some further developments are in progress for scheduling OpenStream programs using polynomial techniques, see Section 6.4 .