Commit 4f5d5505 authored by charguer's avatar charguer

cleanup

parent 476aab04
......@@ -108,7 +108,7 @@ End MapOps.
(** * Finite maps *)
(* ---------------------------------------------------------------------- *)
(** Definitions *)
(** Definition of the type of finite maps *)
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).
......
......@@ -448,6 +448,7 @@ End SepCreditsCore.
(* * Properties of the logic *)
Module Export SepCreditsSetup := SepLogicSetup SepCreditsCore.
Module Export SepCreditsTactics := SepLogicTactics SepCreditsCore.
(* ---------------------------------------------------------------------- *)
......
......@@ -590,6 +590,7 @@ End SepROCore.
(* * Properties of the logic *)
Module Export SepROSetup := SepLogicSetup SepROCore.
Module Export SepROTactics := SepLogicTactics SepROCore.
(* ---------------------------------------------------------------------- *)
......
......@@ -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)
......
# Models of Separation Logics for a simple imperative lambda-calculus
This archive contains definitions and proofs of soundness for several
simple Separation Logics.
Separation Logics.
One such Separation Logic is equipped with read-only 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 union-find
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/chargueraud-pottier-uf-sltc.pdf
The Separation Logic equipped with read-only permissions is described in:
__Temporary Read-Only 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 Union-Find 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 lambda-calculus.
* 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 read-only 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 Read-Only 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.
This diff is collapsed.
(**
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 *)
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment