• 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-assign->writes
              • Svstmt-assign->blockingp
              • Make-svstmt-assign
              • Change-svstmt-assign
            • Svstmt-compile
            • 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-assign

    Svstmt-assign->writes

    Get the writes field from a svstmt-assign.

    Signature
    (svstmt-assign->writes x) → writes
    Arguments
    x — Guard (svstmt-p x).
    Returns
    writes — Type (svstmt-writelist-p writes).

    This is an ordinary field accessor created by defprod.

    Definitions and Theorems

    Function: svstmt-assign->writes$inline

    (defun svstmt-assign->writes$inline (x)
      (declare (xargs :guard (svstmt-p x)))
      (declare (xargs :guard (equal (svstmt-kind x) :assign)))
      (let ((__function__ 'svstmt-assign->writes))
        (declare (ignorable __function__))
        (mbe :logic
             (b* ((x (and (equal (svstmt-kind x) :assign)
                          x)))
               (svstmt-writelist-fix (std::prod-car (cdr x))))
             :exec (std::prod-car (cdr x)))))

    Theorem: svstmt-writelist-p-of-svstmt-assign->writes

    (defthm svstmt-writelist-p-of-svstmt-assign->writes
      (b* ((writes (svstmt-assign->writes$inline x)))
        (svstmt-writelist-p writes))
      :rule-classes :rewrite)

    Theorem: svstmt-assign->writes$inline-of-svstmt-fix-x

    (defthm svstmt-assign->writes$inline-of-svstmt-fix-x
      (equal (svstmt-assign->writes$inline (svstmt-fix x))
             (svstmt-assign->writes$inline x)))

    Theorem: svstmt-assign->writes$inline-svstmt-equiv-congruence-on-x

    (defthm svstmt-assign->writes$inline-svstmt-equiv-congruence-on-x
      (implies (svstmt-equiv x x-equiv)
               (equal (svstmt-assign->writes$inline x)
                      (svstmt-assign->writes$inline x-equiv)))
      :rule-classes :congruence)

    Theorem: svstmt-assign->writes-when-wrong-kind

    (defthm svstmt-assign->writes-when-wrong-kind
      (implies (not (equal (svstmt-kind x) :assign))
               (equal (svstmt-assign->writes x)
                      (svstmt-writelist-fix nil))))