src/HOL/MicroJava/BV/LBVCorrect.thy
author kleing
Thu, 09 Mar 2000 13:56:54 +0100
changeset 8390 e5b618f6824e
parent 8245 6acc80f7f36f
child 9012 d1bd2144ab5d
permissions -rw-r--r--
tuned for completeness of LBV
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8245
6acc80f7f36f lightweight bytecode verifier with correctness proof
kleing
parents:
diff changeset
     1
(*  Title:      HOL/MicroJava/BV/BVLcorrect.thy
6acc80f7f36f lightweight bytecode verifier with correctness proof
kleing
parents:
diff changeset
     2
    ID:         $Id$
6acc80f7f36f lightweight bytecode verifier with correctness proof
kleing
parents:
diff changeset
     3
    Author:     Gerwin Klein
6acc80f7f36f lightweight bytecode verifier with correctness proof
kleing
parents:
diff changeset
     4
    Copyright   1999 Technische Universitaet Muenchen
6acc80f7f36f lightweight bytecode verifier with correctness proof
kleing
parents:
diff changeset
     5
6acc80f7f36f lightweight bytecode verifier with correctness proof
kleing
parents:
diff changeset
     6
    Correctness of the lightweight bytecode verifier
6acc80f7f36f lightweight bytecode verifier with correctness proof
kleing
parents:
diff changeset
     7
*)
6acc80f7f36f lightweight bytecode verifier with correctness proof
kleing
parents:
diff changeset
     8
6acc80f7f36f lightweight bytecode verifier with correctness proof
kleing
parents:
diff changeset
     9
LBVCorrect = LBVSpec +
6acc80f7f36f lightweight bytecode verifier with correctness proof
kleing
parents:
diff changeset
    10
6acc80f7f36f lightweight bytecode verifier with correctness proof
kleing
parents:
diff changeset
    11
constdefs
6acc80f7f36f lightweight bytecode verifier with correctness proof
kleing
parents:
diff changeset
    12
fits :: "[method_type,instr list,jvm_prog,ty,state_type,state_type,certificate] \\<Rightarrow> bool"
8390
e5b618f6824e tuned for completeness of LBV
kleing
parents: 8245
diff changeset
    13
"fits phi is G rT s0 s2 cert \\<equiv> fits_partial phi 0 is G rT s0 s2 cert"
8245
6acc80f7f36f lightweight bytecode verifier with correctness proof
kleing
parents:
diff changeset
    14
6acc80f7f36f lightweight bytecode verifier with correctness proof
kleing
parents:
diff changeset
    15
fits_partial :: "[method_type,nat,instr list,jvm_prog,ty,state_type,state_type,certificate] \\<Rightarrow> bool" 
6acc80f7f36f lightweight bytecode verifier with correctness proof
kleing
parents:
diff changeset
    16
"fits_partial phi pc is G rT s0 s2 cert \\<equiv> (\\<forall> a b i s1. (a@(i#b) = is) \\<longrightarrow> 
6acc80f7f36f lightweight bytecode verifier with correctness proof
kleing
parents:
diff changeset
    17
                   wtl_inst_list a G rT s0 s1 cert (pc+length is) pc \\<longrightarrow> 
6acc80f7f36f lightweight bytecode verifier with correctness proof
kleing
parents:
diff changeset
    18
                   wtl_inst_list (i#b) G rT s1 s2 cert (pc+length is) (pc+length a) \\<longrightarrow> 
8390
e5b618f6824e tuned for completeness of LBV
kleing
parents: 8245
diff changeset
    19
                      ((cert!(pc+length a)      = None   \\<longrightarrow> phi!(pc+length a) = s1) \\<and> 
e5b618f6824e tuned for completeness of LBV
kleing
parents: 8245
diff changeset
    20
                       (\\<forall> t. cert!(pc+length a) = Some t \\<longrightarrow> phi!(pc+length a) = t)))"
8245
6acc80f7f36f lightweight bytecode verifier with correctness proof
kleing
parents:
diff changeset
    21
  
6acc80f7f36f lightweight bytecode verifier with correctness proof
kleing
parents:
diff changeset
    22
  
6acc80f7f36f lightweight bytecode verifier with correctness proof
kleing
parents:
diff changeset
    23
end