Abstract
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 dependency graphs over an automatically annotated program, a technique originally introduced in connection of attribute grammars.
On leave from the Department of Computer Science, University of JyvÄskylÄ, Finland.
This is a preview of subscription content, log in via an institution.
Preview
Unable to display preview. Download preview PDF.
References
H. AÏt-Kaci. An overview of LIFE. In Schmidt, Stogny (eds.) Next generation information system technology, pp. 42–58, LNCS 504, Springer-Verlag, 1990.
J. Boye. S-SLD-resolution — an operational semantics for logic programs with external procedures. In Programming language implementation and logic programming, pp. 383–393, LNCS 528, Springer-Verlag, 1991.
J. Boye. Avoiding dynamic delays in functional logic programs. In Programming language implementation and logic programming, Springer-Verlag, 1993.
J. Boye, J. Paakki and J. Maluszyński. Dependency-based groundness analysis of functional logic programs. Research report LiTH-IDA-R-93-20, Department of computer and information science, Linköping university, 1993.
P. Deransart. Proof methods of declarative properties of logic programs. Report 1248, INRIA Rocquencourt, 1990.
P. Deransart, M. Jourdan and B. Lorho. Attribute grammars — Definitions, systems and bibliography. LNCS 323, Springer-Verlag, 1988.
P. Deransart and J. Maluszyński. Relating logic programs and attribute grammars. Journal of logic programming, 2(2), pp. 119–156, 1985.
M. Hanus. On the completeness of residuation. In Proc. of the joint international conference and symposium on logic programming, pp. 192–206, The MIT Press, 1992.
D. Knuth. Semantics of context-free languages. Mathematical systems theory, 2, pp. 127–145, 1968.
J. Małuszyński, S. Bonnier, J. Boye, F. Kluźniak, A. Kågedal and U. Nilsson. Logic programs with external procedures. In Apt, de Bakker, Rutten (eds.) Logic programming languages: constraints, functions and objects. The MIT Press, 1993.
L. Naish. Adding equations to NU-Prolog. In Programming language implementation and logic programming, pp. 15–26, LNCS 528, Springer-Verlag, 1991.
J. Paakki. Multi-pass evaluation of functional logic programs. Research report LiTH-IDA-R-93-02, Department of computer and information science, Linköping university, 1993.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1993 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Boye, J., Paakki, J., Małuszyński, J. (1993). Synthesis of directionality information for functional logic programs. In: Cousot, P., Falaschi, M., Filé, G., Rauzy, A. (eds) Static Analysis. WSA 1993. Lecture Notes in Computer Science, vol 724. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-57264-3_38
Download citation
DOI: https://doi.org/10.1007/3-540-57264-3_38
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-57264-0
Online ISBN: 978-3-540-48027-3
eBook Packages: Springer Book Archive