• 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
              • Ext-declon-formalp
              • Type-spec-list-formalp
              • Ident-formalp
              • Tyname-formalp
              • Pointers-formalp
              • Dirdeclor-obj-formalp
              • Desiniter-formalp
              • Declon-obj-formalp
              • Fundef-formalp
              • Declon-block-formalp
              • Struct-declon-formalp
              • Init-declor-obj-formalp
              • Declon-struct-formalp
                • Init-declor-block-formalp
                • Dirdeclor-fun-formalp
                • Dirdeclor-block-formalp
                • Init-declor-fun-formalp
                • Declon-fun-formalp
                • Transunit-ensemble-formalp
                • Param-declor-formalp
                • Param-declon-formalp
                • Declor-obj-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
                • Ext-declon-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

    Declon-struct-formalp

    Check if a declaration has formal dynamic semantics, as a declaration for a structure type.

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

    This must not be a static assertion declaration. It must consists of a single type specifier without declarators. The type specifier must be for a structure type, and have a supported structure or union specifier. There must be no GCC extensions.

    Definitions and Theorems

    Function: declon-struct-formalp

    (defun declon-struct-formalp (declon)
     (declare (xargs :guard (declonp declon)))
     (declare (xargs :guard (declon-unambp declon)))
     (let ((__function__ 'declon-struct-formalp))
      (declare (ignorable __function__))
      (declon-case
       declon
       :declon
       (and (not declon.extension)
            (consp declon.specs)
            (endp (cdr declon.specs))
            (decl-spec-case (car declon.specs)
                            :typespec)
            (b* ((tyspec (decl-spec-typespec->spec (car declon.specs))))
              (and (type-spec-case tyspec :struct)
                   (b* ((struni-spec (type-spec-struct->spec tyspec)))
                     (and (struni-spec-formalp struni-spec)
                          (endp declon.declors))))))
       :statassert nil)))

    Theorem: booleanp-of-declon-struct-formalp

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

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

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

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

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