Programming in Prolog (2nd ed.)
Programming in Prolog (2nd ed.)
Projects in the programming languages course
ITiCSE '05 Proceedings of the 10th annual SIGCSE conference on Innovation and technology in computer science education
Some prospective approaches for the shift of programming paradigms
Proceedings of the 2013 International Conference on Information Systems and Design of Communication
Hi-index | 0.00 |
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.