• 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
          • Syntax-for-tools
          • Atc
          • Transformation-tools
          • Language
            • Abstract-syntax
              • Tyspecseq
              • Expr
              • Binop
              • Fileset
              • Obj-declor
              • Abstract-syntax-operations
              • Iconst
              • Obj-adeclor
              • Const
              • Fundef
              • Unop
              • File
              • Tag-declon
              • Fun-declor
              • Obj-declon
              • Iconst-length
              • Label
              • Struct-declon
              • Initer
              • Ext-declon
              • Fun-adeclor
              • Expr-option
              • Iconst-base
              • Initer-option
              • Iconst-option
              • Tyspecseq-option
              • Stmt-option
              • Scspecseq
              • Param-declon
              • Obj-declon-option
              • File-option
              • Tyname
              • Transunit
              • Fun-declon
              • Transunit-result
              • Param-declon-list
              • Struct-declon-list
              • Expr-list
              • Tyspecseq-list
              • Identifiers
              • Ext-declon-list
              • Unop-list
              • Tyname-list
              • Fundef-list
              • Fun-declon-list
              • Binop-list
              • Stmt-fixtypes
                • Stmt
                  • Stmtp
                  • Stmt-case
                  • Stmt-for
                  • Stmt-equiv
                  • Stmt-ifelse
                  • Stmt-while
                  • Stmt-switch
                  • Stmt-labeled
                  • Stmt-if
                  • Stmt-dowhile
                  • Stmt-return
                  • Stmt-kind
                  • Stmt-goto
                    • Stmt-goto->target
                      • Make-stmt-goto
                      • Change-stmt-goto
                    • Stmt-compound
                    • Stmt-expr
                    • Stmt-null
                    • Stmt-continue
                    • Stmt-break
                    • Stmt-fix
                    • Stmt-count
                  • Block-item
                  • Block-item-list
                • Expr-fixtypes
              • Integer-ranges
              • Implementation-environments
              • Dynamic-semantics
              • Static-semantics
              • Grammar
              • Types
              • Integer-formats-definitions
              • Computation-states
              • Portable-ascii-identifiers
              • Values
              • Integer-operations
              • Object-designators
              • Operations
              • Errors
              • Tag-environments
              • Function-environments
              • Character-sets
              • Flexible-array-member-removal
              • Arithmetic-operations
              • Pointer-operations
              • Real-operations
              • Array-operations
              • Scalar-operations
              • Structure-operations
            • Representation
            • Insertion-sort
            • Pack
          • Soft
          • Bv
          • Imp-language
          • Ethereum
          • Event-macros
          • Java
          • Riscv
          • Bitcoin
          • Zcash
          • Yul
          • 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
    • Stmt-goto

    Stmt-goto->target

    Get the target field from a stmt-goto.

    Signature
    (stmt-goto->target x) → target
    Arguments
    x — Guard (stmtp x).
    Returns
    target — Type (identp target).

    This is an ordinary field accessor created by fty::defprod.

    Definitions and Theorems

    Function: stmt-goto->target$inline

    (defun stmt-goto->target$inline (x)
      (declare (xargs :guard (stmtp x)))
      (declare (xargs :guard (equal (stmt-kind x) :goto)))
      (mbe :logic
           (b* ((x (and (equal (stmt-kind x) :goto) x)))
             (ident-fix (std::da-nth 0 (cdr x))))
           :exec (std::da-nth 0 (cdr x))))

    Theorem: identp-of-stmt-goto->target

    (defthm identp-of-stmt-goto->target
      (b* ((target (stmt-goto->target$inline x)))
        (identp target))
      :rule-classes :rewrite)

    Theorem: stmt-goto->target$inline-of-stmt-fix-x

    (defthm stmt-goto->target$inline-of-stmt-fix-x
      (equal (stmt-goto->target$inline (stmt-fix x))
             (stmt-goto->target$inline x)))

    Theorem: stmt-goto->target$inline-stmt-equiv-congruence-on-x

    (defthm stmt-goto->target$inline-stmt-equiv-congruence-on-x
      (implies (stmt-equiv x x-equiv)
               (equal (stmt-goto->target$inline x)
                      (stmt-goto->target$inline x-equiv)))
      :rule-classes :congruence)

    Theorem: stmt-goto->target-when-wrong-kind

    (defthm stmt-goto->target-when-wrong-kind
      (implies (not (equal (stmt-kind x) :goto))
               (equal (stmt-goto->target x)
                      (ident-fix nil))))