Compute the transitive dependencies for a list of nodes.
(transdeps nodes graph) → deps
We implement a general-purpose, transitive closure operation for
dependency graph reachability. We determine all nodes in the
After calling this function you may wish to use transdeps-free to clear out the relevant memo tables.
Function:
(defun transdeps (nodes graph) (declare (xargs :guard t)) (let ((__function__ 'transdeps)) (declare (ignorable __function__)) (let ((orig (mergesort nodes))) (with-fast-alist graph (transdeps-aux orig nil orig graph)))))
Theorem:
(defthm true-listp-of-transdeps (b* ((deps (transdeps nodes graph))) (true-listp deps)) :rule-classes :rewrite)
Theorem:
(defthm setp-of-transdeps (b* ((deps (transdeps nodes graph))) (setp deps)) :rule-classes :rewrite)
Theorem:
(defthm transdeps-subset (subset (transdeps nodes graph) (union (mergesort nodes) (transdeps-allnodes graph))))