Linear Time Unit Resolution for Propositional Formulas|in Prolog, Yet
نویسنده
چکیده
A procedure to analyze a propositional formula in clause form by unit resolution is described and illustrated with a Prolog implementation. It runs in worst-case time that is linear in the length of the formula. The main idea has been independently rediscovered by several implementers. Apparently, its rst journal appearance was a sketch by Dalal and Etherington in 1992. However, there also had arisen a folkloric belief that unit resolution requires quadratic time. This report shows that the implementation sketched for imperative languages, such as C, consumes quadratic time if translated to Prolog. This degradation occurs even if clause indexing permits the retrieval of an asserted clause in constant time. It is rather due to the way Prolog handles assertions involving data structures, such as lists. A modiied Prolog implementation that restores linear time is described. The time remains linear even if the procedure is run \on-line", meaning that new clauses appear in the input as processing proceeds. This property is useful in applications that have several mechanisms for deriving new clauses. The technique may have application in other problems that can be described as inductive closures on nite domains. Ad hoc solutions to such problems are error-prone and often ineecient.
منابع مشابه
The Computational Complexity of Satisfiability of Temporal Horn Formulas in Propositional Linear-Time Temporal Logic
Since the invention of Prolog, a programming language based on classical first-order logic, many people have tried to extend it using similiar ideas and redefine the semantics of the extended Prolog in terms of nonclassical logics [3,5,81. The success of a programming language based on nonclassical logics usually lies in the new definiton of Horn formulas and SLD-resolution-like inference rule....
متن کاملA Transformation of Propositional Prolog Programs into Classical Logic
We transform a propositional Prolog program P into a set of propositional formulas prl(P ) and show that Prolog, using its depth-first left-to-right search, is sound and complete with respect to prl(P ). This means that a goal succeeds in Prolog if and only if it follows from prl(P ) in classical propositional logic. The generalization of prl(P ) to predicate logic leads to a system for which P...
متن کاملExtracting Inheritance Hierarchies from Prolog Programs: A System Based on the Inference of Type Relations
Consistency Checking of Automata Functional Specifications p. 76 Yet Another Application for Toupie: Verification of Mutual Exclusion Algorithms p. 86 Parsing with DCG-Terms p. 98 A First Order Resolution Calculus with Symmetries p. 110 Ordered Paramodulation and Resolution as Decision Procedure p. 122 Static Analysis of Prolog with Cut p. 134 A New Type Theory for Representing Logics p. 146 Ve...
متن کاملPolynomial Simulation and Refutation of Complex Formulas of Resolution over Linear Equations in Propositional Proof System
Abstract In this paper, we present that the propositional proof system R(lin) (Resolution over Linear Equations) established by Ran Raz and Iddo Tzameret is not a super system, there exists a sequence of tautologies, which require proof complexity exponential in size of tautologies. We show that there are the sequence of unsatisfiable collections of disjuncts of linear equations, which require ...
متن کاملLinear Logic Proof
The design of linear logic programming languages and theorem provers opens a number of new implementation challenges not present in more traditional logic languages such as Horn clauses (Prolog) and hereditary Harrop formulas (Prolog and Elf). Among these, the problem of eeciently managing the linear context when solving a goal is of crucial importance for the use of these systems in non-trivia...
متن کامل