COSTA Coding Rules

This page lists a series a rules which every COSTA developer should follow.

  1. Do not commit code which does not compile.
  2. Do not commit code which issues compilation warnings
  3. Run the regression tests before committing your changes:
    1. If the tests succeed, you can proceed with the commit
    2. Otherwise, a problem is found and it should be fixed before committing
  4. Do not modify code in modules that you are not the author
    1. Please contact the module author first
    2. If you do not know who is the author, please ask in the costa-devel list
  5. Always write in standard Prolog, if you need a library predicate youshould define it in lib/utils
  6. Do not commit any .class file for which we have the source file.
  7. Never ever use paths to your own directory, use the install_dir/2 from global_setting to go the absolute path-name to the analyzer's sub-directories

Coding Style

If you are not an expert Prolog programmer, it is probably a good idea that you read a good style guide. Other rules follow:

  1. When you add a new file to the repository, please do not forget to add the copyright header and a description of the module in SWI documentation style.
  2. Whenever you add a new procedure to an existing module, please add documentation to the corresponding procedure, using SWI documentation style.

Use of Subversion

  1. You should never add to the repository files which are automatically generated
  2. Those files which are automatically generated and are not ignored when executing "svn st" should be added to the files for the corresponding directory which svn should ignore. The idea is that unless you have edited something, executing "svn st" at a working copy of COSTA should only mention that there are some external repositories, nothing else.

Quick Links