Syntax Checking of Rulesheet Authoring Form

Executing these steps do not necessarily impact the authoring form rulesheet in its "source" state as exhibited when resident within a rulesheet repository. These steps are necessary only in order to conduct validation, and any changes brought about by these steps do not need to be persisted with the rulesheet. Steps prior to syntax checking:

Include Resolution: One step prior to the syntax check shall be recursive Include Resolution. Include statements can be unconditional or conditional on the Rulesheet Retrieval context (entity's stake {PrimaryCustodian or Stakeholder}, ProblemSpace, entity URI, & PrimaryCustodian URI).

Whitespace Clean-up: Prior to checking the syntax of the authoring form, a whitespace clean-up may be performed. Some authoring forms may have constraints on whitespace usage or on the characters that are interpreted as meaningful whitespace. For instance, Booliette employs meaningful whitespace indentation, and this whitespace indentation must be (as is understood at time of this writing) indicated by spaces (ASCII 32). Authoring form "end of line", which is the backslash character, will also be cleaned up. A whitespace clean-up step prior to any syntax checking is strongly recommended so as to convert what the author intended to be meaningful whitespace into the actual required characters for the specific authoring form, such as converting tabs to spaces.

Thesaurus Lookup: The CDCL authoring form may be extensible either through implementation of enhancements in the syntax checking software (i.e. version releases of CDCL), which we can call "new words", or through use of synonyms for already supported words. Synonyms can be author-defined through use of aliases within rulesheets, which could be construed as an author's own "dialect". However, synonyms can also be defined with the intent to be universal. This latter approach requires a distribution scheme to make such universal synonyms available to all CDCL implementations. This necessitates availability of the thesaurus for each syntax checking implementation (whether in a Gatepoint, in a rulesheet repository, or in an editor). No implementation is compelled to use any such thesaurus; it's optional. However, when an implementation uses a thesaurus, it will pass all semantic tags discovered with each word to the thesaurus, and the thesaurus in turn will reply with the information it knows or can glean about the semantics. The syntax check implementation can then use these thesaurus-supplied semantics in order to equate words present in a rulesheet with the fundamental set of words within the syntax check implementation. Additionally, an implementation may also perform the initial semantic mark-up of the authoring form should there be no semantics found on the words. The specifics about the approach used to perform this initial mark-up, however, may vary from implementation to implementation. There is no proposed standard by which the initial mark-up shall be conducted. For example, an implementation may choose to conduct initial mark-up by relying on an internally configured map between words and semantic tags while others may choose an alternative approach. Whether or not a thesaurus is used, all aliases must be resolved to the syntax checking process' native dictionary at the level of the rulesheet so that other rulesheets, whether they're present through include directives or present in an assembled rulesheet deck, may have their aliases resolved without contention over synonyms. For example, one author may use Y as a synonym for X whereas another author may use Y as a synonym for Z.

The syntax checking step:
Now that the rulesheet has been "pre-processed", a check of the authoring form's syntax shall be performed (see CdclEbnf), followed by a check of Rulesheet Logical Coherence (see below).

Rulesheet Logical Coherence Checking of CDCL Authoring Form

In the list below, some validations are indicated as assumptions. These assumptions are made by rulesheet authors and are validations performed by the Gatepoint at run-time (i.e. policy evaluation time).