## Syntax Overview

Before describing the details of the language, we provide a few general notes about the syntax. In the syntax notations used below, syntactic categories are indicated by monospace font. Grammar productions enclosed in parenthesis ('( )') indicate a set of choices in which a vertical bar ('|') is used to separate alternatives in the syntax rules or ' ..' is used to describe a range (e.g. ('A'..'Z')). Any characters in single quotes describe concrete syntax: (e.g.: '+', '-', '=>', '''). Note that the last example is the concrete syntax for a single quote. Examples of grammar fragments are also written in the monospace font. Sometimes one of the following characters is used at the beginning of a rule as a shorthand for choosing among several alternatives: 1) The '*' character indicates repetition (zero or more occurrences) and '+' indicates required repetition (1 or more occurrences). 2) A '?' character indicates that the preceding token is optional.

AGREE is built on top of the AADL 2.0 architecture description language. The AGREE formulas are found in an AADL annex, which extends the grammar of AADL. Generally, the annex follows the conventions of AADL in terms of lexical elements and types with some small deviations (which are noted). AGREE operates over a relatively small fragment of the AADL syntax. Thus familiarity with the entire AADL language is not required. We will build up the language starting from the smallest fragments. A cursory overview of the AADL declarations is provided in Appendix B.

AADL describes the interface of a component in a component type. A component type contains a list of features, which are the inputs and outputs of a component, and possibly a list of AADL properties. A component implementation is used to describe a specific instance of a component type. A component implementation contains a list of subcomponents and list of connections that occur between its subcomponents and features.

For example, one may decide to create a component type for a car which contains features describing its throttle, speed, and direction. A car component may have many implementations (like a 2006 Toyota Camry, or a McLaren 650s). Different implementations may contain different electronic components, actuators, etc.

The syntax for a component's contract exists in an AGREE annex placed inside of the component type. AGREE syntax can also be placed inside of annexes in a component implementation or an AADL Package. Syntax placed in an annex in an AADL Package can be used to create libraries that can be referenced by other components.