Abstract
We show that the equivalence problem for propositional Prolog programs is coNP-complete. Considering yes-no answers only the modified equivalence problem is solvable in polynomial time. Furthermore, the problem whether a program does not terminate for some question is NP-complete. For a fixed question the loop problem can be decided in linear time.
Similar content being viewed by others
References
Aspvall, B., Plass, M. R. and Tarjan, R. E., ‘A linear-time algorithm for testing the truth of certain quantified boolean formulas’, Information Processing Letters 8, 121–123 (1979).
Börger, E., Berechenbarkeit, Komplexität, Logik, Vieweg-Verlag, Braunschweig (1985).
Börger, E., ‘Logic as machine: complexity relations between programs and formulae’, in Current Trend in Computer Science (ed. E. Börger), Computer Science Press.
Clocksin, W. F. and Mellish, C. S., Programming in Prolog, Springer-Verlag, Berlin (1984).
Cook, S. A., ‘The complexity of theorem-proving procedures’, Proc. Third ACM Symp. on Theory of Computing, pp. 151–158 (1971).
Dowling, W. F. and Gallier, J. H., ‘Linear-time algorithms for testing the satisfiability of propositional Horn formulae’, J. Logic Programming 1, 267–284 (1984).
Klein Büning, H. and Schmitgen, S., Prolog, Teubner-Verlag, Stuttgart (1986).
Kowalski, R., ‘Predicate logic as programming language’, Information Processing 74 (ed. J. Rosenfeld), North-Holland, Amsterdam, pp. 556–574 (1974).
Schaefer, T. J., ‘The complexity of satisfiability problems’, Proc. 10th ACM Symp. on Theory of Computing, pp. 216–226 (1978).
Shoenfield, J. T., Mathematical Logic, Addison-Wesley, London (1967).
Author information
Authors and Affiliations
Additional information
The work of this author was supported by the Studienstiftung des Deutschen Volkes.
Rights and permissions
About this article
Cite this article
Büning, H.K., Löwen, U. & Schmitgen, S. Equivalence of propositional Prolog programs. J Autom Reasoning 6, 319–335 (1990). https://doi.org/10.1007/BF00244491
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF00244491