• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
      • Std/lists
      • Std/alists
      • Obags
      • Std/util
      • Std/strings
      • Std/osets
      • Std/io
      • Std/basic
      • Std/system
        • Fresh-logical-name-with-$s-suffix
        • Irrelevant-formals-info
        • Std/system/function-queries
          • Defun-sk-queries
          • Tail-recursive-p
          • Termination-theorem$
          • Unwrapped-nonexec-body+
          • Measure
          • Arity+
          • Ubody
          • Ruler-extenders+
          • Recursive-calls
          • Guard-theorem-no-simplify$
          • Well-founded-relation+
          • Unwrapped-nonexec-body
          • Measured-subset+
          • Ruler-extenders
          • Measure+
          • Number-of-results+
          • Induction-machine+
          • Non-executablep+
          • Pure-raw-p
          • Irecursivep+
          • Formals+
          • Stobjs-out+
          • Definedp+
          • Number-of-results
          • Induction-machine
          • Ubody+
          • Guard-theorem-no-simplify
          • Uguard
          • Rawp
            • Defchoose-queries
            • Uguard+
            • Stobjs-in+
            • No-stobjs-p+
            • Irecursivep
            • Well-founded-relation
            • Definedp
            • Guard-verified-p+
            • Primitivep+
            • No-stobjs-p
            • Measured-subset
            • Guard-verified-p
            • Primitivep
            • Non-executablep
            • Fundef-disabledp
            • Ibody
            • Fundef-enabledp
            • Std/system/arity
          • Std/system/term-queries
          • Std/system/term-transformations
          • Std/system/enhanced-utilities
          • Install-not-normalized-event
          • Install-not-normalized-event-lst
          • Std/system/term-function-recognizers
          • Genvar$
          • Std/system/event-name-queries
          • Pseudo-tests-and-call-listp
          • Maybe-pseudo-event-formp
          • Add-suffix-to-fn-or-const
          • Chk-irrelevant-formals-ok
          • Table-alist+
          • Pseudo-tests-and-callp
          • Add-suffix-to-fn-or-const-lst
          • Known-packages+
          • Add-suffix-to-fn-lst
          • Unquote-term
          • Event-landmark-names
          • Add-suffix-lst
          • Std/system/theorem-queries
          • Unquote-term-list
          • Std/system/macro-queries
          • Pseudo-command-landmark-listp
          • Install-not-normalized$
          • Pseudo-event-landmark-listp
          • Known-packages
          • Std/system/partition-rest-and-keyword-args
          • Rune-enabledp
          • Rune-disabledp
          • Included-books
          • Std/system/pseudo-event-formp
          • Std/system/plist-worldp-with-formals
          • Std/system/w
          • Std/system/geprops
          • Std/system/arglistp
          • Std/system/constant-queries
        • Std/typed-lists
        • Std/bitsets
        • Std/testing
        • Std/typed-alists
        • Std/stobjs
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Std/system/function-queries

    Rawp

    Check if a named function has raw Lisp code.

    Signature
    (rawp fn state) → yes/no
    Arguments
    fn — Guard (symbolp fn).
    Returns
    yes/no — Type (booleanp yes/no).

    The global variables logic-fns-with-raw-code and program-fns-with-raw-code list the logic-mode and program-mode functions with raw Lisp code. Their initial values are *initial-logic-fns-with-raw-code* and *initial-program-fns-with-raw-code*, but they may change if functions with raw Lisp code are introduced.

    This function checks whether a function has raw Lisp code by checking whether it is listed in one of those global variables.

    Definitions and Theorems

    Function: rawp

    (defun rawp (fn state)
      (declare (xargs :stobjs (state)))
      (declare (xargs :guard (symbolp fn)))
      (let ((__function__ 'rawp))
        (declare (ignorable __function__))
        (and (or (member-eq fn (@ logic-fns-with-raw-code))
                 (member-eq fn (@ program-fns-with-raw-code)))
             t)))

    Theorem: booleanp-of-rawp

    (defthm booleanp-of-rawp
      (b* ((yes/no (rawp fn state)))
        (booleanp yes/no))
      :rule-classes :rewrite)