Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simuliris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
Iris
simuliris
Merge requests
!4
Add dataraces
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Add dataraces
msammler/dataraces
into
master
Overview
152
Commits
9
Pipelines
0
Changes
38
Merged
Michael Sammler
requested to merge
msammler/dataraces
into
master
4 years ago
Overview
54
Commits
9
Pipelines
0
Changes
38
Expand
0
0
Merge request reports
Compare
master
version 24
7f223d3f
3 years ago
version 23
025753b1
3 years ago
version 22
74852cfb
3 years ago
version 21
cdd81a10
3 years ago
version 20
2f85e458
3 years ago
version 19
60148017
3 years ago
version 18
564e228a
3 years ago
version 17
b65a5644
3 years ago
version 16
55d3a0bc
3 years ago
version 15
52120143
3 years ago
version 14
f288d4f6
3 years ago
version 13
84318509
3 years ago
version 12
c753293f
3 years ago
version 11
9b21b0b0
3 years ago
version 10
6ff72452
3 years ago
version 9
72516dbe
3 years ago
version 8
89c133a2
3 years ago
version 7
6b00f15a
3 years ago
version 6
445a3969
3 years ago
version 5
97cb0d41
3 years ago
version 4
2e8d3baa
4 years ago
version 3
0d6f9d70
4 years ago
version 2
c4bc64bf
4 years ago
version 1
def915d7
4 years ago
master (base)
and
latest version
latest version
d7492c62
9 commits,
3 years ago
version 24
7f223d3f
8 commits,
3 years ago
version 23
025753b1
8 commits,
3 years ago
version 22
74852cfb
8 commits,
3 years ago
version 21
cdd81a10
8 commits,
3 years ago
version 20
2f85e458
8 commits,
3 years ago
version 19
60148017
8 commits,
3 years ago
version 18
564e228a
8 commits,
3 years ago
version 17
b65a5644
8 commits,
3 years ago
version 16
55d3a0bc
8 commits,
3 years ago
version 15
52120143
8 commits,
3 years ago
version 14
f288d4f6
8 commits,
3 years ago
version 13
84318509
8 commits,
3 years ago
version 12
c753293f
8 commits,
3 years ago
version 11
9b21b0b0
8 commits,
3 years ago
version 10
6ff72452
8 commits,
3 years ago
version 9
72516dbe
8 commits,
3 years ago
version 8
89c133a2
8 commits,
3 years ago
version 7
6b00f15a
8 commits,
3 years ago
version 6
445a3969
8 commits,
3 years ago
version 5
97cb0d41
8 commits,
3 years ago
version 4
2e8d3baa
7 commits,
4 years ago
version 3
0d6f9d70
6 commits,
4 years ago
version 2
c4bc64bf
4 commits,
4 years ago
version 1
def915d7
3 commits,
4 years ago
38 files
+
4507
−
1835
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Some changes are not shown
For a faster browsing experience, some files are collapsed by default.
Expand all files
Files
38
Search (e.g. *.vue) (Ctrl+P)
theories/simplang/examples/data_races.v deleted
100644 → 0
+
0
−
141
Options
From
simuliris
.
simplang
Require
Import
lang
notation
tactics
class_instances
heap_bij
.
From
iris
Require
Import
bi
.
bi
.
Import
bi
.
From
iris
.
proofmode
Require
Import
tactics
.
From
simuliris
.
simulation
Require
Import
slsls
lifting
.
(** * Examples for exploiting UB of data-races. *)
Section
data_race
.
Context
`{
sbijG
Σ
}
.
Definition
remove_store_and_load_opt
:=
(
λ
:
"a"
,
let
:
"l1"
:=
Fst
"a"
in
let
:
"l2"
:=
Snd
"a"
in
let
:
"v2"
:=
!
"l2"
in
let
:
"r"
:=
"v2"
+
"v2"
in
"l1"
<-
"r"
;;
"r"
)
%
E
.
Definition
remove_store_and_load
:=
(
λ
:
"a"
,
let
:
"l1"
:=
Fst
"a"
in
let
:
"l2"
:=
Snd
"a"
in
"l1"
<-
!
"l2"
;;
"l1"
<-
!
"l1"
+
!
"l2"
;;
!
"l1"
)
%
E
.
Lemma
remove_store_and_load_sim
π
:
⊢
sim_ectx
val_rel
π
remove_store_and_load_opt
remove_store_and_load
val_rel
.
Proof
.
iIntros
(
v_t
v_s
)
"Hrel"
.
sim_pures
.
source_bind
(
Fst
v_s
)
.
iApply
source_red_irred_unless
;
first
done
.
iIntros
((
v_s1
&
v_s2
&
->
))
.
iPoseProof
(
val_rel_pair_source
with
"Hrel"
)
as
(
v_t1
v_t2
)
"(-> & #Hrel1 & Hrel2')"
.
sim_pures
.
sim_pures
.
Abort
.
Definition
reg_promote_loop_opt
f
:=
(
λ
:
"a"
,
let
:
"n"
:=
Fst
"a"
in
let
:
"x"
:=
Snd
"a"
in
let
:
"refn"
:=
ref
!
"n"
in
while
:
#
0
<
!
"refn"
do
Call
##
f
#
2
;;
"refn"
<-
!
"refn"
-
#
1
od
;;
if
:
#
0
<
"n"
then
"x"
<-
#
2
;;
#
2
else
#
0
)
%
E
.
Definition
reg_promote_loop
f
:=
(
λ
:
"a"
,
let
:
"n"
:=
Fst
"a"
in
let
:
"x"
:=
Snd
"a"
in
let
:
"refn"
:=
ref
!
"n"
in
let
:
"res"
:=
ref
#
0
in
while
:
#
0
<
!
"refn"
do
"x"
<-
#
1
;;
"x"
<-
#
2
;;
"res"
<-
!
"x"
;;
(* Should not access x (e.g. because it does not access the
heap) and should not do synchronization. *)
Call
##
f
!
"res"
;;
"refn"
<-
!
"refn"
-
#
1
od
;;
!
"res"
)
%
E
.
Lemma
reg_promote_loop_sim
π
f
:
⊢
sim_ectx
val_rel
π
(
reg_promote_loop_opt
f
)
(
reg_promote_loop
f
)
val_rel
.
Proof
.
iIntros
(
v_t
v_s
)
"Hrel"
.
sim_pures
.
source_bind
(
Fst
v_s
)
.
iApply
source_red_irred_unless
;
first
done
.
iIntros
((
v_s1
&
v_s2
&
->
))
.
iPoseProof
(
val_rel_pair_source
with
"Hrel"
)
as
(
v_t1
v_t2
)
"(-> & #Hrel1 & Hrel2')"
.
sim_pures
.
sim_pures
.
Abort
.
Definition
hoist_load_opt
:=
(
λ
:
"a"
,
let
:
"n"
:=
Fst
"a"
in
let
:
"m"
:=
Fst
(
Snd
"a"
)
in
let
:
"x"
:=
Snd
(
Snd
"a"
)
in
let
:
"refi"
:=
ref
#
0
in
if
:
"n"
<
#
1
then
#
0
else
let
:
"mval"
:=
!
"m"
in
while
:
!
"refi"
<
"n"
do
"x"
<-
"mval"
;;
"refi"
<-
!
"refi"
+
#
1
od
;;
#
0
)
%
E
.
Definition
hoist_load
:=
(
λ
:
"a"
,
let
:
"n"
:=
Fst
"a"
in
let
:
"m"
:=
Fst
(
Snd
"a"
)
in
let
:
"x"
:=
Snd
(
Snd
"a"
)
in
let
:
"refi"
:=
ref
#
0
in
while
:
!
"refi"
<
"n"
do
"x"
<-
!
"m"
;;
"refi"
<-
!
"refi"
+
#
1
od
;;
#
0
)
%
E
.
Lemma
hoist_load_sim
π
:
⊢
sim_ectx
val_rel
π
hoist_load_opt
hoist_load
val_rel
.
Proof
.
iIntros
(
v_t
v_s
)
"Hrel"
.
sim_pures
.
source_bind
(
Fst
v_s
)
.
iApply
source_red_irred_unless
;
first
done
.
iIntros
((
v_s1
&
v_s2'
&
->
))
.
sim_pures
.
source_bind
(
Fst
v_s2'
)
.
iApply
source_red_irred_unless
;
first
done
.
iIntros
((
v_s2
&
v_s3
&
->
))
.
sim_pures
.
iPoseProof
(
val_rel_pair_source
with
"Hrel"
)
as
(
v_t1
v_t2'
)
"(-> & #Hrel1 & Hrel2')"
.
iPoseProof
(
val_rel_pair_source
with
"Hrel2'"
)
as
(
v_t2
v_t3
)
"(-> & #Hrel2 & Hrel3)"
.
sim_pures
.
Abort
.
End
data_race
.
Loading