10.1145/1411260.1411271acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedings
research-article

Declarative language extensions for prolog courses

ABSTRACT

In this paper we present several extensions to support a more declarative view of programming in Prolog. These extensions enable introductory Prolog courses to concentrate on the pure parts of Prolog for longer periods than without. Even quite complex programs can now be written free of any reference to the more problematic constructs. Our extensions include an alternate way to handle the occurs-check, efficient side-effect free I/O with DCGs, and a uniform approach to integer arithmetic that overcomes the disadvantages of arithmetical evaluation and finite domain constraints, but combines and amplifies their strengths. All extensions have been included recently into the SWI-Prolog distribution.

References

  1. K. Apt, A. Pellegrini. Why the occur-check is not a problem. PLILP. 1992. LNCS 631. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. E. Barendsen, J. E. W. Smetsers. Conventional and uniqueness typing in graph rewrite systems. FSTTCS. 1993. LNCS 761. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. M. Carlsson, G. Ottosson, B. Carlson. An Open-Ended Finite Domain Constraint Solver. PLILP. 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. A. Colmerauer. Prolog and Infinite Trees. Logic Programming, K. L. Clark, S.-A. Trnlund (eds), 1982.Google ScholarGoogle Scholar
  5. P. Deransart. The problem of unification in standard Prolog - a discussion paper in ISO/IEC JTC1 SC22 WG17 N59 Prolog, Vienna papers - 2 - 1990.Google ScholarGoogle Scholar
  6. P. Deransart, G. Ferrand, M. Teguia. NSTO Programs (Not Subject to Occur-Check). ISLP. 1991.Google ScholarGoogle Scholar
  7. P. van Hentenryck. Constraint Satisfaction in Logic Programming. MIT Press, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. P. Hudak, J. Hughes, S. Peyton Jones, Ph. Wadler. A History of Haskell: Being Lazy with Class. HOPL ACM 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. ISO/IEC 13211-1 Programming languages - Prolog - Part 1: General core. 1995. (7.3 Unification)Google ScholarGoogle Scholar
  10. F. Mesnard, U. Neumerkel. Applying static analysis techniques for inferring termination conditions of logic programs. SAS. 2001, LNCS 2126. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Z. Michalewicz, D. B. Fogel. How to Solve It: Modern Heuristics. Springer, 1998/2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. P. Moura (ed.) ISO/IEC DTR 13211-3:2006 Definite clause grammar rules (Draft of April 2008).Google ScholarGoogle Scholar
  13. U. Neumerkel. Pruning Infinite Failure Branches in Programs with Occur-Check. LPAR. 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. U. Neumerkel. How to teach Prolog. Teaching beginners Prolog. Tutorial PAP. 1995.Google ScholarGoogle Scholar
  15. U. Neumerkel. Teaching Prolog and CLP, Tutorial ICLP. 1997.Google ScholarGoogle Scholar
  16. U. Neumerkel, F. Mesnard. Localizing and explaining reasons for nonterminating logic programs with failure slices. PPDP. 1999. LNCS 1702. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. U. Neumerkel, St. Kral. Declarative program development in Prolog with GUPU. WLPE. 2002.Google ScholarGoogle Scholar
  18. P. Pritchard, D. Gries. The Seven-Eleven Problem. Cornell University TR 83-574 http://hdl.handle.net/1813/6414 1983. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. R. Scowen. Unification - another discussion paper in ISO/IEC JTC1 SC22 WG17 N59 Prolog, Vienna papers - 2 - 1990.Google ScholarGoogle Scholar
  20. E. Shapiro, Algorithmic Program Debugging. MIT Press, 1983. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Z. Somogyi, F. Henderson, Th. Conway. The execution algorithm of Mercury: an efficient purely declarative logic programming language. JLP 29(1-3), 1996.Google ScholarGoogle Scholar
  22. J. Wielemaker. A programming environment for developing large applications. LPE. 1990.Google ScholarGoogle Scholar
  23. J.Wielemaker. An overview of the SWI-Prolog programming environment. WLPE. 2003.Google ScholarGoogle Scholar
  24. J. Wielemaker. Prolog Unit Tests. Manual. http://www.swi-prolog.org/packages/plunit.html 2006.Google ScholarGoogle Scholar
  25. J. Wielemaker, U. Neumerkel. Garbage Collection for Pure Input Streams. Submitted paper. 2008.Google ScholarGoogle Scholar

Index Terms

  1. Declarative language extensions for prolog courses

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Article Metrics

        • Downloads (Last 12 months)39
        • Downloads (Last 6 weeks)1

        Other Metrics

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!