• 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

    Initer-formalp

    Check if an initializer has formal dynamic semantics.

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

    This is based on c::exec-initer. If the initializer is a single expression, the expression must be a supported call or pure expression. If the initializer is a list, each element of the list must be a supported pure expressions.

    Definitions and Theorems

    Function: initer-formalp

    (defun initer-formalp (initer)
      (declare (xargs :guard (initerp initer)))
      (declare (xargs :guard (initer-unambp initer)))
      (let ((__function__ 'initer-formalp))
        (declare (ignorable __function__))
        (initer-case initer
                     :single (or (expr-pure-formalp initer.expr)
                                 (expr-call-formalp initer.expr))
                     :list (desiniter-list-formalp initer.elems))))

    Theorem: booleanp-of-initer-formalp

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

    Theorem: initer-formalp-of-initer-fix-initer

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

    Theorem: initer-formalp-initer-equiv-congruence-on-initer

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