Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cfml
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Packages
Packages
Container Registry
Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
CHARGUERAUD Arthur
cfml
Commits
4f5d5505
Commit
4f5d5505
authored
May 16, 2017
by
charguer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup
parent
476aab04
Changes
9
Expand all
Hide whitespace changes
Inline
Sidebyside
Showing
9 changed files
with
220 additions
and
102 deletions
+220
102
model/Fmap.v
model/Fmap.v
+5
4
model/LambdaExamplesLifted.v
model/LambdaExamplesLifted.v
+0
0
model/LambdaSepCredits.v
model/LambdaSepCredits.v
+1
0
model/LambdaSepRO.v
model/LambdaSepRO.v
+1
0
model/Makefile
model/Makefile
+1
1
model/README.md
model/README.md
+67
36
model/SepFunctor.v
model/SepFunctor.v
+134
54
model/TLCbuffer.v
model/TLCbuffer.v
+10
5
model/export.sh
model/export.sh
+1
2
No files found.
model/Fmap.v
View file @
4f5d5505
...
...
@@ 108,7 +108,7 @@ End MapOps.
(
**
*
Finite
maps
*
)
(
*

*
)
(
**
Definitions
*
)
(
**
Definition
of
the
type
of
finite
map
s
*
)
Inductive
fmap
(
A
B
:
Type
)
:
Type
:=
fmap_make
{
fmap_data
:>
map
A
B
;
...
...
@@ 597,9 +597,10 @@ Section StateEq.
Variables
(
A
B
:
Type
).
Implicit
Types
h
:
fmap
A
B
.
(
**
[
fmap_eq
]
proves
equalities
between
unions
of
fmaps
.
(
**
[
fmap_eq
]
proves
equalities
between
unions
of
fmaps
,
of
the
form
[
h1
\
+
h2
\
+
h3
\
+
h4
=
h1
'
\
+
h2
'
\
+
h3
'
\
+
h4
'
]
It
attempts
to
discharge
the
disjointness
side

conditions
.
Disclaimer:
cancels
heaps
at
depth
up
to
4
,
but
no
more
.
*
)
Disclaimer:
it
cancels
heaps
at
depth
up
to
4
,
but
no
more
.
*
)
Lemma
fmap_union_eq_cancel_1
:
forall
h1
h2
h2
'
,
h2
=
h2
'
>
...
...
@@ 814,7 +815,7 @@ Qed.
(
*

*
)
(
**
**
Extension
of
a
finite
map
with
at
fresh
locations
*
)
(
**
**
Extension
of
a
number
of
consecutive
fresh
locations
*
)
Section
FmapFresh
.
Variables
(
B
:
Type
).
...
...
model/LambdaExamples
2
.v
→
model/LambdaExamples
Lifted
.v
View file @
4f5d5505
File moved
model/LambdaSepCredits.v
View file @
4f5d5505
...
...
@@ 448,6 +448,7 @@ End SepCreditsCore.
(
*
*
Properties
of
the
logic
*
)
Module
Export
SepCreditsSetup
:=
SepLogicSetup
SepCreditsCore
.
Module
Export
SepCreditsTactics
:=
SepLogicTactics
SepCreditsCore
.
(
*

*
)
...
...
model/LambdaSepRO.v
View file @
4f5d5505
...
...
@@ 590,6 +590,7 @@ End SepROCore.
(
*
*
Properties
of
the
logic
*
)
Module
Export
SepROSetup
:=
SepLogicSetup
SepROCore
.
Module
Export
SepROTactics
:=
SepLogicTactics
SepROCore
.
(
*

*
)
...
...
model/Makefile
View file @
4f5d5505
...
...
@@ 18,7 +18,7 @@ ifeq ($(ARTHUR),1)
# Fmap SepFunctor LambdaSemantics LambdaSep LambdaSepRO LambdaSepCredits LambdaCF LambdaCFCredits
# LambdaExamples
SRC
:=
Fmap SepFunctor MLSemantics MLSep MLSepLifted MLCF MLCFLifted MLExamples LambdaSemantics LambdaSep LambdaSepCredits LambdaSepRO LambdaCF LambdaExamples LambdaCFCredits
SRC
:=
TLCbuffer Fmap SepFunctor
LambdaSemantics LambdaSep LambdaCF LambdaStruct LambdaSepLifted LambdaCFLifted LambdaStructLifted LambdaExamples2
LambdaExamples
SRC
:=
TLCbuffer Fmap SepFunctor
SepTactics LambdaSemantics LambdaSep LambdaCF LambdaStruct LambdaSepLifted LambdaCFLifted LambdaStructLifted LambdaExamplesLifted
LambdaExamples
endif
PWD
:=
$(
shell
pwd
)
...
...
model/README.md
View file @
4f5d5505
# Models of Separation Logics for a simple imperative lambdacalculus
This archive contains definitions and proofs of soundness for several
simple
Separation Logics.
Separation Logics.
One such Separation Logic is equipped with readonly permissions,
as described in the paper
The plain Separation Logic defined here is as described in
Arthur Charguéraud's lecture notes, available from:
http://www.chargueraud.org/teach/verif/seplogic.pdf
The Separation Logic equipped with time credits is described in:
__
Verifying the correctness and amortized complexity of a unionfind
implementation in separation logic with time credits__
by Arthur Charguéraud and François Pottier
(this is a submitted journal article, extending an ITP 2015 article).
http://gallium.inria.fr/~fpottier/publis/chargueraudpottierufsltc.pdf
The Separation Logic equipped with readonly permissions is described in:
__Temporary ReadOnly Permissions for Separation Logic__
by Arthur Charguéraud and François Pottier
(ESOP 2017).
http://www.chargueraud.org/research/2017/readonlysep/readonlysep.pdf
Another Separation Logic is equipped with time credits,
as described in the paper
__
Verifying the Correctness and Amortized Complexity
of a UnionFind Implementation
in Separation Logic with Time Credits__
by Arthur Charguéraud and François Pottier
(in preparation).
Some aspects of these logics are shared, while some are duplicated.
Ideally, there should be less duplication; this is work in progress.
# Organisation of the subdirectories:
...
...
@@ 28,37 +30,66 @@ Ideally, there should be less duplication; this is work in progress.
*
The subdirectory __model__
contains definitions and proofs about Separation Logic.
*
The file __ModelState.v__
*
The file __TLCbuffer.v__
contains scripts to be later merged into TLC.
*
The file __Fmap.v__
defines a representation of finite maps, used to represent stores.
*
The file __ModelLambda.v__
*
The file __SepFunctor.v__
contains a functor with derived properties for Separation Logic.
*
The file __SepTactics.v__
contains a functor with tactics for Separation Logic operations.
*
The file __LambdaSemantics.v__
defines the syntax and semantics of an imperative lambdacalculus.
*
The file __ModelSepFunctor.v__
contains a functor for building derived properties
of a Separation Logic.
*
The file __LambdaSep.v__
defines a plain Separation Logic (and proves its soundness).
*
The file __LambdaSepCredits.v__
defines a Separation Logic with time credits.
*
The file __LambdaSepRO.v__
defines a Separation Logic with readonly permissions.
*
The file __LambdaSep.v__
defines a plain Separation Logic (and proves its soundness).
*
The file __LambdaCF.v__
defines characteristic formulae for plain Separation Logic.
*
The file __LambdaCFCredits.v__
defines characteristic formulae for Separation Logic with credits.
*
The file __LambdaSepLifted.v__
defines a plain Separation Logic with heap predicates and
triples lifted so as to directly manipulate logical values.
*
The file __LambdaCFLifted.v__
defines characteristic formulae for lifted Separation Logic.
*
The file __LambdaStruct.v__
defines specifications for basic derived operations, for records
and for arrays, for plain Separation Logic.
*
The file __LambdaStructLifted.v__
defines specifications for basic derived operations, for records
and for arrays, for lifted Separation Logic.
*
The file __ModelSepBasic.v__
instantiates the functor to derive
a plain Separation Logic,
and establishes the soundness of this logic.
*
The file __LambdaExamples.v__
gives examples of proofs in plain Separation Logic, both using
triples directly and using characteristic formulae.
*
The file __ModelSepCredits.v__
instantiates the functor to derive a
Separation Logic with Time Credits,
and establishes the soundness of this logic.
*
The file __LambdaExamplesLifted.v__
gives examples of proofs in lifted Separation Logic, using
lifted characteristic formulae.
*
The file __ModelSepRO.v__
instantiates the functor to derive a
Separation Logic with Temporary ReadOnly Permissions.
and establishes the soundness of this logic.
*
The file __ModelCF.v__
defines characteristic formulae for
plain Separation Logic and proves them sound.
# To play with the files:
*
The file __ModelCFCredits.v__
defines characteristic formulae for
Separation Logic with Time Credits
and proves them sound.
*
Type __make__ in the root folder.
*
Type __coqide R tlc TLC R model MODEL model/LambdaExamples.v__
from the root folder.
model/SepFunctor.v
View file @
4f5d5505
This diff is collapsed.
Click to expand it.
model/TLCbuffer.v
View file @
4f5d5505
(
**
This
file
contains
temporary
definitions
that
will
eventually
get
merged
into
the
various
files
from
the
TLC
library
.
Author:
Arthur
Chargu
é
raud
.
License:
MIT
.
*
)
Set
Implicit
Arguments
.
Require
Import
LibTactics
LibLogic
.
...
...
@@ 81,9 +91,6 @@ Lemma nat_int_eq : forall (x y:nat),
Proof
using
.
math
.
Qed
.
(
**
)
(
*
List
*
)
...
...
@@ 201,8 +208,6 @@ Notation "m `[ x := v ]" := (LibBag.update m x v)
(
at
level
28
,
format
"m `[ x := v ]"
,
left
associativity
).
(
**
)
(
*
ListExec
*
)
...
...
model/export.sh
View file @
4f5d5505
...
...
@@ 38,8 +38,7 @@ mkdir $ARCHIVE/TLC
echo
"Copying CFML/model..."
mkdir
$ARCHIVE
/model
if
[
!
z
${
ARTHUR
+x
}
]
;
then
FILES
=
"TLCbuffer Fmap SepFunctor LambdaSemantics LambdaSep LambdaCF LambdaStruct LambdaSepLifted LambdaCFLifted LambdaStructLifted LambdaExamples2 LambdaExamples"
# LambdaCFComplete LambdaSepRO LambdaSepCredits LambdaCFCredits MLSemantics MLSep MLSepLifted MLCF MLCFLifted MLExamples
FILES
=
"TLCbuffer Fmap SepFunctor SepTactics LambdaSemantics LambdaSep LambdaCF LambdaStruct LambdaSepLifted LambdaCFLifted LambdaStructLifted LambdaExamplesLifted LambdaExamples"
else
FILES
=
`
grep
v
e
"^ *#"
FILES
`
;
fi
...
...
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