• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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
          • Hid-tools
          • Filtering-by-name
          • Vl-interface-mocktype
          • Stripping-functions
          • Genblob
          • Expr-tools
          • Extract-vl-types
          • Hierarchy
          • Range-tools
          • Finding-by-name
          • Stmt-tools
            • Vl-rebuild-caselist
            • Vl-stmt-atomicstmts
            • Vl-compoundstmt->stmts
            • Vl-compoundstmt->exprs
            • Vl-compoundstmt->vardecls
            • Change-vl-compoundstmt
            • Vl-compoundstmt->paramdecls
            • Vl-compoundstmt->ctrl
              • Vl-atomicstmtlist-p
              • Vl-stmt->atts
              • Vl-atomicstmt-p
              • Vl-timingstmt-p
              • Vl-repeatstmt-p
              • Vl-foreverstmt-p
              • Vl-assignstmt-p
              • Vl-whilestmt-p
              • Vl-waitstmt-p
              • Vl-nullstmt-p
              • Vl-ifstmt-p
              • Vl-forstmt-p
              • Vl-dostmt-p
              • Vl-casestmt-p
              • Vl-callstmt-p
              • Vl-exprlistlist
            • Modnamespace
            • Flat-warnings
            • Reordering-by-name
            • Datatype-tools
            • Syscalls
            • Allexprs
            • Lvalues
            • Port-tools
          • Transforms
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Stmt-tools

    Vl-compoundstmt->ctrl

    Get the timing control, if any, from an arbitrary compound (non-atomic) statement.

    Signature
    (vl-compoundstmt->ctrl x) → ctrl
    Arguments
    x — Guard (vl-stmt-p x).
    Returns
    ctrl — Type (vl-maybe-delayoreventcontrol-p ctrl).

    This really only makes sense for timing statements.

    Definitions and Theorems

    Function: vl-compoundstmt->ctrl

    (defun vl-compoundstmt->ctrl (x)
      (declare (xargs :guard (vl-stmt-p x)))
      (declare (xargs :guard (not (vl-atomicstmt-p x))))
      (let ((__function__ 'vl-compoundstmt->ctrl))
        (declare (ignorable __function__))
        (if (vl-stmt-case x :vl-timingstmt)
            (vl-timingstmt->ctrl x)
          nil)))

    Theorem: vl-maybe-delayoreventcontrol-p-of-vl-compoundstmt->ctrl

    (defthm vl-maybe-delayoreventcontrol-p-of-vl-compoundstmt->ctrl
      (b* ((ctrl (vl-compoundstmt->ctrl x)))
        (vl-maybe-delayoreventcontrol-p ctrl))
      :rule-classes :rewrite)

    Theorem: vl-compoundstmt->ctrl-is-usually-nil

    (defthm vl-compoundstmt->ctrl-is-usually-nil
      (implies (not (vl-stmt-case x :vl-timingstmt))
               (equal (vl-compoundstmt->ctrl x) nil)))

    Theorem: vl-compoundstmt->ctrl-of-vl-stmt-fix-x

    (defthm vl-compoundstmt->ctrl-of-vl-stmt-fix-x
      (equal (vl-compoundstmt->ctrl (vl-stmt-fix x))
             (vl-compoundstmt->ctrl x)))

    Theorem: vl-compoundstmt->ctrl-vl-stmt-equiv-congruence-on-x

    (defthm vl-compoundstmt->ctrl-vl-stmt-equiv-congruence-on-x
      (implies (vl-stmt-equiv x x-equiv)
               (equal (vl-compoundstmt->ctrl x)
                      (vl-compoundstmt->ctrl x-equiv)))
      :rule-classes :congruence)