Built with Alectryon, running Coq+SerAPI v8.20.0+0.20.0. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑ Ctrl+↓ to navigate, Ctrl+🖱️ to focus. On Mac, use instead of Ctrl.
[Loading ML file ssrmatching_plugin.cmxs (using legacy method) ... done]
[Loading ML file ssreflect_plugin.cmxs (using legacy method) ... done]
[Loading ML file ring_plugin.cmxs (using legacy method) ... done]
Serlib plugin: coq-elpi.elpi is not available: serlib support is missing. Incremental checking for commands in this plugin will be impacted.
[Loading ML file coq-elpi.elpi ... done]
[Loading ML file zify_plugin.cmxs (using legacy method) ... done]
[Loading ML file micromega_core_plugin.cmxs (using legacy method) ... done]
[Loading ML file micromega_plugin.cmxs (using legacy method) ... done]
[Loading ML file btauto_plugin.cmxs (using legacy method) ... done]
Notation "_ + _" was already used in scope nat_scope. [notation-overridden,parsing,default]
Notation "_ - _" was already used in scope nat_scope. [notation-overridden,parsing,default]
Notation "_ <= _" was already used in scope nat_scope. [notation-overridden,parsing,default]
Notation "_ < _" was already used in scope nat_scope. [notation-overridden,parsing,default]
Notation "_ >= _" was already used in scope nat_scope. [notation-overridden,parsing,default]
Notation "_ > _" was already used in scope nat_scope. [notation-overridden,parsing,default]
Notation "_ <= _ <= _" was already used in scope nat_scope. [notation-overridden,parsing,default]
Notation "_ < _ <= _" was already used in scope nat_scope. [notation-overridden,parsing,default]
Notation "_ <= _ < _" was already used in scope nat_scope. [notation-overridden,parsing,default]
Notation "_ < _ < _" was already used in scope nat_scope. [notation-overridden,parsing,default]
Notation "_ * _" was already used in scope nat_scope. [notation-overridden,parsing,default]
Require Export prosa.analysis.facts.behavior.arrivals. Require Export prosa.analysis.definitions.readiness. (** In this file, we establish basic facts about backlogged jobs. *) Section BackloggedJobs. (** Consider any kind of jobs with arrival times and costs... *) Context {Job : JobType} `{JobCost Job} `{JobArrival Job}. (** ... and any kind of processor model, ... *) Context {PState : ProcessorState Job}. (** ... and allow for any notion of job readiness. *) Context {jr : JobReady Job PState}. (** Given an arrival sequence and a schedule ... *) Variable arr_seq : arrival_sequence Job. Variable sched : schedule PState. (** ... with consistent arrival times, ... *) Hypothesis H_consistent_arrival_times: consistent_arrival_times arr_seq. (** ... we observe that any backlogged job is indeed in the set of backlogged jobs. *)
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
jr: JobReady Job PState
arr_seq: arrival_sequence Job
sched: schedule PState
H_consistent_arrival_times: consistent_arrival_times arr_seq

forall (j : Job) (t : instant), arrives_in arr_seq j -> backlogged sched j t -> j \in jobs_backlogged_at arr_seq sched t
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
jr: JobReady Job PState
arr_seq: arrival_sequence Job
sched: schedule PState
H_consistent_arrival_times: consistent_arrival_times arr_seq

forall (j : Job) (t : instant), arrives_in arr_seq j -> backlogged sched j t -> j \in jobs_backlogged_at arr_seq sched t
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
jr: JobReady Job PState
arr_seq: arrival_sequence Job
sched: schedule PState
H_consistent_arrival_times: consistent_arrival_times arr_seq
j: Job
t: instant
ARRIVES: arrives_in arr_seq j
BACKLOGGED: backlogged sched j t

j \in jobs_backlogged_at arr_seq sched t
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
jr: JobReady Job PState
arr_seq: arrival_sequence Job
sched: schedule PState
H_consistent_arrival_times: consistent_arrival_times arr_seq
j: Job
t: instant
ARRIVES: arrives_in arr_seq j
BACKLOGGED: backlogged sched j t

j \in [seq j <- arrivals_between arr_seq 0 t.+1 | backlogged sched j t]
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
jr: JobReady Job PState
arr_seq: arrival_sequence Job
sched: schedule PState
H_consistent_arrival_times: consistent_arrival_times arr_seq
j: Job
t: instant
ARRIVES: arrives_in arr_seq j
BACKLOGGED: backlogged sched j t

backlogged sched j t && (j \in arrivals_between arr_seq 0 t.+1)
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
jr: JobReady Job PState
arr_seq: arrival_sequence Job
sched: schedule PState
H_consistent_arrival_times: consistent_arrival_times arr_seq
j: Job
t: instant
ARRIVES: arrives_in arr_seq j
BACKLOGGED: backlogged sched j t

j \in arrivals_between arr_seq 0 t.+1
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
jr: JobReady Job PState
arr_seq: arrival_sequence Job
sched: schedule PState
H_consistent_arrival_times: consistent_arrival_times arr_seq
j: Job
t: instant
ARRIVES: arrives_in arr_seq j
BACKLOGGED: backlogged sched j t

arrived_between j 0 t.+1
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
jr: JobReady Job PState
arr_seq: arrival_sequence Job
sched: schedule PState
H_consistent_arrival_times: consistent_arrival_times arr_seq
j: Job
t: instant
ARRIVES: arrives_in arr_seq j
BACKLOGGED: backlogged sched j t

0 <= job_arrival j < t.+1
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
jr: JobReady Job PState
arr_seq: arrival_sequence Job
sched: schedule PState
H_consistent_arrival_times: consistent_arrival_times arr_seq
j: Job
t: instant
ARRIVES: arrives_in arr_seq j
BACKLOGGED: backlogged sched j t

job_arrival j < t.+1
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
jr: JobReady Job PState
arr_seq: arrival_sequence Job
sched: schedule PState
H_consistent_arrival_times: consistent_arrival_times arr_seq
j: Job
t: instant
ARRIVES: arrives_in arr_seq j
BACKLOGGED: backlogged sched j t

has_arrived j t
now apply (backlogged_implies_arrived sched). Qed. (** Trivially, it is also the case that any backlogged job comes from the respective arrival sequence. *)
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
jr: JobReady Job PState
arr_seq: arrival_sequence Job
sched: schedule PState
H_consistent_arrival_times: consistent_arrival_times arr_seq

forall (j : Job) (t : instant), j \in jobs_backlogged_at arr_seq sched t -> arrives_in arr_seq j
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
jr: JobReady Job PState
arr_seq: arrival_sequence Job
sched: schedule PState
H_consistent_arrival_times: consistent_arrival_times arr_seq

forall (j : Job) (t : instant), j \in jobs_backlogged_at arr_seq sched t -> arrives_in arr_seq j
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
jr: JobReady Job PState
arr_seq: arrival_sequence Job
sched: schedule PState
H_consistent_arrival_times: consistent_arrival_times arr_seq
j: Job
t: instant

j \in jobs_backlogged_at arr_seq sched t -> arrives_in arr_seq j
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
jr: JobReady Job PState
arr_seq: arrival_sequence Job
sched: schedule PState
H_consistent_arrival_times: consistent_arrival_times arr_seq
j: Job
t: instant
IN: j \in arrivals_up_to arr_seq t

arrives_in arr_seq j
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
jr: JobReady Job PState
arr_seq: arrival_sequence Job
sched: schedule PState
H_consistent_arrival_times: consistent_arrival_times arr_seq
j: Job
t: instant

j \in arrivals_up_to arr_seq t -> arrives_in arr_seq j
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
jr: JobReady Job PState
arr_seq: arrival_sequence Job
sched: schedule PState
H_consistent_arrival_times: consistent_arrival_times arr_seq
j: Job
t: instant

j \in arrivals_between arr_seq 0 t.+1 -> arrives_in arr_seq j
now apply in_arrivals_implies_arrived. Qed. End BackloggedJobs. (** In the following section, we make one more crucial assumption: namely, that the readiness model is non-clairvoyant, which allows us to relate backlogged jobs in schedules with a shared prefix. *) Section NonClairvoyance. (** Consider any kind of jobs with arrival times and costs... *) Context {Job : JobType} `{JobCost Job} `{JobArrival Job}. (** ... any kind of processor model, ... *) Context {PState : ProcessorState Job}. (** ... and allow for any non-clairvoyant notion of job readiness. *) Context {RM : JobReady Job PState}. Hypothesis H_nonclairvoyant_job_readiness: nonclairvoyant_readiness RM. (** Consider any arrival sequence ... *) Variable arr_seq : arrival_sequence Job. (** ... and two schedules ... *) Variable sched sched': schedule PState. (** ... with a shared prefix to a fixed horizon. *) Variable h : instant. Hypothesis H_shared_prefix: identical_prefix sched sched' h. (** We observe that a job is backlogged at a time in the prefix in one schedule iff it is backlogged in the other schedule due to the non-clairvoyance of the notion of job readiness ... *)
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
RM: JobReady Job PState
H_nonclairvoyant_job_readiness: nonclairvoyant_readiness RM
arr_seq: arrival_sequence Job
sched, sched': schedule PState
h: instant
H_shared_prefix: identical_prefix sched sched' h

forall (t : nat) (j : Job), t < h -> backlogged sched j t = backlogged sched' j t
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
RM: JobReady Job PState
H_nonclairvoyant_job_readiness: nonclairvoyant_readiness RM
arr_seq: arrival_sequence Job
sched, sched': schedule PState
h: instant
H_shared_prefix: identical_prefix sched sched' h

forall (t : nat) (j : Job), t < h -> backlogged sched j t = backlogged sched' j t
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
RM: JobReady Job PState
H_nonclairvoyant_job_readiness: nonclairvoyant_readiness RM
arr_seq: arrival_sequence Job
sched, sched': schedule PState
h: instant
H_shared_prefix: identical_prefix sched sched' h
t: nat
j: Job
IN_PREFIX: t < h

backlogged sched j t = backlogged sched' j t
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
RM: JobReady Job PState
H_nonclairvoyant_job_readiness: nonclairvoyant_readiness RM
arr_seq: arrival_sequence Job
sched, sched': schedule PState
h: instant
H_shared_prefix: identical_prefix sched sched' h
t: nat
j: Job
IN_PREFIX: t < h

job_ready sched j t && ~~ scheduled_at sched j t = job_ready sched' j t && ~~ scheduled_at sched' j t
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
RM: JobReady Job PState
H_nonclairvoyant_job_readiness: nonclairvoyant_readiness RM
arr_seq: arrival_sequence Job
sched, sched': schedule PState
h: instant
H_shared_prefix: identical_prefix sched sched' h
t: nat
j: Job
IN_PREFIX: t < h

job_ready sched' j t && ~~ scheduled_at sched j t = job_ready sched' j t && ~~ scheduled_at sched' j t
by rewrite /scheduled_at H_shared_prefix. Qed. (** As a corollary, if we further know that j is not scheduled at time [h], we can expand the previous lemma to [t <= h]. *)
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
RM: JobReady Job PState
H_nonclairvoyant_job_readiness: nonclairvoyant_readiness RM
arr_seq: arrival_sequence Job
sched, sched': schedule PState
h: instant
H_shared_prefix: identical_prefix sched sched' h

forall (t : instant) (j : Job), ~~ scheduled_at sched j t -> ~~ scheduled_at sched' j t -> t <= h -> backlogged sched j t = backlogged sched' j t
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
RM: JobReady Job PState
H_nonclairvoyant_job_readiness: nonclairvoyant_readiness RM
arr_seq: arrival_sequence Job
sched, sched': schedule PState
h: instant
H_shared_prefix: identical_prefix sched sched' h

forall (t : instant) (j : Job), ~~ scheduled_at sched j t -> ~~ scheduled_at sched' j t -> t <= h -> backlogged sched j t = backlogged sched' j t
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
RM: JobReady Job PState
H_nonclairvoyant_job_readiness: nonclairvoyant_readiness RM
arr_seq: arrival_sequence Job
sched, sched': schedule PState
h: instant
H_shared_prefix: identical_prefix sched sched' h
t: instant
j: Job
NOT_SCHED: ~~ scheduled_at sched j t
NOT_SCHED': ~~ scheduled_at sched' j t

t <= h -> backlogged sched j t = backlogged sched' j t
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
RM: JobReady Job PState
H_nonclairvoyant_job_readiness: nonclairvoyant_readiness RM
arr_seq: arrival_sequence Job
sched, sched': schedule PState
h: instant
H_shared_prefix: identical_prefix sched sched' h
t: instant
j: Job
NOT_SCHED: ~~ scheduled_at sched j t
NOT_SCHED': ~~ scheduled_at sched' j t
EQ: t = h

backlogged sched j t = backlogged sched' j t
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
RM: JobReady Job PState
H_nonclairvoyant_job_readiness: nonclairvoyant_readiness RM
arr_seq: arrival_sequence Job
sched, sched': schedule PState
h: instant
H_shared_prefix: identical_prefix sched sched' h
t: instant
j: Job
NOT_SCHED: ~~ scheduled_at sched j t
NOT_SCHED': ~~ scheduled_at sched' j t
EQ: t = h

job_ready sched j t && ~~ scheduled_at sched j t = job_ready sched' j t && ~~ scheduled_at sched' j t
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
RM: JobReady Job PState
H_nonclairvoyant_job_readiness: nonclairvoyant_readiness RM
arr_seq: arrival_sequence Job
sched, sched': schedule PState
h: instant
H_shared_prefix: identical_prefix sched sched' h
t: instant
j: Job
NOT_SCHED: ~~ scheduled_at sched j t
NOT_SCHED': ~~ scheduled_at sched' j t
EQ: t = h

job_ready sched' j t && ~~ scheduled_at sched j t = job_ready sched' j t && ~~ scheduled_at sched' j t
now rewrite NOT_SCHED NOT_SCHED'. Qed. (** ... and also lift this observation to the set of all backlogged jobs at any given time in the shared prefix. *)
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
RM: JobReady Job PState
H_nonclairvoyant_job_readiness: nonclairvoyant_readiness RM
arr_seq: arrival_sequence Job
sched, sched': schedule PState
h: instant
H_shared_prefix: identical_prefix sched sched' h

forall t : nat, t < h -> jobs_backlogged_at arr_seq sched t = jobs_backlogged_at arr_seq sched' t
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
RM: JobReady Job PState
H_nonclairvoyant_job_readiness: nonclairvoyant_readiness RM
arr_seq: arrival_sequence Job
sched, sched': schedule PState
h: instant
H_shared_prefix: identical_prefix sched sched' h

forall t : nat, t < h -> jobs_backlogged_at arr_seq sched t = jobs_backlogged_at arr_seq sched' t
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
RM: JobReady Job PState
H_nonclairvoyant_job_readiness: nonclairvoyant_readiness RM
arr_seq: arrival_sequence Job
sched, sched': schedule PState
h: instant
H_shared_prefix: identical_prefix sched sched' h
t: nat
IN_PREFIX: t < h

jobs_backlogged_at arr_seq sched t = jobs_backlogged_at arr_seq sched' t
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
RM: JobReady Job PState
H_nonclairvoyant_job_readiness: nonclairvoyant_readiness RM
arr_seq: arrival_sequence Job
sched, sched': schedule PState
h: instant
H_shared_prefix: identical_prefix sched sched' h
t: nat
IN_PREFIX: t < h

[seq j <- arrivals_up_to arr_seq t | backlogged sched j t] = [seq j <- arrivals_up_to arr_seq t | backlogged sched' j t]
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
RM: JobReady Job PState
H_nonclairvoyant_job_readiness: nonclairvoyant_readiness RM
arr_seq: arrival_sequence Job
sched, sched': schedule PState
h: instant
H_shared_prefix: identical_prefix sched sched' h
t: nat
IN_PREFIX: t < h

(backlogged sched)^~ t =1 (backlogged sched')^~ t
Job: JobType
H: JobCost Job
H0: JobArrival Job
PState: ProcessorState Job
RM: JobReady Job PState
H_nonclairvoyant_job_readiness: nonclairvoyant_readiness RM
arr_seq: arrival_sequence Job
sched, sched': schedule PState
h: instant
H_shared_prefix: identical_prefix sched sched' h
t: nat
IN_PREFIX: t < h
j: Job

backlogged sched j t = backlogged sched' j t
now apply backlogged_prefix_invariance. Qed. End NonClairvoyance.