Little-JIL Semantic Checker Ruleset

The following conditions currently trigger error or warning messages:
  1. All nonlocal parameters of pre- and post-requisites must be IN, not OUT or IN/OUT.
  2. Every parameter of a substep, reaction, requisite, or handler binding must be bound.
  3. Non-leaf step with no substeps: very strange.
  4. Step unreachable from diagram root.
  5. Root step must have an agent.
  6. Parent step does not handle nor declare exception thrown by substep, requisite, reaction, or handler.
  7. Step has handler for an exception which is not thrown by any of its substeps, requisites, reactions, or handlers.
  8. Non-leaf step throws exception which is not thrown by any of its substeps, requisites, reactions, or handlers.
  9. Race condition: multiple substeps of parallel-sequenced step accessing a parameter which is written to.
  10. 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.
  11. 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.
  12. Multiple interface items (in same step) with same name.
  13. If a step has a "resource use" named "agent", it must be bound in a parameter binding to its parent.
  14. Leaf step has an uninitialized local variable.
  15. Non-leaf step has a parameter or local that is never bound.
  16. Deadlines (indicated by parameter "deadline") only apply to leaf steps.
  17. Try step has unreachable substeps; a nonfinal substep does not throw any exceptions handled by the try step with continue semantics.
  18. Non-leaf step receives out parameter, but does not propogate to a parent, later substep, reaction, exception, or postrequisite.
  19. Non-leaf step's out parameter is never set: it has no static initializer and is never bound.
  20. Unreachable substeps of a sequential step: recursive substep precedes other substeps and throws no exception handled by the parent with continue semantics.
  21. Prerequisite loop: step has itself as a prerequisite or prerequisite's[...] prerequisite, and thus will never execute.
  22. Postrequisite loop: step has itself as a postrequisite or postrequisite's[...] postrequisite, and thus will never complete.
  23. 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