• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
      • Io
      • Defttag
      • Sys-call
      • Save-exec
      • Quicklisp
      • Std/io
      • Oslib
        • File-types
        • Argv
        • Copy
        • Catpath
        • Ls
        • Universal-time
        • Tempfile
        • Basename
        • Dirname
        • Copy!
        • Ls-files
          • Ls-subdirs-aux
          • Ls-files-aux
          • 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
    • Ls-files

    Ls-files-aux

    Collect regular files for ls-files.

    Signature
    (ls-files-aux path names state) → (mv error regular state)
    Arguments
    path — Path where the files came from.
        Guard (stringp path).
    names — Names found within this path.
        Guard (string-listp names).
    Returns
    regular — Type (string-listp regular).
    state — Type (state-p1 state), given (force (state-p1 state)).

    Definitions and Theorems

    Function: ls-files-aux

    (defun ls-files-aux (path names state)
      (declare (xargs :stobjs (state)))
      (declare (xargs :guard (and (stringp path)
                                  (string-listp names))))
      (let ((__function__ 'ls-files-aux))
        (declare (ignorable __function__))
        (b* (((when (atom names)) (mv nil nil state))
             (name1 (acl2::str-fix (car names)))
             (path1 (catpath path name1))
             ((mv err1 regular-p state)
              (regular-file-p path1))
             ((when err1) (mv err1 nil state))
             ((unless regular-p)
              (ls-files-aux path (cdr names) state))
             ((mv err2 rest state)
              (ls-files-aux path (cdr names) state))
             ((when err2) (mv err2 nil state)))
          (mv nil (cons name1 rest) state))))

    Theorem: string-listp-of-ls-files-aux.regular

    (defthm string-listp-of-ls-files-aux.regular
      (b* (((mv common-lisp::?error
                ?regular acl2::?state)
            (ls-files-aux path names state)))
        (string-listp regular))
      :rule-classes :rewrite)

    Theorem: state-p1-of-ls-files-aux.state

    (defthm state-p1-of-ls-files-aux.state
      (implies (force (state-p1 state))
               (b* (((mv common-lisp::?error
                         ?regular acl2::?state)
                     (ls-files-aux path names state)))
                 (state-p1 state)))
      :rule-classes :rewrite)