Library mcertikos.devdrivers.HandlerOpGenSpec
This file provide the contextual refinement proof between DConsoleBufOp layer
and DSerialIntro 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 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 Conventions.
Require Import DHandlerCxt.
Require Import AbstractDataType.
Require Import mCertiKOSType.
Local Open Scope string_scope.
Local Open Scope error_monad_scope.
Local Open Scope Z_scope.
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 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 Conventions.
Require Import DHandlerCxt.
Require Import AbstractDataType.
Require Import mCertiKOSType.
Local Open Scope string_scope.
Local Open Scope error_monad_scope.
Local Open Scope Z_scope.
Section SPECIFICATION.
Context `{real_params: RealParams}.
Context `{oracle_prop: MultiOracleProp}.
Notation LDATA := RData.
Notation LDATAOps := (cdata LDATA).
Inductive serial_intr_disable_handler_spec_low_step `{StencilOps} `{Mem.MemoryModelOps} `{UseMemWithData mem}:
sextcall_sem (mem := mwd LDATAOps):=
| serial_intr_disable_handler_spec_low_intro s (WB: _ → Prop) m´0 labd labd´:
serial_intr_disable_concrete_aux_spec labd = Some labd´ →
kernel_mode labd →
high_level_invariant labd →
serial_intr_disable_handler_spec_low_step s WB nil (m´0, labd) Vundef (m´0, labd´).
Inductive serial_intr_enable_handler_spec_low_step `{StencilOps} `{Mem.MemoryModelOps} `{UseMemWithData mem}:
sextcall_sem (mem := mwd LDATAOps):=
| serial_intr_enable_handler_spec_low_intro s (WB: _ → Prop) m´0 labd labd´:
serial_intr_enable_concrete_aux_spec labd = Some labd´ →
kernel_mode labd →
high_level_invariant labd →
serial_intr_enable_handler_spec_low_step s WB nil (m´0, labd) Vundef (m´0, labd´).
Section WITHMEM.
Context `{Hstencil: Stencil}.
Context `{Hmem: Mem.MemoryModelX}.
Context `{Hmwd: UseMemWithData mem}.
Definition serial_intr_disable_handler_spec_low: compatsem LDATAOps :=
csem serial_intr_disable_handler_spec_low_step Tnil Tvoid.
Definition serial_intr_enable_handler_spec_low: compatsem LDATAOps :=
csem serial_intr_enable_handler_spec_low_step Tnil Tvoid.
End WITHMEM.
End SPECIFICATION.
Context `{real_params: RealParams}.
Context `{oracle_prop: MultiOracleProp}.
Notation LDATA := RData.
Notation LDATAOps := (cdata LDATA).
Inductive serial_intr_disable_handler_spec_low_step `{StencilOps} `{Mem.MemoryModelOps} `{UseMemWithData mem}:
sextcall_sem (mem := mwd LDATAOps):=
| serial_intr_disable_handler_spec_low_intro s (WB: _ → Prop) m´0 labd labd´:
serial_intr_disable_concrete_aux_spec labd = Some labd´ →
kernel_mode labd →
high_level_invariant labd →
serial_intr_disable_handler_spec_low_step s WB nil (m´0, labd) Vundef (m´0, labd´).
Inductive serial_intr_enable_handler_spec_low_step `{StencilOps} `{Mem.MemoryModelOps} `{UseMemWithData mem}:
sextcall_sem (mem := mwd LDATAOps):=
| serial_intr_enable_handler_spec_low_intro s (WB: _ → Prop) m´0 labd labd´:
serial_intr_enable_concrete_aux_spec labd = Some labd´ →
kernel_mode labd →
high_level_invariant labd →
serial_intr_enable_handler_spec_low_step s WB nil (m´0, labd) Vundef (m´0, labd´).
Section WITHMEM.
Context `{Hstencil: Stencil}.
Context `{Hmem: Mem.MemoryModelX}.
Context `{Hmwd: UseMemWithData mem}.
Definition serial_intr_disable_handler_spec_low: compatsem LDATAOps :=
csem serial_intr_disable_handler_spec_low_step Tnil Tvoid.
Definition serial_intr_enable_handler_spec_low: compatsem LDATAOps :=
csem serial_intr_enable_handler_spec_low_step Tnil Tvoid.
End WITHMEM.
End SPECIFICATION.