• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
          • Syntax-for-tools
            • Disambiguator
            • Abstract-syntax
            • Parser
            • Validator
            • Printer
            • Formalized-subset
              • Expr-pure-formalp
              • Type-spec-list-integer-formalp
              • Stmts/blocks-formalp
              • Extdecl-formalp
              • Ident-formalp
              • Type-spec-list-formalp
              • Tyname-formalp
              • Pointers-formalp
              • Dirdeclor-obj-formalp
              • Desiniter-formalp
              • Fundef-formalp
              • Decl-obj-formalp
              • Decl-block-formalp
              • Initdeclor-obj-formalp
              • Expr-asg-formalp
              • Structdecl-formalp
              • Initdeclor-block-formalp
              • Decl-struct-formalp
                • Dirdeclor-fun-formalp
                • Dirdeclor-block-formalp
                • Initdeclor-fun-formalp
                • Transunit-ensemble-formalp
                • Param-declor-formalp
                • Initer-formalp
                • Expr-call-formalp
                • Declor-obj-formalp
                • Decl-fun-formalp
                • Param-declon-formalp
                • Structdeclor-formalp
                • Stor-spec-list-formalp
                • Declor-fun-formalp
                • Declor-block-formalp
                • Strunispec-formalp
                • Structdecl-list-formalp
                • Param-declon-list-formalp
                • Desiniter-list-formalp
                • Extdecl-list-formalp
                • Expr-list-pure-formalp
                • Transunit-formalp
                • Const-formalp
                • Stmt-formalp
                • Block-item-list-formalp
                • Block-item-formalp
              • Mapping-to-language-definition
              • Input-files
              • Defpred
              • Output-files
              • Abstract-syntax-operations
              • Validation-information
              • Implementation-environments
              • Concrete-syntax
              • Ascii-identifiers
              • Unambiguity
              • Preprocessing
              • Abstraction-mapping
            • Atc
            • Language
            • 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
    • Formalized-subset

    Decl-struct-formalp

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

    Signature
    (decl-struct-formalp decl) → yes/no
    Arguments
    decl — Guard (declp decl).
    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: decl-struct-formalp

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

    Theorem: booleanp-of-decl-struct-formalp

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

    Theorem: decl-struct-formalp-of-decl-fix-decl

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

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

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