• 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
            • Integer-ranges
            • Implementation-environments
            • Dynamic-semantics
            • Static-semantics
            • Grammar
            • Types
            • Integer-formats-definitions
            • Computation-states
            • Portable-ascii-identifiers
            • Values
            • Integer-operations
            • Object-designators
              • Objdesign
              • Address
              • Object-disjointp
              • Objdesign-option
              • Objdesign-top
              • 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
    • Object-designators

    Objdesign-top

    Top object designator of an object designator.

    Signature
    (objdesign-top objdes) → top-objdes
    Arguments
    objdes — Guard (objdesignp objdes).
    Returns
    top-objdes — Type (objdesignp top-objdes).

    An element or member object designator denotes a portion of an object designated the super component, which in turn may be a portion of a larger object, and so on. This function returns the topmost object designator.

    Definitions and Theorems

    Function: objdesign-top

    (defun objdesign-top (objdes)
      (declare (xargs :guard (objdesignp objdes)))
      (objdesign-case objdes
                      :static (objdesign-fix objdes)
                      :auto (objdesign-fix objdes)
                      :alloc (objdesign-fix objdes)
                      :element (objdesign-top objdes.super)
                      :member (objdesign-top objdes.super)))

    Theorem: objdesignp-of-objdesign-top

    (defthm objdesignp-of-objdesign-top
      (b* ((top-objdes (objdesign-top objdes)))
        (objdesignp top-objdes))
      :rule-classes :rewrite)

    Theorem: objdesign-kind-of-objdesign-top

    (defthm objdesign-kind-of-objdesign-top
      (b* ((?top-objdes (objdesign-top objdes)))
        (member-equal (objdesign-kind top-objdes)
                      '(:static :auto :alloc))))

    Theorem: objdesign-top-of-objdesign-fix-objdes

    (defthm objdesign-top-of-objdesign-fix-objdes
      (equal (objdesign-top (objdesign-fix objdes))
             (objdesign-top objdes)))

    Theorem: objdesign-top-objdesign-equiv-congruence-on-objdes

    (defthm objdesign-top-objdesign-equiv-congruence-on-objdes
      (implies (objdesign-equiv objdes objdes-equiv)
               (equal (objdesign-top objdes)
                      (objdesign-top objdes-equiv)))
      :rule-classes :congruence)