• 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
                • Struct-recursion
                  • Topdecl-list-struct-graph
                  • Structdecl-struct-graph
                    • File-struct-recursion-okp
                    • Compdecl-list-type-identifiers
                    • Topdecl-struct-graph
                    • Compdecl-type-identifiers
                  • 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
    • Struct-recursion

    Structdecl-struct-graph

    Struct graph induced by a struct definition.

    Signature
    (structdecl-struct-graph decl) → graph
    Arguments
    decl — Guard (structdeclp decl).
    Returns
    graph — Type (alistp graph).

    We return a dependency graph expressing that the circui type defined by the struct type declaration depends on the type identifiers in the components' types. This dependency relation is the direct containment relation of struct types. The format is that of an alist for the dependency graph library.

    Definitions and Theorems

    Function: structdecl-struct-graph

    (defun structdecl-struct-graph (decl)
      (declare (xargs :guard (structdeclp decl)))
      (let ((__function__ 'structdecl-struct-graph))
        (declare (ignorable __function__))
        (b* ((subs (compdecl-list-type-identifiers
                        (structdecl->components decl))))
          (list (cons (structdecl->name decl) subs)))))

    Theorem: alistp-of-structdecl-struct-graph

    (defthm alistp-of-structdecl-struct-graph
      (b* ((graph (structdecl-struct-graph decl)))
        (alistp graph))
      :rule-classes :rewrite)

    Theorem: structdecl-struct-graph-of-structdecl-fix-decl

    (defthm structdecl-struct-graph-of-structdecl-fix-decl
      (equal (structdecl-struct-graph (structdecl-fix decl))
             (structdecl-struct-graph decl)))

    Theorem: structdecl-struct-graph-structdecl-equiv-congruence-on-decl

    (defthm structdecl-struct-graph-structdecl-equiv-congruence-on-decl
      (implies (structdecl-equiv decl decl-equiv)
               (equal (structdecl-struct-graph decl)
                      (structdecl-struct-graph decl-equiv)))
      :rule-classes :congruence)