• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
        • Transforms
        • Lint
          • Vl-lintconfig-p
          • Lucid
          • Skip-detection
            • Sd-problem-p
            • Sd-keylist-find-skipped
            • Sd-keylist->indicies
            • Sd-key-p
            • Sd-patalist-compare
              • Sd-analyze-ctxexprs
              • Sd-problemlist-p
              • Sd-patalist-p
              • Sd-keygen
              • Sd-patalist
              • Sd-keylist-p
              • Sd-analyze-modulelist
              • Sd-analyze-module-aux
              • Sd-analyze-module
              • Sd-pp-problem-long
              • Sd-analyze-modulelist-aux
              • Sd-problem-score
              • Sd-pp-problem-header
              • Sd-analyze-design
              • Sd-problem->
              • Sd-pp-problem-brief
              • Sd-pp-problemlist-long
              • Sd-pp-problemlist-brief
              • Sd-natlist-linear-increments-p
              • Sd-keylist-linear-increments-p
            • Vl-lintresult-p
            • Lint-warning-suppression
            • Condcheck
            • Selfassigns
            • Leftright-check
            • Dupeinst-check
            • Oddexpr-check
            • Remove-toohard
            • Qmarksize-check
            • Portcheck
            • Duplicate-detect
            • Vl-print-certain-warnings
            • Duperhs-check
            • *vl-lint-help*
            • Lint-stmt-rewrite
            • Drop-missing-submodules
            • Check-case
            • Drop-user-submodules
            • Check-namespace
            • Vl-lint
          • Mlib
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Skip-detection

    Sd-patalist-compare

    Perform skip-detection for a single expression.

    Signature
    (sd-patalist-compare dom x y ctx) → probs
    Arguments
    dom — In practice, this is the strip-cars of x. That is, it is the list of all pattern names that were found in the expression, and which we need to investigate.
    x — The pattern produced for some particular expression.
        Guard (sd-patalist-p x).
    y — The global sd-patalist-p that we assume was produced for the entire module.
        Guard (sd-patalist-p y).
    ctx — Where this expression came from.
        Guard (vl-context1-p ctx).
    Returns
    probs — Type (sd-problemlist-p probs), given the guard.

    We recur over dom. For each pattern named in the expression, we use sd-keylist-find-skipped to try to find any skipped wires, collecting any problems that have been reported.

    Definitions and Theorems

    Function: sd-patalist-compare

    (defun sd-patalist-compare (dom x y ctx)
     (declare (xargs :guard (and (sd-patalist-p x)
                                 (sd-patalist-p y)
                                 (vl-context1-p ctx))))
     (let ((__function__ 'sd-patalist-compare))
      (declare (ignorable __function__))
      (if (atom dom)
          nil
        (let
           ((first (sd-keylist-find-skipped (cdr (hons-get (car dom) x))
                                            (cdr (hons-get (car dom) y))
                                            ctx))
            (rest (sd-patalist-compare (cdr dom)
                                       x y ctx)))
          (if first (cons first rest) rest)))))

    Theorem: sd-problemlist-p-of-sd-patalist-compare

    (defthm sd-problemlist-p-of-sd-patalist-compare
      (implies (and (force (sd-patalist-p x))
                    (force (sd-patalist-p y))
                    (force (vl-context1-p ctx)))
               (b* ((probs (sd-patalist-compare dom x y ctx)))
                 (sd-problemlist-p probs)))
      :rule-classes :rewrite)