Up Next
Go up to 8 Architectural Constructs
Go forward to 8.2 Unit Compositions

8.1 Unit Declarations and Definitions

UNIT-DECL-DEFN   ::=  UNIT-DECL | UNIT-DEFN
UNIT-DECL        ::=  unit-decl UNIT-NAME UNIT-SPEC
UNIT-DEFN        ::=  unit-defn UNIT-NAME UNIT-TERM
UNIT-NAME        ::=  SIMPLE-ID
A unit declaration UNIT-DECL provides not only a unit specification UNIT-SPEC but also a UNIT-NAME, which is used for referring to the unit in a subsequent UNIT-TERM. The same unit may be used more than once in the composition.

A unit definition UNIT-DEFN names the unit resulting from the composition expressed by its UNIT-TERM. The visibility of unit-names in architectural specifications is linear: each name has to be declared or defined before it is used in a UNIT-TERM.

No UNIT-NAME may be introduced more than once in a particular architectural specification.

UNIT-SPEC-DEFN   ::=  unit-spec-defn UNIT-SPEC-NAME UNIT-SPEC
UNIT-SPEC        ::=  UNIT-SPEC-NAME | UNIT-TYPE
UNIT-TYPE        ::=  unit-type SPEC* SPEC
UNIT-SPEC-NAME   ::=  SIMPLE-ID
A unit specification definition UNIT-SPEC-DEFN provides a name UNIT-SPEC-NAME for a unit specification UNIT-SPEC, which is either a UNIT-TYPE or the name UNIT-SPEC-NAME of another unit specification. A unit satisfies a UNIT-TYPE when it is a persistent function that maps compatible tuples of models of the argument specifications SPEC* to models of their extension by the result specification SPEC.
CoFI Document: CASL/Summary-v0.97 --Version 0.97-- 20 May 1997.
Comments to cofi-language@brics.dk

Up Next