• 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

      Lisp-version

      Get a host-Lisp specific string describing the version number for this Common Lisp implementation.

      Signature
      (lisp-version &optional (state 'state)) 
        → 
      (mv description state)
      Returns
      description — E.g., "Version 1.9-r15996 (LinuxX8664)".
          Type (stringp description).
      state — Type (state-p1 state), given (force (state-p1 state)).

      In the logic this function reads from the ACL2 oracle. In the execution, we call the Common Lisp function lisp-implementation-version, and return the string it produces.

      Note that the Common Lisp lisp-implementation-type function is technically allowed to return nil; in this case we return the empty string.

      Definitions and Theorems

      Function: lisp-version-fn

      (defun lisp-version-fn (state)
        (declare (xargs :stobjs (state)))
        (declare (xargs :guard t))
        (let ((__function__ 'lisp-version))
          (declare (ignorable __function__))
          (b* (((mv err val state)
                (read-acl2-oracle state))
               (description (if (and (not err) (stringp val))
                                val
                              "")))
            (mv description state))))

      Theorem: stringp-of-lisp-version.description

      (defthm stringp-of-lisp-version.description
        (b* (((mv ?description acl2::?state)
              (lisp-version-fn state)))
          (stringp description))
        :rule-classes :type-prescription)

      Theorem: state-p1-of-lisp-version.state

      (defthm state-p1-of-lisp-version.state
        (implies (force (state-p1 state))
                 (b* (((mv ?description acl2::?state)
                       (lisp-version-fn state)))
                   (state-p1 state)))
        :rule-classes :rewrite)