• 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
          • Defbyte
          • Defresult
          • Fold
          • Specific-types
          • Defsubtype
          • Defset
          • Defflatsum
          • Deflist-of-len
          • Pos-list
          • Defomap
          • Defbytelist
          • Defbyte-standard-instances
          • Deffixtype-alias
          • Defbytelist-standard-instances
          • Defunit
          • Byte-list
          • Database
          • Byte
          • String-option
          • Pos-option
          • Nibble
          • Nat-option
          • Ubyte32-option
          • Byte-list20
          • Byte-list32
          • Byte-list64
          • Pseudo-event-form
          • Natoption/natoptionlist
          • Nati
          • Character-list
          • Nat/natlist
          • Maybe-string
          • Nibble-list
          • Natoption/natoptionlist-result
          • Nat/natlist-result
          • Nat-option-list-result
          • Set
          • String-result
          • String-list-result
          • Nat-result
          • Nat-option-result
          • Nat-list-result
          • Maybe-string-result
          • Integer-result
          • Character-result
          • Character-list-result
          • Boolean-result
          • Map
          • Dependencies
            • Depgraph
            • Flextype-direct-dependencies
            • Name-of-flextypes-containing-recognizer
            • Flexprod-fields-direct-dependencies
            • Topo-dependencies
              • Flexprods-direct-dependencies
              • Flextypes-direct-dependencies
              • Flextype-list-direct-dependencies
            • Bag
            • Pos-set
            • Hex-digit-char-list
            • Dec-digit-char-list
            • Pseudo-event-form-list
            • Nat-option-list
            • Character-any-map
            • Any-nat-map
            • Symbol-set
            • String-set
            • Nat-set
            • Character-set
            • Oct-digit-char-list
            • Bin-digit-char-list
            • Bit-list
          • Isar
          • Kestrel-utilities
          • Set
          • C
          • 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
    • Dependencies

    Topo-dependencies

    A topological ordering of type (clique) based on type dependencies.

    Signature
    (topo-dependencies name fty-table) → dependencies
    Arguments
    name — Guard (symbolp name).
    fty-table — Guard (alistp fty-table).
    Returns
    dependencies — Type (symbol-listp dependencies).

    This is the topological ordering of depgraph, obtained via depgraph::toposort.

    Definitions and Theorems

    Function: topo-dependencies

    (defun topo-dependencies (name fty-table)
      (declare (xargs :guard (and (symbolp name)
                                  (alistp fty-table))))
      (let ((__function__ 'topo-dependencies))
        (declare (ignorable __function__))
        (b* ((depgraph (depgraph name fty-table))
             ((mv successp result)
              (depgraph::toposort depgraph))
             ((unless successp)
              (raise "Internal error: assembled graph is not a DAG ~x0"
                     depgraph))
             ((unless (symbol-listp result))
              (raise "Internal error: result is not a symbol-list ~x0"
                     result)))
          result)))

    Theorem: symbol-listp-of-topo-dependencies

    (defthm symbol-listp-of-topo-dependencies
      (b* ((dependencies (topo-dependencies name fty-table)))
        (symbol-listp dependencies))
      :rule-classes :rewrite)