• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
      • Io
      • Defttag
      • Sys-call
      • Save-exec
      • Quicklisp
      • Std/io
      • Oslib
        • File-types
          • File-kind
          • Regular-files
          • Missing-paths
          • Existing-paths
          • Directories
          • Path-exists-p
          • Regular-file-p
          • Paths-all-missing-p
          • Directory-p
          • Regular-files-p
            • Paths-all-exist-p
            • Directories-p
            • File-kind-p
            • Regular-files-exec
            • Missing-paths-exec
            • Existing-paths-exec
            • Directories-exec
          • Argv
          • Copy
          • Catpath
          • Ls
          • Universal-time
          • Tempfile
          • Basename
          • Dirname
          • Copy!
          • Ls-files
          • Mkdir
          • Rmtree
          • Lisp-version
          • Lisp-type
          • Ls-subdirs
          • Date
          • Getpid
          • Dirnames
          • Basenames
          • Basename!
          • Ls-subdirs!
          • Ls-files!
          • Dirname!
          • Ls!
          • Catpaths
          • Mkdir!
          • Rmtree!
          • Remove-nonstrings
        • Bridge
        • Clex
        • Tshell
        • Unsound-eval
        • Hacker
        • ACL2s-interface
        • Startup-banner
        • Command-line
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • File-types

    Regular-files-p

    Are all of these paths regular files?

    Signature
    (regular-files-p paths &key (state 'state)) 
      → 
    (mv err ans new-state)
    Arguments
    paths — Guard (string-listp paths).
    Returns
    err — NIL on success, or an error msg on failure.
    ans — Meaningful only when there is no error.
        Type (booleanp ans).
    new-state — Type (state-p1 new-state), given (force (state-p1 state)).

    Definitions and Theorems

    Function: regular-files-p-fn

    (defun regular-files-p-fn (paths state)
      (declare (xargs :stobjs (state)))
      (declare (xargs :guard (string-listp paths)))
      (let ((__function__ 'regular-files-p))
        (declare (ignorable __function__))
        (b* (((when (atom paths)) (mv nil t state))
             ((mv err ans1 state)
              (regular-file-p (car paths)))
             ((when err) (mv err nil state))
             ((unless ans1) (mv nil nil state)))
          (regular-files-p (cdr paths)))))

    Theorem: booleanp-of-regular-files-p.ans

    (defthm booleanp-of-regular-files-p.ans
      (b* (((mv ?err ?ans ?new-state)
            (regular-files-p-fn paths state)))
        (booleanp ans))
      :rule-classes :type-prescription)

    Theorem: state-p1-of-regular-files-p.new-state

    (defthm state-p1-of-regular-files-p.new-state
      (implies (force (state-p1 state))
               (b* (((mv ?err ?ans ?new-state)
                     (regular-files-p-fn paths state)))
                 (state-p1 new-state)))
      :rule-classes :rewrite)

    Theorem: w-state-of-regular-files-p

    (defthm w-state-of-regular-files-p
      (b* (((mv ?err ?ans ?new-state)
            (regular-files-p-fn paths state)))
        (equal (w new-state) (w state))))