Introduction

This chapter provides a high-level overview of CDL and the criteria for valid, executable rule definitions.

This chapter covers the following topics:

Overview of the Constraint Definition Language (CDL)

The Constraint Definition Language (CDL) is a modeling language. CDL allows you to define configuration rules, the constraining relationships among items in configuration models, by entering them as text. A rule defined in CDL is an input string of characters that is stored in the CZ schema of the Oracle Applications database, validated by a parser, translated into executable code by a compiler, and interpreted at runtime by Oracle Configurator.

You use CDL to define a Statement Rule in Oracle Configurator Developer by entering the rule’s definition as text rather than interactively assembling the rule’s elements. Because you use CDL to define them, Statement Rules can express more complex constraining relationships than interactively defined configuration rules.

For information about creating Statement Rules in Configurator Developer, see the Oracle Configurator Developer User's Guide..

CDL also supports writing rules in rule-writing environments other than Configurator Developer for the purpose of importing rules directly into the CZ schema. For details about the availability of this functionality, see the Oracle Configurator Implementation Guide.

Relationships Expressed in CDL

Using CDL, you can define the following relationships that are supported by the rules available in Oracle Configurator Developer:

The other types of relationships that can be defined in Configurator Developer (Explicit Compatibility Rules and Design Charts) cannot be expressed in CDL.

For more information about the kinds of relationships that are supported in CDL, see Kinds of Relationships or Constraints Available in CDL.

Terminology

The table Terminology Used in This Book describes the terms that are used throughout this guide. For a description of the Model that is used for all of the examples in this guide, see The House Model and its Window Submodel.

Terminology Used in This Book
Term Description
Cartesian product A set of tuples that is constructed from two or more given sets and comprises all permutations of single elements from each set such that the first element of the tuple is from the first set and the second is from the second set, and so on.
clause A segment of a rule statement consisting of a keyword and expression.
collection A set of multiple operands within parentheses and separated by commas.
compiler The part of Oracle Configurator that first parses rule definitions and then generates code that is executable at runtime.
explicit statement Explicit statements express relations among explicitly identified participants and restrict execution of the rule to those participants and the Model containing those participants.
expression A subset of the statement that contains operators and operands
formal identifier A variable that is defined in the scope of an iterator statement to represent an iterating identifier.
iterator statement Iterators are query-like statements that iterate, or repeat, over one or multiple relations or constraints.
non-terminal The kind of symbols used in the notation for presenting CDL grammar that represent the names of grammar rules.
parser A component of the Oracle Configurator compiler that analyzes the syntactic and semantic correctness of statements used in rule definitions.
relationship A type of constraint expressed in a single statement or clause. A relationship can be equivalent to a simple rule. A Statement Rule expresses one or more relationship types but is not itself a type of relationship.
signature The distinct combination of a function’s attributes, such as name, number of parameters, type of parameters, return type, mutability, and so on.
singleton A single operand that is not within a collection.
statement The entire sentence that expresses the rule’s intent. A CDL rule definition can consist of multiple statements, each consisting of clauses containing expressions, and separated by semi-colons.
terminal The kind of symbols used in the notation for presenting CDL grammar that represent the names, characters, or literal strings of tokens.
token The result of translating characters into recognizable lexical meaning. All text strings in the input stream to the parser, except whitespace characters and comments, are tokens. For more information about the use of special characters, see the Oracle Configurator Developer User’s Guide.
unicode A 16-bit character encoding scheme allowing characters from Western European, Eastern European, Cyrillic, Greek, Arabic, Hebrew, Chinese, Japanese, Korean, Thai, Urdu, Hindi and all other major world languages, to be encoded in a single character set.

Additional terms are listed in the Glossary.

Syntax Notation

CDL Statement Syntax Notation describes the valid statement syntax notation for CDL. The table lists the available symbols and provides a description of each. This notation is used throughout this book for CDL examples and in the syntax reference in Notation Used in Presenting CDL Grammar.

CDL Statement Syntax Notation
Symbol Description
-- or // A double hyphen or double slash begins a single line comment that extends to the end of the line.
/* */ A slash asterisk and an asterisk slash delimits a comment that spans multiple lines.
&lower case Lower case prefixed by the ampersand sign is used for names of formal parameters and iterator local variables.
UPPER CASE Upper case is used for keywords and names of predefined variables or formal parameters.
Mixed Case Mixed case is used for names of user-defined Model nodes, names of user-defined rules
; A semi-colon indicates the end of one statement and the beginning of the next

In the examples in this book, an implied carriage return occurs at the end of each line, unless otherwise noted. You must press the Enter key at the end of a line of input. The table below lists the typographic and symbol conventions used in this book, such as ellipses, bold face, italics.

Convention Meaning
.
.
.
Vertical ellipsis points in an example mean that information not directly related to the example has been omitted.
. . . Horizontal ellipsis points in statements or commands mean that parts of the statement or command not directly related to the example or relevant to the discussion have been omitted
boldface text Boldface type in text indicates a new term, a term defined in the glossary, specific keys, and labels of user interface objects. Boldface type also indicates a menu, command, or option, especially within procedures
italics Italic type in text, tables, or code examples indicates user-supplied text. Replace these placeholders with a specific value or string.
[ ] Brackets enclose optional clauses from which you can choose one or none.
> The left bracket alone represents the MS DOS prompt.
$ The dollar sign represents the DIGITAL Command Language prompt in Windows and the Bourne shell prompt in Digital UNIX.
% The per cent sign alone represents the UNIX prompt.
name() In text other than code examples, the names of programming language methods and functions are shown with trailing parentheses. The parentheses are always shown as empty. For the actual argument or parameter list, see the reference documentation. This convention is not used in code examples.