• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Riscv
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
        • Transformations
        • Language
          • Abstract-syntax
          • Dynamic-semantics
          • Concrete-syntax
          • Static-soundness
          • Static-semantics
          • Errors
            • Reserr-limitp
            • Error-info-wfp
              • Reserr-nonlimitp
          • Yul-json
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Errors

    Error-info-wfp

    Check if the information in an error is well-formed.

    Signature
    (error-info-wfp error) → yes/no
    Arguments
    error — Guard (reserrp error).
    Returns
    yes/no — Type (booleanp yes/no).

    For certain purposes, we need to know that the errors generated (and propagated) in our Yul formalization are well-formed according to certain criteria. Specifically, we need to know that the information is always a cons. For better encapsulation and possible future extension, we capture that in this predicate.

    Definitions and Theorems

    Function: error-info-wfp

    (defun error-info-wfp (error)
      (declare (xargs :guard (reserrp error)))
      (let ((__function__ 'error-info-wfp))
        (declare (ignorable __function__))
        (consp (fty::reserr->info error))))

    Theorem: booleanp-of-error-info-wfp

    (defthm booleanp-of-error-info-wfp
      (b* ((yes/no (error-info-wfp error)))
        (booleanp yes/no))
      :rule-classes :rewrite)

    Theorem: error-info-wfp-of-reserr-of-cons

    (defthm error-info-wfp-of-reserr-of-cons
      (error-info-wfp (reserr (cons a b))))

    Theorem: error-info-wfp-of-reserr-fix-error

    (defthm error-info-wfp-of-reserr-fix-error
      (equal (error-info-wfp (fty::reserr-fix error))
             (error-info-wfp error)))

    Theorem: error-info-wfp-reserr-equiv-congruence-on-error

    (defthm error-info-wfp-reserr-equiv-congruence-on-error
      (implies (fty::reserr-equiv error error-equiv)
               (equal (error-info-wfp error)
                      (error-info-wfp error-equiv)))
      :rule-classes :congruence)