• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
        • Riscv
          • Specification
            • Semantics
            • Features
            • Instructions
            • Encoding
            • States
              • Stat
              • Stat-validp
              • Read-instruction
              • Write-memory-unsigned64
              • Write-memory-unsigned32
              • Write-memory-unsigned8
              • Write-memory-unsigned16
              • Write-xreg-32
              • Read-xreg-unsigned
              • Write-xreg
              • Read-memory-unsigned64
              • Read-memory-unsigned8
              • Read-memory-unsigned32
              • Read-xreg-signed
              • Read-memory-unsigned16
              • Read-xreg-unsigned32
              • Write-pc
              • Read-xreg-signed32
              • Inc4-pc
              • Read-pc
              • Errorp
                • Error
              • Reads-over-writes
              • Semantics-equivalences
              • Decoding
              • Execution
            • Executable
            • Specialized
            • Optimized
          • Bitcoin
          • Ethereum
          • Yul
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • States

    Errorp

    Check if the error flag in the state is set.

    Signature
    (errorp stat feat) → yes/no
    Arguments
    stat — Guard (statp stat).
    feat — Guard (featp feat).
    Returns
    yes/no — Type (booleanp yes/no).

    Definitions and Theorems

    Function: errorp

    (defun errorp (stat feat)
      (declare (xargs :guard (and (statp stat) (featp feat))))
      (declare (ignore feat))
      (declare (xargs :guard (stat-validp stat feat)))
      (let ((__function__ 'errorp))
        (declare (ignorable __function__))
        (stat->error stat)))

    Theorem: booleanp-of-errorp

    (defthm booleanp-of-errorp
      (b* ((yes/no (errorp stat feat)))
        (booleanp yes/no))
      :rule-classes :rewrite)

    Theorem: errorp-of-write-xreg

    (defthm errorp-of-write-xreg
      (equal (errorp (write-xreg reg val stat feat)
                     feat)
             (errorp stat feat)))

    Theorem: errorp-of-write-xreg-32

    (defthm errorp-of-write-xreg-32
      (equal (errorp (write-xreg-32 reg val stat feat)
                     feat)
             (errorp stat feat)))

    Theorem: errorp-of-write-pc

    (defthm errorp-of-write-pc
      (equal (errorp (write-pc pc stat feat) feat)
             (errorp stat feat)))

    Theorem: errorp-of-inc4-pc

    (defthm errorp-of-inc4-pc
      (equal (errorp (inc4-pc stat feat) feat)
             (errorp stat feat)))

    Theorem: errorp-of-stat-fix-stat

    (defthm errorp-of-stat-fix-stat
      (equal (errorp (stat-fix stat) feat)
             (errorp stat feat)))

    Theorem: errorp-stat-equiv-congruence-on-stat

    (defthm errorp-stat-equiv-congruence-on-stat
      (implies (stat-equiv stat stat-equiv)
               (equal (errorp stat feat)
                      (errorp stat-equiv feat)))
      :rule-classes :congruence)

    Theorem: errorp-of-feat-fix-feat

    (defthm errorp-of-feat-fix-feat
      (equal (errorp stat (feat-fix feat))
             (errorp stat feat)))

    Theorem: errorp-feat-equiv-congruence-on-feat

    (defthm errorp-feat-equiv-congruence-on-feat
      (implies (feat-equiv feat feat-equiv)
               (equal (errorp stat feat)
                      (errorp stat feat-equiv)))
      :rule-classes :congruence)