Louis Mandel, Josh Milthorpe, Olivier Tardieu
ACM SIGPLAN Workshop on X10
Publication year: 2016
The X10 programming language offers a simple but expressive model of concurrency and distribution. Domain Specific Languages embedded in X10 (eDSL) can build upon this model to offer scheduling and placement facilities tailored to particular patterns of applications, e.g. stencils or graph traversals. They exploit X10’s rich type system and closures to offer flexible and precise functional interfaces, however, they are restricted by X10’s rigid syntax. In this work, we propose an overloading mechanism enabling eDSLs to redefine or extend the behavior of X10 control structures. Loops can be parallelized or distributed. Exception handlers can triage and process exceptions arising from concurrent tasks. While our overloading mechanism requires augmenting the X10 syntax with new forms, the change to the syntax is small and intuitive. Overall, the combination of syntax and semantics we propose improves code readability over traditional X10 at no cost in run time performance.