Abstract

We investigate the interaction of lazy evaluation and backtracking in the framework of functional logic languages, whose operational semantics is based on lazy narrowing. Technically, it is no problem to realize a lazy narrowing strategy by adapting the well-known techniques, which have been developed for functional languages, to the more general evaluation mechanism of functional logic languages. But, unfortunately, it turns out, that the use of a lazy strategy has some severe disadvantages. In particular, it may lead to nontermination in combination with backtracking, where an innermost strategy will determine a solution. The use of demandedness information for function arguments allows us to define a mixture between an eager and a lazy evaluation strategy, which partially helps to cope with these problems. The runtimes obtained for various example programs with respect to the different strategies, substantiate that the mixed strategy is a reasonable compromise between an eager and a lazy strategy for functional logic languages.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call