4

Is there a (relatively) current reference for best practices in Prolog? One suitable for giving to commercial Prolog developers who have not studied logic programming or advanced texts like "The Craft of Prolog"?

There are plenty of general tutorials but the only one on best practices I could find was this one from 1994:

http://www.cs.auckland.ac.nz/~j-hamer/07.363/prolog-for-se.html

There's also the individual question on comp.lang.prolog or here like the following:

Prolog Best Practice: checking if a variable is already bound.

But nothing more comprehensive, current, and suitable to the commercial developer.

This issue came up during an interview for a job that would require formal mentoring and code reviews for beginner to intermediate Prolog developers. Working as an experienced Prolog contractor, I frequently advised other developers who had advanced knowledge of their product and its domain, but were self-taught or who had limited Prolog training. But the mentoring was on an ad hoc basis, responding to their particular day-to-day issues.

Anyway, I've been away from Prolog development for a while and the interviewers question got me thinking that there should be such a reference. If there isn't one out there, I will likely create it myself if I get this job.

Community
  • 1
  • 1
Andy Lech
  • 41
  • 1
  • 6

1 Answers1

8

Coding guidelines for Prolog by Covington et al. is very recent; in fact, I believe it hasn't even been formally published yet. There was some discussion about it on the SWI-Prolog mailing list some six weeks ago.

Fred Foo
  • 355,277
  • 75
  • 744
  • 836
  • Thank you for that. I haven't kept up with SWI-Prolog for a while and was unfamiliar with that article. Michael Covington was my thesis adviser and I've been using a variation on his comment style since graduate school, so I'm not surprised. Sections 5 and 6 are particular interesting for this issue, but I guess what I really had in mind was something more along the line of the koans or katas in Ruby and other languages which teach you how to solve various types of problems using different language features. For example, backtracking, cuts, failure-driven loops, disjunctions, etc. – Andy Lech Apr 06 '11 at 21:39
  • I am new to using this site as a user and not just a reader, so I seem to have bungled my comment and the answer acceptance procedure. The Covington, et al. article is useful, but I still may need to create my own tutorials for a more problem-solution style of instruction. – Andy Lech Apr 06 '11 at 21:56