• 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
      • Zcash
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
        • Primitive-functions
        • Translated-terms
        • Values
        • Evaluation
          • Step-from-trans
          • Call-primitive-function
          • Step-from-init
          • Put-leftmost-nonconst
          • Exec-outcome
            • Exec-outcome-case
            • Exec-outcome-fix
            • Exec-outcome-equiv
            • Exec-outcome-p
              • Exec-outcome-terminating
              • Exec-outcome-nonterminating
              • Exec-outcome-kind
              • Exec-outcome-error
            • Stepn
            • Step
            • Terminatingp
            • Get-leftmost-nonconst
            • Exec-call
            • Step*
          • Program-equivalence
          • Functions
          • Packages
          • Programs
          • Interpreter
          • Evaluation-states
        • 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
    • Exec-outcome

    Exec-outcome-p

    Recognizer for exec-outcome structures.

    Signature
    (exec-outcome-p x) → *

    Definitions and Theorems

    Function: exec-outcome-p

    (defun exec-outcome-p (x)
      (declare (xargs :guard t))
      (let ((__function__ 'exec-outcome-p))
        (declare (ignorable __function__))
        (and (consp x)
             (cond ((or (atom x) (eq (car x) :terminating))
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 1)
                         (b* ((result (std::da-nth 0 (cdr x))))
                           (valuep result))))
                   ((eq (car x) :error)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   (t (and (eq (car x) :nonterminating)
                           (and (true-listp (cdr x))
                                (eql (len (cdr x)) 0))
                           (b* nil t)))))))

    Theorem: consp-when-exec-outcome-p

    (defthm consp-when-exec-outcome-p
      (implies (exec-outcome-p x) (consp x))
      :rule-classes :compound-recognizer)