Prolog for imperative programmers

  • Kumar A
N/ACitations
Citations of this article
9Readers
Mendeley users who have this article in their library.

Abstract

Once students master the imperative programming paradigm, they find it hard to learn to work with a declarative language such as Prolog. In order to help our students make the transition from imperative to pure declarative programming, we have identified many common misconceptions and pitfalls to which imperative programmers are susceptible. We have attempted to recast the semantics of commonly misunderstood data and control constructs in Prolog in terms of the more familiar imperative constructs. Furthermore, in order to promote declarative rather than imperative programming in Prolog, we have devised a set of programming templates, organized by input-output characteristics of the problems to which they apply. We have found that these templates are helpful in teaching logic programming in our Comparative Programming Languages course.In this paper, we will present the common misconceptions of imperative programmers as they begin programming in Prolog, and our attempts to dispel them. We will also present and analyze the templates we have developed to help our students make the transition from imperative to declarative programming. Finally, we will list some of the problems that our students have successfully solved over the years, as evidence of the effectiveness of the tools and techniques we present.

Cite

CITATION STYLE

APA

Kumar, A. N. (2002). Prolog for imperative programmers. J. Comput. Small Coll., 17(6), 167–181. Retrieved from http://portal.acm.org/citation.cfm?id=775742.775771

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free