• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
        • Syntax
        • Loader
        • Warnings
        • Getting-started
        • Utilities
        • Printer
        • Kit
          • Vl-lint
            • Vl-lintconfig-p
            • Condcheck
            • Lint-warning-suppression
            • Lucid
            • Lvaluecheck
            • Vl-interfacelist-alwaysstyle
            • Truncation-warnings
            • Vl-modulelist-alwaysstyle
            • Skip-detection
              • Vl-ctxexprlist->exprs
              • Sd-keylist->indicies
              • Sd-keylist-find-skipped
              • Sd-problem
              • Sd-key
              • Sd-patalist-compare
              • Sd-analyze-ctxexprs
                • Sd-keygen
                • Make-sd-patalist
                • Sd-analyze-modulelist
                • Sd-analyze-module-aux
                • Sd-analyze-module
                • Sd-pp-problem-long
                • Sd-problem-score
                • Sd-pp-problem-header
                • Sd-analyze-modulelist-aux
                • Sd-analyze-design
                • Sd-problem->
                • Sd-patalist
                • Sd-problemlist
                • Sd-pp-problem-brief
                • Sd-keylist
                • Sd-pp-problemlist-long
                • Sd-pp-problemlist-brief
                • Sd-natlist-linear-increments-p
                • Sd-keylist-linear-increments-p
              • Vl-lint-report
              • Vl-lintresult
              • Vl::vl-design-sv-use-set
              • Oddexpr-check
              • Leftright-check
              • Duplicate-detect
              • Selfassigns
              • *vl-lint-help*
              • Arith-compare-check
              • Dupeinst-check
              • Qmarksize-check
              • Lint-whole-file-suppression
              • Run-vl-lint-main
              • Logicassign
              • Run-vl-lint
              • Vl-print-certain-warnings
              • Duperhs-check
              • Vl-lint-top
              • Sd-filter-problems
              • Vl-modulelist-add-svbad-warnings
              • Vl-module-add-svbad-warnings
              • Check-case
              • Vl-lint-extra-actions
              • Drop-lint-stubs
              • Vl-lint-print-warnings
              • Drop-user-submodules
              • Check-namespace
              • Vl-lintconfig-loadconfig
              • Vl-lint-design->svex-modalist-wrapper
              • Vl-delete-sd-problems-for-modnames-aux
              • Vl-collect-new-names-from-orignames
              • Vl-lint-print-all-warnings
              • Vl-design-remove-unnecessary-modules
              • Vl-delete-sd-problems-for-modnames
              • Vl-always-check-style
              • Vl-vardecllist-svbad-warnings
              • Vl-vardecl-svbad-warnings
              • Vl-reportcard-remove-suppressed
              • Vl-reportcard-keep-suppressed
              • Vl-alwayslist-check-style
              • Vl-remove-nameless-descriptions
              • Vl-lint-apply-quiet
              • Vl-warninglist-remove-suppressed
              • Vl-warninglist-keep-suppressed
              • Vl-print-eliminated-descs
              • Vl-module-alwaysstyle
              • Vl-jp-reportcard-aux
              • Vl-interface-alwaysstyle
              • Vl-design-alwaysstyle
              • Vl-jp-description-locations
              • Vl-jp-reportcard
              • Vl-pp-stringlist-lines
              • Vl-jp-design-locations
              • Vl-datatype-svbad-p
              • Unpacked-range-check
              • Sd-problem-major-p
              • Vl-alwaysstyle
            • Vl-server
            • Vl-gather
            • Vl-zip
            • Vl-main
            • Split-plusargs
            • Vl-shell
            • Vl-json
          • Mlib
          • Transforms
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Skip-detection

    Sd-analyze-ctxexprs

    Perform skip-detection for a list of expressions.

    Signature
    (sd-analyze-ctxexprs ctxexprs global-pats) → problems
    Arguments
    ctxexprs — Guard (vl-ctxexprlist-p ctxexprs).
    global-pats — Guard (sd-patalist-p global-pats).
    Returns
    problems — Type (sd-problemlist-p problems), given (sd-patalist-p global-pats).

    Signature: (sd-analyze-ctxexprs ctxexprs global-pats) returns a list of sd-problem-ps.

    • ctxexprs is an vl-ctxexprlist that associates expressions with their contexts. Generally we expect that this alist includes every expression in a module.
    • global-pats is the sd-patalist that was constructed for all names in the module, which is needed by sd-patalist-compare.

    We just call sd-patalist-compare for every expression in ctxexprs and combine the results.

    Definitions and Theorems

    Function: sd-analyze-ctxexprs

    (defun sd-analyze-ctxexprs (ctxexprs global-pats)
     (declare (xargs :guard (and (vl-ctxexprlist-p ctxexprs)
                                 (sd-patalist-p global-pats))))
     (let ((__function__ 'sd-analyze-ctxexprs))
      (declare (ignorable __function__))
      (if (atom ctxexprs)
          nil
       (b* (((vl-ctxexpr x1) (car ctxexprs))
            (expr-names (vl-expr-varnames x1.expr))
            (expr-keys (sd-keygen-list expr-names nil))
            (expr-pats (make-sd-patalist expr-keys))
            (dom (strip-cars expr-pats))
            (report1
                 (sd-patalist-compare dom expr-pats global-pats x1.ctx))
            (- (flush-hons-get-hash-table-link expr-pats)))
         (append report1
                 (sd-analyze-ctxexprs (cdr ctxexprs)
                                      global-pats))))))

    Theorem: sd-problemlist-p-of-sd-analyze-ctxexprs

    (defthm sd-problemlist-p-of-sd-analyze-ctxexprs
      (implies
           (sd-patalist-p global-pats)
           (b* ((problems (sd-analyze-ctxexprs ctxexprs global-pats)))
             (sd-problemlist-p problems)))
      :rule-classes :rewrite)

    Theorem: true-listp-of-sd-analyze-ctxexprs

    (defthm true-listp-of-sd-analyze-ctxexprs
      (b* ((?problems (sd-analyze-ctxexprs ctxexprs global-pats)))
        (true-listp problems))
      :rule-classes :type-prescription)