• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
    • Macro-libraries
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
          • Syntax-for-tools
          • Atc
          • Language
            • Abstract-syntax
            • Integer-ranges
            • Implementation-environments
            • Dynamic-semantics
            • Static-semantics
            • Grammar
            • Integer-formats
            • Types
            • Portable-ascii-identifiers
            • Values
            • Integer-operations
            • Computation-states
            • Object-designators
            • Operations
            • Errors
            • Tag-environments
            • Function-environments
            • Character-sets
            • Flexible-array-member-removal
              • Remove-flexible-array-member
              • Flexible-array-member-p
              • Arithmetic-operations
              • Pointer-operations
              • Bytes
              • Keywords
              • Real-operations
              • Array-operations
              • Scalar-operations
              • Structure-operations
            • Representation
            • Transformation-tools
            • Insertion-sort
            • Pack
          • Bv
          • Imp-language
          • Event-macros
          • Java
          • Bitcoin
          • Ethereum
          • Yul
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Flexible-array-member-removal

    Flexible-array-member-p

    Check if a value is a structure with a flexible array member.

    Signature
    (flexible-array-member-p val) → yes/no
    Arguments
    val — Guard (valuep val).
    Returns
    yes/no — Type (booleanp yes/no).

    Definitions and Theorems

    Function: flexible-array-member-p

    (defun flexible-array-member-p (val)
      (declare (xargs :guard (valuep val)))
      (let ((__function__ 'flexible-array-member-p))
        (declare (ignorable __function__))
        (and (value-case val :struct)
             (value-struct->flexiblep val))))

    Theorem: booleanp-of-flexible-array-member-p

    (defthm booleanp-of-flexible-array-member-p
      (b* ((yes/no (flexible-array-member-p val)))
        (booleanp yes/no))
      :rule-classes :rewrite)

    Theorem: flexible-array-member-p-of-value-fix-val

    (defthm flexible-array-member-p-of-value-fix-val
      (equal (flexible-array-member-p (value-fix val))
             (flexible-array-member-p val)))

    Theorem: flexible-array-member-p-value-equiv-congruence-on-val

    (defthm flexible-array-member-p-value-equiv-congruence-on-val
      (implies (value-equiv val val-equiv)
               (equal (flexible-array-member-p val)
                      (flexible-array-member-p val-equiv)))
      :rule-classes :congruence)