Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PROSA - Formally Proven Schedulability Analysis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lasse Blaauwbroek
PROSA - Formally Proven Schedulability Analysis
Commits
f73f6508
Commit
f73f6508
authored
5 years ago
by
Sergey Bozhko
Browse files
Options
Downloads
Patches
Plain Diff
Add destruction tactic for ideal uni-processor
parent
b3d66e94
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
restructuring/analysis/basic_facts/ideal_schedule.v
+42
-0
42 additions, 0 deletions
restructuring/analysis/basic_facts/ideal_schedule.v
with
42 additions
and
0 deletions
restructuring/analysis/basic_facts/ideal_schedule.v
+
42
−
0
View file @
f73f6508
...
@@ -9,6 +9,8 @@ Section ScheduleClass.
...
@@ -9,6 +9,8 @@ Section ScheduleClass.
Local
Transparent
service_in
scheduled_in
scheduled_on
.
Local
Transparent
service_in
scheduled_in
scheduled_on
.
(** Consider any job type and the ideal processor model. *)
(** Consider any job type and the ideal processor model. *)
Context
{
Job
:
JobType
}
.
Context
{
Job
:
JobType
}
.
Context
`{
JobArrival
Job
}
.
Context
`{
JobCost
Job
}
.
(** We note that the ideal processor model is indeed a uniprocessor
(** We note that the ideal processor model is indeed a uniprocessor
model. *)
model. *)
...
@@ -64,4 +66,44 @@ Section ScheduleClass.
...
@@ -64,4 +66,44 @@ Section ScheduleClass.
Proof
.
Proof
.
by
rewrite
/
service_at
service_in_is_scheduled_in
.
by
rewrite
/
service_at
service_in_is_scheduled_in
.
Qed
.
Qed
.
(** Next we prove a lemma which helps us to do a case analysis on
the state of an ideal schedule. *)
Lemma
ideal_proc_model_sched_case_analysis
:
forall
(
sched
:
schedule
(
ideal
.
processor_state
Job
))
(
t
:
instant
),
is_idle
sched
t
\/
exists
j
,
scheduled_at
sched
j
t
.
Proof
.
intros
.
unfold
is_idle
;
simpl
;
destruct
(
sched
t
)
eqn
:
EQ
.
-
by
right
;
exists
s
;
auto
;
rewrite
scheduled_at_def
EQ
.
-
by
left
;
auto
.
Qed
.
End
ScheduleClass
.
End
ScheduleClass
.
(** * Automation *)
(** We add the above lemmas into a "Hint Database" basic_facts, so Coq
will be able to apply them automatically. *)
Hint
Resolve
ideal_proc_model_is_a_uniprocessor_model
ideal_proc_model_ensures_ideal_progress
ideal_proc_model_provides_unit_service
:
basic_facts
.
(** We also provide tactics for case analysis on ideal processor state. *)
(** The first tactic generates two subgoals: one with idle processor and
the other with processor executing a job named JobName. *)
Ltac
ideal_proc_model_sched_case_analysis
sched
t
JobName
:=
let
Idle
:=
fresh
"Idle"
in
let
Sched
:=
fresh
"Sched_"
JobName
in
destruct
(
ideal_proc_model_sched_case_analysis
sched
t
)
as
[
Idle
|
[
JobName
Sched
]]
.
(** The second tactic is similar to the first, but it additionally generates
two equalities: [sched t = None] and [sched t = Some j]. *)
Ltac
ideal_proc_model_sched_case_analysis_eq
sched
t
JobName
:=
let
Idle
:=
fresh
"Idle"
in
let
IdleEq
:=
fresh
"Eq"
Idle
in
let
Sched
:=
fresh
"Sched_"
JobName
in
let
SchedEq
:=
fresh
"Eq"
Sched
in
destruct
(
ideal_proc_model_sched_case_analysis
sched
t
)
as
[
Idle
|
[
JobName
Sched
]];
[
move
:
(
Idle
)
=>
/
eqP
IdleEq
;
rewrite
?IdleEq
|
move
:
(
Sched
);
simpl
;
move
=>
/
eqP
SchedEq
;
rewrite
?SchedEq
]
.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment