Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
rtproofs
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sophie Quinton
rtproofs
Commits
d3c64ee5
Commit
d3c64ee5
authored
Sep 26, 2018
by
Sergey Bozhko
Committed by
Sergey Bozhko
Apr 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new definitions and lemmas to service and workload files
parent
58d8d0ab
Changes
5
Expand all
Hide whitespace changes
Inline
Sidebyside
Showing
5 changed files
with
427 additions
and
9 deletions
+427
9
model/arrival/basic/job.v
model/arrival/basic/job.v
+27
5
model/arrival/basic/task_arrival.v
model/arrival/basic/task_arrival.v
+5
1
model/schedule/uni/schedule.v
model/schedule/uni/schedule.v
+17
1
model/schedule/uni/service.v
model/schedule/uni/service.v
+323
2
model/schedule/uni/workload.v
model/schedule/uni/workload.v
+55
0
No files found.
model/arrival/basic/job.v
View file @
d3c64ee5
Require
Import
rt
.
model
.
time
rt
.
model
.
arrival
.
basic
.
task
.
Require
Import
rt
.
model
.
time
rt
.
model
.
arrival
.
basic
.
task
rt
.
model
.
arrival
.
basic
.
arrival_sequence
.
From
mathcomp
Require
Import
ssrnat
ssrbool
eqtype
.
(* Properties of different types of job: *)
Module
Job
.
Import
Time
.
Import
Time
ArrivalSequence
.
(* 1) Basic Job *)
Section
ValidJob
.
...
...
@@ 19,7 +19,7 @@ Module Job.
End
ValidJob
.
(* 2)
r
ealtime job (with a deadline) *)
(* 2)
R
ealtime job (with a deadline) *)
Section
ValidRealtimeJob
.
Context
{
Job
:
eqType
}.
...
...
@@ 38,7 +38,7 @@ Module Job.
job_deadline_positive
.
End
ValidRealtimeJob
.
(* 3) Job of sporadic task *)
Section
ValidSporadicTaskJob
.
...
...
@@ 68,4 +68,26 @@ Module Job.
End
ValidSporadicTaskJob
.
(* 4) Job of task *)
Section
ValidTaskJob
.
Context
{
Task
:
eqType
}.
Variable
task_cost
:
Task
>
time
.
Context
{
Job
:
eqType
}.
Variable
job_cost
:
Job
>
time
.
Variable
job_task
:
Job
>
Task
.
(* Consider any arrival sequence. *)
Variable
arr_seq
:
arrival_sequence
Job
.
(* The job cost from the arrival sequence
cannot be larger than the task cost. *)
Definition
cost_of_jobs_from_arrival_sequence_le_task_cost
:
=
forall
j
,
arrives_in
arr_seq
j
>
job_cost_le_task_cost
task_cost
job_cost
job_task
j
.
End
ValidTaskJob
.
End
Job
.
\ No newline at end of file
model/arrival/basic/task_arrival.v
View file @
d3c64ee5
...
...
@@ 54,7 +54,11 @@ Module TaskArrival.
(* ...we can identify the jobs of tsk that arrived in any interval [t1, t2) ... *)
Definition
arrivals_of_task_between
(
t1
t2
:
time
)
:
=
[
seq
j
<
arrivals_between
t1
t2

is_job_of_task
j
].
(* ...we define the jobs of tsk that arrived before some time instant t ... *)
Definition
arrivals_of_task_before
(
t
:
time
)
:
=
arrivals_of_task_between
0
t
.
(* ...and also count the number of job arrivals. *)
Definition
num_arrivals_of_task
(
t1
t2
:
time
)
:
=
size
(
arrivals_of_task_between
t1
t2
).
...
...
model/schedule/uni/schedule.v
View file @
d3c64ee5
...
...
@@ 271,7 +271,7 @@ Module UniprocessorSchedule.
(* Let j be any job. *)
Variable
j
:
Job
.
(*
First, w
e show that if job j is scheduled, then it must be pending. *)
(*
W
e show that if job j is scheduled, then it must be pending. *)
Lemma
scheduled_implies_pending
:
forall
t
,
scheduled_at
sched
j
t
>
...
...
@@ 291,6 +291,22 @@ Module UniprocessorSchedule.
by
rewrite
/
service_at
SCHED
.
Qed
.
(* Consider any arrival sequence. *)
Variable
arr_seq
:
arrival_sequence
Job
.
(* Then we prove that the job is pending at the moment of its arrival. *)
Lemma
job_pending_at_arrival
:
arrives_in
arr_seq
j
>
job_cost
j
>
0
>
pending
job_arrival
job_cost
sched
j
(
job_arrival
j
).
Proof
.
intros
ARR
POS
.
apply
/
andP
;
split
;
first
by
rewrite
/
has_arrived
.
rewrite
neq_ltn
;
apply
/
orP
;
left
.
rewrite
/
service
/
service_during
(
ignore_service_before_arrival
)
;
try
done
.
by
rewrite
big_geq
;
eauto
2
.
Qed
.
End
Pending
.
(* In this section we show that the schedule is unique at any point. *)
...
...
model/schedule/uni/service.v
View file @
d3c64ee5
This diff is collapsed.
Click to expand it.
model/schedule/uni/workload.v
View file @
d3c64ee5
...
...
@@ 77,5 +77,60 @@ Module Workload.
End
PerJobPriority
.
End
WorkloadDefs
.
(* We also define the workload of a task. *)
Section
TaskWorkload
.
Context
{
Task
:
eqType
}.
Context
{
Job
:
eqType
}.
Variable
job_arrival
:
Job
>
time
.
Variable
job_cost
:
Job
>
time
.
Variable
job_task
:
Job
>
Task
.
(* Consider any job arrival sequence. *)
Variable
arr_seq
:
arrival_sequence
Job
.
(* Let tsk be the task to be analyzed. *)
Variable
tsk
:
Task
.
(* Recall the notion of a job of task tsk. *)
Let
of_task_tsk
j
:
=
job_task
j
==
tsk
.
(* We define the task workload as the workload of jobs of task tsk. *)
Definition
task_workload
jobs
:
=
workload_of_jobs
job_cost
jobs
of_task_tsk
.
(* Next, we recall the definition of the task workload in interval [t1, t2). *)
Definition
task_workload_between
(
t1
t2
:
time
)
:
=
task_workload
(
jobs_arrived_between
arr_seq
t1
t2
).
End
TaskWorkload
.
(* In this section, we prove a few basic lemmas about the workload. *)
Section
BasicLemmas
.
Context
{
Job
:
eqType
}.
Variable
job_arrival
:
Job
>
time
.
Variable
job_cost
:
Job
>
time
.
(* Consider any job arrival sequence... *)
Variable
arr_seq
:
arrival_sequence
Job
.
(* For simplicity, let's define some local names. *)
Let
arrivals_between
:
=
jobs_arrived_between
arr_seq
.
(* We prove that workload can be splited into two parts. *)
Lemma
workload_of_jobs_cat
:
forall
t
t1
t2
P
,
t1
<=
t
<=
t2
>
workload_of_jobs
job_cost
(
arrivals_between
t1
t2
)
P
=
workload_of_jobs
job_cost
(
arrivals_between
t1
t
)
P
+
workload_of_jobs
job_cost
(
arrivals_between
t
t2
)
P
.
Proof
.
move
=>
t
t1
t2
P
/
andP
[
GE
LE
].
rewrite
/
workload_of_jobs
/
arrivals_between
.
by
rewrite
(
job_arrived_between_cat
_
_
t
)
//
big_cat
.
Qed
.
End
BasicLemmas
.
End
Workload
.
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment