• 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

    Desiniter-formalp

    Check if an initializer with optional designations has formal dynamic semantics.

    Signature
    (desiniter-formalp desiniter) → yes/no
    Arguments
    desiniter — Guard (desiniterp desiniter).
    Returns
    yes/no — Type (booleanp yes/no).

    Since compound literals are not supported currently, the only place where initializers with optional designations occur is as elements of list initializers (i.e. the :list case of initer). The supported initializers are the ones in c::exec-initer, which only supports list initializers that consist of supported pure expressions. So each element of the list must have no designations and be a single supported pure expression.

    Definitions and Theorems

    Function: desiniter-formalp

    (defun desiniter-formalp (desiniter)
     (declare (xargs :guard (desiniterp desiniter)))
     (declare (xargs :guard (desiniter-unambp desiniter)))
     (let ((__function__ 'desiniter-formalp))
      (declare (ignorable __function__))
      (b* (((desiniter desiniter) desiniter))
       (and
          (endp desiniter.designors)
          (initer-case desiniter.initer :single)
          (expr-pure-formalp (initer-single->expr desiniter.initer))))))

    Theorem: booleanp-of-desiniter-formalp

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

    Theorem: desiniter-formalp-of-desiniter-fix-desiniter

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

    Theorem: desiniter-formalp-desiniter-equiv-congruence-on-desiniter

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