• 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
        • Mlib
          • Scopestack
            • Vl-interfaceportlist->ifnames
            • Vl-blockscope
            • Vl-scope-find-item
            • Vl-scopestack-find-item/ss/package
            • Vl-importlist-find-explicit-item
            • Vl-scopestack-find-item/context
            • Vl-importlist-find-implicit-item
            • Vl-import-stars-find-item
            • Vl-scopeinfo
            • Vl-importlist->explicit-item-alist
            • Vl-scopestack-find-definition/ss
            • Vl-scopeitem
            • Vl-scopestack-find-package/ss
            • Vl-scopestack
            • Vl-scopeinfo-find-item
            • Vl-scopestack-find-item/ss
            • Vl-scopestack-find-class/ss
            • Scopestack-constants
            • Vl-scope-namespace
            • Vl-maybe-scope
            • Vl-importresult
            • Vl-scopestack-push
              • Vl-taskdecl->blockscope
              • Vl-fundecl->blockscope
              • Vl-foreachstmt->blockscope
              • Vl-blockstmt->blockscope
              • Vl-forstmt->blockscope
            • Vl-import-stars-itemnames
            • Vl-scope->scopeinfo
            • Vl-scope-find-item-fast
            • Vl-interface-scope-find-item
            • Vl-genblob-scope-find-item
            • Vl-module-scope-find-item
            • Vl-design-scope-find-definition
            • Vl-scopestack-find-item
            • Vl-scopestack-find-definition
            • Vl-scopeinfo->itemnames
            • Vl-scope-find-portdecl
            • Vl-scope-find-definition
            • Vl-package-scope-find-item
            • Vl-interface-scope-find-portdecl
            • Vl-genblob-scope-find-portdecl
            • Vl-design-scope-find-item
            • Vl-blockscope-scope-find-item
            • Vl-scopestack-find-package
            • Vl-scope-find-package
            • Vl-module-scope-find-portdecl
            • Vl-design-scope-find-package
            • Vl-design-scope-find-class
            • Vl-class-scope-find-item
            • Vl-scopestack-find-class
            • Vl-scope-find-class
            • Vl-scopestack->hashkey
            • Vl-scope-find-portdecl-fast
            • Vl-package-scope-item-alist-top
            • Vl-scopestack->path-aux
            • Vl-scopedef
            • Vl-scope-portdecl-alist
            • Vl-scope-package-alist
            • Vl-scope-find-definition-fast
            • Vl-scope-definition-alist
            • Vl-scope-find-package-fast
            • Vl-scope-find-class-fast
            • Vl-scope-class-alist
            • Vl-scopestack->path
            • Vl-scopestack->design
            • Vl-scopeitem->name
            • Vl-scope
            • Vl-scopestack-init
            • Vl-importlist->star-packages
            • Vl-scopestack-pop
            • Vl-scopestack-nesting-level
            • Vl-scopestack->toplevel
            • Vl-scope->scopetype
            • Vl-scope->id
            • Vl-design-scope-package-alist-top
            • Vl-bindlist->modinsts
            • Vl-scopestack-toplevel-p
            • Vl-scopestacks-free
            • Vl-importresult-alist
          • Hid-tools
          • Filtering-by-name
          • Vl-interface-mocktype
          • Stripping-functions
          • Genblob
          • Expr-tools
          • Extract-vl-types
          • Hierarchy
          • Range-tools
          • Finding-by-name
          • Stmt-tools
          • Modnamespace
          • Flat-warnings
          • Reordering-by-name
          • Datatype-tools
          • Syscalls
          • Allexprs
          • Lvalues
          • Port-tools
        • Transforms
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Math
    • Testing-utilities
  • Scopestack

Vl-scopestack-push

Signature
(vl-scopestack-push scope x) → x1
Arguments
scope — Guard (vl-scope-p scope).
x — Guard (vl-scopestack-p x).
Returns
x1 — Type (vl-scopestack-p x1).

Definitions and Theorems

Function: vl-scopestack-push

(defun vl-scopestack-push (scope x)
 (declare (xargs :guard (and (vl-scope-p scope)
                             (vl-scopestack-p x))))
 (let ((__function__ 'vl-scopestack-push))
   (declare (ignorable __function__))
   (progn$ (or (not (eq (tag scope) :vl-design))
               (cw "Note: pushing whole design onto scopestack.~%"))
           (make-vl-scopestack-local :top scope
                                     :super x))))

Theorem: vl-scopestack-p-of-vl-scopestack-push

(defthm vl-scopestack-p-of-vl-scopestack-push
  (b* ((x1 (vl-scopestack-push scope x)))
    (vl-scopestack-p x1))
  :rule-classes :rewrite)

Theorem: vl-scopestack-push-of-vl-scope-fix-scope

(defthm vl-scopestack-push-of-vl-scope-fix-scope
  (equal (vl-scopestack-push (vl-scope-fix scope)
                             x)
         (vl-scopestack-push scope x)))

Theorem: vl-scopestack-push-vl-scope-equiv-congruence-on-scope

(defthm vl-scopestack-push-vl-scope-equiv-congruence-on-scope
  (implies (vl-scope-equiv scope scope-equiv)
           (equal (vl-scopestack-push scope x)
                  (vl-scopestack-push scope-equiv x)))
  :rule-classes :congruence)

Theorem: vl-scopestack-push-of-vl-scopestack-fix-x

(defthm vl-scopestack-push-of-vl-scopestack-fix-x
  (equal (vl-scopestack-push scope (vl-scopestack-fix x))
         (vl-scopestack-push scope x)))

Theorem: vl-scopestack-push-vl-scopestack-equiv-congruence-on-x

(defthm vl-scopestack-push-vl-scopestack-equiv-congruence-on-x
  (implies (vl-scopestack-equiv x x-equiv)
           (equal (vl-scopestack-push scope x)
                  (vl-scopestack-push scope x-equiv)))
  :rule-classes :congruence)

Subtopics

Vl-taskdecl->blockscope
Vl-fundecl->blockscope
Vl-foreachstmt->blockscope
Vl-blockstmt->blockscope
Vl-forstmt->blockscope