Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joshua Yanovski
iris-coq
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/heap_lang/adequacy.v
View file @
60d82286
...
...
@@ -3,7 +3,7 @@ From iris.heap_lang Require Export lifting.
From
iris
.
algebra
Require
Import
auth
.
From
iris
.
heap_lang
Require
Import
proofmode
notation
.
From
iris
.
proofmode
Require
Import
tactics
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Class
heapPreG
Σ
:=
HeapPreG
{
heap_preG_iris
:>
invPreG
Σ
;
...
...
theories/heap_lang/lang.v
View file @
60d82286
...
...
@@ -2,7 +2,7 @@ From iris.program_logic Require Export ectx_language ectxi_language.
From
iris
.
algebra
Require
Export
ofe
.
From
iris
.
prelude
Require
Export
strings
.
From
iris
.
prelude
Require
Import
gmap
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Module
heap_lang
.
Open
Scope
Z_scope
.
...
...
theories/heap_lang/lib/assert.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
Import
tactics
.
From
iris
.
heap_lang
Require
Import
proofmode
notation
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Definition
assert
:
val
:=
λ
:
"v"
,
if
:
"v"
#()
then
#()
else
#
0
#
0.
(
*
#
0
#
0
is
unsafe
*
)
...
...
theories/heap_lang/lib/barrier/barrier.v
View file @
60d82286
From
iris
.
heap_lang
Require
Export
notation
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Definition
newbarrier
:
val
:=
λ
:
<>
,
ref
#
false
.
Definition
signal
:
val
:=
λ
:
"x"
,
"x"
<-
#
true
.
...
...
theories/heap_lang/lib/barrier/proof.v
View file @
60d82286
...
...
@@ -5,7 +5,7 @@ From iris.prelude Require Import functions.
From
iris
.
base_logic
Require
Import
big_op
lib
.
saved_prop
lib
.
sts
.
From
iris
.
heap_lang
Require
Import
proofmode
.
From
iris
.
heap_lang
.
lib
.
barrier
Require
Import
protocol
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
(
**
The
CMRAs
/
functors
we
need
.
*
)
(
*
Not
bundling
heapG
,
as
it
may
be
shared
with
other
users
.
*
)
...
...
theories/heap_lang/lib/barrier/protocol.v
View file @
60d82286
From
iris
.
algebra
Require
Export
sts
.
From
iris
.
base_logic
Require
Import
lib
.
own
.
From
iris
.
prelude
Require
Export
gmap
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
(
**
The
STS
describing
the
main
barrier
protocol
.
Every
state
has
an
index
-
set
associated
with
it
.
These
indices
are
actually
[
gname
],
because
we
use
them
...
...
theories/heap_lang/lib/barrier/specification.v
View file @
60d82286
...
...
@@ -2,11 +2,12 @@ From iris.program_logic Require Export hoare.
From
iris
.
heap_lang
.
lib
.
barrier
Require
Export
barrier
.
From
iris
.
heap_lang
.
lib
.
barrier
Require
Import
proof
.
From
iris
.
heap_lang
Require
Import
proofmode
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Import
uPred
.
Section
spec
.
Context
`
{!
heapG
Σ
}
`
{!
barrierG
Σ
}
.
Set
Default
Proof
Using
"Type*"
.
Context
`
{!
heapG
Σ
,
!
barrierG
Σ
}
.
Lemma
barrier_spec
(
N
:
namespace
)
:
∃
recv
send
:
loc
→
iProp
Σ
-
n
>
iProp
Σ
,
...
...
theories/heap_lang/lib/counter.v
View file @
60d82286
...
...
@@ -4,7 +4,7 @@ From iris.heap_lang Require Export lang.
From
iris
.
proofmode
Require
Import
tactics
.
From
iris
.
algebra
Require
Import
frac
auth
.
From
iris
.
heap_lang
Require
Import
proofmode
notation
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Definition
newcounter
:
val
:=
λ
:
<>
,
ref
#
0.
Definition
incr
:
val
:=
rec
:
"incr"
"l"
:=
...
...
theories/heap_lang/lib/lock.v
View file @
60d82286
From
iris
.
heap_lang
Require
Export
lifting
notation
.
From
iris
.
base_logic
.
lib
Require
Export
invariants
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Structure
lock
Σ
`
{!
heapG
Σ
}
:=
Lock
{
(
*
--
operations
--
*
)
...
...
theories/heap_lang/lib/par.v
View file @
60d82286
From
iris
.
heap_lang
Require
Export
spawn
.
From
iris
.
heap_lang
Require
Import
proofmode
notation
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Import
uPred
.
Definition
parN
:
namespace
:=
nroot
.
@
"par"
.
...
...
@@ -14,6 +14,7 @@ Definition par : val :=
Notation
"e1 ||| e2"
:=
(
par
(
Pair
(
λ
:
<>
,
e1
)
(
λ
:
<>
,
e2
)))
%
E
:
expr_scope
.
Section
proof
.
Set
Default
Proof
Using
"Type*"
.
Context
`
{!
heapG
Σ
,
!
spawnG
Σ
}
.
(
*
Notice
that
this
allows
us
to
strip
a
later
*
after
*
the
two
Ψ
have
been
...
...
theories/heap_lang/lib/spawn.v
View file @
60d82286
...
...
@@ -4,7 +4,7 @@ From iris.heap_lang Require Export lang.
From
iris
.
proofmode
Require
Import
tactics
.
From
iris
.
heap_lang
Require
Import
proofmode
notation
.
From
iris
.
algebra
Require
Import
excl
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Definition
spawn
:
val
:=
λ
:
"f"
,
...
...
theories/heap_lang/lib/spin_lock.v
View file @
60d82286
...
...
@@ -4,7 +4,7 @@ From iris.proofmode Require Import tactics.
From
iris
.
heap_lang
Require
Import
proofmode
notation
.
From
iris
.
algebra
Require
Import
excl
.
From
iris
.
heap_lang
.
lib
Require
Import
lock
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Definition
newlock
:
val
:=
λ
:
<>
,
ref
#
false
.
Definition
try_acquire
:
val
:=
λ
:
"l"
,
CAS
"l"
#
false
#
true
.
...
...
theories/heap_lang/lib/ticket_lock.v
View file @
60d82286
...
...
@@ -4,7 +4,7 @@ From iris.proofmode Require Import tactics.
From
iris
.
heap_lang
Require
Import
proofmode
notation
.
From
iris
.
algebra
Require
Import
auth
gset
.
From
iris
.
heap_lang
.
lib
Require
Export
lock
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Import
uPred
.
Definition
wait_loop
:
val
:=
...
...
theories/heap_lang/lifting.v
View file @
60d82286
...
...
@@ -5,7 +5,7 @@ From iris.heap_lang Require Export lang.
From
iris
.
heap_lang
Require
Import
tactics
.
From
iris
.
proofmode
Require
Import
tactics
.
From
iris
.
prelude
Require
Import
fin_maps
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Import
uPred
.
(
**
Basic
rules
for
language
operations
.
*
)
...
...
theories/heap_lang/notation.v
View file @
60d82286
From
iris
.
program_logic
Require
Import
language
.
From
iris
.
heap_lang
Require
Export
lang
tactics
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Coercion
LitInt
:
Z
>->
base_lit
.
Coercion
LitBool
:
bool
>->
base_lit
.
...
...
theories/heap_lang/proofmode.v
View file @
60d82286
...
...
@@ -2,7 +2,7 @@ From iris.program_logic Require Export weakestpre.
From
iris
.
proofmode
Require
Import
coq_tactics
.
From
iris
.
proofmode
Require
Export
tactics
.
From
iris
.
heap_lang
Require
Export
tactics
lifting
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Import
uPred
.
(
**
wp
-
specific
helper
tactics
*
)
...
...
theories/heap_lang/tactics.v
View file @
60d82286
From
iris
.
heap_lang
Require
Export
lang
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Import
heap_lang
.
(
**
We
define
an
alternative
representation
of
expressions
in
which
the
...
...
theories/proofmode/class_instances.v
View file @
60d82286
...
...
@@ -2,7 +2,7 @@ From iris.proofmode Require Export classes.
From
iris
.
algebra
Require
Import
gmap
.
From
iris
.
prelude
Require
Import
gmultiset
.
From
iris
.
base_logic
Require
Import
big_op
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Import
uPred
.
Section
classes
.
...
...
theories/proofmode/classes.v
View file @
60d82286
From
iris
.
base_logic
Require
Export
base_logic
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Import
uPred
.
Section
classes
.
...
...
theories/proofmode/coq_tactics.v
View file @
60d82286
...
...
@@ -2,7 +2,7 @@ From iris.base_logic Require Export base_logic.
From
iris
.
base_logic
Require
Import
big_op
tactics
.
From
iris
.
proofmode
Require
Export
environments
classes
.
From
iris
.
prelude
Require
Import
stringmap
hlist
.
Set
Default
Proof
Using
"Type
*
"
.
Set
Default
Proof
Using
"Type"
.
Import
uPred
.
Import
env_notations
.
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment