Library CompOptCert.NPThread
Require Import Language.
Require Import Event.
Require Import Time.
Require Import View.
Require Import Cell.
Require Import Memory.
Require Import TView.
Require Import Local.
Require Import Thread.
Require Import Language.
Require Import Event.
Require Import Time.
Require Import View.
Require Import Cell.
Require Import Memory.
Require Import TView.
Require Import Local.
Require Import Thread.
Require Import Language.
Thread Step in the Non-preemptive Semantics
Thread state in the non-preemptive semantics. It includes:
Definition na_step (lo: Ordering.LocOrdMap) (e1 e2:t): Prop :=
Thread.na_step lo (state e1) (state e2) ∧ (preempt e2 = false).
Thread.na_step lo (state e1) (state e2) ∧ (preempt e2 = false).
Definition at_step (lo: Ordering.LocOrdMap) (e1 e2:t): Prop :=
Thread.at_step lo (state e1) (state e2) ∧ (preempt e2 = true).
Thread.at_step lo (state e1) (state e2) ∧ (preempt e2 = true).
Definition out_step (lo: Ordering.LocOrdMap) (e: Event.t) (e1 e2:t): Prop :=
Thread.out_step lo e (state e1) (state e2) ∧ (preempt e2 = true).
Thread.out_step lo e (state e1) (state e2) ∧ (preempt e2 = true).
The promise/reservation and cancel steps are only permitted to occur when preempt = true. In our paper, for simply preservation, we weakened the non-preemptive semantics definition
but it does not influence our result,
and allowed the cancel step to take when preempt = false.
Definition prc_step (lo: Ordering.LocOrdMap) (e1 e2:t): Prop :=
Thread.prc_step lo (state e1) (state e2) ∧ (preempt e1 = true) ∧ (preempt e2 = true).
Definition tau_step (lo: Ordering.LocOrdMap) (e1 e2:t): Prop :=
na_step lo e1 e2 ∨ at_step lo e1 e2 ∨ prc_step lo e1 e2.
Definition consistent := Thread.consistent_nprm.
Definition all_step (lo: Ordering.LocOrdMap) (e1 e2:t): Prop :=
tau_step lo e1 e2 ∨ (∃ e, out_step lo e e1 e2).
End NPAuxThread.
End NPAuxThread.
Thread.prc_step lo (state e1) (state e2) ∧ (preempt e1 = true) ∧ (preempt e2 = true).
Definition tau_step (lo: Ordering.LocOrdMap) (e1 e2:t): Prop :=
na_step lo e1 e2 ∨ at_step lo e1 e2 ∨ prc_step lo e1 e2.
Definition consistent := Thread.consistent_nprm.
Definition all_step (lo: Ordering.LocOrdMap) (e1 e2:t): Prop :=
tau_step lo e1 e2 ∨ (∃ e, out_step lo e e1 e2).
End NPAuxThread.
End NPAuxThread.