• 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
            • Formalized-subset
              • Exprs-formalp
              • Stmts-formalp
              • Type-spec-list-integer-formalp
              • Type-spec-list-formalp
              • Extdecl-formalp
              • Ident-formalp
              • Tyname-formalp
              • Pointers-formalp
              • Dirdeclor-obj-formalp
              • Desiniter-formalp
              • Fundef-formalp
              • Decl-obj-formalp
              • Decl-block-formalp
              • Struct-declon-formalp
                • Initdeclor-obj-formalp
                • Initdeclor-block-formalp
                • Decl-struct-formalp
                • Dirdeclor-fun-formalp
                • Dirdeclor-block-formalp
                • Initdeclor-fun-formalp
                • Transunit-ensemble-formalp
                • Param-declor-formalp
                • Param-declon-formalp
                • Declor-obj-formalp
                • Decl-fun-formalp
                • Struct-declor-formalp
                • Struct-declon-list-formalp
                • Initer-formalp
                • Struni-spec-formalp
                • Stor-spec-list-formalp
                • Declor-fun-formalp
                • Declor-block-formalp
                • Param-declon-list-formalp
                • Desiniter-list-formalp
                • Extdecl-list-formalp
                • Transunit-formalp
                • Const-formalp
                • Stmt-formalp
                • Expr-formalp
                • Expr-list-formalp
                • Block-item-list-formalp
                • Block-item-formalp
                • Comp-stmt-formalp
              • Mapping-to-language-definition
              • Input-files
              • Compilation-database
              • Printer
              • Output-files
              • Abstract-syntax-operations
              • Implementation-environments
              • Abstract-syntax
              • Concrete-syntax
              • Disambiguation
              • Validation
              • Gcc-builtins
              • Preprocessing
              • Parsing
            • Atc
            • Transformation-tools
            • Language
            • 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
    • Formalized-subset

    Struct-declon-formalp

    Check if a structure declaration has formal dynamic semantics.

    Signature
    (struct-declon-formalp structdeclon) → yes/no
    Arguments
    structdeclon — Guard (struct-declonp structdeclon).
    Returns
    yes/no — Type (booleanp yes/no).

    This must be a declaration for a member, not a static assertion. There must be no GCC extension. There must be only type specifiers, not type qualifiers, and they must form a supported type. There must be a single supported structure declarator.

    Definitions and Theorems

    Function: struct-declon-formalp

    (defun struct-declon-formalp (structdeclon)
     (declare (xargs :guard (struct-declonp structdeclon)))
     (declare (xargs :guard (struct-declon-unambp structdeclon)))
     (let ((__function__ 'struct-declon-formalp))
      (declare (ignorable __function__))
      (struct-declon-case
       structdeclon
       :member
       (and
         (not structdeclon.extension)
         (b*
          (((mv okp tyspecs)
            (check-spec/qual-list-all-typespec structdeclon.specquals)))
          (and okp (type-spec-list-formalp tyspecs)))
         (consp structdeclon.declors)
         (endp (cdr structdeclon.declors))
         (struct-declor-formalp (car structdeclon.declors))
         (endp structdeclon.attribs))
       :statassert nil
       :empty nil)))

    Theorem: booleanp-of-struct-declon-formalp

    (defthm booleanp-of-struct-declon-formalp
      (b* ((yes/no (struct-declon-formalp structdeclon)))
        (booleanp yes/no))
      :rule-classes :rewrite)

    Theorem: struct-declon-formalp-of-struct-declon-fix-structdeclon

    (defthm struct-declon-formalp-of-struct-declon-fix-structdeclon
      (equal (struct-declon-formalp (struct-declon-fix structdeclon))
             (struct-declon-formalp structdeclon)))

    Theorem: struct-declon-formalp-struct-declon-equiv-congruence-on-structdeclon

    (defthm
     struct-declon-formalp-struct-declon-equiv-congruence-on-structdeclon
     (implies (struct-declon-equiv structdeclon structdeclon-equiv)
              (equal (struct-declon-formalp structdeclon)
                     (struct-declon-formalp structdeclon-equiv)))
     :rule-classes :congruence)