• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
        • Svex-stvs
        • Svex-decomposition-methodology
        • Sv-versus-esim
        • Svex-decomp
        • Svex-compose-dfs
        • Svex-compilation
        • Moddb
        • Svmods
        • Svstmt
          • Svstmt-case
          • Svstmt-while
          • Svstmt-p
          • Svstmt-if
          • Svstmt-equiv
          • Svstmt-xcond
          • Svstmt-scope
          • Svstmt-assign
          • Svstmt-compile
            • Svstmt-compile.lisp
              • Svstate-merge-branches
              • Svex-alist-merge-branches
              • Svstmt-assign->subst
              • Svstack-merge-branches
              • Svstacks-compatible
              • Svjumpstate-merge-svstate-branches
              • Svjumpstate-svstate-compatible
              • Svstmt-lhs-check-masks
              • Svjumpstate
              • Svjumpstates-compatible
              • Svstmtlist-compile-top
                • Svjumpstate-sequence-svstates
                • Constraintlist-merge-branches
                • Svjumpstate-merge-branches
                • Svex-replace-range
                • Svex-svstmt-ite
                • Svstmt-process-write
                • Svjumpstate-sequence
                • Svstmt-process-writelist
                • Svstack-assign
                • Svstmt-writelist-var-sizes
                • Svstates-compatible
                • 4vec-replace-range
                • Svstmt-write-var-sizes
                • Make-empty-svjumpstate
                • Constraintlist-add-pathcond
                • Svjumpstate-pop-scope
                • Constraintlist-compose-svstack
                • Svstack-to-svex-alist
                • Svstack-filter-global-lhs-vars
                • Svjumpstate-vars
                • Svex-svstmt-or
                • Svex-svstmt-andc1
                • Svstate-push-scope
                • Svstate-pop-scope
                • Svstate-vars
                • Svstack-lookup
                • Svar-subtract-delay
                • Svstmt-initialize-locals
                • Svstack-fork
                • Svstack-clean
                • Svstack-nonempty-fix
                • Svstate-fork
                • Svstate-clean
                • Svstack-globalp
                • Svjumpstate-fork
                • Svar-delayed-member
                • Svjumpstate-levels
                • Svjumpstate-free
                • Svstate-free
                • Svstack-free
                • Svstack
                • Svar-size-alist
              • Svstate
            • Svstmt-constraints
            • Svstmt-jump
            • Svstmtlist
            • Svstmt-kind
            • Svstmt.lisp
            • Svstmt-fix
            • Svstmt-count
          • Sv-tutorial
          • Expressions
          • Symbolic-test-vector
          • Vl-to-svex
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Svstmt-compile.lisp

    Svstmtlist-compile-top

    Signature
    (svstmtlist-compile-top x &key sclimit (nb-delayp 't)) 
      → 
    (mv ok warnings final-st constraints blk-masks nonblk-masks)
    Arguments
    x — Guard (svstmtlist-p x).
    sclimit — Guard (natp sclimit).
    Returns
    warnings — Type (vl-warninglist-p warnings).
    final-st — Type (svstate-p final-st).
    constraints — Type (constraintlist-p constraints).
    blk-masks — Type (4vmask-alist-p blk-masks).
    nonblk-masks — Type (4vmask-alist-p nonblk-masks).

    Definitions and Theorems

    Function: svstmtlist-compile-top-fn

    (defun svstmtlist-compile-top-fn (x sclimit nb-delayp)
     (declare (xargs :guard (and (svstmtlist-p x) (natp sclimit))))
     (let ((__function__ 'svstmtlist-compile-top))
      (declare (ignorable __function__))
      (b*
       (((mv ok
             warnings st jst blk-masks nonblk-masks)
         (svstmtlist-compile x (make-svstate)
                             sclimit nb-delayp nil nil nil))
        ((svjumpstate jst))
        (final-st
         (svstate-fork
              (svstate-merge-branches jst.returncond jst.returnst st))))
       (svjumpstate-free jst)
       (svstate-free st)
       (mv ok warnings final-st jst.constraints
           blk-masks nonblk-masks))))

    Theorem: vl-warninglist-p-of-svstmtlist-compile-top.warnings

    (defthm vl-warninglist-p-of-svstmtlist-compile-top.warnings
      (b* (((mv vl::?ok vl::?warnings ?final-st
                ?constraints ?blk-masks ?nonblk-masks)
            (svstmtlist-compile-top-fn x sclimit nb-delayp)))
        (vl-warninglist-p warnings))
      :rule-classes :rewrite)

    Theorem: svstate-p-of-svstmtlist-compile-top.final-st

    (defthm svstate-p-of-svstmtlist-compile-top.final-st
      (b* (((mv vl::?ok vl::?warnings ?final-st
                ?constraints ?blk-masks ?nonblk-masks)
            (svstmtlist-compile-top-fn x sclimit nb-delayp)))
        (svstate-p final-st))
      :rule-classes :rewrite)

    Theorem: constraintlist-p-of-svstmtlist-compile-top.constraints

    (defthm constraintlist-p-of-svstmtlist-compile-top.constraints
      (b* (((mv vl::?ok vl::?warnings ?final-st
                ?constraints ?blk-masks ?nonblk-masks)
            (svstmtlist-compile-top-fn x sclimit nb-delayp)))
        (constraintlist-p constraints))
      :rule-classes :rewrite)

    Theorem: 4vmask-alist-p-of-svstmtlist-compile-top.blk-masks

    (defthm 4vmask-alist-p-of-svstmtlist-compile-top.blk-masks
      (b* (((mv vl::?ok vl::?warnings ?final-st
                ?constraints ?blk-masks ?nonblk-masks)
            (svstmtlist-compile-top-fn x sclimit nb-delayp)))
        (4vmask-alist-p blk-masks))
      :rule-classes :rewrite)

    Theorem: 4vmask-alist-p-of-svstmtlist-compile-top.nonblk-masks

    (defthm 4vmask-alist-p-of-svstmtlist-compile-top.nonblk-masks
      (b* (((mv vl::?ok vl::?warnings ?final-st
                ?constraints ?blk-masks ?nonblk-masks)
            (svstmtlist-compile-top-fn x sclimit nb-delayp)))
        (4vmask-alist-p nonblk-masks))
      :rule-classes :rewrite)

    Theorem: vars-of-svstmtlist-compile-top

    (defthm vars-of-svstmtlist-compile-top
     (b* (((mv vl::?ok vl::?warnings ?final-st
               ?constraints ?blk-masks ?nonblk-masks)
           (svstmtlist-compile-top-fn x sclimit nb-delayp)))
       (implies
            (and (svarlist-addr-p (svstmtlist-vars x))
                 ok)
            (and (svarlist-addr-p (svstate-vars final-st))
                 (svarlist-addr-p (constraintlist-vars constraints))))))

    Theorem: svstmtlist-compile-top-fn-of-svstmtlist-fix-x

    (defthm svstmtlist-compile-top-fn-of-svstmtlist-fix-x
      (equal (svstmtlist-compile-top-fn (svstmtlist-fix x)
                                        sclimit nb-delayp)
             (svstmtlist-compile-top-fn x sclimit nb-delayp)))

    Theorem: svstmtlist-compile-top-fn-svstmtlist-equiv-congruence-on-x

    (defthm svstmtlist-compile-top-fn-svstmtlist-equiv-congruence-on-x
     (implies
          (svstmtlist-equiv x x-equiv)
          (equal (svstmtlist-compile-top-fn x sclimit nb-delayp)
                 (svstmtlist-compile-top-fn x-equiv sclimit nb-delayp)))
     :rule-classes :congruence)

    Theorem: svstmtlist-compile-top-fn-of-nfix-sclimit

    (defthm svstmtlist-compile-top-fn-of-nfix-sclimit
      (equal (svstmtlist-compile-top-fn x (nfix sclimit)
                                        nb-delayp)
             (svstmtlist-compile-top-fn x sclimit nb-delayp)))

    Theorem: svstmtlist-compile-top-fn-nat-equiv-congruence-on-sclimit

    (defthm svstmtlist-compile-top-fn-nat-equiv-congruence-on-sclimit
     (implies
          (nat-equiv sclimit sclimit-equiv)
          (equal (svstmtlist-compile-top-fn x sclimit nb-delayp)
                 (svstmtlist-compile-top-fn x sclimit-equiv nb-delayp)))
     :rule-classes :congruence)