• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • 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
        • 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
              • Unambiguity
              • Ascii-identifiers
              • 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

    Structdecl-formalp

    Check if a structure declaration has formal dynamic semantics.

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

    (defun structdecl-formalp (structdecl)
     (declare (xargs :guard (structdeclp structdecl)))
     (declare (xargs :guard (structdecl-unambp structdecl)))
     (let ((__function__ 'structdecl-formalp))
      (declare (ignorable __function__))
      (structdecl-case
       structdecl
       :member
       (and
         (not structdecl.extension)
         (b* (((mv okp tyspecs)
               (check-spec/qual-list-all-typespec structdecl.specqual)))
           (and okp (type-spec-list-formalp tyspecs)))
         (consp structdecl.declor)
         (endp (cdr structdecl.declor))
         (structdeclor-formalp (car structdecl.declor))
         (endp structdecl.attrib))
       :statassert nil
       :empty nil)))

    Theorem: booleanp-of-structdecl-formalp

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

    Theorem: structdecl-formalp-of-structdecl-fix-structdecl

    (defthm structdecl-formalp-of-structdecl-fix-structdecl
      (equal (structdecl-formalp (structdecl-fix structdecl))
             (structdecl-formalp structdecl)))

    Theorem: structdecl-formalp-structdecl-equiv-congruence-on-structdecl

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