• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Recursion-and-induction
      • Hons-and-memoization
      • Events
      • Parallelism
      • History
      • Programming
      • Operational-semantics
      • Real
      • Start-here
      • Debugging
      • Miscellaneous
      • Output-controls
      • Macros
      • 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
          • 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
      • 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
          • 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
      • Oslib

      Ls-subdirs!

      Get a listing of the subdirectories of a directory, or cause a hard error.

      Signature
      (ls-subdirs! path &key (state 'state)) → (mv val state)
      Arguments
      path — Guard (stringp path).
      Returns
      val — Type (string-listp val).
      state — Type (state-p1 state), given (force (state-p1 state)).

      This is just a wrapper for ls-subdirs that causes a hard error if there are any problems.

      Definitions and Theorems

      Function: ls-subdirs!-fn

      (defun ls-subdirs!-fn (path state)
        (declare (xargs :stobjs (state)))
        (declare (xargs :guard (stringp path)))
        (let ((__function__ 'ls-subdirs!))
          (declare (ignorable __function__))
          (b* (((mv err val state) (ls-subdirs path))
               ((when err)
                (er hard? 'ls-subdirs! "~@0" err)
                (mv nil state)))
            (mv val state))))

      Theorem: string-listp-of-ls-subdirs!.val

      (defthm string-listp-of-ls-subdirs!.val
        (b* (((mv ?val acl2::?state)
              (ls-subdirs!-fn path state)))
          (string-listp val))
        :rule-classes :rewrite)

      Theorem: state-p1-of-ls-subdirs!.state

      (defthm state-p1-of-ls-subdirs!.state
        (implies (force (state-p1 state))
                 (b* (((mv ?val acl2::?state)
                       (ls-subdirs!-fn path state)))
                   (state-p1 state)))
        :rule-classes :rewrite)