Many functional logic programming languages are based on reduction of functional ‘expressions. This feature is also provided by many Prolog systems that offer the facility of calling external functions written in non-logic programming languages. A basic requirement is usually that the arguments of the functions must be ground at invocation time, otherwise an error is reported, or the call is delayed until the arguments are sufficiently instantiated. The drawback of the latter method is twofold: (1) the arguments might never be instantiated, and (2) the dynamic checks made by the delaying mechanism are expensive. This paper presents a method, which for a given program identifies a class of atomic goals for which (1) will not occur. Moreover, we describe a method for transforming a program into an equivalent program, for which dynamic delays are avoided. The static analysis is based on the concept of depen. dency graphs over an automatically annotated program, a technique originally introduced in connection of attribute grammars.
Boye, J., Paakki, J., & Małuszyński, J. (1993). Synthesis of directionality information for functional logic programs. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 724 LNCS, pp. 165–177). Springer Verlag. https://doi.org/10.1007/3-540-57264-3_38