Advertisement

Partial correctness semantics for CP[↓, ¦, &]

  • Vijay A. Saraswat
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 206)

Abstract

The class of so-called concurrent logic programming languages, such as Parlog

In this paper we take the first steps towards a formal understanding of this paradigm by presenting a simple, bottom-up partial correctness semantics for CP[↓, ¦, &], an extension of the language Concurrent Prolog. In the context of Horn logic languages, a partial correctness semantics specifies, for a given program:
  • • the success set, the set of all queries which have a successful execution, together with the resulting answer substitution,

  • • the finite failure set, the set of all queries which have an execution sequence terminating in finite failure, and, if applicable,

  • • the deadlock set, the set of all queries which have an execution sequence resulting in deadlock.

The semantics that we give defines these three sets inductively, in analogy with the standard success-set semantics of pure logic programs [9]. We first give an operational semantics in the form of a transition system in the style of [14]. This semantics can be looked upon as specifying the SLD-derivations [1] for a given query that are admissible given the control annotations present in the program. We then invert the transition system to extract a simple inductive characterisation of the deadlock, finite failure and success sets for a given query.

This semantics is, however, not compositional. That is, it does not derive the semantics of a clause from the meaning of the atoms in its body. To get that, an a priori notion of the meaning of an atom is needed, a notion that is consistent with CP[↓, ¦, &]'s annotations and control structures. As has been learnt from the semantics of data-flow languages [22], predicate letters cannot now be interpreted as predicates over the underlying Herbrand domain; more operational information is needed. Accordingly, we define the notion of scenarios, adapted from the semantics given in [3] for non-deterministic data-flow languages, and give the success-semantics of CP[↓, ¦] based on specifying the meaning of a (possibly non-ground) atom as a set of scenarios. This semantics can be extended to a partial-correctness semantics for CP[↓, ¦].

Keywords

Logic Program Atom System Operational Semantic Execution Sequence Atomic Configuration 
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.

References

  1. [1]
    Apt, K.R., van Emden, M.H., ‘Contributions to the theory of logic programming', JACM, vol. 29, No.3, July 1982, pp 841–862.CrossRefGoogle Scholar
  2. [2]
    Brock, J.D., Ackerman, W.B., 'scenarios: A model of non-determinate computation', International Colloquim on Formalisation of Programming Concepts (J Diaz, I. Ramos ed.) LNCS 107, April 1981, 252–259.Google Scholar
  3. [3]
    Brock, J.D., ‘A formal model of non-determinate dataflow computation', PhD dissertation, EECS department, MIT, August, 1983.Google Scholar
  4. [4]
    Clark, K.L., Gregory, S., ‘PARLOG: parallel programming in logic', to appear in TOPLAS, 1985.Google Scholar
  5. [5]
    Clark, K.L., Gregory S., ‘A relational language for parallel programming', Res report DOC 81/16, Imperial College, July 1981.Google Scholar
  6. [6]
    van Emden, M.H., de Lucenha Filho, G.J., ‘Predicate logic as a language for parallel programming', in Logic Programming, ed. Clark, K.L., and Tarnlund, S.-A., Academic Press, 1980.Google Scholar
  7. [7]
    Jones, N.D., Mycroft, A., 'stepwise development of operational and denotational semantics for Prolog', Proceedings of the 1984 International Symposium on Logic Programming, Atlantic City.Google Scholar
  8. [8]
    Kahn, G., ‘The semantics of a simple language for parallel programming', in Information Processing 74: Proceedings of IFIP Congress 74, ed. Rosenfeld, J.L., August 1974, pp 471–475.Google Scholar
  9. [9]
    Kowalski, R.A., van Emden, M.H., ‘The semantics of predicate logic as a programming language', JACM, vol. 23, no. 4, October, 1976, pp. 733–742.CrossRefGoogle Scholar
  10. [10]
    Lassez, J-L., Maher, M.J. ‘Closure and fairness in the semantics of programming logic', Theoretical Computer Science 29 (1984) 167–184.CrossRefGoogle Scholar
  11. [11]
    Lassez, J-L., Maher, M.J., ‘The denotational semantics of Horn clauses as a production system', Proceedings of AAAI, 1983.Google Scholar
  12. [12]
    Lloyd, J.W., ‘Foundations of Logic Programming', Springer Verlaag, Symbolic Computation series, 1984.Google Scholar
  13. [13]
    Mycroft, A., ‘Logic programs and many valued logics', Symposium on Theoretical Aspects of Computer Science, 1984, LNCS 166.Google Scholar
  14. [14]
    Plotkin, G.D., ‘A structural approach to operational semantics', DAIMI FN-19, September 1981, CS Department, University of Aarhus.Google Scholar
  15. [15]
    Plotkin, G.D., ‘An operational semantics for CSP', In Formal descriptions of programming concepts-II ed. Bjørner, D., pp 199–224, North Holland, 183.Google Scholar
  16. [16]
    Saraswat, V.A., ‘Problems with Concurrent Prolog', forthcoming technical report, CS Department, Carnegie-Mellon University, August, 1985.Google Scholar
  17. [17]
    Saraswat, V.A., ‘An operational semantics for CP [↓, |, & ]', forthcoming technical report, CS Department, Carnegie-Mellon University, August, 1985.Google Scholar
  18. [18]
    Shapiro, E. Y., ‘A subset of Concurrent Prolog and its interpreter', CS83-06, Weizmann Institute technical report.Google Scholar
  19. [19]
    Shapiro, E. Y., 'systems programming in Concurrent Prolog', POPL, 1984.Google Scholar
  20. [20]
    Shapiro, E.Y., Takeuchi, A., ‘Object oriented programming in Concurrent Prolog', New Generation Computing, 1 (1983) 25–48.Google Scholar
  21. [21]
    Shapiro, E. Y., 'systolic programming: a paradigm of parallel processing', Proceedings of the Fifth Generation Computer Systems Conference, 1984.Google Scholar
  22. [22]
    Staples, J., and Nguyen, V.L., ‘A fixpoint semantics for nondeterminstic data flow', JACM vol 32, no. 2, April 1985.Google Scholar
  23. [23]
    Ueda, K., ‘Guarded Horn Clauses', ICOT Technical report TR-103, June 1985.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1985

Authors and Affiliations

  • Vijay A. Saraswat
    • 1
  1. 1.Computer Science DepartmentCarnegie-Mellon UniversityPittsburghUSA

Personalised recommendations