Functional computations in logic programs
- 1 July 1989
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Programming Languages and Systems
- Vol. 11 (3) , 451-481
- https://doi.org/10.1145/65979.65984
Abstract
Although the ability to simulate nondeterminism and to compute multiple solutions for a single query is a powerful and attractive feature of logic programming languages, it is expensive in both time and space. Since programs in such languages are very often functional, that is, they do not produce more than one distinct solution for a single input, this overhead is especially undesirable. This paper describes how programs may be analyzed statically to determine which literals and predicates are functional, and how the program may then be optimized using this information. Our notion of “functionality” subsumes the notion of “determinacy” that has been considered by various researchers. Our algorithm is less reliant on language features such as the cut, and thus extends more easily to parallel execution strategies, than others that have been proposed.Keywords
This publication has 9 references indexed in Scilit:
- Automatic mode inference for logic programsThe Journal of Logic Programming, 1988
- Denotational and operational semantics for prologThe Journal of Logic Programming, 1988
- Parallel Execution of Logic ProgramsPublished by Springer Nature ,1987
- An abstract machine for restricted AND-parallel execution of logic programsPublished by Springer Nature ,1986
- Negation and quantifiers in NU-PrologPublished by Springer Nature ,1986
- Relating logic programs and attribute grammarsThe Journal of Logic Programming, 1985
- Some global optimizations for a PROLOG compilerThe Journal of Logic Programming, 1985
- Foundations of Logic ProgrammingPublished by Springer Nature ,1984
- The Semantics of Predicate Logic as a Programming LanguageJournal of the ACM, 1976