Cyclic or self-referential downloads are not allowed.
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).
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 initial 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.
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
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.
URL ::= url SITE? DIRECTORY
SITE -- structure insignificant for abstract syntax
CoFI Document: LanguageSummary --DRAFT, Version 0.96-- 30 April 1997.
Comments to cofi-language@brics.dk