Abstract
In logic programming, dynamic scheduling indicates the feature by means of which the choice of the atom to be selected at each resolution step is done at runtime and does not follow a fixed selection rule such as the left-to-right one of Prolog. Input-consuming derivations were introduced to model dynamic scheduling while abstracting from the technical details. In this article, we provide a sufficient and necessary criterion for termination of input-consuming derivations of simply moded logic programs. The termination criterion we propose is based on a denotational semantics for partial derivations which is defined in the spirit of model-theoretic semantics previously proposed for left-to-right derivations.
- Apt, K. R. 1990. Logic Programming. In Handbook of Theoretical Computer Science, J. van Leeuwen, Ed. Vol. B: Formal Models and Semantics. Elsevier and The MIT Press, Amsterdam, The Netherlands, and Cambridge, MA, 495--574.]] Google Scholar
- Apt, K. R. 1997. From Logic Programming to Prolog. Prentice Hall, London, U.K.]] Google Scholar
- Apt, K. R. and Etalle, S. 1993. On the unification free Prolog programs. In Proceedings of the Conference on Mathematical Foundations of Computer Science (MFCS'93), A. Borzyszkowski and S. Sokolowski, Eds. Lecture Notes in Computer Science, vol. 711. Springer-Verlag, Berlin, Germany, 1--19.]] Google Scholar
- Apt, K. R. and Luitjes, I. 1995. Verification of logic programs with delay declarations. In Proceedings of the 4th International Conference on Algebraic Methodology and Software Technology (AMAST'95), V. Alagar and M. Nivat, Eds. Lecture Notes in Computer Science, vol. 936. Springer-Verlag, Berlin, Germany, 66--90.]] Google Scholar
- Apt, K. R. and Pedreschi, D. 1994. Modular termination proofs for logic and pure Prolog programs. In Advances in Logic Programming Theory, G. Levi, Ed. Oxford University Press, Oxford, U.K., 183--229.]] Google Scholar
- Bossi, A., Etalle, S., and Rossi, S. 2000. Semantics of well-moded input-consuming logic programs. Comput. Lang. 26, 1, 1--25.]] Google Scholar
- Bossi, A., Etalle, S., and Rossi, S. 2002. Properties of input-consuming derivations. Theor. Pract. Logic Programm. 2, 2, 125--154.]] Google Scholar
- Bossi, A., Etalle, S., Rossi, S., and Smaus, J.-G. 2001. Semantics and termination of simply moded logic programs with dynamic scheduling. In Proceedings of the European Symposium on Programming (Genoa, Italy), D. Sands, Ed. Lecture Notes in Computer Science, vol. 2028. Springer-Verlag, Berlin, Germany, 402--416.]] Google Scholar
- Bossi, A., Gabrielli, M., Levi, G., and Martelli, M. 1994. The S-semantics approach: Theory and applications. J. Logic Programm. 19 & 20, 149--198.]]Google Scholar
- Boye, J. 1996. Directional types in logic programming. Ph.D. dissertation, Linköpings Universitet, Linköping, Sweden]]Google Scholar
- de Boer, F. and Palamidessi, C. 1991. A fully abstract model for concurrent constraint programming. In Proceedings of the International Joint Conference on Theory and Practice of Software Development (TAPSOFT/CAAP), S. Abramsky and T. Maibaum, Eds. Lecture Notes in Computer Science, vol. 493. Springer-Verlag, Berlin, Germany, 296--319.]] Google Scholar
- Etalle, S., Bossi, A., and Cocco, N. 1999. Termination of well-moded programs. J. Logic Programm. 38, 2, 243--257.]]Google Scholar
- Etalle, S., Gabbrielli, M., and Meo, M. C. 2002. Transformations of ccp programs. ACM Trans. Programm. Lang. Syst. 23, 3, 304--395.]] Google Scholar
- Falaschi, M., Gabbrielli, M., Marriott, K., and Palamidessi, C. 1997. Constraint logic programming with dynamic scheduling: a semantics based on closure operators. Inform. Computat. 137, 1, 41--67.]] Google Scholar
- Kowalski, R. A. 1979. Algorithm = logic + control. Commun. ACM 22, 7, 424--436.]] Google Scholar
- Lloyd, J. W. 1987. Foundations of Logic Programming, 2nd ed. Symbolic Computation---Artificial Intelligence Series. Springer-Verlag, Berlin, Berlin, Germany.]] Google Scholar
- Lüttringhaus-Kappel, S. 1993. Control generation for logic programs. In Proceedings of the 10th International Conference on Logic Programming (Budapest, Hungary), D. Warren, Ed. The MIT Press, Cambridge, MA. 478--495.]] Google Scholar
- Marchiori, E. and Teusink, F. 1999. Termination of logic programs with delay declarations. J. Logic Programm. 39, 1--3, 95--124.]]Google Scholar
- Martin, J. C. and King, A. M. 1997. Generating efficient, terminating logic programs. In Proceedings of the 7th International Joint Conference on Theory and Practice of Software Development (Lille, France), M. Bidoit and M. Dauchet, Eds. Lecture Notes in Computer Science, vol. 1214. Springer-Verlag, Berlin, Germany, 273--184.]] Google Scholar
- Naish, L. 1982 (Revised July 1983). An introduction to MU-Prolog. Tech. rep. 82/2, Department of Computer Science, University of Melbourne, Melbourne, Australia.]]Google Scholar
- Naish, L. 1986. Negation and Control in Prolog. Lecture Notes in Computer Science, vol. 238. Springer-Verlag, New York.]] Google Scholar
- Naish, L. 1988. Parallelizing NU-Prolog. In Proceedings of the 5th International Conference/Symposium on Logic Programming (Seattle, Washington), K. A. Bowen and R. A. Kowalski, Eds. The MIT Press, Cambridge, MA, 1546--1564.]]Google Scholar
- Naish, L. 1993. Coroutining and the construction of terminating logic programs. Australian Comput. Sci. Commun. 15, 1, 181--190.]]Google Scholar
- Pedreschi, D., Ruggieri, S., and Smaus, J.-G. 2002. Classes of terminating logic programs. Theor. Pract. Logic Programm. 3, 2, 369--418.]] Google Scholar
- Ruggieri, S. 1997. Termination of constraint logic programs. In Proceedings of the 24th International Colloquium on Automata, Languages and Programming (ICALP'97), Bologna, Italy. Lecture Notes in Computer Science, vol. 1256. Springer-Verlag, Berlin, Germany, 838--848.]] Google Scholar
- Saraswat, V. A. and Rinard, M. 1990. Concurrent constraint programming. In Proceedings of the 17th ACM Symposium on Principles of Programming Languages (San Francisco, California). ACM, New York, NY, 232--245.]] Google Scholar
- Smaus, J.-G. 1999a. Modes and types in logic programming. Ph.D. dissertation, University of Kent at Canterbury, Canterbury, U.K. Available online from http://www.cs.ukc.ac.uk/pubs/1999/986/.]]Google Scholar
- Smaus, J.-G. 1999b. Proving termination of input-consuming logic programs. In Proceedings of the 16th International Conference on Logic Programming (Las Cruces, NM), D. De Schreye, Ed. The MIT Press, Cambridge, MA, 335--349.]] Google Scholar
- Smaus, J.-G., Hill, P. M., and King, A. M. 1998. Termination of logic programs with block declarations running in several modes. In Proceedings of the 10th Symposium on Programming Language Implementations and Logic Programming (Pisa, Italy), C. Palamidessi, Ed. Lecture Notes in Computer Science, vol. 1490. Springer-Verlag, Berlin, Germany, 73--88.]] Google Scholar
- Smaus, J.-G., Hill, P. M., and King, A. M. 2001. Verifying termination and error-freedom of logic programs with block declarations. Theor. Pract. Logic Programm. 1, 4, 447--486.]] Google Scholar
- Sterling, L. and Shapiro, E. 1986. The Art of Prolog. The MIT Press, Cambridge, MA.]]Google Scholar
- Ueda, K. and Furukawa, K. 1988. Transformation rules for GHC Programs. In Proceedings of the International Conference on Fifth Generation Computer Systems. Institute for New Generation Computer Technology, Tokyo, OHMSHA Ltd, Tokyo, and Springer-Verlag, Tokyo, Japan, 582--591.]]Google Scholar
- Ueda, K. and Morita, M. 1994. Moded flat GHC and its message-oriented implementation technique. New Gen. Comput. 13, 1, 3--43.]] Google Scholar
- van Emden, M. H. and de Lucena, G. J. 1982. Predicate logic as a language for parallel programming. In Logic Programming, K. Clark and S.-A. Tärnlund, Eds. Academic Press, London, U.K.]]Google Scholar
Index Terms
- Termination of simply moded logic programs with dynamic scheduling
Recommendations
Semantics of well-moded input-consuming logic programs
Recent logic programming languages employ dynamic scheduling of calls to improve efficiency of programs. Dynamic scheduling is realized by allowing some calls to be dynamically ''delayed'' until their arguments are sufficiently instantiated. To this end,...
Three-Valued Constructive Logic and Logic Programs
ISMVL '95: Proceedings of the 25th International Symposium on Multiple-Valued LogicAbstract: We propose three valued constructive logic with strong negation 3N by describing both proof and model theory. We relate the proposed three valued system to J. Lukasiewicz's (1920) three valued logic. We demonstrate that 3N is very useful to ...
Cyclic proofs of program termination in separation logic
POPL '08We propose a novel approach to proving the termination of heap-manipulating programs, which combines separation logic with cyclic proof within a Hoare-style proof system.Judgements in this system express (guaranteed) termination of the program when ...
Comments