Advertisement

A compositional semantics for Concurrent Prolog

  • Joost N. Kok
Contributed Papers Semantics Of Parallelism
Part of the Lecture Notes in Computer Science book series (LNCS, volume 294)

Abstract

Concurrent logic languages like Concurrent Prolog have mechanisms in common with imperative concurrent languages: concurrency, communication, synchronization and indeterminacy, finite and infinite behaviour. A goal statement can be considered as a network of processes which run in parallel and can communicate. For imperative concurrent languages a lot of research on the semantics has been done. In this paper we show that a model, which was originally designed for imperative languages, can be used to give a formal description of Concurrent Prolog. This model is compositional: for any two conjunctions C1, C2 the meaning of C1C2 can be obtained by applying a function to the meanings of C1 and C2. To be more specific: we shall employ a domain where some choices made during the computation are recorded in certain tree-like structures, and which allows for interleaving. We use tree like structures because it is not possible to use flat structures (like traces or sequences of substitutions). They do not contain enough information to handle deadlock or infinite computations. Such phenomena require that we know at a certain moment in time all the alternatives. The domain is obtained as a solution of a domain equation. We apply metric topological tools to find a solution of the domain equation, and to define operations on elements of the domain. The semantic function maps goals, given a program P, to elements of the domain. This function is defined recursively. The model is able to handle both finite and infinite computations.

Keywords

Logic Program Logic Programming Operational Semantic Unique Fixed Point Isometric Embedding 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

7. References

  1. [America & Rutten 1987] P. America, J. Rutten, Solving Reflexive Domain Equations in a Category of Complete Metric Spaces, Proceedings 3rd workshop on the Mathematical Foundations of Programming Language Semantics, to appear.Google Scholar
  2. [Apt & van Emden 1982] K.R. Apt, M.H. van Emden, Contributions to the theory of logic programming, Journal of the ACM 29, 1982, pp. 841–862.Google Scholar
  3. [de Bakker & Zucker 1982] J.W. de Bakker, J.I. Zucker, Processes and the Denotational Semantics of Concurrency, Information and Control 54, 1982, pp. 70–120.Google Scholar
  4. [de Bakker & Zucker 1983] J.W. de Bakker, J.I. Zucker, Compactness in Semantics for Merge and Fair Merge, Proceedings Workshop Logic of Programs, Springer, 1983, pp. 18–33.Google Scholar
  5. [de Bakker et al 1984] J.W. de Bakker, J.A. Bergstra, J.W. Klop, J.-J.Ch. Meyer, Linear Time and Branching Time Semantics for Recursion with Merge, Theoretical Computer Science 34, 1984, pp. 135–156.Google Scholar
  6. [Debray & Mishra 1987] S.K. Debray, P. Mishra, Denotational and Operational Semantics for Prolog, Proceedings of 3rd Working Conference on the Formal Description of Programming Concepts, North-Holland, 1987, pp. 245–270.Google Scholar
  7. [Dugundji 1966] J. Dugundji, Topology, Allyn and Bacon Inc, 1966.Google Scholar
  8. [van Emden 1986] M. van Emden, Quantitative Deduction and its fixpoint theory, Journal on Logic Programming 1, 1986, pp. 37–53.Google Scholar
  9. [Engelking 1977] R. Engelking, General Topology, Polish Scientific Publishers, 1977.Google Scholar
  10. [Fitting 1985a] Fitting, A Deterministic Prolog Fixpoint Semantics, Journal on Logic Programming 2, 1985, pp. 111–118.Google Scholar
  11. [Fitting 1985b] Fitting, A Kripke-Kleene semantics for Logic Programs, Journal on Logic Programming 4, 1985, pp. 295–312.Google Scholar
  12. [Gelernter 1984] D. Gelernter, A Note on Systems Programming in Concurrent Prolog, Proceedings 1984 Symposium on Logic Programming, IEEE Comp. Society Press, 1984, pp. 76–82.Google Scholar
  13. [Lloyd 1984] J.W. Lloyd, Foundations of Logic Programming, Springer, 1984.Google Scholar
  14. [Levi & Palamidessi 1985] G. Levi, C. Palamidessi, The declarative semantics of logical read-only variables, Proceedings 1985 Symposium on Logic Programming, IEEE Comp. Society Press, 1985, pp. 128–137.Google Scholar
  15. [Levi & Palamidessi 1987] G. Levi, C. Palamidessi, An approach to the declarative semantics of synchronization in logic languages, to appear.Google Scholar
  16. [Nait Abdallah 1984] M.A. Nait Abdallah, On the interpretation of infinite computations in logic programming, Proceedings 11th ICALP, (J. Paredaens ed.), Springer, 1984, pp. 358–370.Google Scholar
  17. [Saraswat 1986] V.A. Saraswat, Problems with Concurrent Prolog, CMU-CS-86-100, Departement of Computer Science, Carnegie-Mellon University, 1986Google Scholar
  18. V.A. Saraswat, The concurrent logic programming language CP: Definition and Operational Semantics, Proceedings 1987 Principles Of Programming Languages, 1987, pp. 49–62.Google Scholar
  19. E.Y. Shapiro, A subset of Concurrent Prolog and its interpreter, Techn. Rep. TR-003, ICOT, 1983.Google Scholar
  20. S. van Veen, E. de Vink, Semantics of Logic Programming, Note CS-N8508, Centre for Mathematics and Computer Science, 1985.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1988

Authors and Affiliations

  • Joost N. Kok
    • 1
  1. 1.Centre for Mathematics and Computer ScienceAmsterdamThe Netherlands

Personalised recommendations