diff --git a/spec/cspec/RISCV64/Kernel_C.thy b/spec/cspec/RISCV64/Kernel_C.thy index e00f5e2269..893fe1789c 100644 --- a/spec/cspec/RISCV64/Kernel_C.thy +++ b/spec/cspec/RISCV64/Kernel_C.thy @@ -29,11 +29,16 @@ type_synonym cghost_state = "(machine_word \ vmpage_size) * (machine_word \ nat) * ghost_assertions * (machine_word \ nat)" +abbreviation gs_refill_buffer_lengths :: "cghost_state \ (machine_word \ nat)" where + "gs_refill_buffer_lengths \ snd \ snd \ snd" + definition gs_clear_region :: "addr \ nat \ cghost_state \ cghost_state" where "gs_clear_region ptr bits gs \ - (%x. if x \ {ptr..+2 ^ bits} then None else fst gs x, - %x. if x \ {ptr..+2 ^ bits} then None else fst (snd gs) x, snd (snd gs))" + (\x. if x \ {ptr..+2 ^ bits} then None else fst gs x, + \x. if x \ {ptr..+2 ^ bits} then None else fst (snd gs) x, + fst (snd (snd gs)), + \x. if x \ {ptr..+2 ^ bits} then None else gs_refill_buffer_lengths gs x)" definition gs_new_frames:: "vmpage_size \ addr \ nat \ cghost_state \ cghost_state" @@ -53,9 +58,6 @@ definition then Some sz else fst (snd gs) x, snd (snd gs))" -abbreviation gs_refill_buffer_lengths :: "cghost_state \ (machine_word \ nat)" where - "gs_refill_buffer_lengths \ snd \ snd \ snd" - abbreviation (input) refills_len :: "nat \ nat \ nat \ nat" where "refills_len userSize struct_size refill_size \ (2 ^ userSize - struct_size) div refill_size"