• 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-fun-formalp

    Check if a declaration has dynamic formal semantics, as a function declaration.

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

    It must not be a static assertion declaration, and there must be no GCC extensions. There may be only type specifiers, for a supported type. There must a single supported initializer declarator.

    Definitions and Theorems

    Function: declon-fun-formalp

    (defun declon-fun-formalp (declon)
     (declare (xargs :guard (declonp declon)))
     (declare (xargs :guard (declon-unambp declon)))
     (let ((__function__ 'declon-fun-formalp))
      (declare (ignorable __function__))
      (declon-case
           declon
           :declon
           (and (not declon.extension)
                (b* (((mv okp tyspecs)
                      (check-decl-spec-list-all-typespec declon.specs)))
                  (and okp (type-spec-list-formalp tyspecs)))
                (consp declon.declors)
                (endp (cdr declon.declors))
                (init-declor-fun-formalp (car declon.declors)))
           :statassert nil)))

    Theorem: booleanp-of-declon-fun-formalp

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

    Theorem: declon-fun-formalp-of-declon-fix-declon

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

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

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