English

Coding Guidelines for Prolog

Programming Languages 2011-05-18 v3

Abstract

Coding standards and good practices are fundamental to a disciplined approach to software projects, whatever programming languages they employ. Prolog programming can benefit from such an approach, perhaps more than programming in other languages. Despite this, no widely accepted standards and practices seem to have emerged up to now. The present paper is a first step towards filling this void: it provides immediate guidelines for code layout, naming conventions, documentation, proper use of Prolog features, program development, debugging and testing. Presented with each guideline is its rationale and, where sensible options exist, illustrations of the relative pros and cons for each alternative. A coding standard should always be selected on a per-project basis, based on a host of issues pertinent to any given programming project; for this reason the paper goes beyond the mere provision of normative guidelines by discussing key factors and important criteria that should be taken into account when deciding on a fully-fledged coding standard for the project.

Keywords

Cite

@article{arxiv.0911.2899,
  title  = {Coding Guidelines for Prolog},
  author = {Michael A. Covington and Roberto Bagnara and Richard A. O'Keefe and Jan Wielemaker and Simon Price},
  journal= {arXiv preprint arXiv:0911.2899},
  year   = {2011}
}

Comments

39 pages, 4 figures, 2 tables

R2 v1 2026-06-21T14:11:51.894Z