This document describes the conventions to be observed when writing code and documentation for the Decision Procedure Toolkit.
svn
Id
keyword. This first
comment may violate the 80 column maximum rule. The second comment
is a one-line summary of the purpose of the file. For example, this
file begins with the following comments:
The form of the one-line summary comment may be different from the others to ensure that it is seen by the ocamldoc tool. More specific requirements on the form of the one-line summary comment will given below where relevant.〈!-- $Id: conventions.html 1785 2007-09-28 ... agoel3 $ --〉 〈!-- Description of project coding and documentation standards. --〉
〈!-- Copyright 2007 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. ...
_
”. A file name might look
like this:
multi_word_module.ml
_
” and should start with a lower-case
letter. A module name might look like this:
Multi_word_module
_
”. A module type name might look like
this:
MultiWordModuleType
_
” and should start
with a lower-case letter. A class or class type name might look
like this:
multi_word_class
_
”. A type constructor
name might look like this:
MultiWordTypeConstructor
_
”. A multi-word exception name might
look like this:
Multi_word_exception
_
”. A multi-word name might look like
this:
multi_word
*
”
on the second comment.
(* $Id: vec.mli 1785 2007-09-28 ... agoel3 $ *) (** Dynamically resizable arrays. *)
(** Description of ModuleType *) module type ModuleType = sig ... end
(** Bar is a foo kind of thing. *) include Foo
(** Description of type t *) type t
val v: t (** Description of value v *) method m: t (** Description of method m *)
The heading comments in OCamlLex files should be given as OCamlLex comments. A separate/* $Id: smtlib_grammar.mly 1785 2007-09-28 ... agoel3 $ */ %{ (** Parser for SMT-LIB theory, logic, and benchmark files. *) (* Copyright 2007 ...
.mli
file can, and should, be
specified for the OCamlLex file with appropriate OCamlDoc comments
included._
”. A multi-word terminal
name might look like this:
MULTI_WORD_TERMINAL
_
”. A multi-word name might look like
this:
multi_word
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <HTML> <HEAD> <LINK rel="stylesheet" href="ocamldoc_html/style.css" type="text/css">
<HEAD>
”.<ADDRESS> © 2007 Intel Corporation </ADDRESS> </BODY> </HTML>