CDL Validation

This appendix provides additional information about the Oracle Configurator parser’s expectations and requirements during rule validation.

This appendix covers the following topics:

Validation of CDL

As with any language, CDL requires a precise syntax and grammar to ensure that it can be interpreted by Oracle Configurator. The Oracle Configurator parser handles validation at the level of individual rules. A compiler uses the parser to validate the entire set of rules in a configuration model, and then translates them into executable code.

The Parser

The Oracle Configurator parser analyzes the CDL input stream of a rule definition. The parser ignores whitespace and comments and only analyzes the tokens of the input stream to determine if the rule definition is valid.

The parser validates the grammar and structure of rule definition tokens according to the Extended Backus-Naur Form (EBNF). For more information, see Notation Used in Presenting CDL Grammar. The parser is part of the compiler. For details about the compiler, see The Compiler.

Calling the Oracle Configurator Parser

In Configurator Developer, clicking the following buttons in the Statement Rule Details page calls the Oracle Configurator parser:

The Parser’s Validation Criteria

Unless all of the following are true, the parser returns an error:

The Compiler

The Oracle Configurator compiler parses all the rule definitions in a Model and then translates the rule set into executable code that can be interpreted by the runtime Oracle Configurator engine.

Calling the Oracle Configurator Compiler

The compiler runs when you generate Model logic in Configurator Developer.

For more information, see the section on generating Model logic, Oracle Configurator Developer User's Guide.

For information about generating logic programmatically using CZ_modelOperations_pub.GENERATE_LOGIC and CZ_modelOperations_pub.REFRESH_JRAD_UI, see the Oracle Configurator Implementation Guide.

The Compiler’s Validation Criteria

Unless the following are true, the compiler returns an error:

The Input Stream to the Oracle Configurator Parser

The input stream presented to the Oracle Configurator parser for lexical analysis is a sequence of Unicode characters. The input stream is processed through the following translations:

Unicode Characters

Unicode escaped characters are of the format \uxxxx where xxxx is the hexadecimal value representing the character in the Unicode character set. For example the Unicode escape of the character "?" is "\u003f".

Name Substitution

When parsing identifiers that are references, the Oracle Configurator parser extracts the identity of each identifier (ps_node_id/model_ref_expl_id) and stores it with the intermediate representation of the identifier. This preserves the semantics of the rules regardless of name changes or modifications to the Model structure.

Name Persistency

Since the model object identifiers are case insensitive, the Oracle Configurator parser must preserve the original format of the rule definition. If the Model structure or node names participating in the rule do not change, Configurator Developer displays the original text exactly as it was entered.

If the name of a rule participant changes, Configurator Developer automatically updates the displayed rule definition at the time of viewing or in the Model Report to prevent you from being misdirected to a different or no longer existing Model node.

Ambiguity Resolution

Model structure changes or changes to a node can cause one or more of the references participating in a rule definition to become ambiguous. You must manually resolve ambiguities by inserting or removing identifiers from the reference, as needed.