Purify tends to get confused because of the threads package used in Shore, and also because "uninitialized" data is sometimes "read" in a DBMS in order to be written. A sample ".purify" suppressions file is in the top-level "utils" directory of the release, and this reduces some of the warnings. You then have an option: you can either compile Shore with the USE_PURIFY flag --- this eliminates some of Purify's confusion. Optionally, you can pipe the output of the Purify'ed server through the "disinfect" script (which is also in the top-level "utils" directory). This removes many spurious messages. However, using this approach precludes the use of the graphical Purify interface. Instead, you should set something like the following in your .cshrc.
We have lacked the time to fully remove memory leaks, but this is a process that we are gradually undertaking.setenv PURIFYOPTIONS "-output-limit=100000 -free-queue-length=500 -chain-length=10 -cache-dir=/home/praveen/purifycache -always-use-cache-dir=yes -windows=no -ignore-signals=0xffffffff -handle-signals=0x00000400" setenv QUANTIFYOPTIONS "-cache-dir=/home/praveen/qfycache -always-use-cache-dir=yes"
No code should be added to the PREDATOR codebase without accompanying documentation. The conventions below must be followed to insure uniform results.
All comments associated with a specific declaration, e.g., class, must preceed the declaration. Those that follow it (including those on the same line) will be associated with the next declaration.
Before checking in your code, insure that the documentation generated for your code is comprehensible and explicit.
If a data member requires more documentation than can be written on a single line, you may use the /** ... */ format; for example:
General Conventions
Every class, data member, and function member must be documented. Documentation takes place in .h and .java files only. Documentation in .cpp files, although very helpful for those reading your code, are not processed by DOC++.
Class Declaration Conventions
Every class declaration, even nested class declarations, must be preceeded by a comment of the form:
Things to note about the comment:
/**
* [Memo]. (optional)
* [Documentation]
* @see [Related classes, topics, etc.] (optional)
* @author [Your name and e-mail address] (optional)
* @version [The date the code was checked in, e.g., June 1, 1997] (optional)
*/
class Foo : public Bar { ... };
Here is an example of a well-documented class:
/**
* The parse structure for functions over audio types. This class
* encapsulates all the necessary information to parse an expression over
* an audio object, including the ID of the method and any catalog
* information required.
* @see XxxFuncParseInfo, XxxAudioADT
* @author Leong Kian Fai
* @version June 1, 1997
*/
class ParseInfo : public XxxFuncParseInfo { ... }
Member Declaration Conventions
All class members must be documented, no matter how trivial they may seem. Documentation of a data member consists of preceeding its declaration with a /// comment; for example:
If the presence of /// messes up the autoindent on your editor,
try //// instead -- this usually works fine.
Comments which are on the same line, e.g.,
/// The method ID of the method relevant to this structure
AudioMethType MethType;
will not be properly processed.
AudioMethType MethType; /// The method ID of the method
/**
* The method ID of the method relevant to this structure. It is important
* to note that the value UNDEFINED will cause mass destruction, and its
* use should be disallowed.
*/
AudioMethType MethType;
Function Declaration Conventions
Every function declaration must be preceeded by a comment of the form:
Things to note about the comment:
/**
* [Memo].
* [Documentation]
* @param param1 [Description of what param1 is]
* [...]
* @param paramn [Description of what paramn is]
* @return [Description of return value]
*/
XxxErrCode FooBar (int param1, ..., int paramn);
Here is an example of a well-documented function:
/**
* Action for the vibro-volume merge rule.
* This is the action performed when the vibro-volume merge rule is
* applied. It transforms the two expressions into an equivalent
* single expression.
* @param InVExpr The incoming expression
* @param RuleData Any data passed in by the rule firing
* @param OutVExpr The resultant expression
* @return The status code.
*/
static XxxErrCode VibroVolumeMergeAct(XxxValueExpression* InVExpr,
void* RuleData,
XxxValueExpression*& OutVExpr);
Generating Documentation
To generate the PREDATOR documentation automatically, type
in your $XXXROOT directory.
make doc
When you add a new file with documentation...
When a new .h or .java file is added, DOC++ must be made aware of it. Each directory in the codebase has a file called doc++.items. It is a list of //@Include: directives. Add your file to the list in its directory. It will then be processed by DOC++.
Idiosyncracies of DOC++
Since DOC++ is also free software from a research project, it has certain
idiosyncracies to be aware of -- all the same, it is tremendously useful
if you intend to have others understand your code.
Instead, use:
class Foo { public:
....
};
class Foo {
public:
....
};
MAIL:: User support: predator-support@cs.cornell.edu
Project information :
praveen@cs.cornell.edu