• 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
        • C
        • Soft
        • Bv
        • Imp-language
        • Ethereum
        • Event-macros
        • Java
        • Riscv
        • Bitcoin
        • Zcash
        • Yul
          • Transformations
          • Language
            • Abstract-syntax
            • Dynamic-semantics
            • Concrete-syntax
            • Static-soundness
            • Static-semantics
              • Static-safety-checking
              • Static-shadowing-checking
              • Mode-set-result
              • Literal-evaluation
              • Static-identifier-checking
              • Static-safety-checking-evm
                • Evm-funtable
                • Check-safe-top-block-evm
                • Mode-set
                • Modes
              • Errors
            • Yul-json
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Axe
          • Lists-light
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Static-safety-checking-evm

    Check-safe-top-block-evm

    Check if the top block is safe, in the EVM dialect.

    Signature
    (check-safe-top-block-evm block) → _
    Arguments
    block — Guard (blockp block).
    Returns
    _ — Type (reserr-optionp _).

    This is like check-safe-top-block for generic Yul, except that the initial function table is the one with the EVM functions.

    Definitions and Theorems

    Function: check-safe-top-block-evm

    (defun check-safe-top-block-evm (block)
      (declare (xargs :guard (blockp block)))
      (let ((__function__ 'check-safe-top-block-evm))
        (declare (ignorable __function__))
        (b* (((okf modes)
              (check-safe-block block nil (evm-funtable))))
          (if (equal modes (insert (mode-regular) nil))
              nil
            (reserrf (list :top-block-mode modes))))))

    Theorem: reserr-optionp-of-check-safe-top-block-evm

    (defthm reserr-optionp-of-check-safe-top-block-evm
      (b* ((_ (check-safe-top-block-evm block)))
        (reserr-optionp _))
      :rule-classes :rewrite)

    Theorem: check-safe-top-block-evm-of-block-fix-block

    (defthm check-safe-top-block-evm-of-block-fix-block
      (equal (check-safe-top-block-evm (block-fix block))
             (check-safe-top-block-evm block)))

    Theorem: check-safe-top-block-evm-block-equiv-congruence-on-block

    (defthm check-safe-top-block-evm-block-equiv-congruence-on-block
      (implies (block-equiv block block-equiv)
               (equal (check-safe-top-block-evm block)
                      (check-safe-top-block-evm block-equiv)))
      :rule-classes :congruence)