File: RETURN.lisp

package info (click to toggle)
acl2 8.6%2Bdfsg-3
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 1,138,276 kB
  • sloc: lisp: 17,818,294; java: 125,359; python: 28,122; javascript: 23,458; cpp: 18,851; ansic: 11,569; perl: 7,678; xml: 5,591; sh: 3,978; makefile: 3,840; ruby: 2,633; yacc: 1,126; ml: 763; awk: 295; csh: 233; lex: 197; php: 178; tcl: 49; asm: 23; haskell: 17
file content (73 lines) | stat: -rw-r--r-- 2,386 bytes parent folder | download | duplicates (2)
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
(in-package "ACL2")
(include-book "djvm-model")
(include-book "bcv-simple-model")
(include-book "generic")

(include-book "consistent-state-properties")
(include-book "bcv-method-properties")


;--- EXPORT ----

(encapsulate () 
  (local (include-book "djvm-RETURN"))
  (defthm consistent-state-preserved-by-DJVM-RETURN
    (implies (and (consistent-state st)
                  (equal (next-inst st) inst)
                  (equal (op-code inst) 'RETURN)
                  (djvm-check-RETURN inst st))
             (consistent-state
              (djvm-execute-RETURN inst st)))))


;;(i-am-here) ;; Mon Nov 21 10:57:11 2005



(local (in-theory (disable current-method consistent-state 
                           collect-witness-bcv-method
                           bcv-simple-inst next-inst)))




(local 
 (defthm consistent-caller-frame-implies-frame-size
   (implies (consistent-caller-frame caller callee method-table)
            (<= (+ 1 (len (g 'op-stack caller)))
                (g 'max-stack caller)))
   :hints (("Goal" :in-theory (e/d (consistent-caller-frame)
                                   (bcv-method 
                                    sig-frame-compatible
                                    sig-method-init-frame
                                    collect-witness-bcv-method))))
   :rule-classes :forward-chaining))

(local 
 (defthm consistent-state-implies-consistent-caller-frame-f
   (implies (and (consp (cdr (g 'call-stack st)))
                 (consistent-state st))
            (consistent-caller-frame (cadr (g 'call-stack st))
                                     (car (g 'call-stack st))
                                     (g 'method-table st)))
   :hints (("Goal" :in-theory (e/d (consistent-state) 
                                   (consistent-caller-frame))))
   :rule-classes :forward-chaining))



(defthm bcv-simple-check-return-implies-djvm-check
  (IMPLIES (AND (CONSISTENT-STATE DJVM-S)
                (equal (op-code (next-inst djvm-s)) 'RETURN)
                (BCV-SIMPLE-CHECK-RETURN (next-inst djvm-s)
                                         (EXTRACT-SIG-FRAME (CAR (G 'CALL-STACK DJVM-S))
                                                            (G 'METHOD-TABLE DJVM-S))))
           (DJVM-CHECK-RETURN (next-inst djvm-s) djvm-s))
  :hints (("Goal" :in-theory (disable consistent-state consistent-caller-frame))))