Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to main content

Denotational versus declarative semantics for functional programming

  • Conference paper
  • First Online:
Computer Science Logic (CSL 1991)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 626))

Included in the following conference series:

Abstract

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.

Research supported by the PRONTIC project TIC 89/0104.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  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. M.Bellia, G.Levi: The Relation between Logic and Functional Languages: a Survey. J. Logic Programming 3, 1986, pp. 217–236.

    Google Scholar 

  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. 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. 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. D. de Groot, G.Lindstrom (eds): Logic Programming: Functions, Relations and Equations. Prentice Hall, 1986.

    Google Scholar 

  7. N.Dershowitz, M.Okada: A Rationale for Conditional Equational Programming. Theor. Comp. Sci. 75, 1990, pp. 111–138.

    Google Scholar 

  8. N.Dershowitz, S.Kaplan, D.A.Plaisted: Rewrite, Rewrite, Rewrite, Rewrite, Rewrite, ... Theoretical Computer Science 83, 1991. pp. 71–96.

    Google Scholar 

  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. 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. J.R.Hindley, J.P.Seldin: Introduction to Combinators and λ-Calculus. Cambridge University Press, 1986.

    Google Scholar 

  12. J.R.Kennaway, J.W.Klop, M.R.Sleep, F.J.de Vries: Transfinite Reductions in Orthogonal Term Rewriting Systems. Procs. RTA '91, Springer LNCS 488, 1989, pp. 1–12.

    Google Scholar 

  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. D.S.Scott: Domains for denotational semantics. Procs. ICALP, 82, Springer LNCS 140, 1982, pp. 577–613.

    Google Scholar 

  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 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Egon Börger Gerhard Jäger Hans Kleine Büning Michael M. Richter

Rights and permissions

Reprints and permissions

Copyright information

© 1992 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Carlos, J., Moreno, G., González, M.T.H., Artalejo, M.R. (1992). Denotational versus declarative semantics for functional programming. In: Börger, E., Jäger, G., Kleine Büning, H., Richter, M.M. (eds) Computer Science Logic. CSL 1991. Lecture Notes in Computer Science, vol 626. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0023763

Download citation

  • DOI: https://doi.org/10.1007/BFb0023763

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-55789-0

  • Online ISBN: 978-3-540-47285-8

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics