Abstract
Declarative methodologies for logic program construction have been proposed for Prolog. They roughly consist of 1) building a purely logical version of the program based on a clear declarative semantics and 2) performing a number of checks about modes, types, termination and multiplicity. We plan to define a similar methodology for Mercury. This choice is motivated by the fact that type, mode, and multiplicity must be explicitly specified in Mercury, allowing the compiler to perform the second step above. In order to propose a methodology to perform the first step, we need a declarative semantics for Mercury, which has not yet been explicitly defined. The goal of the paper is to propose such a semantics pursuing simplicity and naturalness. We chose to define the semantics with respect to a unique interpretation domain, called the “universe”, which is a kind of higher-order version of the Herbrand universe. Based on this simple domain, the denotation of terms and goals is naturally defined as well as the models of programs. Although the declarative semantics is primarily introduced to improve “manual” program construction by programmers, it could be used in a synthesis context.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Krzysztof R. Apt. From Logic Programming to Prolog. Prentice Hall, 1997.
Dante Baldan and Baudouin Le Charlier. Declarative Semantics for Mercury. Technical report, Institute d’ Informatique, FUNDP, Namur, Belgique, 1998.
Dante Baldan, Baudouin Le Charlier, Chistophe Leclère, and Isabelle Pollet. Abstract Syntax and Typing Rules for Mercury. Technical report, Institute d’Informatique, FUNDP, Namur,Belgique, 1998.
Yves Deville. Logic Programming: Systematic Program Development. MIT Press, 1990.
Pierre Flener, Kung-Kiu Lau, and Mario Ornaghi. Correct-schema-guided synthesis of steadfast programs. In M. Lowry and Y. Ledru, editors, Proceedings of ASE’97, Computer Society Press. IEEE, 1997.
Pierre Flener, Kung-Kiu Lau, and Mario Ornaghi. On correct program schemas. In N. E. Fuchs, editor, Proceedings of LOPSTR’97, LNCS. Springer-Verlag, 1997.
Jean Henrard and Baudouin Le Charlier. Folon: An environment for declarative construction of logic programs (extended abstract). In M. Bruynooghe and M. Wirsing, editors, Proc. of PLILP’92, volume 631 of LNCS, Leuven, Belgium, August 1992. Springer-Verlag.
John W. Lloyd. Foundations of Logic Programming. Springer Series: Symbolic Computation-Artificial Intelligence. Springer-Verlag, second, extended edition edition, 1987.
Lee Naish. Types and Intended Meaning. In F. Pfenning, editor, Types in Logic Programming. MIT Press, 1992.
Zoltan Somogyi, Fergus Henderson, and Thomas Conway. The execution algorithm of Mercury, an efficient purely declarative logic programming language. Journal of Logic Programming, 29(1-3):17–64, October-November 1996.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1999 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Baldan, D., Le Charlier, B., Leclère, C., Pollet, I. (1999). A Step Towards a Methodology for Mercury Program Construction: A Declarative Semantics for Mercury. In: Flener, P. (eds) Logic-Based Program Synthesis and Transformation. LOPSTR 1998. Lecture Notes in Computer Science, vol 1559. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-48958-4_2
Download citation
DOI: https://doi.org/10.1007/3-540-48958-4_2
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-65765-1
Online ISBN: 978-3-540-48958-0
eBook Packages: Springer Book Archive