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





Comments