Connected book directory string
Example: ACL2 !>:cbd "/usr/home/smith/"
The connected book directory (``cbd'') is a nonempty string that specifies
a directory as an absolute pathname. (See pathname for a discussion of
file naming conventions.) When utilities that take a filename argument, such
as include-book, are given a relative pathname, it is elaborated it
into an absolute pathname, essentially by appending the connected book
directory string to the left and
Note that the cbd is used for elaborating every pathname argument,
not just a pathname that represents a book. (Technical remark: Some
utilities, such as open-input-channel, use the cbd indirectly as
follows. That utility uses the Common Lisp utility,
General Form: (cbd)
This is a macro that expands into a term involving the single free variable state. It returns the connected book directory string.
For example, if the
The
As noted above, during the processing of the events in a book,
include-book sets the
(include-book "project/task-1/arith")
the
(include-book "naturals").
In general, suppose we have a superior book and several inferior books which are included by events in the superior book. Any inferior book residing on the same directory as the superior book may be referenced in the superior without specification of the directory.
We call this a ``relative'' as opposed to ``absolute'' naming. The use of relative naming is preferred because it permits books (and their accompanying inferiors) to be moved between directories while maintaining their certificates and utility. Certified books that reference inferiors by absolute file names are unusable (and rendered uncertified) if the inferiors are moved to new directories.