• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
        • Transforms
          • Expression-sizing
          • Occform
          • Oprewrite
          • Expand-functions
          • Delayredux
          • Unparameterization
          • Caseelim
          • Split
          • Selresolve
          • Weirdint-elim
          • Vl-delta
          • Replicate-insts
          • Rangeresolve
          • Propagate
            • Vl-modulelist-propagate
            • Too-hard-to-propagate
            • Vl-maybe-driven-by-modinsts
            • Vl-maybe-driven-by-gateinsts
            • Vl-driven-by-assigns
            • Propagate-limits-p
            • Vl-maybe-driven-by-args
            • Candidates-for-propagation
              • Remove-simple-assigns-to
              • Propagation-sigma
              • Vl-propagation-round
              • Vl-propagation-fixpoint
              • Vl-maybe-driven-by-modinst
              • Vl-maybe-driven-by-gateinst
              • Vl-module-propagate
              • Propagate-expr-limits-okp
              • Vl-driven-by-assign
              • Vl-design-propagate
            • Clean-selects
            • Clean-params
            • Blankargs
            • Inline-mods
            • Expr-simp
            • Trunc
            • Always-top
            • Gatesplit
            • Gate-elim
            • Expression-optimization
            • Elim-supplies
            • Wildelim
            • Drop-blankports
            • Clean-warnings
            • Addinstnames
            • Custom-transform-hooks
            • Annotate
            • Latchcode
            • Elim-unused-vars
            • Problem-modules
          • Lint
          • Mlib
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Propagate

    Candidates-for-propagation

    Gather initial candidates for propagation.

    Signature
    (candidates-for-propagation x limits) → sigma
    Arguments
    x — Guard (vl-assignlist-p x).
    limits — Guard (propagate-limits-p limits).
    Returns
    sigma — Binds each identifier (lhs) to its replacement (rhs).
        Type (vl-sigma-p sigma), given (force (vl-assignlist-p x)).

    We're basically just looking for assignments like:

    assign identifier = expr;

    These are just initial candidates, and later we'll eliminate some of them because propagation would be too hard.

    Definitions and Theorems

    Function: candidates-for-propagation

    (defun candidates-for-propagation (x limits)
      (declare (xargs :guard (and (vl-assignlist-p x)
                                  (propagate-limits-p limits))))
      (let ((__function__ 'candidates-for-propagation))
        (declare (ignorable __function__))
        (b* (((when (atom x)) nil)
             ((vl-assign x1) (car x))
             ((when (and (vl-idexpr-p x1.lvalue)
                         (propagate-expr-limits-okp x1.expr limits)))
              (cons (cons (vl-idexpr->name x1.lvalue)
                          x1.expr)
                    (candidates-for-propagation (cdr x)
                                                limits))))
          (candidates-for-propagation (cdr x)
                                      limits))))

    Theorem: vl-sigma-p-of-candidates-for-propagation

    (defthm vl-sigma-p-of-candidates-for-propagation
      (implies (force (vl-assignlist-p x))
               (b* ((sigma (candidates-for-propagation x limits)))
                 (vl-sigma-p sigma)))
      :rule-classes :rewrite)

    Theorem: alistp-of-candidates-for-propagation

    (defthm alistp-of-candidates-for-propagation
      (alistp (candidates-for-propagation x limits)))