Next: , Previous: Top, Up: Top


1 Typed Entities

The Typing module implements the definition and use of typed entities. It is instantiated by

        $/Type/Typing.gnrc +referto=KEY :inst

The referto parameter modifies the names of Key attributes, and has to be the same as the referto parameter used for the module instance that supplies those key attributes.

Each distinct type is represented by a distinct DefTableKey value. The roles of this module use a property IsType (set to 1) of such type keys to distinguish them from keys for other entities. Further properties of the type keys may be used to characterize the particular type. NoKey represents an unknown or non-existent type.

A known key must be established for each type required by the language definition (see How to specify the initial state).

When an identifier is used to represent a typed entity such as a variable or constant, the type specified by a defining occurrence of the identifier must be made available at each applied occurrence. The module exports computational roles to support typed identifiers:

TypedDefId
The computational role inherited by a grammar symbol that represents a defining occurrence of an identifier for a typed entity.
TypedUseId
ChkTypedUseId
The computational roles inherited by a grammar symbol that represents an applied occurrence of an identifier for a typed entity.
TypedDefinition
The computational role inherited by a grammar symbol that represents a definition of one or more typed entities.