Skip to main content

How to Use Guarded Functional Programming

  • Conference paper
Declarative Programming, Sasbachwalden 1991

Part of the book series: Workshops in Computing ((WORKSHOPS COMP.))

  • 36 Accesses

Abstract

Guarded functional programming (GFP) has been proposed as an approach to integrate functional programming, represented by equations and rewriting, and logic programming, represented by Horn clauses and SLD resolution. The basic programming constructs are guarded equations, i.e. equations conditioned by guards which are Horn logic goals. When an equation is applied to rewrite an expression, its guard must be solved first. If a guard has more than one solutions, only one is considered (committed choice). In an extension of GFP, list comprehensions can be used to collect all solutions of a goal (GFP*). This paper presents a systematic approach how to use GFP* with respect to a classification of functions and relations regarding non-determinism properties. A sample problem is described whereof a taxonomy of functions and relations is derived. It is shown how the programming constructs of GFP* reflect this taxonomy and a systematic solution of the sample problem is outlined.

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. M. M. T. Chakravarty. Die funktional logische Programmiersprache Guarded termml: Sprachdefinition. Technical report, GMD Research Laboratory Karlsruhe, May 1991.

    Google Scholar 

  2. R. Dietrich. Vergleichende Analyse von Inferenzsystemen. GMD-Bericht Nr. 188. R. Oldenbourg Verlag, 1990.

    Google Scholar 

  3. R. Dietrich. The PHOENIX case study: EXIS - an environment for experimenting with inference systems. GMD-Studie Nr. 190, April 1991.

    Google Scholar 

  4. R. Dietrich and H. C. R. Lock. Exploiting non-determinism through laziness in guarded functional languages. In TAPSOFT’91, Colloquium on Combining Paradigms for Software Development, Brighton, England, April 1991.

    Google Scholar 

  5. R. Dietrich and H. Pull. Case studies in declarative programming. GMD Forschungsstelle Karlsruhe and Imperial College, London, PHOENIX-Deliverable A. 2. 1, March 1991.

    Google Scholar 

  6. W. Drabent. Do logic programs resemble conventional programs. In 4th IEEE Symposium on Logic Programming, San Francisco, pages 389–397, 1987.

    Google Scholar 

  7. Yi-Ke Guo and H. C. R. Lock. A Classification Scheme for Declarative Programming Languages. - Syntax, Semantics, and Operational Models. GMD-Studien Nr. 182, August 1990.

    Google Scholar 

  8. Loc88] Hendrik C.R. Lock. Guarded Term ML. In Workshop on Implementations of Lazy. Functional Languages,Aspenas, Sept. 1988. Report 53, PMG, Univ. of Goteborg, Sweden.

    Google Scholar 

  9. MMTC91] H. C. R. Lock M. M. T. Chackravarty. The Implementation of Lazy Narrowing. In Programming Language Implementation and Logic Programming (PLILP’91), Passau,August 1991. Springer LNCS (to appear).

    Google Scholar 

  10. N. J. Nilsson. Principles of Artificial Intelligence. Springer, 1982.

    Google Scholar 

  11. J. A. Robinson. A machine oriented logic based on the resolution principle. JACM, 12, No. 1: 23–41, January 1965.

    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

© 1992 Springer-Verlag London

About this paper

Cite this paper

Dietrich, R. (1992). How to Use Guarded Functional Programming. In: Darlington, J., Dietrich, R. (eds) Declarative Programming, Sasbachwalden 1991. Workshops in Computing. Springer, London. https://doi.org/10.1007/978-1-4471-3794-8_3

Download citation

  • DOI: https://doi.org/10.1007/978-1-4471-3794-8_3

  • Publisher Name: Springer, London

  • Print ISBN: 978-3-540-19735-5

  • Online ISBN: 978-1-4471-3794-8

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics