• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • C
      • 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
        • Aleobft
        • Aleovm
        • Leo
          • Grammar
          • Early-version
            • Json2ast
            • Testing
            • Definition
              • Flattening
              • Abstract-syntax
              • Dynamic-semantics
              • Compilation
              • Static-semantics
                • Type-checking
                • Static-environments
                • Curve-parameterization
                • Function-recursion
                  • Statements-callees
                  • Expressions-callees
                  • File-function-recursion-okp
                  • Topdecl-list-call-graph
                  • Fundecl-call-graph
                    • Topdecl-call-graph
                    • Expression-callees
                    • Constdecl-callees
                    • Console-callees
                    • Vardecl-callees
                    • Struct-init-list-callees
                    • Struct-init-callees
                    • Statement-list-callees
                    • Expression-list-callees
                    • Branch-list-callees
                    • Statement-callees
                    • Branch-callees
                  • Struct-recursion
                  • Input-checking
                  • Program-checking
                  • Type-maps-for-struct-components
                  • Program-and-input-checking
                  • Output-checking
                • Concrete-syntax
        • 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
    • Function-recursion

    Fundecl-call-graph

    Call graph induced by a function declaration.

    Signature
    (fundecl-call-graph decl) → graph
    Arguments
    decl — Guard (fundeclp decl).
    Returns
    graph — Type (alistp graph).

    We return a dependency graph expressing that the declared function depends on (i.e. calls) the functions directly called in its body. The format is that of an alist for the dependency graph library.

    Definitions and Theorems

    Function: fundecl-call-graph

    (defun fundecl-call-graph (decl)
      (declare (xargs :guard (fundeclp decl)))
      (let ((__function__ 'fundecl-call-graph))
        (declare (ignorable __function__))
        (b* (((fundecl decl) decl)
             (caller decl.name)
             (callees (statement-list-callees decl.body)))
          (list (cons caller callees)))))

    Theorem: alistp-of-fundecl-call-graph

    (defthm alistp-of-fundecl-call-graph
      (b* ((graph (fundecl-call-graph decl)))
        (alistp graph))
      :rule-classes :rewrite)

    Theorem: fundecl-call-graph-of-fundecl-fix-decl

    (defthm fundecl-call-graph-of-fundecl-fix-decl
      (equal (fundecl-call-graph (fundecl-fix decl))
             (fundecl-call-graph decl)))

    Theorem: fundecl-call-graph-fundecl-equiv-congruence-on-decl

    (defthm fundecl-call-graph-fundecl-equiv-congruence-on-decl
      (implies (fundecl-equiv decl decl-equiv)
               (equal (fundecl-call-graph decl)
                      (fundecl-call-graph decl-equiv)))
      :rule-classes :congruence)