• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
        • Symbolic-test-vectors
          • Defstv
          • Stv-compile
          • Symbolic-test-vector-format
          • Stv-implementation-details
          • Compiled-stv-p
          • Stv-run-for-all-dontcares
          • Stv-run
          • Stv-process
            • Processed-stv-p
            • Stv-fully-general-simulation-run
            • Stv-fully-general-in-alists
            • Stv-run-esim-debug
            • Stv-extract-relevant-signals
              • Stv-fully-general-st-alist
              • Stv-run-esim
            • Stv-run-check-dontcares
            • Symbolic-test-vector-composition
            • Stv-expand
            • Stv-easy-bindings
            • Stv-debug
            • Stv-run-squash-dontcares
            • Stvdata-p
            • Stv-doc
            • Stv2c
            • Stv-widen
            • Stv-out->width
            • Stv-in->width
            • Stv->outs
            • Stv-number-of-phases
            • Stv->ins
            • Stv-suffix-signals
            • Stv->vars
          • Esim-primitives
          • E-conversion
          • Esim-steps
          • Patterns
          • Mod-internal-paths
          • Defmodules
          • Esim-simplify-update-fns
          • Esim-tutorial
          • Esim-vl
        • Vl2014
        • Sv
        • Vwsim
        • Fgl
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Testing-utilities
      • Math
    • Stv-process

    Stv-extract-relevant-signals

    Pull out the fully general expressions for the signals that we care about, and bind them to the bit names of the simulation variables.

    Signature
    (stv-extract-relevant-signals extract-alists out-alists acc) 
      → 
    *
    Arguments
    extract-alists — The stv-extraction-alists we obtained from stv-compile.
    out-alists — The list of output alists from the fully general simulation, e.g., from stv-fully-general-simulation-run.
    acc — An accumulator to extend, which should initially be nil.

    We walk down the extract-alists and out-alists together, extracting the expressions for the signals that we care about at each phase, and naming them with the output simulation variable bit names.

    Definitions and Theorems

    Function: stv-extract-relevant-signals

    (defun
     stv-extract-relevant-signals
     (extract-alists out-alists acc)
     (declare (xargs :guard t))
     (let
      ((__function__ 'stv-extract-relevant-signals))
      (declare (ignorable __function__))
      (b* (((when (and (atom extract-alists)
                       (atom out-alists)))
            acc)
           ((when (or (atom extract-alists)
                      (atom out-alists)))
            (raise "Should have as many extract alists as out-alists."))
           (extr1 (car extract-alists))
           (outs1 (car out-alists))
           ((when (not extr1))
            (stv-extract-relevant-signals (cdr extract-alists)
                                          (cdr out-alists)
                                          acc))
           (user-bits (alist-vals extr1))
           (want-names (alist-keys extr1))
           (outs1 (make-fast-alist outs1))
           (want-exprs (vl2014::look-up-each-fast want-names outs1))
           (- (fast-alist-free outs1))
           (acc (safe-pairlis-onto-acc user-bits want-exprs acc)))
          (stv-extract-relevant-signals (cdr extract-alists)
                                        (cdr out-alists)
                                        acc))))