• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
    • Macro-libraries
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
        • Transforms
        • Lint
          • Vl-lintconfig-p
          • Lucid
            • Vl-lucidstate
            • Vl-lucidstate-init
              • Vl-scope-luciddb-init
                • Vl-scope-luciddb-init-aux
              • Vl-taskdecllist-luciddb-init
              • Vl-interfacelist-luciddb-init
              • Vl-packagelist-luciddb-init
              • Vl-modulelist-luciddb-init
              • Vl-initiallist-luciddb-init
              • Vl-fundecllist-luciddb-init
              • Vl-alwayslist-luciddb-init
              • Vl-taskdecl-luciddb-init
              • Vl-package-luciddb-init
              • Vl-interface-luciddb-init
              • Vl-fundecl-luciddb-init
              • Vl-module-luciddb-init
              • Vl-initial-luciddb-init
              • Vl-always-luciddb-init
              • Vl-luciddb-init
            • Vl-lucid-dissect-pair
            • Vl-hidslice-mark
            • Vl-lucid-dissect-var-main
            • Vl-lucid-multidrive-detect
            • Vl-lucid-filter-merges
            • Vl-hidsolo-mark
            • Vl-maybe-delayoreventcontrol-lucidcheck
            • Vl-maybe-packeddimension-lucidcheck
            • Vl-delayoreventcontrol-lucidcheck
            • Vl-repeateventcontrol-lucidcheck
            • Vl-packeddimensionlist-lucidcheck
            • Vl-namedparamvaluelist-lucidcheck
            • Vl-hidtrace-mark-interfaces
            • Vl-hidstep-mark-interfaces
            • Vl-maybe-paramvalue-lucidcheck
            • Vl-paramvaluelist-lucidcheck
            • Vl-packeddimension-lucidcheck
            • Vl-namedparamvalue-lucidcheck
            • Vl-maybe-gatedelay-lucidcheck
            • Vl-rhsatom-lucidcheck
            • Vl-plainarglist-lucidcheck
            • Vl-namedarglist-lucidcheck
            • Vl-lucidstate-mark
            • Vl-lucid-mark-simple
            • Vl-eventcontrol-lucidcheck
            • Vl-enumitemlist-lucidcheck
            • Vl-enumbasetype-lucidcheck
            • Vl-enumbasekind-lucidcheck
            • Vl-delaycontrol-lucidcheck
            • Vl-plainarg-lucidcheck
            • Vl-paramvalue-lucidcheck
            • Vl-paramargs-lucidcheck
            • Vl-maybe-rhsexpr-lucidcheck
            • Vl-maybe-range-lucidcheck
            • Vl-gatedelay-lucidcheck
            • Vl-evatomlist-lucidcheck
            • Vl-arguments-lucidcheck
            • Vl-rangelist-lucidcheck
            • Vl-namedarg-lucidcheck
            • Vl-enumitem-lucidcheck
            • Vl-custom-suppress-multidrive-p
            • Vl-evatom-lucidcheck
            • Vl-range-lucidcheck
            • Vl-pps-lucidstate
            • Vl-lucid-valid-bits-for-datatype
            • Vl-lucidocclist-drop-bad-modinsts
            • Vl-paramdecl-lucidcheck
            • Vl-lucid-dissect-database
            • Vl-interfaceportlist-lucidcheck
            • Vl-interfaceport-lucidcheck
            • Vl-taskdecllist-lucidcheck
            • Vl-taskdecl-lucidcheck
            • Vl-portdecllist-lucidcheck
            • Vl-paramdecllist-lucidcheck
            • Vl-interfacelist-lucidcheck
            • Vl-gateinstlist-lucidcheck
            • Vl-fundecl-lucidcheck
            • Vl-design-lucidcheck-main
            • Vl-vardecllist-lucidcheck
            • Vl-vardecl-lucidcheck
            • Vl-typedeflist-lucidcheck
            • Vl-portdecl-lucidcheck
            • Vl-packagelist-lucidcheck
            • Vl-package-lucidcheck
            • Vl-modulelist-lucidcheck
            • Vl-modinstlist-lucidcheck
            • Vl-modinst-lucidcheck
            • Vl-interface-lucidcheck
            • Vl-initiallist-lucidcheck
            • Vl-gateinst-lucidcheck
            • Vl-fundecllist-lucidcheck
            • Vl-assignlist-lucidcheck
            • Vl-alwayslist-lucidcheck
            • Vl-typedef-lucidcheck
            • Vl-initial-lucidcheck
            • Vl-design-lucid
            • Vl-assign-lucidcheck
            • Vl-module-lucidcheck
            • Vl-always-lucidcheck
            • Vl-lucidocclist-drop-foreign-writes
            • Vl-lucid-valid-bits-for-decl
            • Vl-custom-suppress-multidrive-p-default
            • Vl-lucidmergealist-count
            • Vl-lucid-scopestack-subscope-p
            • Vl-lucid-collect-solo-occs
            • Vl-lucid-collect-resolved-slices
            • Vl-lucid-pp-multibits
            • Vl-lucid-ctx
            • Vl-lucidocclist-drop-initials
            • Vl-lucidocclist-drop-generates
            • Vl-lucid-slices-append-bits
            • Vl-lucid-first-solo-occ
            • Vl-lucid-do-merges1
            • Vl-lucid-do-merges
            • Vl-lucidocclist-remove-tails
            • Vl-lucid-some-solo-occp
            • Vl-lucid-resolved-slices->bits
            • Vl-lucid-resolved-slice->bits
            • Vl-scopestack-top-level-name
            • Vl-normalize-scopestack
            • Vl-lucid-resolved-slice-p
            • Vl-lucid-all-slices-resolved-p
            • Vl-lucid-range->bits
            • Vl-lucid-plainarglist-nicely-resolved-p
            • Vl-lucid-multidrive-summary
            • Vl-pp-lucid-multidrive-summary
            • Vl-lucid-dissect
            • Vl-lucid-all-slices-p
            • Vl-lucidocclist-some-transistory-p
            • Vl-lucidocc-transistory-p
            • Vl-lucid-plainarg-nicely-resolved-p
            • Vl-inside-true-generate-p
            • Vl-lucid-z-gateinst-p
            • Vl-lucid-modinst-nicely-resolved-p
            • Vl-inside-interface-p
            • Vl-inside-blockscope-p
            • Vl-lucid-z-expr-p
            • Vl-lucid-z-assign-p
            • Vl-lucidmergealist
            • Vl-lucid-summarize-bits
            • Vl-pp-merged-index-list
            • Vl-pp-merged-index
            • Vl-lucid-pp-bits
            • Vl-fast-range-p
          • Skip-detection
          • 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
  • Vl-lucidstate-init

Vl-scope-luciddb-init

Initialize variables for a scope.

Signature
(vl-scope-luciddb-init x ss db) → new-db
Arguments
x — Current scope we're processing, already added to the scopestack.
    Guard (vl-scope-p x).
ss — Scopestack for our current location.
    Guard (vl-scopestack-p ss).
db — Database we're initializing.
    Guard (vl-luciddb-p db).
Returns
new-db — Database extended with all variables from this scope.
    Type (vl-luciddb-p new-db).

The scopeinfo for x has locals, imports, and star-packages, but we only want the locals: any imports or star-packages are of course relevant for looking up variables, but those variables will have their own keys created when we process their packages, etc.

Definitions and Theorems

Function: vl-scope-luciddb-init

(defun vl-scope-luciddb-init (x ss db)
  (declare (xargs :guard (and (vl-scope-p x)
                              (vl-scopestack-p ss)
                              (vl-luciddb-p db))))
  (let ((__function__ 'vl-scope-luciddb-init))
    (declare (ignorable __function__))
    (b* ((x (vl-scope-fix x))
         (info (vl-scope->scopeinfo x (vl-scopestack->design ss)))
         (locals (vl-scopeinfo->locals info)))
      (vl-scope-luciddb-init-aux locals ss db))))

Theorem: vl-luciddb-p-of-vl-scope-luciddb-init

(defthm vl-luciddb-p-of-vl-scope-luciddb-init
  (b* ((new-db (vl-scope-luciddb-init x ss db)))
    (vl-luciddb-p new-db))
  :rule-classes :rewrite)

Theorem: vl-scope-luciddb-init-of-vl-scope-fix-x

(defthm vl-scope-luciddb-init-of-vl-scope-fix-x
  (equal (vl-scope-luciddb-init (vl-scope-fix x)
                                ss db)
         (vl-scope-luciddb-init x ss db)))

Theorem: vl-scope-luciddb-init-vl-scope-equiv-congruence-on-x

(defthm vl-scope-luciddb-init-vl-scope-equiv-congruence-on-x
  (implies (vl-scope-equiv x x-equiv)
           (equal (vl-scope-luciddb-init x ss db)
                  (vl-scope-luciddb-init x-equiv ss db)))
  :rule-classes :congruence)

Theorem: vl-scope-luciddb-init-of-vl-scopestack-fix-ss

(defthm vl-scope-luciddb-init-of-vl-scopestack-fix-ss
  (equal (vl-scope-luciddb-init x (vl-scopestack-fix ss)
                                db)
         (vl-scope-luciddb-init x ss db)))

Theorem: vl-scope-luciddb-init-vl-scopestack-equiv-congruence-on-ss

(defthm vl-scope-luciddb-init-vl-scopestack-equiv-congruence-on-ss
  (implies (vl-scopestack-equiv ss ss-equiv)
           (equal (vl-scope-luciddb-init x ss db)
                  (vl-scope-luciddb-init x ss-equiv db)))
  :rule-classes :congruence)

Theorem: vl-scope-luciddb-init-of-vl-luciddb-fix-db

(defthm vl-scope-luciddb-init-of-vl-luciddb-fix-db
  (equal (vl-scope-luciddb-init x ss (vl-luciddb-fix db))
         (vl-scope-luciddb-init x ss db)))

Theorem: vl-scope-luciddb-init-vl-luciddb-equiv-congruence-on-db

(defthm vl-scope-luciddb-init-vl-luciddb-equiv-congruence-on-db
  (implies (vl-luciddb-equiv db db-equiv)
           (equal (vl-scope-luciddb-init x ss db)
                  (vl-scope-luciddb-init x ss db-equiv)))
  :rule-classes :congruence)

Subtopics

Vl-scope-luciddb-init-aux