Skip to content

Commit

Permalink
[squash] design: clear up requalify clobbering situation
Browse files Browse the repository at this point in the history
* Do not import generic constants sanitiseRegister and getSanitiseRegisterInfo.
  Their definitions were never imported in lieu of using translated Arch
  versions that have the same type, causing aliasing warning during
  const requalification.
* Update comments where requalify clobbers arch version from abstract
  spec.
  • Loading branch information
Xaphiosis committed Aug 18, 2024
1 parent 03423cb commit bd23eec
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion spec/design/skel/FaultHandler_H.thy
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ arch_requalify_consts (H)
makeArchFaultMessage
handleArchFaultReply

(* FIXME arch-split: clobbers generic with arch version, no disambiguation via global. *)
(* clobbers previously requalified abstract spec constants with design spec versions *)
arch_requalify_consts (aliasing, H)
syscallMessage
exceptionMessage
Expand Down
2 changes: 1 addition & 1 deletion spec/design/skel/Invocations_H.thy
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ requalify_types (in Arch)
#INCLUDE_HASKELL SEL4/API/Invocation.lhs Arch=Arch NOT GenInvocationLabels InvocationLabel
#INCLUDE_HASKELL SEL4/API/InvocationLabels.lhs ONLY invocationType genInvocationType

(* disambiguate Arch.invocation vs global.invocation *)
(* disambiguate name clash between Arch and non-arch consts with same names *)
context Arch begin
context begin global_naming global
requalify_types (aliasing)
Expand Down
2 changes: 1 addition & 1 deletion spec/design/skel/KernelInit_H.thy
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ newKernelState_def:
ksMachineState = init_machine_state
\<rparr>"

(* disambiguate newKernelState defined here as global vs the one in Arch as Arch *)
(* disambiguate name clash between Arch and non-arch consts with same names *)
context Arch begin
requalify_facts (aliasing)
newKernelState_def
Expand Down
3 changes: 2 additions & 1 deletion spec/design/skel/TCBDecls_H.thy
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ theory TCBDecls_H
imports FaultMonad_H Invocations_H
begin

#INCLUDE_HASKELL SEL4/Object/TCB.lhs decls_only NOT archThreadGet archThreadSet
#INCLUDE_HASKELL SEL4/Object/TCB.lhs decls_only \
NOT archThreadGet archThreadSet sanitiseRegister getSanitiseRegisterInfo

end
7 changes: 3 additions & 4 deletions spec/design/skel/TCB_H.thy
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@ arch_requalify_consts (H)
msgRegisters
fromVPtr
postModifyRegisters
sanitiseRegister
getSanitiseRegisterInfo

(* FIXME arch-split: not clear why this is being done this way, there's no disambiguation *)
(* override generic names with arch-specific versions *)
(* clobbers previously requalified abstract spec constants with design spec versions *)
arch_requalify_consts (aliasing, H)
gpRegisters
frameRegisters
tlsBaseRegister
sanitiseRegister
getSanitiseRegisterInfo

abbreviation "mapMaybe \<equiv> option_map"

Expand Down

0 comments on commit bd23eec

Please sign in to comment.