• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • 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-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

    Svstmt-kind

    Get the kind (tag) of a svstmt structure.

    Signature
    (svstmt-kind x) → kind
    Arguments
    x — Guard (svstmt-p x).

    Definitions and Theorems

    Function: svstmt-kind$inline

    (defun svstmt-kind$inline (x)
      (declare (xargs :guard (svstmt-p x)))
      (let ((__function__ 'svstmt-kind))
        (declare (ignorable __function__))
        (mbe :logic (cond ((or (atom x) (eq (car x) :assign))
                           :assign)
                          ((eq (car x) :if) :if)
                          ((eq (car x) :xcond) :xcond)
                          ((eq (car x) :while) :while)
                          ((eq (car x) :constraints) :constraints)
                          ((eq (car x) :scope) :scope)
                          (t :jump))
             :exec (car x))))

    Theorem: svstmt-kind-possibilities

    (defthm svstmt-kind-possibilities
      (or (equal (svstmt-kind x) :assign)
          (equal (svstmt-kind x) :if)
          (equal (svstmt-kind x) :xcond)
          (equal (svstmt-kind x) :while)
          (equal (svstmt-kind x) :constraints)
          (equal (svstmt-kind x) :scope)
          (equal (svstmt-kind x) :jump))
      :rule-classes
      ((:forward-chaining :trigger-terms ((svstmt-kind x)))))