• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • C
        • Syntax-for-tools
          • Formalized-subset
            • Expr-pure-formalp
            • Stmts-formalp
            • Type-spec-list-integer-formalp
            • Expr-formalp
            • Type-spec-list-formalp
            • Extdecl-formalp
            • Ident-formalp
            • Tyname-formalp
            • Pointers-formalp
            • Dirdeclor-obj-formalp
            • Desiniter-formalp
            • Fundef-formalp
            • Decl-obj-formalp
            • Expr-asg-formalp
            • Decl-block-formalp
            • Struct-declon-formalp
            • Initdeclor-obj-formalp
            • Initdeclor-block-formalp
            • Decl-struct-formalp
            • Dirdeclor-fun-formalp
            • Dirdeclor-block-formalp
            • Initdeclor-fun-formalp
            • Transunit-ensemble-formalp
            • Param-declor-formalp
            • Param-declon-formalp
            • Initer-formalp
            • Expr-call-formalp
            • Declor-obj-formalp
            • Decl-fun-formalp
              • Struct-declor-formalp
              • Struct-declon-list-formalp
              • Struni-spec-formalp
              • Stor-spec-list-formalp
              • Declor-fun-formalp
              • Declor-block-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
              • 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
        • Proof-checker-array
        • Soft
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Ethereum
        • Leftist-trees
        • Java
        • Riscv
        • Taspi
        • Bitcoin
        • Zcash
        • Des
        • X86isa
        • Sha-2
        • Yul
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Axe
        • Poseidon
        • Where-do-i-place-my-book
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Formalized-subset

    Decl-fun-formalp

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

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

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

    Theorem: booleanp-of-decl-fun-formalp

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

    Theorem: decl-fun-formalp-of-decl-fix-decl

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

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

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