• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • 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
        • Bitcoin
        • Ethereum
        • Yul
        • Zcash
        • ACL2-programming-language
        • Prime-fields
        • Json
        • Syntheto
          • Process-syntheto-toplevel-fn
          • Translation
          • Language
            • Static-semantics
            • Abstract-syntax
            • Outcome
              • Outcome-fix
              • Outcome-case
              • Outcomep
                • Outcome-equiv
                • Outcome-proof-obligation-failure
                • Outcome-transformation-success
                • Outcome-kind
                • Outcome-unexpected-failure
                • Outcome-type-success
                • Outcome-transformation-failure
                • Outcome-theorem-success
                • Outcome-theorem-failure
                • Outcome-specification-success
                • Outcome-function-success
              • Abstract-syntax-operations
              • Outcome-list
              • Outcomes
            • Process-syntheto-toplevel
            • Shallow-embedding
          • File-io-light
          • Cryptography
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Outcome

    Outcomep

    Recognizer for outcome structures.

    Signature
    (outcomep x) → *

    Definitions and Theorems

    Function: outcomep

    (defun outcomep (x)
      (declare (xargs :guard t))
      (let ((__function__ 'outcomep))
        (declare (ignorable __function__))
        (and (consp x)
             (cond ((or (atom x)
                        (eq (car x) :function-success))
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 1)
                         (b* ((message (std::da-nth 0 (cdr x))))
                           (stringp message))))
                   ((eq (car x) :type-success)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 1)
                         (b* ((message (std::da-nth 0 (cdr x))))
                           (stringp message))))
                   ((eq (car x) :specification-success)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 1)
                         (b* ((message (std::da-nth 0 (cdr x))))
                           (stringp message))))
                   ((eq (car x) :theorem-success)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 1)
                         (b* ((message (std::da-nth 0 (cdr x))))
                           (stringp message))))
                   ((eq (car x) :transformation-success)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 2)
                         (b* ((message (std::da-nth 0 (cdr x)))
                              (toplevels (std::da-nth 1 (cdr x))))
                           (and (stringp message)
                                (toplevel-listp toplevels)))))
                   ((eq (car x) :proof-obligation-failure)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 2)
                         (b* ((message (std::da-nth 0 (cdr x)))
                              (obligation-expr (std::da-nth 1 (cdr x))))
                           (and (stringp message)
                                (expressionp obligation-expr)))))
                   ((eq (car x) :theorem-failure)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 1)
                         (b* ((message (std::da-nth 0 (cdr x))))
                           (stringp message))))
                   ((eq (car x) :transformation-failure)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 1)
                         (b* ((message (std::da-nth 0 (cdr x))))
                           (stringp message))))
                   (t (and (eq (car x) :unexpected-failure)
                           (and (true-listp (cdr x))
                                (eql (len (cdr x)) 1))
                           (b* ((message (std::da-nth 0 (cdr x))))
                             (stringp message))))))))

    Theorem: consp-when-outcomep

    (defthm consp-when-outcomep
      (implies (outcomep x) (consp x))
      :rule-classes :compound-recognizer)