Computer Science · Artificial Intelligence
Unrestricted call-by-value recursion
Johan Nordlander, Magnus Carlsson, Andy Gill
See on the mapAbstract
Call-by-value languages commonly restrict recursive definitions by only allowing functions and syntactically explicit values in the right-hand sides. As a consequence, some very appealing programming patterns that work well in lazy functional languages are hard to apply in a call-by-value setting, even though they might not be using laziness for any other purpose than to enable the desired form of recursion. In this paper we present an operational semantics as well as a straightforward implementation technique for unrestricted recursion under call-by-value. On that basis we are able to demonstrate that highly recursive programming idioms such as combinatorbased parsing are indeed compatible with call-by-value evaluation.