Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
storebuffer
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tacoq
storebuffer
Commits
a543cf79
Commit
a543cf79
authored
2 years ago
by
Alban Gruin
Browse files
Options
Downloads
Patches
Plain Diff
definitions: simplify proofs
Signed-off-by:
Alban Gruin
<
alban.gruin@irit.fr
>
parent
6ae7da3d
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
src/definitions.v
+13
-22
13 additions, 22 deletions
src/definitions.v
with
13 additions
and
22 deletions
src/definitions.v
+
13
−
22
View file @
a543cf79
...
...
@@ -90,11 +90,12 @@ Proof.
intros
s
o
.
(
*
Enumerate
all
stages
*
)
destruct
s
;
try
reflexivity
.
(
*
Trivial
for
all
cases
,
except
Lsu
*
)
(
*
Lsu
depends
on
the
opcode
*
)
destruct
o
;
reflexivity
.
destruct
s
eqn
:
Hs
;
match
goal
with
(
*
Trivial
for
all
cases
,
except
Lsu
:
depends
on
the
opcode
*
)
|
[
_
:
s
=
Lsu
|-
_
]
=>
destruct
o
;
reflexivity
|
_
=>
reflexivity
end
.
Qed
.
Variant
sbStateT
:=
...
...
@@ -166,9 +167,7 @@ Lemma kind_is_valid :
Proof
.
intros
t
i
Hl
.
assert
(
Hl
'
:=
Hl
).
rewrite
<-
opc_length
in
Hl
.
rewrite
<-
(
nth_error_Some
(
get_opc
t
)
i
)
in
Hl
.
exact
Hl
.
now
rewrite
<-
opc_length
,
<-
(
nth_error_Some
(
get_opc
t
)
i
)
in
Hl
.
Qed
.
Lemma
stage_is_valid
:
...
...
@@ -176,9 +175,7 @@ Lemma stage_is_valid :
Proof
.
intros
t
i
Hl
.
assert
(
Hl
'
:=
Hl
).
rewrite
<-
stg_length
in
Hl
.
rewrite
<-
(
nth_error_Some
(
get_stg
t
)
i
)
in
Hl
.
exact
Hl
.
now
rewrite
<-
stg_length
,
<-
(
nth_error_Some
(
get_stg
t
)
i
)
in
Hl
.
Qed
.
Lemma
cycle_is_valid
:
...
...
@@ -186,9 +183,7 @@ Lemma cycle_is_valid :
Proof
.
intros
t
i
Hl
.
assert
(
Hl
'
:=
Hl
).
rewrite
<-
cyc_length
in
Hl
.
rewrite
<-
(
nth_error_Some
(
get_cyc
t
)
i
)
in
Hl
.
exact
Hl
.
now
rewrite
<-
cyc_length
,
<-
(
nth_error_Some
(
get_cyc
t
)
i
)
in
Hl
.
Qed
.
Lemma
not_some_0_is_some_n
:
...
...
@@ -199,8 +194,7 @@ Proof.
intros
i
t
Hi
Hzero
.
assert
(
nth_error
(
get_cyc
t
)
i
<>
None
)
as
Hnone
.
-
apply
cycle_is_valid
.
exact
Hi
.
-
now
apply
cycle_is_valid
.
-
destruct
nth_error
.
+
exists
n
.
...
...
@@ -266,8 +260,7 @@ Section check_correctness.
rewrite
(
check_latencies_is_correct_v0
_
t1
tstep
).
-
rewrite
(
check_latencies_is_correct_v0
tstep
[
e
]
t2
).
+
rewrite
He
.
destruct
lat
;
reflexivity
.
now
destruct
lat
.
+
exact
Htstep
.
-
exact
Ht
.
Qed
.
...
...
@@ -295,8 +288,7 @@ Section check_correctness.
rewrite
<-
Htstep
in
Ht
.
rewrite
(
check_loads_and_stores_is_correct_v0
t
t1
tstep
).
-
rewrite
(
check_loads_and_stores_is_correct_v0
tstep
[
e
]
t2
).
+
rewrite
He
,
andb_comm
.
reflexivity
.
+
now
rewrite
He
,
andb_comm
.
+
exact
Htstep
.
-
exact
Ht
.
Qed
.
...
...
@@ -309,8 +301,7 @@ Section check_correctness.
rewrite
<-
Htstep
in
Ht
.
rewrite
(
check_loads_and_stores_is_correct_v0
t
t1
tstep
).
-
rewrite
(
check_loads_and_stores_is_correct_v0
tstep
[
e
]
t2
).
+
rewrite
He
,
andb_comm
.
reflexivity
.
+
now
rewrite
He
,
andb_comm
.
+
exact
Htstep
.
-
exact
Ht
.
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