• Top
    • Documentation
    • Books
      • Cert.pl
      • Community-books
      • Bookdata
      • Book-hash
      • Uncertified-books
      • Best-practices
      • Where-do-i-place-my-book
      • Books-reference
        • Include-book
        • Certify-book
        • Cbd
        • Add-include-book-dir
        • Set-write-ACL2x
        • Book-compiled-file
        • Pathname
        • Full-book-name
          • Add-include-book-dir!
          • Delete-include-book-dir
          • Delete-include-book-dir!
          • Set-cbd
          • Certify-book-debug
        • Books-tour
      • Boolean-reasoning
      • Debugging
      • Projects
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Testing-utilities
      • Math
    • Books-reference

    Full-book-name

    Book naming conventions assumed by ACL2

    For this discussion we assume that the resident operating system is Unix (trademark of AT&T), but analogous remarks apply to other operating systems supported by ACL2; see pathname.

    ACL2 defines a ``full book name'' to be an ``absolute filename string,'' that may be divided into contiguous sections: a ``directory string'', a ``familiar name'' and an ``extension''. See pathname for the definitions of ``absolute,'' ``filename string,'' and other notions pertaining to naming files. Below we exhibit the three sections of one such string:

    "/usr/home/smith/project/arith.lisp"
    
    "/usr/home/smith/project/"           ; directory string
                            "arith"      ; familiar name
                                 ".lisp" ; extension

    The sections are marked by the rightmost slash and rightmost dot, as shown below.

    "/usr/home/smith/project/arith.lisp"
                            |     |
                            slash dot
                            |     |
    "/usr/home/smith/project/"           ; directory string
                            "arith"      ; familiar name
                                 ".lisp" ; extension

    The directory string includes (and terminates with) the rightmost slash. The extension includes (and starts with) the rightmost dot. The dot must be strictly to the right of the slash so that the familiar name is well-defined and nonempty.

    If you are using ACL2 on a system in which file names do not have this form, please contact the authors and we'll see what we can do about generalizing ACL2's conventions.

    We conclude with a remark about a representation of full book names that is used in certificate files and make-event expansions. When the system books directory is a prefix of a full book name, ACL2 may choose to write a full book name as (:system . "suffix"), where "suffix" is the result of removing the system books directory from the front of the full book name. Here is an example.

    ; full book name:
    "/Users/smith/acl2/acl2/books/std/portcullis.lisp"
    
    ; alternate representation
    ; (where "/Users/smith/acl2/acl2/books/" is the system books directory):
    (:SYSTEM . "std/portcullis.lisp")

    Conversely, in some contexts ACL2 will convert :system . "suffix" to an absolute pathname. Generally "suffix" will be a relative pathname, such as "dir/filename.lisp"; in that case, the system books directory will be concatenated with "suffix" to form a corresponding full book name. However, if "suffix" is an absolute pathname, such as "/u/smith/foo.lisp", then the corresponding full book name is simply that absolute pathname; essentially, the :system prefix is dropped.