Denotational versus declarative semantics for functional programming

  • Juan Carlos
  • González Moreno
  • Maria Teresa Hortalá González
  • Mario Rodríguez Artalejo
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 626)


Denotational semantics is the usual mathematical semantics for functional programming languages. It is higher order (H.O.) in the sense that the semantic domain D includes [D → D] as a subdomain. On the other hand, the usual declarative semantics for logic programs is first order (F.O.) and given by the least Herbrand model. In this paper, we take a restricted kind of H.O. conditional rewriting systems as computational paradigm for functional programming. For these systems, we define both H.O. denotational and F.O. declarative semantics as two particular instances of algebraic semantics over continuous applicative algebras. For the declarative semantics, we prove soundness and completeness of rewriting, as well as an initiality result. We show that both soundness and completeness fail w.r.t. the denotational semantics and we present a natural restriction of rewriting that avoids unsoundness. We conjecture that this restricted rewriting is complete for computing denotation ally valid F.O. results.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    K.R.Apt: Logic Programming. In J.van Leeuwen (ed.), Handbook of Theoretical Computer Science, vol. B, Elsevier Science Publishers, 1990.Google Scholar
  2. 2.
    M.Bellia, G.Levi: The Relation between Logic and Functional Languages: a Survey. J. Logic Programming 3, 1986, pp. 217–236.Google Scholar
  3. 3.
    M.Bellia, P.G.Bosco, E.Giovannetti, G.Levi, C.Moiso, C.Palamidessi: A twolevel approach to logic and functional programming, in Procs. PARLE '87.Google Scholar
  4. 4.
    M.H.M.Cheng, M.H.van Emden, B.E.Richards: On Warren's Method for Functional Programming in Logic. Procs. 7th Int. Conf. on Logic Programming, MIT Press, 1990, pp. 546–560.Google Scholar
  5. 5.
    W.Chen, M.Kifer, D.S.Warren: HiLog: A First Order Semantics for Higher-Order Logic Programming Constructs. Procs. North American Conf. on Logic Programming '89, MIT Press, 1989, pp. 1090–1114.Google Scholar
  6. 6.
    D. de Groot, G.Lindstrom (eds): Logic Programming: Functions, Relations and Equations. Prentice Hall, 1986.Google Scholar
  7. 7.
    N.Dershowitz, M.Okada: A Rationale for Conditional Equational Programming. Theor. Comp. Sci. 75, 1990, pp. 111–138.Google Scholar
  8. 8.
    N.Dershowitz, S.Kaplan, D.A.Plaisted: Rewrite, Rewrite, Rewrite, Rewrite, Rewrite, ... Theoretical Computer Science 83, 1991. pp. 71–96.Google Scholar
  9. 9.
    J.A.Goguen, J.W.Thatcher, E.G.Wagner,J.B.Wright: On Initial Algebra Semantics and Continuous Algebras. J. ACM 24, 1, 1977, pp. 68–95.Google Scholar
  10. 10.
    J.C.González-Moreno, M.T.Hortalá-González, M.Rodríguez-Artalejo: A Functional Logic Language with Higher Order Logic Variables. Technical Report DIA 90/6, October 1990.Google Scholar
  11. 11.
    J.R.Hindley, J.P.Seldin: Introduction to Combinators and λ-Calculus. Cambridge University Press, 1986.Google Scholar
  12. 12.
    J.R.Kennaway, J.W.Klop, M.R.Sleep, Vries: Transfinite Reductions in Orthogonal Term Rewriting Systems. Procs. RTA '91, Springer LNCS 488, 1989, pp. 1–12.Google Scholar
  13. 13.
    D.A.Miller, G.Nadathur: Higher Order Logic Programming. Procs. 3th Int. Conf. on Logic Programming, Springer LNCS. 225, 1986, pp. 448–462.Google Scholar
  14. 14.
    D.S.Scott: Domains for denotational semantics. Procs. ICALP, 82, Springer LNCS 140, 1982, pp. 577–613.Google Scholar
  15. 15.
    D.A.Turner: Miranda: a non-strict functional language with polymorphic types. Procs. ACM Conf. on Functional Programming Languages and Computer Architectures, Springer LNCS 201, 1985, pp. 1–16.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1992

Authors and Affiliations

  • Juan Carlos
    • 1
  • González Moreno
    • 1
  • Maria Teresa Hortalá González
    • 2
  • Mario Rodríguez Artalejo
    • 2
  1. 1.Dpto. L.S.I.I.S.U.P.M.Spain
  2. 2.Dpto. de Informática y AutomáticaU.C.M.Spain

Personalised recommendations