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

10.2 Distributed Libraries and Downloading

LIBRARY          ::=  ... | library URL? LIBRARY-ITEM*
LIBRARY-ITEM     ::=  ... | DOWNLOAD
DOWNLOAD         ::=  download URL ITEM-NAME-MAP+
ITEM-NAME-MAP    ::=  item-name-map ITEM-NAME? ITEM-NAME
ITEM-NAME        ::=  SPEC-NAME | GEN-SPEC-NAME 
                   |  ARCH-SPEC-NAME | UNIT-SPEC-NAME
A DOWNLOAD specifies which definitions to copy from a remote library, with possible renaming as indicated by the optional SPEC-NAME? in a
SPEC-NAME-MAP. Any unmentioned remote definitions to which the downloaded definitions refer are copied too, but their names are not added to the global environment. Thus a DOWNLOAD shows exactly which specification names are added to the current global environment of the LIBRARY in which it occurs, allowing references to named specifications in the LIBRARY to be checked before copying the definitions from the remote library.

Cyclic or self-referential downloads are not allowed.

URL              ::=  url SITE? DIRECTORY
SITE             --  structure insignificant for abstract syntax
The DIRECTORY of a URL identifies the location of the library definitions at the specified SITE. When the SITE is omitted, the DIRECTORY is interpreted relative to the URL specified in the enclosing LIBRARY, if there is one; otherwise the DIRECTORY is interpreted locally, relative to the location of the library in which it occurs.

A LIBRARY with a URL that specifies both a SITE and a DIRECTORY may be copied verbatim to another location without affecting its semantics; similarly for a LIBRARY where every DOWNLOAD has an explicit SITE (since then the DOWNLOAD is independent of the URL specified for the enclosing LIBRARY).


CoFI Document: CASL/Summary-v0.97 --Version 0.97-- 20 May 1997.
Comments to cofi-language@brics.dk

Prev Up