Chapter 10. Defining Facets

Facet definitions nearly always take one of two forms: (i) item declarations or (ii) direct definitions. Item declarations use the same form as used with other Rosetta items. Specifically, a label, type, and value are used to create an item declaration of the form:

      f ::T is v

where f names the new facet, T is the facet’s type, and v is the facet’s value. This style is used frequently when the value of a facet is calculated from other facets using the facet algebra or when defining a facet variable whose value is unknown.

Like functions, this definition style can be cumbersome and difficult to read in many circumstances. Thus, a special syntax is provided to define facets directly. Called direct definition, this syntax ...

Get System-Level Design with Rosetta now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.