Our primary interest is in better understanding the class of abstract computations captured by Yampa. Unfortunately, arrows are not concrete enough to do this with precision. To remedy this situation we introduce the concept of \emph{commutative arrows} that capture a kind of non-interference property of concurrent computations. We also add an \emph{init} operator, and identify a crucial law that captures the causal nature of arrow effects. We call the resulting computational model \emph{causal commutative arrows}.
To study this class of computations in more detail, we define an extension to the simply typed lambda calculus called \emph{causal commutative arrows} (CCA), and study its properties. Our key contribution is the identification of a normal form for CCA called \emph{causal commutative normal form} (CCNF). By defining a terminating normalization procedure we have developed an optimization strategy that yields dramatic improvements in performance over conventional implementations of arrows. We have implemented this technique in Haskell, and conducted benchmarks that validate the effectiveness of our approach. When combined with stream fusion, the overall methodology can result in speed-ups of greater than two orders of magnitude.
START Conference Manager (V2.56.8 - Rev. 748M)