The functional evaluation of length y produces a result only if y is either the empty list, [], or a non-empty list (x:xs), where x is the head and where xs is the tail. Thus, the evaluation by narrowing of length y, when y is unknown, non-deterministically guesses [] or (x:xs) for y and makes a step of the computation. When, after a step, the result still contains missing or partial information, further narrowing steps are executed to obtain the result.length [] = 0 length (x:xs) = 1 + length xs
My tutorial on programming with narrowing contains examples of problems where narrowing is appropriate, implementation code that uses narrowing, and considerations about the use of narrowing in programming.
Currently, I am working along two main lines:
This line of work is centered on the discovery of narrowing strategies for rewrite systems suitable for programming. The 90s have seen major advances in this area. Nowadays, relatively well-understood narrowing strategies exist for all interesting classes of functional logic programs, see a survey and some slides on this subject. Current work focuses on better formalizations of some strategies and on implementations providing complete and efficient non-determinism.
This line of work is centered on the design and implementation of Curry a general purpose programming language proposed as the lingua franca of the functional logic community. Specifically, I am working on PAKCS the mainstream implementation of Curry which can be freely downloaded and executed on various platforms and on other implementations, e.g., Sprite 3.
This research has been supported in part by the following grants: NSF CCF-1317249, A principled compiler for functional logic languages; NSF CCR-0218224, Implementation of Functional Logic Languages; NSF CCR-0110496, Non-Deterministic Computations for Functional Logic Programs; NSF INT-9981317, Advanced Techniques for Multi-Paradigm Declarative Languages; NSF CCR-9406751, Needed Narrowing Strategies.