arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 0911.2899cs.PL
收藏

Prolog的编码指南

Coding Guidelines for Prolog

Michael A. Covington, Roberto Bagnara, Richard A. O'Keefe, Jan Wielemaker, Simon Price

摘要:

编码标准和良好实践是软件项目的规范方法的基础,无论它们使用什么程序设计语言。Prolog编程可以从这样的方法中受益,也许比其他语言的编程受益更多。尽管如此,到目前为止似乎还没有出现广泛接受的标准和做法。本文件是填补这一空白的第一步:它提供了直接的指导方针,代码布局,命名约定,文档,正确使用Prolog功能,程序开发,调试和测试。每一项准则都有其基本原理,如果存在合理的选择,还说明了每一种选择的相对利弊。编码标准应始终选择在每个项目的基础上,根据主机相关的任何给定的编程项目的问题,因此,本文超越了仅仅提供规范性的指导方针,讨论关键因素和重要的标准,应考虑到在决定一个成熟的编码标准的项目。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑