Title
Principles and practice of unification factoring
Abstract
The efficiency of resolution-based logic programming languages, such as Prolog, depends critically on selecting and executing sets of applicable clause heads to resolve against subgoals. Traditional approaches to this problem have focused on using indexing to determine the smallest possible applicable set. Despite their usefulness, these approaches ignore the nondeterminism inherent in many programming languages to the extent that they do not attempt to optimize execution after the applicable set has been determined. Unification factoring seeks to rectify this omission by regarding the indexing and unification phases of clause resolution as a single process. This article formalizes that process through the construction of factoring automata. A polynomial-time algorithm is given for constructing optimal factoring automata that preserve the clause selection strategy of Prolog. More generally, when the clause selection strategy is not fixed, constructing such an optimal automaton is shown to be NP-complete, solving an open trie minimization problem. Unification factoring is implemented through a source code transformation that preserves the full semantics of Prolog. This transformation is specified in the article, and using it, several well-known programs show significant performance improvements across several different systems. A prototype of unification factoring is available by anonymous ftp.
Year
DOI
Venue
1996
10.1145/232706.232722
ACM Trans. Program. Lang. Syst.
Keywords
Field
DocType
indexing,optimal factoring automaton,smallest possible applicable set,trie minimization,unification factoring,applicable clause,clause selection strategy,logic programming,open trie minimization problem,unification,clause resolution,unification phase,applicable set,optimal automaton,programming language,source code,indexation
Programming language,Computer science,Source code,Unification,Automaton,Search engine indexing,Theoretical computer science,Prolog,Logic programming,Trie,Factoring
Journal
Volume
Issue
ISSN
18
5
0164-0925
Citations 
PageRank 
References 
7
0.73
18
Authors
4
Name
Order
Citations
PageRank
Steven Dawson122853.67
C. R. Ramakrishnan21427107.75
S S Skiena33380292.51
Terrance Swift41339101.50