• 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

    Outcome-kind

    Get the kind (tag) of a outcome structure.

    Signature
    (outcome-kind x) → kind
    Arguments
    x — Guard (outcomep x).

    Definitions and Theorems

    Function: outcome-kind$inline

    (defun outcome-kind$inline (x)
      (declare (xargs :guard (outcomep x)))
      (let ((__function__ 'outcome-kind))
        (declare (ignorable __function__))
        (mbe :logic (cond ((or (atom x)
                               (eq (car x) :function-success))
                           :function-success)
                          ((eq (car x) :type-success)
                           :type-success)
                          ((eq (car x) :specification-success)
                           :specification-success)
                          ((eq (car x) :theorem-success)
                           :theorem-success)
                          ((eq (car x) :transformation-success)
                           :transformation-success)
                          ((eq (car x) :proof-obligation-failure)
                           :proof-obligation-failure)
                          ((eq (car x) :theorem-failure)
                           :theorem-failure)
                          ((eq (car x) :transformation-failure)
                           :transformation-failure)
                          (t :unexpected-failure))
             :exec (car x))))

    Theorem: outcome-kind-possibilities

    (defthm outcome-kind-possibilities
      (or (equal (outcome-kind x)
                 :function-success)
          (equal (outcome-kind x) :type-success)
          (equal (outcome-kind x)
                 :specification-success)
          (equal (outcome-kind x)
                 :theorem-success)
          (equal (outcome-kind x)
                 :transformation-success)
          (equal (outcome-kind x)
                 :proof-obligation-failure)
          (equal (outcome-kind x)
                 :theorem-failure)
          (equal (outcome-kind x)
                 :transformation-failure)
          (equal (outcome-kind x)
                 :unexpected-failure))
      :rule-classes
      ((:forward-chaining :trigger-terms ((outcome-kind x)))))