Prev Up Next
Go backward to 10.1 Local Libraries
Go up to 10 Library Constructs
Go forward to 10.3 Library Names

10.2 Distributed Libraries

      LIB-ITEM         ::= ... | DOWNLOAD-ITEMS
      DOWNLOAD-ITEMS   ::= download-items LIB-NAME ITEM-NAME-OR-MAP+
      ITEM-NAME-OR-MAP ::= ITEM-NAME | ITEM-NAME-MAP
      ITEM-NAME-MAP    ::= item-name-map ITEM-NAME ITEM-NAME
      ITEM-NAME        ::= SIMPLE-ID

The syntax of local libraries is here extended with a further sort of library item, for use with distributed libraries. The DOWNLOAD-ITEMS construct is written:

from LN get IN1  |->  IN'1,..., INn  |->  IN'n end
where the terminating `end' keyword is optional. An identity map `INn |-> INn' may be simply written `INn'.

It specifies which definitions to copy from the remote library named LN, changing the remote names INi to the local names IN'i.

The semantics corresponds to having already replaced all references in the downloaded definitions by the corresponding (closed) specifications; cyclic chains of references via remote libraries are not allowed. The download items show exactly which specification names are added to the current global environment of the library in which they occur, allowing references to named specifications to be checked locally (although not whether the kind of specification to be downloaded from the remote library is consistent with its local use).


CoFI Document: CASL/Summary -- Version: 1.0 -- 22 July 1999.
Comments to cofi-language@brics.dk

Prev Up Next