• 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

    Topdecl-list-call-graph

    Call graph induced by a list of top-level declarations.

    Signature
    (topdecl-list-call-graph decls) → graph
    Arguments
    decls — Guard (topdecl-listp decls).
    Returns
    graph — Type (alistp graph).

    This lifts topdecl-call-graph to lists. We return the union of the graphs for each element of the list. Note that type checking ensures the absence of different declarations of the same function, ensuring that the unioned alists have disjoint keys.

    Definitions and Theorems

    Function: topdecl-list-call-graph

    (defun topdecl-list-call-graph (decls)
      (declare (xargs :guard (topdecl-listp decls)))
      (let ((__function__ 'topdecl-list-call-graph))
        (declare (ignorable __function__))
        (cond ((endp decls) nil)
              (t (append (topdecl-call-graph (car decls))
                         (topdecl-list-call-graph (cdr decls)))))))

    Theorem: alistp-of-topdecl-list-call-graph

    (defthm alistp-of-topdecl-list-call-graph
      (b* ((graph (topdecl-list-call-graph decls)))
        (alistp graph))
      :rule-classes :rewrite)

    Theorem: topdecl-list-call-graph-of-topdecl-list-fix-decls

    (defthm topdecl-list-call-graph-of-topdecl-list-fix-decls
      (equal (topdecl-list-call-graph (topdecl-list-fix decls))
             (topdecl-list-call-graph decls)))

    Theorem: topdecl-list-call-graph-topdecl-list-equiv-congruence-on-decls

    (defthm
         topdecl-list-call-graph-topdecl-list-equiv-congruence-on-decls
      (implies (topdecl-list-equiv decls decls-equiv)
               (equal (topdecl-list-call-graph decls)
                      (topdecl-list-call-graph decls-equiv)))
      :rule-classes :congruence)