Library mcertikos.proc.AbQueueAtomicGenLink

Require Import LinkTemplate.
Require Import PAbQueueAtomic.
Require Import AbQueueAtomicGenLinkSource.
Require Import AbQueueAtomicGen.
Require Import PAbQueue.
Require Import PAbQueueCode.

Section WITHCOMPCERTIKOS.
  Context `{compcertikos_prf: CompCertiKOS} `{real_params_prf: RealParams}.
  Context `{multi_oracle_prop: MultiOracleProp}.

  Lemma init_correct:
    init_correct_type PAbQueueAtomic_module pabqueue pabqueue_atomic.
  Proof.
    init_correct.
  Qed.

  Lemma link_correct_aux:
    link_correct_aux_type PAbQueueAtomic_module pabqueue pabqueue_atomic.
  Proof.
    link_correct_aux.
    - link_cfunction enqueue_atomic_spec_ref PAbQueueCode.enqueue_atomic_code_correct.
    - link_cfunction dequeue_atomic_spec_ref PAbQueueCode.dequeue_atomic_code_correct.
    - apply passthrough_correct.
  Qed.

  Theorem cl_backward_simulation:
    cl_backward_simulation_type PAbQueueAtomic_module pabqueue pabqueue_atomic.
  Proof.
    cl_backward_simulation init_correct link_correct_aux.
  Qed.

  Theorem make_program_exists:
    make_program_exist_type PAbQueueAtomic_module pabqueue pabqueue_atomic.
  Proof.
    make_program_exists link_correct_aux.
  Qed.
End WITHCOMPCERTIKOS.