Go up to Architectural Constructs
Go forward to Unit Compositions

Unit Declarations

! 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. No UNIT-NAME may be declared more than once in a particular architectural specification.

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.

! UNIT-SPEC-DEFN   ::=  unit-spec-defn UNIT-SPEC-NAME UNIT-SPEC
! UNIT-SPEC-NAME   ::=  SIMPLE-ID
! UNIT-SPEC        ::=  UNIT-SPEC-NAME | UNIT-TYPE
  UNIT-TYPE        ::=  unit-type SPEC* SPEC
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. A UNIT-TYPE is well-formed only when the signature of the union of the argument specifications is included in the signature of the result.
CoFI Document: LanguageSummary --DRAFT, Version 0.96-- 30 April 1997.
Comments to cofi-language@brics.dk