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
7ee4f352
Commit
7ee4f352
authored
3 years ago
by
Alban Gruin
Committed by
Alban Gruin
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
correct_store_buffer: redefine constaints and use it in the proofs
Signed-off-by:
Alban Gruin
<
alban.gruin@irit.fr
>
parent
d943294e
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/correct_store_buffer.v
+13
-3
13 additions, 3 deletions
src/correct_store_buffer.v
with
13 additions
and
3 deletions
src/correct_store_buffer.v
+
13
−
3
View file @
7ee4f352
...
@@ -66,6 +66,15 @@ Definition cycle sbState trace :=
...
@@ -66,6 +66,15 @@ Definition cycle sbState trace :=
let
isSuUsed
:=
List
.
existsb
is_in_su
trace
in
let
isSuUsed
:=
List
.
existsb
is_in_su
trace
in
List
.
map
(
cycle_elt
isSuUsed
sbState
trace
)
trace
.
List
.
map
(
cycle_elt
isSuUsed
sbState
trace
)
trace
.
Definition
is_constrained
(
elt
:
instr_kind
)
trace
sbState
:=
match
elt
,
sbState
with
|
(
_
,
(
Sp
,
_
)),
_
=>
List
.
existsb
is_in_lsu
trace
|
(
Load
,
(
Lsu
,
_
)),
Empty
=>
List
.
existsb
is_in_lu
trace
||
List
.
existsb
is_in_su
trace
|
(
Load
,
(
Lsu
,
_
)),
_
=>
true
|
(
Store
,
(
Lsu
,
_
)),
_
=>
List
.
existsb
is_in_su
trace
|
_
,
_
=>
false
end
.
Section
can_advance
.
Section
can_advance
.
Variable
isSuUsed
:
bool
.
Variable
isSuUsed
:
bool
.
Variable
sbState
:
sbStateT
.
Variable
sbState
:
sbStateT
.
...
@@ -139,10 +148,11 @@ Section constrained.
...
@@ -139,10 +148,11 @@ Section constrained.
Theorem
constrained_sp_can_advance_unconstrained_too
:
Theorem
constrained_sp_can_advance_unconstrained_too
:
e
=
(
opc
,
(
Sp
,
0
))
->
e
=
(
opc
,
(
Sp
,
0
))
->
(
*
t
is
constrained
,
t
'
is
unconstrained
*
)
(
*
t
is
constrained
,
t
'
is
unconstrained
*
)
(
List
.
existsb
is_in_lsu
t
)
=
true
->
(
List
.
existsb
is_in_lsu
t
'
)
=
false
->
is_constrained
e
t
sbState
=
true
->
is_constrained
e
t
'
sbState
'
=
false
->
List
.
nth_error
tc
i
=
Some
(
opc
,
(
Lsu
,
0
))
->
List
.
nth_error
tc
'
i
=
Some
(
opc
,
(
Lsu
,
0
)).
List
.
nth_error
tc
i
=
Some
(
opc
,
(
Lsu
,
0
))
->
List
.
nth_error
tc
'
i
=
Some
(
opc
,
(
Lsu
,
0
)).
Proof
.
Proof
.
intros
He
HconstT
HconstT
'
.
intros
He
HconstT
HconstT
'
.
rewrite
He
in
HconstT
'
.
constraint_delve
He
.
constraint_delve
He
.
...
@@ -153,15 +163,15 @@ Section constrained.
...
@@ -153,15 +163,15 @@ Section constrained.
-
exact
HconstT
'
.
-
exact
HconstT
'
.
Qed
.
Qed
.
(
*
If
a
constrained
Lsu
can
advance
,
an
unconstrained
Lsu
can
advance
.
*
)
(
*
Store
version
*
)
(
*
Store
version
*
)
Theorem
constrained_lsu_store_advance_unconstrained_too
:
Theorem
constrained_lsu_store_advance_unconstrained_too
:
e
=
(
Store
,
(
Lsu
,
0
))
->
e
=
(
Store
,
(
Lsu
,
0
))
->
(
*
t
is
constrained
,
t
'
is
unconstrained
*
)
(
*
t
is
constrained
,
t
'
is
unconstrained
*
)
(
List
.
existsb
is_in_su
t
)
=
true
->
(
List
.
existsb
is_in_su
t
'
)
=
false
->
is_constrained
e
t
sbState
=
true
->
is_constrained
e
t
'
sbState
'
=
false
->
List
.
nth_error
tc
i
=
Some
(
Store
,
(
Su
,
0
))
->
List
.
nth_error
tc
'
i
=
Some
(
Store
,
(
Su
,
0
)).
List
.
nth_error
tc
i
=
Some
(
Store
,
(
Su
,
0
))
->
List
.
nth_error
tc
'
i
=
Some
(
Store
,
(
Su
,
0
)).
Proof
.
Proof
.
intros
He
HconstT
HconstT
'
.
intros
He
HconstT
HconstT
'
.
rewrite
He
in
HconstT
'
.
constraint_delve
He
.
constraint_delve
He
.
...
...
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