Little-JIL Semantic Checker Ruleset
The following conditions currently trigger error or warning messages:
-
All nonlocal parameters of pre- and post-requisites must be IN, not
OUT or IN/OUT.
-
Every parameter of a substep, reaction, requisite, or handler
binding must be bound.
-
Non-leaf step with no substeps: very strange.
-
Step unreachable from diagram root.
-
Root step must have an agent.
-
Parent step does not handle nor declare exception thrown by substep,
requisite, reaction, or handler.
-
Step has handler for an exception which is not thrown by any of its
substeps, requisites, reactions, or handlers.
-
Non-leaf step throws exception which is not thrown by any of its
substeps, requisites, reactions, or handlers.
-
Race condition: multiple substeps of parallel-sequenced step
accessing a parameter which is written to.
-
Value of parameter used in an IN or IN/OUT parameter binding has no
static initializer, is not passed in from a parent, and is not bound
to an out parameter of a previous substep.
-
Value of parameter used in an IN or IN/OUT parameter binding with a
handler step has no static initializer, is not passed in from a
parent, and is not bound to an out parameter of a substep which will
be executed before one throwing the exception being handled.
-
Multiple interface items (in same step) with same name.
-
If a step has a "resource use" named "agent", it must be bound in a
parameter binding to its parent.
-
Leaf step has an uninitialized local variable.
-
Non-leaf step has a parameter or local that is never bound.
-
Deadlines (indicated by parameter "deadline") only apply to leaf
steps.
-
Try step has unreachable substeps; a nonfinal substep does not throw
any exceptions handled by the try step with continue semantics.
-
Non-leaf step receives out parameter, but does not propogate to a
parent, later substep, reaction, exception, or postrequisite.
-
Non-leaf step's out parameter is never set: it has no static
initializer and is never bound.
-
Unreachable substeps of a sequential step: recursive substep
precedes other substeps and throws no exception handled by the
parent with continue semantics.
-
Prerequisite loop: step has itself as a prerequisite or
prerequisite's[...] prerequisite, and thus will never execute.
-
Postrequisite loop: step has itself as a postrequisite or
postrequisite's[...] postrequisite, and thus will never complete.
-
Steps along a step's recursive cycle throw no exceptions
and do no resource acquisitions, and the step has no rethrow or
complete handlers. Recursion may be infinite.
Other formats
The rule file which contains the checker error and warning rules is
available as XML (text). The following formats are generated
using Rule2Latex:
Rule Format
The basic rules follow standard xlinkit
format, but some extra information is used for the checker's reporting
facilities.
Error messages and information are read from the xlinkit rule file. The
message itself is the collapsed-whitespace version of the consistencyrule
header's description element. To signify whether the rule is an
error or a warning, use a meta:msg tag in the header with the
attribute mode set to error or warning. Titles
for the operands (XPath expressions on the LJIL-XML document, which we
evaluate and attempt to describe using the LJILErrorOperand class)
returned by xlinkit can be specified with a meta:operand tag having
a seq attribute specifying the number (starting at 1) of the
operand. The title attribute is, of course, the title.
Example:
<header>
<author>Shimon Rura, shimon@rura.org</author>
<description>
All nonlocal parameters of pre- and post-requisites must be IN, not
OUT or IN/OUT.
</description>
<meta:msg mode="error"/>
<meta:operand seq="1" title="Requisite"/>
<meta:operand seq="2" title="Step"/>
<meta:operand seq="3" title="Parameter Decl"/>
</header>
Little-JIL XML
For your convenience, here is a useful UML
diagram of the Little-JIL XML DTD. Since I generated this image using
XMLSpy, the DTD has changed to allow
parameter-binding elements within prerequisite and
postrequisite elements, but not (yet) in any other way.
shimon@rura.org