Recursive Array Comprehensions in a Call-by-Value Language
A. Šinkarovs, S.-B. Scholz, R. Stewart, and H.-N. Vießmann, “Recursive array comprehensions in a call-by-value language,” in Proceedings of the 29th symposium on the implementation and application of functional programming languages, Aug. 2017. doi: 10.1145/3205368.3205373.
Abstract
Recursive value definitions in the context of functional programming languages that are based on a call-by-value semantics are known to be challenging. A lot of prior work exists in the context of languages such as Scheme and OCaml.
In this paper, we look at the problem of recursive array definitions within a call-by-value setting. We propose a solution that enables recursive array definitions as long as there are no cyclic dependences between array elements. The paper provides a formal semantics definition, sketches possible compiler implementations and relates to a prototypical implementation of an interpreter in OCaml. Furthermore, we briefly discuss how this approach could be extended to other data structures and how it could serve as a basis to further extend mutually recursive value definitions in a call-by-value setting in general.