Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jonas Kastberg
iris
Commits
60d82286
Commit
60d82286
authored
Jan 05, 2017
by
Ralf Jung
Browse files
more restrictive Proof Using hints in heap_lang, proofmode, tests
parent
6db2ae8e
Changes
35
Hide whitespace changes
Inline
Side-by-side
theories/proofmode/environments.v
View file @
60d82286
...
...
@@ -2,7 +2,7 @@ From iris.prelude Require Export strings.
From
iris
.
proofmode
Require
Import
strings
.
From
iris
.
algebra
Require
Export
base
.
From
iris
.
prelude
Require
Import
stringmap
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Inductive
env
(
A
:
Type
)
:
Type
:
=
|
Enil
:
env
A
...
...
theories/proofmode/intro_patterns.v
View file @
60d82286
From
iris
.
prelude
Require
Export
strings
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Inductive
intro_pat
:
=
|
IName
:
string
→
intro_pat
...
...
theories/proofmode/notation.v
View file @
60d82286
From
iris
.
proofmode
Require
Import
coq_tactics
environments
.
From
iris
.
prelude
Require
Export
strings
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Delimit
Scope
proof_scope
with
env
.
Arguments
Envs
_
_
%
proof_scope
_
%
proof_scope
.
...
...
theories/proofmode/sel_patterns.v
View file @
60d82286
From
iris
.
prelude
Require
Export
strings
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Inductive
sel_pat
:
=
|
SelPure
...
...
theories/proofmode/spec_patterns.v
View file @
60d82286
From
iris
.
prelude
Require
Export
strings
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Record
spec_goal
:
=
SpecGoal
{
spec_goal_modal
:
bool
;
...
...
theories/proofmode/strings.v
View file @
60d82286
From
iris
.
prelude
Require
Import
strings
.
From
iris
.
algebra
Require
Import
base
.
From
Coq
Require
Import
Ascii
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Local
Notation
"b1 && b2"
:
=
(
if
b1
then
b2
else
false
)
:
bool_scope
.
...
...
theories/proofmode/tactics.v
View file @
60d82286
...
...
@@ -5,7 +5,7 @@ From iris.proofmode Require Export classes notation.
From
iris
.
proofmode
Require
Import
class_instances
.
From
iris
.
prelude
Require
Import
stringmap
hlist
.
From
iris
.
proofmode
Require
Import
strings
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Declare
Reduction
env_cbv
:
=
cbv
[
beq
ascii_beq
string_beq
...
...
theories/tests/barrier_client.v
View file @
60d82286
...
...
@@ -3,7 +3,7 @@ From iris.heap_lang Require Export lang.
From
iris
.
heap_lang
.
lib
.
barrier
Require
Import
proof
.
From
iris
.
heap_lang
Require
Import
par
.
From
iris
.
heap_lang
Require
Import
adequacy
proofmode
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Definition
worker
(
n
:
Z
)
:
val
:
=
λ
:
"b"
"y"
,
wait
"b"
;;
!
"y"
#
n
.
...
...
@@ -14,9 +14,10 @@ Definition client : expr :=
(
worker
12
"b"
"y"
|||
worker
17
"b"
"y"
).
Section
client
.
Set
Default
Proof
Using
"Type*"
.
Context
`
{!
heapG
Σ
,
!
barrierG
Σ
,
!
spawnG
Σ
}.
Local
Definition
N
:
=
nroot
.@
"barrier"
.
Definition
N
:
=
nroot
.@
"barrier"
.
Definition
y_inv
(
q
:
Qp
)
(
l
:
loc
)
:
iProp
Σ
:
=
(
∃
f
:
val
,
l
↦
{
q
}
f
∗
□
∀
n
:
Z
,
WP
f
#
n
{{
v
,
⌜
v
=
#(
n
+
42
)
⌝
}})%
I
.
...
...
theories/tests/counter.v
View file @
60d82286
...
...
@@ -8,7 +8,7 @@ From iris.heap_lang Require Export lang.
From
iris
.
program_logic
Require
Export
hoare
.
From
iris
.
proofmode
Require
Import
tactics
.
From
iris
.
heap_lang
Require
Import
proofmode
notation
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Import
uPred
.
Definition
newcounter
:
val
:
=
λ
:
<>,
ref
#
0
.
...
...
theories/tests/heap_lang.v
View file @
60d82286
...
...
@@ -3,7 +3,7 @@ From iris.program_logic Require Export weakestpre hoare.
From
iris
.
heap_lang
Require
Export
lang
.
From
iris
.
heap_lang
Require
Import
adequacy
.
From
iris
.
heap_lang
Require
Import
proofmode
notation
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Section
LiftingTests
.
Context
`
{
heapG
Σ
}.
...
...
theories/tests/joining_existentials.v
View file @
60d82286
...
...
@@ -4,7 +4,7 @@ From iris.algebra Require Import excl agree csum.
From
iris
.
heap_lang
.
lib
.
barrier
Require
Import
proof
specification
.
From
iris
.
heap_lang
Require
Import
notation
par
proofmode
.
From
iris
.
proofmode
Require
Import
tactics
.
Set
Default
Proof
Using
"
All
"
.
Set
Default
Proof
Using
"
Type
"
.
Definition
one_shotR
(
Σ
:
gFunctors
)
(
F
:
cFunctor
)
:
=
csumR
(
exclR
unitC
)
(
agreeR
$
laterC
$
F
(
iPreProp
Σ
)).
...
...
@@ -24,6 +24,7 @@ Definition client eM eW1 eW2 : expr :=
(
eM
;;
signal
"b"
)
|||
((
wait
"b"
;;
eW1
)
|||
(
wait
"b"
;;
eW2
)).
Section
proof
.
Set
Default
Proof
Using
"Type*"
.
Context
`
{!
heapG
Σ
,
!
barrierG
Σ
,
!
spawnG
Σ
,
!
oneShotG
Σ
F
}.
Context
(
N
:
namespace
).
Local
Notation
X
:
=
(
F
(
iProp
Σ
)).
...
...
@@ -71,7 +72,7 @@ Lemma client_spec_new eM eW1 eW2 `{!Closed [] eM, !Closed [] eW1, !Closed [] eW2
(
∀
x
,
{{
Φ
1
x
}}
eW1
{{
_
,
Ψ
1
x
}})
-
∗
(
∀
x
,
{{
Φ
2
x
}}
eW2
{{
_
,
Ψ
2
x
}})
-
∗
WP
client
eM
eW1
eW2
{{
_
,
∃
γ
,
barrier_res
γ
Ψ
}}.
Proof
.
Proof
using
All
.
iIntros
"/= HP #He #He1 #He2"
;
rewrite
/
client
.
iMod
(
own_alloc
(
Pending
:
one_shotR
Σ
F
))
as
(
γ
)
"Hγ"
;
first
done
.
wp_apply
(
newbarrier_spec
N
(
barrier_res
γ
Φ
))
;
auto
.
...
...
theories/tests/list_reverse.v
View file @
60d82286
...
...
@@ -3,7 +3,7 @@ From iris.program_logic Require Export weakestpre hoare.
From
iris
.
heap_lang
Require
Export
lang
.
From
iris
.
proofmode
Require
Export
tactics
.
From
iris
.
heap_lang
Require
Import
proofmode
notation
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Section
list_reverse
.
Context
`
{!
heapG
Σ
}.
...
...
theories/tests/one_shot.v
View file @
60d82286
...
...
@@ -3,7 +3,7 @@ From iris.heap_lang Require Export lang.
From
iris
.
algebra
Require
Import
excl
agree
csum
.
From
iris
.
heap_lang
Require
Import
assert
proofmode
notation
.
From
iris
.
proofmode
Require
Import
tactics
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Definition
one_shot_example
:
val
:
=
λ
:
<>,
let
:
"x"
:
=
ref
NONE
in
(
...
...
@@ -30,6 +30,7 @@ Instance subG_one_shotΣ {Σ} : subG one_shotΣ Σ → one_shotG Σ.
Proof
.
intros
[?%
subG_inG
_
]%
subG_inv
.
split
;
apply
_
.
Qed
.
Section
proof
.
Set
Default
Proof
Using
"Type*"
.
Context
`
{!
heapG
Σ
,
!
one_shotG
Σ
}.
Definition
one_shot_inv
(
γ
:
gname
)
(
l
:
loc
)
:
iProp
Σ
:
=
...
...
theories/tests/proofmode.v
View file @
60d82286
From
iris
.
proofmode
Require
Import
tactics
.
From
iris
.
base_logic
.
lib
Require
Import
invariants
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Lemma
demo_0
{
M
:
ucmraT
}
(
P
Q
:
uPred
M
)
:
□
(
P
∨
Q
)
-
∗
(
∀
x
,
⌜
x
=
0
⌝
∨
⌜
x
=
1
⌝
)
→
(
Q
∨
P
).
...
...
theories/tests/tree_sum.v
View file @
60d82286
...
...
@@ -2,7 +2,7 @@ From iris.program_logic Require Export weakestpre.
From
iris
.
heap_lang
Require
Export
lang
.
From
iris
.
proofmode
Require
Export
tactics
.
From
iris
.
heap_lang
Require
Import
proofmode
notation
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Inductive
tree
:
=
|
leaf
:
Z
→
tree
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
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