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


      DIRECT-LINK   ::= direct-link URL
      INDIRECT-LINK ::= indirect-link PATH

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 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:

where each file identifier FIi is a valid file name as if for use in a URL.

An indirect link is interpreted as a URL by the current global library directory. [] [CHANGED:] The library identifier LIB-ID of a library definition determines how the library is to be referenced from other libraries; its interpretation as a URL determines the primary location of the library (any copies of a library are to retain the original identifier). []

CoFI Document: CASL/Summary-v1.0 -- Version: 1.0 -- 22 October 1998.
Comments to

Prev Up