Semantics and Termination of Simply-Moded Logic Programs with Dynamic Scheduling
In logic programming, dynamic scheduling refers to a situation where the selection of the atom in each resolution (computation) step is determined at runtime, as opposed to a fixed selection rule such as the left-to-right one of Prolog. This has applications e.g. in parallel programming. A mechanism to control dynamic scheduling is provided in existing languages in the form of delay declarations. Input-consuming derivations were introduced to describe dynamic scheduling while abstracting from the technical details. In this paper, we first formalize the relationship between delay declarations and input-consuming derivations, showing in many cases a one-to-one correspondence. Then, we define a model-theoretic semantics for input-consuming derivations of simply-moded programs. Finally, for this class of programs, we provide a necessary and sufficient criterion for termination.
KeywordsLogic Program Logic Programming Predicate Symbol Dynamic Schedule Derivation Step
- 1.K. R. Apt. Introduction to Logic Programming. In J. van Leeuwen, editor, Handbook of Theoretical Computer Science, volume B: Formal Models and Semantics, pages 495–574. Elsevier, Amsterdam and The MIT Press, Cambridge, 1990.Google Scholar
- 2.K. R. Apt. From Logic Programming to Prolog. Prentice Hall, 1997.Google Scholar
- 3.K. R. Apt and S. Etalle. On the unification free Prolog programs. In A. Borzyszkowski and S. Sokolowski, editors, Proceedings of MFCS’ 93, LNCS, pages 1–19. Springer-Verlag, 1993.Google Scholar
- 4.K. R. Apt and I. Luitjes. Verification of logic programs with delay declarations. In V. S. Alagar and M. Nivat, editors, Proceedings of AMAST’95, LNCS, pages 66–90. Springer-Verlag, 1995. Invited Lecture.Google Scholar
- 5.K. R. Apt and D. Pedreschi. Modular termination proofs for logic and pure Prolog programs. In G. Levi, editor, Advances in Logic Programming Theory, pages 183–229. Oxford University Press, 1994.Google Scholar
- 6.A. Bossi, S. Etalle, and S. Rossi. Properties of input-consuming derivations. ENTCS, 30(1), 1999. http://www.elsevier.nl/locate/entcs.
- 7.A. Bossi, S. Etalle, and S. Rossi. Semantics of input-consuming programs. In J. Lloyd, editor, CL 2000. Springer-Verlag, 2000.Google Scholar
- 8.A. Bossi, S. Etalle, S. Rossi, and J.-G. Smaus. Semantics and termination of simply-moded logic programs with dynamic scheduling. Available via CoRR: http://arXiv.org/archive/cs/intro.html, 2001.
- 12.P. M. Hill and J. W. Lloyd. The Gödel Programming Language. The MIT Press, 1994.Google Scholar
- 13.Intelligent Systems Laboratory, Swedish Institute of Computer Science, PO Box 1263, S-164 29 Kista, Sweden. SICStus Prolog User’s Manual, 1998. http://www.sics.se/sicstus/docs/3.7.1/html/sicstus toc.html.
- 15.J. W. Lloyd. Foundations of Logic Programming. Symbolic Computation-Artificial Intelligence. Springer-Verlag, 1987.Google Scholar
- 17.L. Naish. Parallelizing NU-Prolog. In R. A. Kowalski and K. A. Bowen, editors, Proceedings of ICLP/SLP’ 88, pages 1546–1564. MIT Press, 1988.Google Scholar
- 18.J.-G. Smaus. Proving termination of input-consuming logic programs. In D. De Schreye, editor, Proceedings of ICLP’99, pages 335–349. MIT Press, 1999.Google Scholar
- 19.L. Sterling and E. Shapiro. The Art of Prolog. MIT Press, 1986.Google Scholar