Towards lazy evaluation, sharing, and non-determinism in resolution based functional logic languages

Feixiong Liu · 1993

Lazy evaluationand sharing are two of the most important issues in implementations of lazy functional languages.However they are either inadequately handled or put aside in most of the current implementations of resolution based functional logic languages which usually adopt extended versions of the Warren Abstract Machine ( WAM ) as their implementation vehicles.It is partly due to the fact that lazy evaluation is "alien" to the WAM baaed approaches and sharing becomes more tricky due to non-determinism.Although non-determinism is naturally supported in these ap preaches, deterministic computation may suffer from overheads of creating and manipulating unnecessary choice points.These are the main issues to be addressed in this paper.We first demonstrate how lazy evaluation can be naturally implemented using the concepts of graph rewriting in a resolution based functional logic framework.Then we identify two basic forms of sharing existing in such a framework: deterministic and non-deterministic sharing, and show both forms of sharing can be effectively exploited using the principle of generalized graph rewriting techniques.And finally we show that both static and dynamic detection of determinism can be facilitated by the directionality of functions.1

Read the paper · More papers on PaperTik