Library mcertikos.proc.KContextNewGenSpec


This file provide the contextual refinement proof between MBoot layer and MALInit layer
Require Import Coqlib.
Require Import Errors.
Require Import AST.
Require Import Integers.
Require Import Floats.
Require Import Op.
Require Import Asm.
Require Import Events.
Require Import Globalenvs.
Require Import Smallstep.
Require Import Values.
Require Import Memory.
Require Import Maps.
Require Import AuxLemma.
Require Import FlatMemory.
Require Import AuxStateDataType.
Require Import Constant.
Require Import GlobIdent.
Require Import RealParams.
Require Import AsmImplLemma.
Require Import GenSem.
Require Import PrimSemantics.

Require Import AbstractDataType.

Require Import liblayers.logic.PTreeModules.
Require Import liblayers.logic.LayerLogicImpl.
Require Import liblayers.compcertx.Stencil.
Require Import liblayers.compcertx.MakeProgram.
Require Import liblayers.compat.CompatLayers.
Require Import liblayers.compat.CompatGenSem.
Require Import compcert.cfrontend.Ctypes.

Require Import PKContext.

Local Open Scope string_scope.
Local Open Scope error_monad_scope.
Local Open Scope Z_scope.

Definition of the low level specification

Section SPECIFICATION.

  Context `{real_params: RealParams}.
  Context `{oracle_prop: MultiOracleProp}.

  Notation LDATA := RData.

  Notation LDATAOps := (cdata LDATA).

  Inductive kctxt_new_spec_low_step `{StencilOps} `{Mem.MemoryModelOps} `{UseMemWithData mem}:
    sextcall_sem (mem := mwd LDATAOps):=
  | kctxt_new_spec_low_intro s (WB: _Prop) m´0 labd labd´ b0 n ofs´ id q:
      PKContext.kctxt_new_spec labd b0 ofs´
                               (Int.unsigned id) (Int.unsigned q) = Some (labd´, Int.unsigned n)
      find_symbol s STACK_LOC = Some b0
      ( id, find_symbol s id = Some ) →
      kernel_mode labd
      high_level_invariant labd
      kctxt_new_spec_low_step s WB (Vptr ofs´ :: Vint id :: Vint q :: nil) (m´0, labd) (Vint n) (m´0, labd´).

  Section WITHMEM.

    Context `{Hstencil: Stencil}.
    Context `{Hmem: Mem.MemoryModel}.
    Context `{Hmwd: UseMemWithData mem}.

    Definition kctxt_new_spec_low: compatsem LDATAOps :=
      csem kctxt_new_spec_low_step (type_of_list_type (Tpointer Tvoid noattr::Tint32::Tint32::nil)) Tint32.


  End WITHMEM.

End SPECIFICATION.