• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Hons-and-memoization
      • Events
      • History
      • Parallelism
      • Programming
        • Defun
        • Declare
        • Stobj
        • State
        • Memoize
        • Mbe
        • Io
        • Apply$
        • System-utilities
        • Defpkg
        • Mutual-recursion
        • Arrays
        • Programming-with-state
        • Characters
        • Loop$
        • Time$
        • Defmacro
        • Defconst
        • Guard
          • Mbe
          • Verify-guards
          • Set-guard-checking
          • Ec-call
          • Print-gv
          • Guard-debug
          • Guards-and-evaluation
          • Set-check-invariant-risk
          • Guard-evaluation-table
          • The
          • Guard-evaluation-examples-log
          • Guard-miscellany
          • Defthmg
          • Invariant-risk
          • With-guard-checking
          • Guard-formula-utilities
          • Guard-holders
          • Guard-example
          • Guard-quick-reference
          • Set-verify-guards-eagerness
          • Set-register-invariant-risk
          • Guards-for-specification
          • Guard-introduction
          • Guard-evaluation-examples-script
          • Non-exec
          • Set-guard-msg
          • Safe-mode
          • Set-print-gv-defaults
          • Guard-theorem-example
          • With-guard-checking-event
          • With-guard-checking-error-triple
          • Program-only
            • Guard-checking-inhibited
            • Extra-info
          • Evaluation
          • Equality-variants
          • Fast-alists
          • Compilation
          • Hons
          • ACL2-built-ins
          • Advanced-features
          • Set-check-invariant-risk
          • Developers-guide
          • Numbers
          • Irrelevant-formals
          • Efficiency
          • Introduction-to-programming-in-ACL2-for-those-who-know-lisp
          • Redefining-programs
          • Lists
          • Invariant-risk
          • Errors
          • Defabbrev
          • Conses
          • Alists
          • Set-register-invariant-risk
          • Strings
          • Program-wrapper
          • Get-internal-time
          • Basics
          • Packages
          • System-attachments
          • Defmacro-untouchable
          • Primitive
          • <<
          • Revert-world
          • Set-duplicate-keys-action
          • Unmemoize
          • Symbols
          • Def-list-constructor
          • Easy-simplify-term
          • Defiteration
          • Defopen
          • Sleep
        • Real
        • ACL2-tutorial
        • Debugging
        • Miscellaneous
        • Prover-output
        • Built-in-theorems
        • Macros
        • Interfacing-tools
        • About-ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Testing-utilities
      • Math
    • Guard

    Program-only

    Functions that cannot be in logic mode

    Functions are considered to be ``program-only'' when they are in program mode and they belong to the list (@ program-fns-with-raw-code). For such a function, its executable-counterpart (see evaluation) always checks the guard. If the guard fails, then even if guard-checking is off, an error is signaled because a program-only function is assumed to have an executable-counterpart that should only execute the raw Lisp definition. Moreover, an error is always signaled when in safe-mode (e.g., during macroexpansion), because there is no guarantee that evaluation of the raw Lisp code will be ``safe''.

    See safe-mode-cheat-sheet for possible workarounds.