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.
Preview
Unable to display preview. Download preview PDF.
References
K.R.Apt: Logic Programming. In J.van Leeuwen (ed.), Handbook of Theoretical Computer Science, vol. B, Elsevier Science Publishers, 1990.
M.Bellia, G.Levi: The Relation between Logic and Functional Languages: a Survey. J. Logic Programming 3, 1986, pp. 217–236.
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.
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.
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.
D. de Groot, G.Lindstrom (eds): Logic Programming: Functions, Relations and Equations. Prentice Hall, 1986.
N.Dershowitz, M.Okada: A Rationale for Conditional Equational Programming. Theor. Comp. Sci. 75, 1990, pp. 111–138.
N.Dershowitz, S.Kaplan, D.A.Plaisted: Rewrite, Rewrite, Rewrite, Rewrite, Rewrite, ... Theoretical Computer Science 83, 1991. pp. 71–96.
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.
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.
J.R.Hindley, J.P.Seldin: Introduction to Combinators and λ-Calculus. Cambridge University Press, 1986.
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.
D.A.Miller, G.Nadathur: Higher Order Logic Programming. Procs. 3th Int. Conf. on Logic Programming, Springer LNCS. 225, 1986, pp. 448–462.
D.S.Scott: Domains for denotational semantics. Procs. ICALP, 82, Springer LNCS 140, 1982, pp. 577–613.
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.
Author information
Authors and Affiliations
Editor information
Rights 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