equal
deleted
inserted
replaced
449 ultimately show False |
449 ultimately show False |
450 by (simp add: some_elem_def) |
450 by (simp add: some_elem_def) |
451 qed |
451 qed |
452 |
452 |
453 lemma [code]: |
453 lemma [code]: |
454 "iter f step ss w = while (\<lambda>(ss, w). \<not> More_Set.is_empty w) |
454 "iter f step ss w = while (\<lambda>(ss, w). \<not> Set.is_empty w) |
455 (\<lambda>(ss, w). |
455 (\<lambda>(ss, w). |
456 let p = some_elem w in propa f (step p (ss ! p)) ss (w - {p})) |
456 let p = some_elem w in propa f (step p (ss ! p)) ss (w - {p})) |
457 (ss, w)" |
457 (ss, w)" |
458 unfolding iter_def More_Set.is_empty_def some_elem_def .. |
458 unfolding iter_def Set.is_empty_def some_elem_def .. |
459 |
459 |
460 lemma JVM_sup_unfold [code]: |
460 lemma JVM_sup_unfold [code]: |
461 "JVMType.sup S m n = lift2 (Opt.sup |
461 "JVMType.sup S m n = lift2 (Opt.sup |
462 (Product.sup (Listn.sup (JType.sup S)) |
462 (Product.sup (Listn.sup (JType.sup S)) |
463 (\<lambda>x y. OK (map2 (lift2 (JType.sup S)) x y))))" |
463 (\<lambda>x y. OK (map2 (lift2 (JType.sup S)) x y))))" |
467 by simp |
467 by simp |
468 |
468 |
469 lemmas [code] = JType.sup_def [unfolded exec_lub_def] JVM_le_unfold |
469 lemmas [code] = JType.sup_def [unfolded exec_lub_def] JVM_le_unfold |
470 lemmas [code] = lesub_def plussub_def |
470 lemmas [code] = lesub_def plussub_def |
471 |
471 |
472 setup {* |
|
473 Code.add_signature_cmd ("More_Set.is_empty", "'a set \<Rightarrow> bool") |
|
474 #> Code.add_signature_cmd ("propa", "('s \<Rightarrow> 's \<Rightarrow> 's) \<Rightarrow> (nat \<times> 's) list \<Rightarrow> 's list \<Rightarrow> nat set \<Rightarrow> 's list * nat set") |
|
475 #> Code.add_signature_cmd |
|
476 ("iter", "('s \<Rightarrow> 's \<Rightarrow> 's) \<Rightarrow> (nat \<Rightarrow> 's \<Rightarrow> (nat \<times> 's) list) \<Rightarrow> 's list \<Rightarrow> nat set \<Rightarrow> 's list * nat set") |
|
477 #> Code.add_signature_cmd ("unstables", "('s \<Rightarrow> 's \<Rightarrow> bool) \<Rightarrow> (nat \<Rightarrow> 's \<Rightarrow> (nat \<times> 's) list) \<Rightarrow> 's list \<Rightarrow> nat set") |
|
478 *} |
|
479 |
|
480 lemmas [code] = |
472 lemmas [code] = |
481 JType.sup_def [unfolded exec_lub_def] |
473 JType.sup_def [unfolded exec_lub_def] |
482 wf_class_code |
474 wf_class_code |
483 widen.equation |
475 widen.equation |
484 match_exception_entry_def |
476 match_exception_entry_def |