Library prosa.analysis.abstract.iw_auxiliary
Require Export prosa.analysis.definitions.interference.
Require Export prosa.analysis.definitions.task_schedule.
Require Export prosa.analysis.facts.priority.classes.
Require Export prosa.analysis.abstract.restricted_supply.busy_prefix.
Require Export prosa.model.aggregate.service_of_jobs.
Require Export prosa.analysis.facts.model.service_of_jobs.
Require Export prosa.analysis.definitions.task_schedule.
Require Export prosa.analysis.facts.priority.classes.
Require Export prosa.analysis.abstract.restricted_supply.busy_prefix.
Require Export prosa.model.aggregate.service_of_jobs.
Require Export prosa.analysis.facts.model.service_of_jobs.
Auxiliary Lemmas About Interference and Interfering Workload.
Consider any type of tasks ...
... and any type of jobs associated with these tasks.
Context {Job : JobType}.
Context `{JobTask Job Task}.
Context `{JobArrival Job}.
Context `{JobCost Job}.
Context `{JobTask Job Task}.
Context `{JobArrival Job}.
Context `{JobCost Job}.
Assume we are provided with abstract functions for interference
and interfering workload.
Consider any kind of fully supply-consuming uniprocessor model.
Context `{PState : ProcessorState Job}.
Hypothesis H_uniprocessor_proc_model : uniprocessor_model PState.
Hypothesis H_consumed_supply_proc_model : fully_consuming_proc_model PState.
Hypothesis H_uniprocessor_proc_model : uniprocessor_model PState.
Hypothesis H_consumed_supply_proc_model : fully_consuming_proc_model PState.
Consider any valid arrival sequence with consistent arrivals ...
Variable arr_seq : arrival_sequence Job.
Hypothesis H_valid_arrival_sequence : valid_arrival_sequence arr_seq.
Hypothesis H_valid_arrival_sequence : valid_arrival_sequence arr_seq.
... and any uni-processor schedule of this arrival
sequence ...
Variable sched : schedule PState.
Hypothesis H_jobs_come_from_arrival_sequence :
jobs_come_from_arrival_sequence sched arr_seq.
Hypothesis H_jobs_come_from_arrival_sequence :
jobs_come_from_arrival_sequence sched arr_seq.
... where jobs do not execute before their arrival or after
completion.
Hypothesis H_jobs_must_arrive_to_execute : jobs_must_arrive_to_execute sched.
Hypothesis H_completed_jobs_dont_execute : completed_jobs_dont_execute sched.
Hypothesis H_completed_jobs_dont_execute : completed_jobs_dont_execute sched.
Let tsk be any task.
For convenience, we define a function that "folds" cumulative
conditional interference with a predicate fun _ _ ⇒ true to
cumulative (unconditional) interference.
Lemma fold_cumul_interference :
∀ j t1 t2,
cumul_cond_interference (fun _ _ ⇒ true) j t1 t2
= cumulative_interference j t1 t2.
∀ j t1 t2,
cumul_cond_interference (fun _ _ ⇒ true) j t1 t2
= cumulative_interference j t1 t2.
In this section, we prove a few basic properties of conditional
interference w.r.t. a generic predicate P.
In the following, consider a predicate P.
First, we show that the cumulative conditional interference
within a time interval
[t1, t2)
can be rewritten as a sum
over all time instances satisfying P j.
Lemma cumul_cond_interference_alt :
∀ j t1 t2,
cumul_cond_interference P j t1 t2 = \sum_(t1 ≤ t < t2 | P j t) interference j t.
∀ j t1 t2,
cumul_cond_interference P j t1 t2 = \sum_(t1 ≤ t < t2 | P j t) interference j t.
Next, we show that cumulative interference on an interval
[al, ar)
is bounded by the cumulative interference on an
interval [bl,br)
if [al,ar)
⊆ [bl,br)
.
Lemma cumulative_interference_sub :
∀ (j : Job) (al ar bl br : instant),
bl ≤ al →
ar ≤ br →
cumul_cond_interference P j al ar ≤ cumul_cond_interference P j bl br.
∀ (j : Job) (al ar bl br : instant),
bl ≤ al →
ar ≤ br →
cumul_cond_interference P j al ar ≤ cumul_cond_interference P j bl br.
We show that the cumulative interference of a job can be split
into disjoint intervals.
Lemma cumulative_interference_cat :
∀ j t t1 t2,
t1 ≤ t ≤ t2 →
cumul_cond_interference P j t1 t2
= cumul_cond_interference P j t1 t + cumul_cond_interference P j t t2.
End CondInterferencePredicate.
∀ j t t1 t2,
t1 ≤ t ≤ t2 →
cumul_cond_interference P j t1 t2
= cumul_cond_interference P j t1 t + cumul_cond_interference P j t t2.
End CondInterferencePredicate.
Next, we show a few relations between interference functions
conditioned on different predicates.
We introduce a lemma (similar to ssreflect's bigID lemma)
that allows us to split the cumulative conditional
interference w.r.t predicate P1 into a sum of two cumulative
conditional interference w.r.t. predicates P1 && P2 and P1
&& ~~ P2, respectively.
Lemma cumul_cond_interference_ID :
∀ j t1 t2,
cumul_cond_interference P1 j t1 t2
= cumul_cond_interference (fun j t ⇒ P1 j t && P2 j t) j t1 t2
+ cumul_cond_interference (fun j t ⇒ P1 j t && ~~ P2 j t) j t1 t2.
∀ j t1 t2,
cumul_cond_interference P1 j t1 t2
= cumul_cond_interference (fun j t ⇒ P1 j t && P2 j t) j t1 t2
+ cumul_cond_interference (fun j t ⇒ P1 j t && ~~ P2 j t) j t1 t2.
If two predicates P1 and P2 are equivalent, then they can
be used interchangeably with cumul_cond_interference.