Section DrySafety.
(* combining results from semax_to_juicy_machine and erasure_proof *)
Variable (CPROOF : CSL_proof).
Instance Sem : Semantics := ClightSemanticsForMachines.Clight_newSem (Clight.globalenv CPROOF.(CSL_prog)).
Definition ge := Clight.globalenv CPROOF.(CSL_prog).
Instance DTP : threadPool.ThreadPool.ThreadPool := Parching.DTP ge.
Instance DMS : HybridMachineSig.MachineSig := Parching.DMS ge.
Definition init_mem := proj1_sig (init_mem CPROOF).
Definition init_rmap n := m_phi (initial_jm CPROOF n).
Context {SW : spawn_wrapper CPROOF}.
Notation ClightSem:= ClightSemanticsForMachines.ClightSem.

Theorem Clight_initial_safe (sch : HybridMachineSig.schedule) (n : nat) :
HybridMachineSig.HybridCoarseMachine.csafe
(Sem := ClightSem ge)
(ThreadPool:= threadPool.OrdinalPool.OrdinalThreadPool(Sem:=ClightSem ge))
(machineSig:= HybridMachine.DryHybridMachine.DryHybridMachineSig)
(sch, nil,
DryHybridMachine.initial_machine(Sem := ClightSem ge)
(permissions.getCurPerm init_mem)
(initial_Clight_state CPROOF)) init_mem n.