Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
ReLoC-v1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dan Frumin
ReLoC-v1
Commits
115acf17
Commit
115acf17
authored
Sep 07, 2017
by
Dan Frumin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests
parent
1c1d4e0a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
37 deletions
+35
-37
_CoqProject
_CoqProject
+3
-1
tactics.v
theories/F_mu_ref_conc/tactics.v
+0
-24
tactics.v
theories/tests/tactics.v
+23
-0
tactics2.v
theories/tests/tactics2.v
+9
-12
typetest.v
theories/tests/typetest.v
+0
-0
No files found.
_CoqProject
View file @
115acf17
...
...
@@ -33,4 +33,6 @@ theories/examples/stack/stack_rules.v
theories/examples/stack/CG_stack.v
theories/examples/stack/FG_stack.v
theories/examples/stack/refinement.v
theories/examples/typetest.v
theories/tests/typetest.v
theories/tests/tactics.v
theories/tests/tactics2.v
theories/F_mu_ref_conc/tactics.v
View file @
115acf17
...
...
@@ -141,27 +141,3 @@ Tactic Notation "wp_case" := wp_pure (Case _ _ _).
Tactic
Notation
"wp_op"
:=
wp_pure
(
BinOp
_
_
_
).
Ltac
wp_value
:=
iApply
wp_value
;
eauto
.
(
*
TODO
:
move
to
tests
/
*
)
From
iris_logrel
.
F_mu_ref_conc
Require
Export
notation
.
Lemma
wp_rec1
`
{
heapG
Σ
}
Φ
:
▷
Φ
#
4
⊢
WP
(
λ
:
"y"
,
(
λ
:
"x"
,
"x"
+
#
3
)
"y"
)
#
1
{{
Φ
}}
.
Proof
.
iIntros
"Z"
.
wp_rec
.
wp_rec
.
wp_op
.
wp_value
.
Qed
.
Lemma
wp_proj2
`
{
heapG
Σ
}
Φ
:
▷
Φ
#
1
⊢
WP
Fst
(
Fst
(#
1
,#
2
,#
4
))
{{
Φ
}}
.
Proof
.
iIntros
"HΦ"
.
wp_proj
.
wp_proj
.
wp_value
.
Qed
.
theories/tests/tactics.v
0 → 100644
View file @
115acf17
From
iris_logrel
.
F_mu_ref_conc
Require
Export
tactics
notation
.
Lemma
wp_rec1
`
{
heapG
Σ
}
Φ
:
▷
Φ
#
4
⊢
WP
(
λ
:
"y"
,
(
λ
:
"x"
,
"x"
+
#
3
)
"y"
)
#
1
{{
Φ
}}
.
Proof
.
iIntros
"Z"
.
wp_rec
.
wp_rec
.
wp_op
.
wp_value
.
Qed
.
Lemma
wp_proj2
`
{
heapG
Σ
}
Φ
:
▷
Φ
#
1
⊢
WP
Fst
(
Fst
(#
1
,#
2
,#
4
))
{{
Φ
}}
.
Proof
.
iIntros
"HΦ"
.
wp_proj
.
wp_proj
.
wp_value
.
Qed
.
theories/
logrel/proofmode/tactics
.v
→
theories/
tests/tactics2
.v
View file @
115acf17
From
iris
.
proofmode
Require
Import
coq_tactics
sel_patterns
.
From
iris_logrel
.
F_mu_ref_conc
Require
Export
tactics
.
From
iris_logrel
.
logrel
Require
Export
rules_threadpool
lang
reflection
proofmode
.
classes
logrel_binary
.
From
iris_logrel
.
logrel
Require
Export
rules_threadpool
proofmode
.
tactics_threadpool
logrel_binary
.
Set
Default
Proof
Using
"Type"
.
Import
lang
.
(
**************************
)
(
*
/
tp_apply
*
)
Section
test
.
Context
`
{
logrelG
Σ
}
.
Definition
bot
:=
App
(
TApp
(
TLam
(
Rec
"f"
"x"
(
App
(
Var
"f"
)
(
Var
"x"
)))))
Unit
.
Definition
bot
:=
App
(
TApp
(
TLam
(
Rec
"f"
"x"
(
App
(
Var
"f"
)
(
Var
"x"
)))))
#()
.
Notation
Lam
x
e
:=
(
Rec
BAnon
x
e
).
Notation
LamV
x
e
:=
(
RecV
BAnon
x
e
).
...
...
@@ -46,7 +43,7 @@ Qed.
Lemma
test1
E1
j
K
l
n
ρ
:
nclose
specN
⊆
E1
→
j
⤇
fill
K
(
App
(
Lam
"x"
(
Store
(
L
oc
l
)
(
BinOp
Add
(
Nat
1
)
(
Var
"x"
))))
(
Load
(
Loc
l
)))
-
∗
j
⤇
fill
K
(
App
(
Lam
"x"
(
Store
(
L
it
(
Loc
l
))
(
BinOp
Add
#
1
(
Var
"x"
))))
(
Load
(#
l
)))
-
∗
spec_ctx
ρ
-
∗
l
↦ₛ
(#
nv
n
)
={
E1
}=
∗
True
.
Proof
.
...
...
@@ -58,13 +55,13 @@ Proof.
done
.
Qed
.
Lemma
test2
E
j
K
l
n
ρ
:
Lemma
test2
E
j
K
(
l
:
loc
)
(
n
:
nat
)
ρ
:
nclose
specN
⊆
E
→
j
⤇
fill
K
(
Fork
(
Fork
(
App
(
If
(
CAS
(
Loc
l
)
(
Nat
n
)
(
Nat
(
n
+
1
)))
(
Lam
"x"
(
Fst
(
Var
"x"
)))
(
Lam
"x"
(
Snd
(
Var
"x"
))))
(
Pair
(
Nat
1
)
(
Nat
2
)))))
-
∗
(
App
(
If
(
CAS
(
#
l
)
(#
n
)
(#
(
n
+
1
)))
(
Lam
"x"
(
Fst
(
Var
"x"
)))
(
Lam
"x"
(
Snd
(
Var
"x"
))))
(
Pair
(
#
1
)
(#
2
)))))
-
∗
spec_ctx
ρ
-
∗
l
↦ₛ
(#
nv
n
)
={
E
}=
∗
∃
j
,
j
⤇
(#
n
1
).
Proof
.
...
...
@@ -86,15 +83,15 @@ End test.
Section
test2
.
Context
`
{
logrelG
Σ
}
.
(
*
TODO
:
Coq
complains
if
I
make
it
a
section
variable
*
)
Axiom
(
steps_release_test
:
forall
E
ρ
j
K
l
b
,
Axiom
(
steps_release_test
:
forall
E
ρ
j
K
(
l
:
loc
)
b
,
nclose
specN
⊆
E
→
spec_ctx
ρ
-
∗
l
↦ₛ
(#
♭
v
b
)
-
∗
j
⤇
fill
K
(
App
(
Lit
Unit
)
(
Loc
l
))
spec_ctx
ρ
-
∗
l
↦ₛ
(#
♭
v
b
)
-
∗
j
⤇
fill
K
(
App
(
#
tt
)
(#
l
))
={
E
}=
∗
j
⤇
fill
K
(
Lit
Unit
)
∗
l
↦ₛ
(#
♭
v
false
)).
Theorem
test_apply
E
ρ
j
b
K
l
:
nclose
specN
⊆
E
→
spec_ctx
ρ
-
∗
l
↦ₛ
(#
♭
v
b
)
-
∗
j
⤇
fill
K
(
App
(
Lit
Unit
)
(
Loc
l
))
l
↦ₛ
(#
♭
v
b
)
-
∗
j
⤇
fill
K
(
App
(
Lit
Unit
)
(
#
l
))
-
∗
|={
E
}=>
True
.
Proof
.
iIntros
(
?
)
"#Hs Hst Hj"
.
...
...
theories/
example
s/typetest.v
→
theories/
test
s/typetest.v
View file @
115acf17
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment