Up Next
Go up to 6.3 Views
Go forward to 6.3.2 Implicit Fitting Views

6.3.1 Fitting Views

  FIT-ARG          ::= ... | FIT-VIEW
  FIT-VIEW         ::= fit-view VIEW-NAME

A reference to a non-generic fitting argument view FIT-VIEW is simply written:

view VN

It refers to the current global environment, and is well-formed as an argument for a parameter SPi only when the global environment includes a view definition for VN of type from SP to SP', such that the signatures of SP and of SPi are the same. The view definition then provides the fitting morphism from the parameter SPi to the argument specification given by the target SP' of the view.

If the generic specification being instantiated has imports, the fitting morphism is then the union of the specification morphism given by the view and the identity morphism on the imports. The argument specification is the union of the target of the view and the imports.

Note that checking whether a view can be used as a fitting morphism only depends on the signatures of the involved specifications and thus no semantic check is needed to ensure the applicability of a view.

  FIT-VIEW         ::= ... | fit-view VIEW-NAME FIT-ARG+

A fitting argument view FIT-VIEW involving the instantiation of a generic view to fitting arguments is written:

view VN[FA1]...[FAn]

It refers to the current global environment, and is well-formed only when the global environment includes a generic view definition for VN with parameters that can be instantiated by the indicated fitting arguments FA1, ..., FAn to give a view of type from SP to SP', such that the signatures of SP and of SPi are the same.


CoFI Document: CASL/Summary --Version 0.99-- 21 April 1998.
Comments to cofi-language@brics.dk

Up Next