Module ConcurCC_correct:= (Concurrent_correctness CC_correct Args).
(*USed to be start_stack*)
Definition Clight_init_state (p: Clight.program):=
Clight.initial_state p.
Definition Asm_init_state (p: Asm.program):=
Asm.initial_state  p.
Notation valid Sem:=
(valid dryResources Sem OrdinalPool.OrdinalThreadPool).
Definition opt_init_mem_source (p : Clight.program):=
(Genv.init_mem (Ctypes.program_of_program p)).
Definition opt_init_mem_target {F V} (tp:AST.program F V ):=
(Genv.init_mem tp).

Lemma ConcurrentCompilerSafety:
CC_correct.CompCert_compiler Args.C_program = Some Args.Asm_program ->
forall asm_genv_safety : Asm_core.safe_genv (@the_ge Args.Asm_program),
let SemSource:= (ClightSemanticsForMachines.ClightSem
(Clight.globalenv Args.C_program)) in
let SemTarget:= @X86Sem Args.Asm_program asm_genv_safety in
concurrent_simulation_safety_preservation
(Genv.init_mem (Ctypes.program_of_program Args.C_program))
(Genv.init_mem Args.Asm_program)
(SemSource:= SemSource)
(SourceThreadPool:= threadPool.OrdinalPool.OrdinalThreadPool(Sem:=SemSource))
(SourceMachineSig:= HybridMachine.DryHybridMachine.DryHybridMachineSig)
(SemTarget :=  SemTarget)
(TargetThreadPool:= threadPool.OrdinalPool.OrdinalThreadPool(Sem:=SemTarget))
(TargetMachineSig:= HybridMachine.DryHybridMachine.DryHybridMachineSig)
.