• 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
          • 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
              • Change-vl-compoundstmt-core
            • 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

Change-vl-compoundstmt

Mutate a compound statement.

General form:

(change-vl-compoundstmt x
                        [:stmts stmts]
                        [:exprs exprs]
                        [:ctrl ctrl]
                        [:vardecls vardecls]
                        [:paramdecls paramdecls])

This expands into a suitable call of change-vl-compoundstmt-core. It allows you to modify statements without paying much attention to the kind of statement being modified.

Note that change-vl-compoundstmt-core has an elaborate guard; e.g., you must provide the same number of statements and expressions, and only provide a :ctrl when there is one, etc.

Macro: change-vl-compoundstmt

(defmacro change-vl-compoundstmt (x &rest args)
 (change-vl-compoundstmt-fn
   x
   (std::da-changer-args-to-alist 'change-vl-compoundstmt
                                  args
                                  '(:stmts :exprs :ctrl
                                           :vardecls :paramdecls))))

Definitions and Theorems

Function: change-vl-compoundstmt-fn

(defun change-vl-compoundstmt-fn (x alist)
  (cons 'change-vl-compoundstmt-core
        (list x
              (if (assoc :stmts alist)
                  (cdr (assoc :stmts alist))
                (list 'vl-compoundstmt->stmts x))
              (if (assoc :exprs alist)
                  (cdr (assoc :exprs alist))
                (list 'vl-compoundstmt->exprs x))
              (if (assoc :ctrl alist)
                  (cdr (assoc :ctrl alist))
                (list 'vl-compoundstmt->ctrl x))
              (if (assoc :vardecls alist)
                  (cdr (assoc :vardecls alist))
                (list 'vl-compoundstmt->vardecls x))
              (if (assoc :paramdecls alist)
                  (cdr (assoc :paramdecls alist))
                (list 'vl-compoundstmt->paramdecls
                      x)))))

Subtopics

Change-vl-compoundstmt-core
Mutate an arbitrary compound (non-atomic) statement.