• Top
    • Documentation
    • Books
    • Boolean-reasoning
      • Ipasir
      • Aignet
      • Aig
        • Aig-constructors
        • Aig-vars
        • Aig-sat
        • Bddify
        • Aig-substitution
        • Aig-other
          • Best-aig
            • Aig-label-nodes
            • Aig-list-list-best
            • Aig-collect-andnode-labels
            • Aig-list-best-aux1
            • Aig-collect-labels
              • Aig-list-best
              • Aig-list-list-label-nodes
              • Aig-list-label-nodes
              • Aig-list-list-best-aux
              • Aig-count-andnode-labels
              • Aig-list-best-aux
              • Aig-count-labels
            • Aig2c
            • Expr-to-aig
            • Aiger-write
            • Aig-random-sim
            • Aiger-read
            • Aig-print
            • Aig-cases
          • Aig-semantics
          • Aig-and-count
        • Satlink
        • Truth
        • Ubdds
        • Bdd
        • Faig
        • Bed
        • 4v
      • Projects
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Best-aig

    Aig-collect-labels

    Collect the labels of ALL nodes in an AIG. (memoized)

    Signature
    (aig-collect-labels x map) → label-set
    Arguments
    x — A single AIG.
    map — Mapping of AIG nodes to labels.
    Returns
    label-set — Ordered set of labels for all nodes in X.
        Type (set::setp label-set).

    Definitions and Theorems

    Function: aig-collect-labels

    (defun aig-collect-labels (x map)
      (declare (xargs :guard t))
      (let ((__function__ 'aig-collect-labels))
        (declare (ignorable __function__))
        (b* (((when (atom x)) nil)
             (x-label (cdr (hons-get x map)))
             (car-labels (aig-collect-labels (car x) map))
             (cdr-labels (aig-collect-labels (cdr x) map)))
          (set::insert x-label
                       (set::union car-labels cdr-labels)))))

    Theorem: setp-of-aig-collect-labels

    (defthm setp-of-aig-collect-labels
      (b* ((label-set (aig-collect-labels x map)))
        (set::setp label-set))
      :rule-classes :rewrite)

    Function: aig-collect-labels-memoize-condition

    (defun aig-collect-labels-memoize-condition (x map)
      (declare (ignorable x map)
               (xargs :guard 't))
      (and (consp x) (cdr x)))