Skip to main content

A Step Towards a Methodology for Mercury Program Construction: A Declarative Semantics for Mercury

  • Conference paper
  • First Online:
Logic-Based Program Synthesis and Transformation (LOPSTR 1998)

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

  • 202 Accesses

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.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Krzysztof R. Apt. From Logic Programming to Prolog. Prentice Hall, 1997.

    Google Scholar 

  2. Dante Baldan and Baudouin Le Charlier. Declarative Semantics for Mercury. Technical report, Institute d’ Informatique, FUNDP, Namur, Belgique, 1998.

    Google Scholar 

  3. 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.

    Google Scholar 

  4. Yves Deville. Logic Programming: Systematic Program Development. MIT Press, 1990.

    Google Scholar 

  5. 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.

    Google Scholar 

  6. 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.

    Google Scholar 

  7. 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.

    Google Scholar 

  8. John W. Lloyd. Foundations of Logic Programming. Springer Series: Symbolic Computation-Artificial Intelligence. Springer-Verlag, second, extended edition edition, 1987.

    Google Scholar 

  9. Lee Naish. Types and Intended Meaning. In F. Pfenning, editor, Types in Logic Programming. MIT Press, 1992.

    Google Scholar 

  10. 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.

    Article  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics