Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NCCoq - Formally Proven Network Calculus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
Pierre Roux
NCCoq - Formally Proven Network Calculus
Commits
51938b51
Commit
51938b51
authored
4 years ago
by
Pierre Roux
Browse files
Options
Downloads
Patches
Plain Diff
Add pseudo periodic clocks
parent
d2849574
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
link/clock.v
+37
-3
37 additions, 3 deletions
link/clock.v
with
37 additions
and
3 deletions
link/clock.v
+
37
−
3
View file @
51938b51
...
...
@@ -191,8 +191,42 @@ Qed.
(** ** A few specific clocks *)
(** Periodic clocks are a simple example of clock *)
Program
Definition
periodic_uclock
(
period
:
{
posnum
R
})
:
uclock
:=
Build_uclock
(
fun
n
=>
(
n
%
:
R
*
period
%
:
num
)
%
:
nng
)
_
period
_
.
(** Pseudo periodic clocks: clocks whose time between ticks is not
necessarily exactly the same but might be n an interval
[uclock_min_intertick, ppclock_max_intertick]. *)
Record
ppuclock
:=
{
(** A pseudo periodic clock is a uclock. *)
ppuclock_uclock
:>
uclock
;
(** with a maximal time between ticks *)
ppuclock_max_intertick
:
{
posnum
R
};
_
:
uclock_min_intertick
ppuclock_uclock
<=
ppuclock_max_intertick
;
_
:
forall
n
,
(
uclock_tick_time
ppuclock_uclock
n
.
+
1
)
%
:
nngnum
<=
(
uclock_tick_time
ppuclock_uclock
n
)
%
:
nngnum
+
ppuclock_max_intertick
%
:
num
}
.
Arguments
Build_ppuclock
:
clear
implicits
.
Lemma
ppuclock_ub
(
c
:
ppuclock
)
n
:
(
uclock_tick_time
c
n
.
+
1
)
%
:
nngnum
<=
(
uclock_tick_time
c
n
)
%
:
nngnum
+
(
ppuclock_max_intertick
c
)
%
:
num
.
Proof
.
by
case
:
c
.
Qed
.
(** Periodic clocks are a particular case of pseudo periodic clocks *)
Program
Definition
periodic_uclock
(
period
:
{
posnum
R
})
:
ppuclock
:=
Build_ppuclock
(
Build_uclock
(
fun
n
=>
(
n
%
:
R
*
period
%
:
num
)
%
:
nng
)
_
period
_)
period
_
_
.
Next
Obligation
.
by
apply
/
val_inj
;
rewrite
/=
mul0r
.
Qed
.
Next
Obligation
.
by
rewrite
-
addn1
natrD
mulrDl
mul1r
.
Qed
.
Next
Obligation
.
by
rewrite
-
addn1
natrD
mulrDl
mul1r
.
Qed
.
Lemma
ppuclock_incr_ub
(
c
:
ppuclock
)
t
d
:
(
c
(
t
+
d
)
%
nat
)
%
:
nngnum
-
(
c
t
)
%
:
nngnum
<=
d
%
:
R
*
(
ppuclock_max_intertick
c
)
%
:
num
.
Proof
.
elim
:
d
=>
[|
d
IHd
];
first
by
rewrite
addn0
subrr
mul0r
.
rewrite
addnS
-
[
X
in
X
<=
_]
addr0
-
(
subrr
(
c
(
t
+
d
)
%
nat
)
%
:
nngnum
)
.
rewrite
(
addrC
(
c
(
t
+
d
)
%
nat
)
%
:
nngnum
)
addrACA
.
rewrite
-
(
addn1
d
)
natrD
mulrDl
mul1r
addrC
.
by
apply
:
ler_add
;
rewrite
?(
addrC
(
-
_))
?IHd
//
ler_subl_addl
ppuclock_ub
.
Qed
.
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