Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
VFPG
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
POLLIEN Baptiste
VFPG
Commits
a86fd7ed
Commit
a86fd7ed
authored
1 year ago
by
WASQUEL Valentin
Browse files
Options
Downloads
Patches
Plain Diff
change correct definition for correct user defs
parent
51734e7b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/syntax/FlightPlanSized.v
+34
-4
34 additions, 4 deletions
src/syntax/FlightPlanSized.v
with
34 additions
and
4 deletions
src/syntax/FlightPlanSized.v
+
34
−
4
View file @
a86fd7ed
...
...
@@ -32,6 +32,9 @@ Set Implicit Arguments.
Definition
correct_block_id
(
fp
:
flight_plan
)
(
id
:
block_id
)
:
Prop
:=
(
id
<
get_nb_block
fp
).
Definition
is_user_id
(
fp
:
flight_plan
)
(
id
:
block_id
)
:
Prop
:=
(
id
<
get_nb_block
fp
-
1
).
Lemma
normalise_block_id_is_correct
:
forall
(
fp
:
flight_plan
)
(
id
:
block_id
),
correct_block_id
fp
(
normalise_block_id
fp
id
).
...
...
@@ -42,15 +45,28 @@ Proof.
-
apply
leb_complete_conv
in
E
.
apply
E
.
Qed
.
Lemma
user_id_is_correct
:
forall
(
fp
:
flight_plan
)
(
id
:
block_id
),
is_user_id
fp
id
->
correct_block_id
fp
id
.
Proof
.
intros
fp
id
Huser
.
unfold
correct_block_id
.
unfold
is_user_id
in
Huser
.
lia
.
Qed
.
(
**
**
Properties
about
exceptions
*
)
Definition
correct_excpt
(
ex
:
fp_exception
)
:
Prop
:=
is_nat8
(
get_expt_block_id
ex
).
Definition
correct_user_excpt
(
fp
:
flight_plan
)
(
ex
:
fp_exception
)
:
Prop
:=
correct_excpt
ex
/
\
is_user_id
fp
(
get_expt_block_id
ex
).
(
**
**
Properties
about
forbidden
deroutes
*
)
Record
correct_fbd_deroute
(
fp
:
flight_plan
)
(
fbd
:
fp_forbidden_deroute
)
:=
create_correct_fbd_deroute
{
get_correct_from:
correct_block
_id
fp
(
get_fbd_from
fbd
);
get_correct_to:
correct_block
_id
fp
(
get_fbd_to
fbd
);
get_correct_from:
is_user
_id
fp
(
get_fbd_from
fbd
);
get_correct_to:
is_user
_id
fp
(
get_fbd_to
fbd
);
}
.
(
**
**
Properties
about
deroute
*
)
...
...
@@ -60,6 +76,12 @@ Definition correct_deroutes (block: fp_block): Prop :=
=
DEROUTE
ids
'
params
->
is_nat8
(
get_deroute_block_id
params
).
Definition
correct_user_deroutes
(
fp
:
flight_plan
)
(
block
:
fp_block
)
:
Prop
:=
forall
ids
ids
'
idd
params
,
List
.
nth
ids
(
get_block_stages
block
)
(
DEFAULT
idd
)
=
DEROUTE
ids
'
params
->
is_user_id
fp
(
get_deroute_block_id
params
).
(
**
*
Property
that
blocks
are
well
numbered
*
)
Definition
well_numbered_blocks
(
fp
:
flight_plan
)
:
Prop
:=
forall
i
,
i
<
get_nb_block
fp
...
...
@@ -75,6 +97,14 @@ Record well_sized_block (block: fp_block) :=
get_correct_deroute:
correct_deroutes
block
;
}
.
Record
well_sized_user_block
(
fp
:
flight_plan
)
(
block
:
fp_block
)
:=
create_well_sized_user_block
{
get_well_sized_block:
well_sized_block
block
;
get_correct_user_lexcpts:
Forall
(
correct_user_excpt
fp
)
(
get_block_exceptions
block
);
get_correct_user_deroute:
correct_user_deroutes
fp
block
;
}
.
(
**
*
Properties
about
the
flight
plan
*
)
(
**
**
Property
about
that
there
is
less
than
256
blocks
*
)
...
...
@@ -89,8 +119,8 @@ Definition nb_block_lt_256 (fp: flight_plan): Prop :=
Record
verified_fp_e
(
fp
:
flight_plan
)
:=
create_verified_fp_e
{
get_nb_block8:
nb_block_lt_256
fp
;
get_well_numbered_blocks:
well_numbered_blocks
fp
;
get_well_sized_blocks:
forall
i
,
well_sized_block
(
get_block
fp
i
);
get_correct_gexcpts:
Forall
correct_excpt
(
get_fp_exceptions
fp
);
get_well_sized_
user_
blocks:
forall
i
,
well_sized_
user_
block
fp
(
get_block
fp
i
);
get_correct_
user_
gexcpts:
Forall
(
correct_
user_
excpt
fp
)
(
get_fp_exceptions
fp
);
get_correct_fbd:
Forall
(
correct_fbd_deroute
fp
)
(
get_fp_forbidden_deroutes
fp
)
}
.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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