Prev Up
Go backward to 10.1 Local Libraries
Go up to 10 Library Constructs

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. A 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).

When the library name LN does not include a version number, the version with the largest version number is taken. (This need not be the latest installed version, due to the lexicographic ordering on version identifiers.)

  LIB-ID           ::= DIRECT-LINK | INDIRECT-LINK
  DIRECT-LINK      ::= direct-link URL
  INDIRECT-LINK    ::= indirect-link SIMPLE-ID+

A direct link to another library is simply written as its URL. The location of a library is always a directory, giving access not only to the the individual specifications defined by the current version of the library but also to archived versions, various indexes, and other documentation. An indirect link is written:

SI1/.../SIn
where each simple identifier SIi is a valid file name as if for use in a URL.

An indirect link is interpreted as a URL with reference to the current global library directory.


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

Prev Up