Library Pip.Proof.invariants.CreatePartition

Summary

This file contains the invariant of createPartition. We prove that this PIP service preserves the isolation property
Require Import Pip.Model.ADT Pip.Model.Hardware Pip.Model.Lib Pip.Model.MAL Pip.Model.Lib.
Require Import Pip.Core.Services.

Require Import Pip.Proof.WeakestPreconditions Pip.Proof.StateLib Pip.Proof.InternalLemmas
               Pip.Proof.DependentTypeLemmas.

Require Import Isolation Consistency Invariants GetTableAddr WriteAccessible WritePhyEntry
               PropagatedProperties WriteAccessibleRec InitConfigPagesList InitPEntryTable
               UpdateMappedPageContent UpdatePartitionDescriptor PropagatedProperties
               UpdateShadow1Structure InitFstShadow InitSndShadow UpdatePDFlagTrue.

Require Import Lia Bool Coq.Logic.ProofIrrelevance List EqNat Compare_dec.

Lemma andPreAndPost :
  (A : Type) (P: state Prop)
 (Q1 Q2 : state Prop) (m : LLI A),
{{fun sP s Q1 s}} m {{fun _Q1}}
{{fun sP s Q2 s}} m {{fun _Q2}}
{{fun sP s Q1 s Q2 s}} m {{fun _ sQ1 s Q2 s}}.
Lemma levelDecOrNot :
       p1 p2 : level, p1 p2 p1 = p2.

Lemma mapKernel table idx (P : unit state Prop) :
{{fun sP tt {|
  currentPartition := currentPartition s;
  memory := add table idx
              (PE {| read := false; write := false; exec := false; present := false; user := false; pa := defaultPage |})
              (memory s) beqPage beqIndex |} }} MAL.writePhyEntry table idx defaultPage false false false false false {{P}}.

Lemma createPartition (descChild pdChild shadow1 shadow2 list : vaddr) :
{{fun spartitionsIsolation s kernelDataIsolation s verticalSharing s consistency s }}
createPartition descChild pdChild shadow1 shadow2 list
{{fun _ spartitionsIsolation s kernelDataIsolation s verticalSharing s consistency s }}.
getNbLevel
Vaddrs Eq
Kernel map
getCurPartition
getPd
getTableAddr
simplify the new precondition
StateLib.getIndexOfAddr
getTableAddr
simplify the new precondition
StateLib.getIndexOfAddr
getTableAddr
simplify the new precondition
StateLib.getIndexOfAddr
getTableAddr
simplify the new precondition
StateLib.getIndexOfAddr
getTableAddr
simplify the new precondition
getIndexOfAddr
case present && accessible
fst case : accessible and present
getFstShadow
getTableAddr
simplify the new precondition
derived
getTableAddr
simplify the new precondition
derived
getTableAddr
simplify the new precondition
derived
getTableAddr
simplify the new precondition
derived
getTableAddr
simplify the new precondition
derived
Derivation Test
readPhyEntry
readPhyEntry
readPhyEntry
readPhyEntry
readPhyEntry
writeAccessible : pdChild
writeAccessibleRec : pdChild
writeAccessible : shadow1
writeAccessibleRec : shadow 1
writeAccessible : shadow 2
writeAccessibleRec : shadow 2
writeAccessible : list
writeAccessibleRec : list
writeAccessible : descChild
writeAccessibleRec : descChild
IndexZero
initPEntryTable
getKidx
writeKernelPhyEntry
initPEntryTable
initPEntryTable
initConfigPagesList
getDefaultVAddr
getPRidx
getPDidx
getSh1idx
getSh2idx
getSh3idx
getPRPidx
updatePartitionDescriptor : add the partition descriptor itself
updatePartitionDescriptor : add the page directory into the partition descriptor
updatePartitionDescriptor : add the page directory into the partition descriptor
updatePartitionDescriptor : add the page directory into the partition descriptor
updatePartitionDescriptor : add the config list into the partition descriptor
updatePartitionDescriptor : add the config list into the partition descriptor
writeVirEntry
writeVirEntry
writeVirEntry
writeVirEntry
writePDflag