1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
|
(in-package "DJVM")
(include-book "djvm-simple")
(defthm consistent-state-wff-state-f
(implies (consistent-state s)
(wff-state s))
:rule-classes :forward-chaining)
(defthm consistent-state-wff-thread-table-f
(implies (consistent-state s)
(wff-thread-table (thread-table s)))
:rule-classes :forward-chaining)
(defthm consistent-state-wff-thread-f
(implies (consistent-state s)
(wff-thread (thread-by-id (current-thread s)
(thread-table s))))
:rule-classes :forward-chaining)
(defthm consistent-state-wff-thread-call-stack-f
(implies (consistent-state s)
(wff-call-stack
(thread-call-stack (thread-by-id (current-thread s)
(thread-table s)))))
:rule-classes :forward-chaining)
(defthm consistent-state-current-frame-guard-f
(implies (consistent-state s)
(current-frame-guard s))
:hints (("Goal" :in-theory (enable current-frame-guard)))
:rule-classes :forward-chaining)
(defthm consistent-state-current-frame-f
(implies (consistent-state s)
(wff-call-frame (current-frame s)))
:hints (("Goal" :in-theory (enable current-frame)))
:rule-classes :forward-chaining)
(defthm consistent-state-wff-method-ptr-f
(implies (consistent-state s)
(wff-method-ptr (current-method-ptr s)))
:rule-classes :forward-chaining)
(defthm consistent-state-wff-class-table-f
(implies (consistent-state s)
(wff-class-table (class-table s)))
:rule-classes :forward-chaining)
(defthm consistent-state-wff-instance-class-table-f
(implies (consistent-state s)
(wff-instance-class-table (instance-class-table s)))
:rule-classes :forward-chaining)
(defthm consistent-state-wff-method-decl-f
(implies (consistent-state s)
(wff-method-decl (deref-method (current-method-ptr s)
(instance-class-table s))))
:rule-classes :forward-chaining)
;----------------------------------------------------------------------
;----------------------------------------------------------------------
(skip-proofs
(defthm consistent-state-wff-code-f
(implies (consistent-state s)
(wff-code (method-code (deref-method (current-method-ptr s)
(instance-class-table s)))))
:rule-classes :forward-chaining))
(skip-proofs
(defthm consistent-state-wff-insts-f
(implies (consistent-state s)
(wff-insts (code-instrs (method-code (deref-method (current-method-ptr s)
(instance-class-table s))))))
:rule-classes :forward-chaining))
;;; these two that I have not added into the consistent-state assertions!!!
;----------------------------------------------------------------------
;----------------------------------------------------------------------
;; (defthm consistent-state-strong-implies-next-inst-guard
;; (implies (consistent-state-strong jvm::s)
;; (AND
;; (WFF-STATE JVM::S)
;; (CURRENT-FRAME-GUARD JVM::S)
;; (WFF-CALL-FRAME (CURRENT-FRAME JVM::S))
;; (WFF-METHOD-PTR (CURRENT-METHOD-PTR JVM::S))
;; (WFF-CLASS-TABLE (CLASS-TABLE JVM::S))
;; (WFF-INSTANCE-CLASS-TABLE (INSTANCE-CLASS-TABLE JVM::S))
;; (WFF-METHOD-DECL
;; (DEREF-METHOD (CURRENT-METHOD-PTR JVM::S)
;; (INSTANCE-CLASS-TABLE JVM::S)))
;; (WFF-CODE
;; (METHOD-CODE
;; (DEREF-METHOD (CURRENT-METHOD-PTR JVM::S)
;; (INSTANCE-CLASS-TABLE JVM::S))))
;; (WFF-INSTS
;; (CODE-INSTRS
;; (METHOD-CODE
;; (DEREF-METHOD (CURRENT-METHOD-PTR JVM::S)
;; (INSTANCE-CLASS-TABLE JVM::S)))))))
;; :hints (("Goal" :in-theory (e/d (consistent-state-strong)
;; (wff-state
;; method-code
;; code-instrs
;; current-method-ptr
;; current-frame-guard
;; wff-call-frame
;; wff-method-ptr
;; wff-class-table
;; wff-instance-class-table
;; wff-method-decl
;; wff-code
;; wff-insts)))))
|