Skip to content

Commit e00f7b4

Browse files
Xaphiosislsf37
authored andcommitted
refine+crefine: update for arch_requalify design spec updates
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
1 parent 723a7b6 commit e00f7b4

File tree

16 files changed

+34
-34
lines changed

16 files changed

+34
-34
lines changed

proof/crefine/AARCH64/Invoke_C.thy

+2-2
Original file line numberDiff line numberDiff line change
@@ -2812,10 +2812,10 @@ lemma ctes_of_ex_cte_cap_to':
28122812

28132813

28142814
lemma Arch_isFrameType_spec:
2815-
"\<forall>s. \<Gamma> \<turnstile> \<lbrace>s. unat \<acute>type \<le> fromEnum (maxBound::ArchTypes_H.object_type)\<rbrace>
2815+
"\<forall>s. \<Gamma> \<turnstile> \<lbrace>s. unat \<acute>type \<le> fromEnum (maxBound::object_type)\<rbrace>
28162816
Call Arch_isFrameType_'proc
28172817
\<lbrace> \<acute>ret__unsigned_long =
2818-
from_bool (isFrameType ((toEnum (unat \<^bsup>s\<^esup> type))::ArchTypes_H.object_type))\<rbrace>"
2818+
from_bool (isFrameType ((toEnum (unat \<^bsup>s\<^esup> type))::object_type))\<rbrace>"
28192819
apply vcg
28202820
apply (simp add: toEnum_object_type_to_H)
28212821
apply (frule object_type_from_to_H)

proof/crefine/AARCH64/Retype_C.thy

+3-3
Original file line numberDiff line numberDiff line change
@@ -5047,7 +5047,7 @@ lemma placeNewObject_user_data:
50475047
done
50485048

50495049
definition
5050-
createObject_hs_preconds :: "machine_word \<Rightarrow> ArchTypes_H.object_type \<Rightarrow> nat \<Rightarrow> bool \<Rightarrow> kernel_state \<Rightarrow> bool"
5050+
createObject_hs_preconds :: "machine_word \<Rightarrow> object_type \<Rightarrow> nat \<Rightarrow> bool \<Rightarrow> kernel_state \<Rightarrow> bool"
50515051
where
50525052
"createObject_hs_preconds regionBase newType userSize d \<equiv>
50535053
(invs' and pspace_no_overlap' regionBase (getObjectSize newType userSize)
@@ -5070,14 +5070,14 @@ abbreviation
50705070

50715071
(* these preconds actually used throughout the proof *)
50725072
abbreviation(input)
5073-
createObject_c_preconds1 :: "machine_word \<Rightarrow> ArchTypes_H.object_type \<Rightarrow> nat \<Rightarrow> bool \<Rightarrow> (globals myvars) set"
5073+
createObject_c_preconds1 :: "machine_word \<Rightarrow> object_type \<Rightarrow> nat \<Rightarrow> bool \<Rightarrow> (globals myvars) set"
50745074
where
50755075
"createObject_c_preconds1 regionBase newType userSize deviceMemory \<equiv>
50765076
{s. region_actually_is_dev_bytes regionBase (2 ^ getObjectSize newType userSize) deviceMemory s}"
50775077

50785078
(* these preconds used at start of proof *)
50795079
definition
5080-
createObject_c_preconds :: "machine_word \<Rightarrow> ArchTypes_H.object_type \<Rightarrow> nat \<Rightarrow> bool \<Rightarrow> (globals myvars) set"
5080+
createObject_c_preconds :: "machine_word \<Rightarrow> object_type \<Rightarrow> nat \<Rightarrow> bool \<Rightarrow> (globals myvars) set"
50815081
where
50825082
"createObject_c_preconds regionBase newType userSize deviceMemory \<equiv>
50835083
(createObject_c_preconds1 regionBase newType userSize deviceMemory

proof/crefine/ARM/Invoke_C.thy

+2-2
Original file line numberDiff line numberDiff line change
@@ -2623,10 +2623,10 @@ lemma ctes_of_ex_cte_cap_to':
26232623

26242624

26252625
lemma Arch_isFrameType_spec:
2626-
"\<forall>s. \<Gamma> \<turnstile> \<lbrace>s. unat \<acute>type \<le> fromEnum (maxBound::ArchTypes_H.object_type)\<rbrace>
2626+
"\<forall>s. \<Gamma> \<turnstile> \<lbrace>s. unat \<acute>type \<le> fromEnum (maxBound::object_type)\<rbrace>
26272627
Call Arch_isFrameType_'proc
26282628
\<lbrace> \<acute>ret__unsigned_long =
2629-
from_bool (isFrameType ((toEnum (unat \<^bsup>s\<^esup> type))::ArchTypes_H.object_type))\<rbrace>"
2629+
from_bool (isFrameType ((toEnum (unat \<^bsup>s\<^esup> type))::object_type))\<rbrace>"
26302630
apply vcg
26312631
apply (simp add: toEnum_object_type_to_H)
26322632
apply (frule object_type_from_to_H)

proof/crefine/ARM/Retype_C.thy

+3-3
Original file line numberDiff line numberDiff line change
@@ -4350,7 +4350,7 @@ lemma placeNewObject_user_data:
43504350

43514351

43524352
definition
4353-
createObject_hs_preconds :: "word32 \<Rightarrow> ArchTypes_H.object_type \<Rightarrow> nat \<Rightarrow> bool \<Rightarrow> kernel_state \<Rightarrow> bool"
4353+
createObject_hs_preconds :: "word32 \<Rightarrow> object_type \<Rightarrow> nat \<Rightarrow> bool \<Rightarrow> kernel_state \<Rightarrow> bool"
43544354
where
43554355
"createObject_hs_preconds regionBase newType userSize d \<equiv>
43564356
(invs' and pspace_no_overlap' regionBase (getObjectSize newType userSize)
@@ -4373,14 +4373,14 @@ abbreviation
43734373

43744374
(* these preconds actually used throughout the proof *)
43754375
abbreviation(input)
4376-
createObject_c_preconds1 :: "word32 \<Rightarrow> ArchTypes_H.object_type \<Rightarrow> nat \<Rightarrow> bool \<Rightarrow> (globals myvars) set"
4376+
createObject_c_preconds1 :: "word32 \<Rightarrow> object_type \<Rightarrow> nat \<Rightarrow> bool \<Rightarrow> (globals myvars) set"
43774377
where
43784378
"createObject_c_preconds1 regionBase newType userSize deviceMemory \<equiv>
43794379
{s. region_actually_is_dev_bytes regionBase (2 ^ getObjectSize newType userSize) deviceMemory s}"
43804380

43814381
(* these preconds used at start of proof *)
43824382
definition
4383-
createObject_c_preconds :: "word32 \<Rightarrow> ArchTypes_H.object_type \<Rightarrow> nat \<Rightarrow> bool \<Rightarrow> (globals myvars) set"
4383+
createObject_c_preconds :: "word32 \<Rightarrow> object_type \<Rightarrow> nat \<Rightarrow> bool \<Rightarrow> (globals myvars) set"
43844384
where
43854385
"createObject_c_preconds regionBase newType userSize deviceMemory \<equiv>
43864386
(createObject_c_preconds1 regionBase newType userSize deviceMemory

proof/crefine/ARM_HYP/Invoke_C.thy

+2-2
Original file line numberDiff line numberDiff line change
@@ -2828,10 +2828,10 @@ lemma ctes_of_ex_cte_cap_to':
28282828

28292829

28302830
lemma Arch_isFrameType_spec:
2831-
"\<forall>s. \<Gamma> \<turnstile> \<lbrace>s. unat \<acute>type \<le> fromEnum (maxBound::ArchTypes_H.object_type)\<rbrace>
2831+
"\<forall>s. \<Gamma> \<turnstile> \<lbrace>s. unat \<acute>type \<le> fromEnum (maxBound::object_type)\<rbrace>
28322832
Call Arch_isFrameType_'proc
28332833
\<lbrace> \<acute>ret__unsigned_long =
2834-
from_bool (isFrameType ((toEnum (unat \<^bsup>s\<^esup> type))::ArchTypes_H.object_type))\<rbrace>"
2834+
from_bool (isFrameType ((toEnum (unat \<^bsup>s\<^esup> type))::object_type))\<rbrace>"
28352835
apply vcg
28362836
apply (simp add: toEnum_object_type_to_H)
28372837
apply (frule object_type_from_to_H)

proof/crefine/ARM_HYP/Retype_C.thy

+3-3
Original file line numberDiff line numberDiff line change
@@ -4919,7 +4919,7 @@ lemma placeNewObject_user_data:
49194919

49204920

49214921
definition
4922-
createObject_hs_preconds :: "word32 \<Rightarrow> ArchTypes_H.object_type \<Rightarrow> nat \<Rightarrow> bool \<Rightarrow> kernel_state \<Rightarrow> bool"
4922+
createObject_hs_preconds :: "word32 \<Rightarrow> object_type \<Rightarrow> nat \<Rightarrow> bool \<Rightarrow> kernel_state \<Rightarrow> bool"
49234923
where
49244924
"createObject_hs_preconds regionBase newType userSize d \<equiv>
49254925
(invs' and pspace_no_overlap' regionBase (getObjectSize newType userSize)
@@ -4942,14 +4942,14 @@ abbreviation
49424942

49434943
(* these preconds actually used throughout the proof *)
49444944
abbreviation(input)
4945-
createObject_c_preconds1 :: "word32 \<Rightarrow> ArchTypes_H.object_type \<Rightarrow> nat \<Rightarrow> bool \<Rightarrow> (globals myvars) set"
4945+
createObject_c_preconds1 :: "word32 \<Rightarrow> object_type \<Rightarrow> nat \<Rightarrow> bool \<Rightarrow> (globals myvars) set"
49464946
where
49474947
"createObject_c_preconds1 regionBase newType userSize deviceMemory \<equiv>
49484948
{s. region_actually_is_dev_bytes regionBase (2 ^ getObjectSize newType userSize) deviceMemory s}"
49494949

49504950
(* these preconds used at start of proof *)
49514951
definition
4952-
createObject_c_preconds :: "word32 \<Rightarrow> ArchTypes_H.object_type \<Rightarrow> nat \<Rightarrow> bool \<Rightarrow> (globals myvars) set"
4952+
createObject_c_preconds :: "word32 \<Rightarrow> object_type \<Rightarrow> nat \<Rightarrow> bool \<Rightarrow> (globals myvars) set"
49534953
where
49544954
"createObject_c_preconds regionBase newType userSize deviceMemory \<equiv>
49554955
(createObject_c_preconds1 regionBase newType userSize deviceMemory

proof/crefine/RISCV64/Invoke_C.thy

+2-2
Original file line numberDiff line numberDiff line change
@@ -2774,10 +2774,10 @@ lemma ctes_of_ex_cte_cap_to':
27742774

27752775

27762776
lemma Arch_isFrameType_spec:
2777-
"\<forall>s. \<Gamma> \<turnstile> \<lbrace>s. unat \<acute>type \<le> fromEnum (maxBound::ArchTypes_H.object_type)\<rbrace>
2777+
"\<forall>s. \<Gamma> \<turnstile> \<lbrace>s. unat \<acute>type \<le> fromEnum (maxBound::object_type)\<rbrace>
27782778
Call Arch_isFrameType_'proc
27792779
\<lbrace> \<acute>ret__unsigned_long =
2780-
from_bool (isFrameType ((toEnum (unat \<^bsup>s\<^esup> type))::ArchTypes_H.object_type))\<rbrace>"
2780+
from_bool (isFrameType ((toEnum (unat \<^bsup>s\<^esup> type))::object_type))\<rbrace>"
27812781
apply vcg
27822782
apply (simp add: toEnum_object_type_to_H)
27832783
apply (frule object_type_from_to_H)

proof/crefine/RISCV64/Retype_C.thy

+3-3
Original file line numberDiff line numberDiff line change
@@ -4796,7 +4796,7 @@ lemma placeNewObject_user_data:
47964796
done
47974797

47984798
definition
4799-
createObject_hs_preconds :: "machine_word \<Rightarrow> ArchTypes_H.object_type \<Rightarrow> nat \<Rightarrow> bool \<Rightarrow> kernel_state \<Rightarrow> bool"
4799+
createObject_hs_preconds :: "machine_word \<Rightarrow> object_type \<Rightarrow> nat \<Rightarrow> bool \<Rightarrow> kernel_state \<Rightarrow> bool"
48004800
where
48014801
"createObject_hs_preconds regionBase newType userSize d \<equiv>
48024802
(invs' and pspace_no_overlap' regionBase (getObjectSize newType userSize)
@@ -4819,14 +4819,14 @@ abbreviation
48194819

48204820
(* these preconds actually used throughout the proof *)
48214821
abbreviation(input)
4822-
createObject_c_preconds1 :: "machine_word \<Rightarrow> ArchTypes_H.object_type \<Rightarrow> nat \<Rightarrow> bool \<Rightarrow> (globals myvars) set"
4822+
createObject_c_preconds1 :: "machine_word \<Rightarrow> object_type \<Rightarrow> nat \<Rightarrow> bool \<Rightarrow> (globals myvars) set"
48234823
where
48244824
"createObject_c_preconds1 regionBase newType userSize deviceMemory \<equiv>
48254825
{s. region_actually_is_dev_bytes regionBase (2 ^ getObjectSize newType userSize) deviceMemory s}"
48264826

48274827
(* these preconds used at start of proof *)
48284828
definition
4829-
createObject_c_preconds :: "machine_word \<Rightarrow> ArchTypes_H.object_type \<Rightarrow> nat \<Rightarrow> bool \<Rightarrow> (globals myvars) set"
4829+
createObject_c_preconds :: "machine_word \<Rightarrow> object_type \<Rightarrow> nat \<Rightarrow> bool \<Rightarrow> (globals myvars) set"
48304830
where
48314831
"createObject_c_preconds regionBase newType userSize deviceMemory \<equiv>
48324832
(createObject_c_preconds1 regionBase newType userSize deviceMemory

proof/crefine/X64/Invoke_C.thy

+2-2
Original file line numberDiff line numberDiff line change
@@ -2800,10 +2800,10 @@ lemma ctes_of_ex_cte_cap_to':
28002800

28012801

28022802
lemma Arch_isFrameType_spec:
2803-
"\<forall>s. \<Gamma> \<turnstile> \<lbrace>s. unat \<acute>type \<le> fromEnum (maxBound::ArchTypes_H.object_type)\<rbrace>
2803+
"\<forall>s. \<Gamma> \<turnstile> \<lbrace>s. unat \<acute>type \<le> fromEnum (maxBound::object_type)\<rbrace>
28042804
Call Arch_isFrameType_'proc
28052805
\<lbrace> \<acute>ret__unsigned_long =
2806-
from_bool (isFrameType ((toEnum (unat \<^bsup>s\<^esup> type))::ArchTypes_H.object_type))\<rbrace>"
2806+
from_bool (isFrameType ((toEnum (unat \<^bsup>s\<^esup> type))::object_type))\<rbrace>"
28072807
apply vcg
28082808
apply (simp add: toEnum_object_type_to_H)
28092809
apply (frule object_type_from_to_H)

proof/crefine/X64/Retype_C.thy

+3-3
Original file line numberDiff line numberDiff line change
@@ -5628,7 +5628,7 @@ lemma placeNewObject_user_data:
56285628
done
56295629

56305630
definition
5631-
createObject_hs_preconds :: "machine_word \<Rightarrow> ArchTypes_H.object_type \<Rightarrow> nat \<Rightarrow> bool \<Rightarrow> kernel_state \<Rightarrow> bool"
5631+
createObject_hs_preconds :: "machine_word \<Rightarrow> object_type \<Rightarrow> nat \<Rightarrow> bool \<Rightarrow> kernel_state \<Rightarrow> bool"
56325632
where
56335633
"createObject_hs_preconds regionBase newType userSize d \<equiv>
56345634
(invs' and pspace_no_overlap' regionBase (getObjectSize newType userSize)
@@ -5651,14 +5651,14 @@ abbreviation
56515651

56525652
(* these preconds actually used throughout the proof *)
56535653
abbreviation(input)
5654-
createObject_c_preconds1 :: "machine_word \<Rightarrow> ArchTypes_H.object_type \<Rightarrow> nat \<Rightarrow> bool \<Rightarrow> (globals myvars) set"
5654+
createObject_c_preconds1 :: "machine_word \<Rightarrow> object_type \<Rightarrow> nat \<Rightarrow> bool \<Rightarrow> (globals myvars) set"
56555655
where
56565656
"createObject_c_preconds1 regionBase newType userSize deviceMemory \<equiv>
56575657
{s. region_actually_is_dev_bytes regionBase (2 ^ getObjectSize newType userSize) deviceMemory s}"
56585658

56595659
(* these preconds used at start of proof *)
56605660
definition
5661-
createObject_c_preconds :: "machine_word \<Rightarrow> ArchTypes_H.object_type \<Rightarrow> nat \<Rightarrow> bool \<Rightarrow> (globals myvars) set"
5661+
createObject_c_preconds :: "machine_word \<Rightarrow> object_type \<Rightarrow> nat \<Rightarrow> bool \<Rightarrow> (globals myvars) set"
56625662
where
56635663
"createObject_c_preconds regionBase newType userSize deviceMemory \<equiv>
56645664
(createObject_c_preconds1 regionBase newType userSize deviceMemory

proof/refine/AARCH64/Syscall_R.thy

+1-1
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ crunch InterruptDecls_H.invokeIRQHandler
535535
for typ_at'[wp]: "\<lambda>s. P (typ_at' T p s)"
536536

537537
lemmas invokeIRQHandler_typ_ats[wp] =
538-
typ_at_lifts [OF InterruptDecls_H_invokeIRQHandler_typ_at']
538+
typ_at_lifts [OF invokeIRQHandler_typ_at']
539539

540540
crunch setDomain
541541
for tcb_at'[wp]: "tcb_at' tptr"

proof/refine/ARM/Syscall_R.thy

+1-1
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ crunch InterruptDecls_H.invokeIRQHandler
526526
for typ_at'[wp]: "\<lambda>s. P (typ_at' T p s)"
527527

528528
lemmas invokeIRQHandler_typ_ats[wp] =
529-
typ_at_lifts [OF InterruptDecls_H_invokeIRQHandler_typ_at']
529+
typ_at_lifts [OF invokeIRQHandler_typ_at']
530530

531531
crunch setDomain
532532
for tcb_at'[wp]: "tcb_at' tptr"

proof/refine/ARM/orphanage/Orphanage.thy

+4-4
Original file line numberDiff line numberDiff line change
@@ -1797,11 +1797,11 @@ lemma invokeIRQControl_no_orphans [wp]:
17971797
apply (wp | clarsimp)+
17981798
done
17991799

1800-
lemma invokeIRQHandler_no_orphans [wp]:
1800+
lemma arch_invokeIRQHandler_no_orphans[wp]:
18011801
"\<lbrace> \<lambda>s. no_orphans s \<and> invs' s \<rbrace>
1802-
invokeIRQHandler i
1802+
ARM_H.invokeIRQHandler i
18031803
\<lbrace> \<lambda>reply s. no_orphans s \<rbrace>"
1804-
apply (cases i, simp_all add: invokeIRQHandler_def)
1804+
apply (cases i, simp_all add: ARM_H.invokeIRQHandler_def)
18051805
apply (wp | clarsimp | fastforce)+
18061806
done
18071807

@@ -1939,7 +1939,7 @@ lemma setDomain_no_orphans [wp]:
19391939
apply (fastforce simp: tcb_at_typ_at' is_active_tcb_ptr_runnable')
19401940
done
19411941

1942-
crunch InterruptDecls_H.invokeIRQHandler
1942+
crunch invokeIRQHandler
19431943
for no_orphans[wp]: no_orphans
19441944

19451945
lemma performInvocation_no_orphans [wp]:

proof/refine/ARM_HYP/Syscall_R.thy

+1-1
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ crunch InterruptDecls_H.invokeIRQHandler
536536
for typ_at'[wp]: "\<lambda>s. P (typ_at' T p s)"
537537

538538
lemmas invokeIRQHandler_typ_ats[wp] =
539-
typ_at_lifts [OF InterruptDecls_H_invokeIRQHandler_typ_at']
539+
typ_at_lifts [OF invokeIRQHandler_typ_at']
540540

541541
crunch setDomain
542542
for tcb_at'[wp]: "tcb_at' tptr"

proof/refine/RISCV64/Syscall_R.thy

+1-1
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ crunch InterruptDecls_H.invokeIRQHandler
534534
for typ_at'[wp]: "\<lambda>s. P (typ_at' T p s)"
535535

536536
lemmas invokeIRQHandler_typ_ats[wp] =
537-
typ_at_lifts [OF InterruptDecls_H_invokeIRQHandler_typ_at']
537+
typ_at_lifts [OF invokeIRQHandler_typ_at']
538538

539539
crunch setDomain
540540
for tcb_at'[wp]: "tcb_at' tptr"

proof/refine/X64/Syscall_R.thy

+1-1
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ crunch InterruptDecls_H.invokeIRQHandler
535535
for typ_at'[wp]: "\<lambda>s. P (typ_at' T p s)"
536536

537537
lemmas invokeIRQHandler_typ_ats[wp] =
538-
typ_at_lifts [OF InterruptDecls_H_invokeIRQHandler_typ_at']
538+
typ_at_lifts [OF invokeIRQHandler_typ_at']
539539

540540
crunch setDomain
541541
for tcb_at'[wp]: "tcb_at' tptr"

0 commit comments

Comments
 (0)