This project provides a Separation Logic framework for simple heap-manipulating programs verification. Inspired by CFML
To build this project tun
lake exe cache get; lake build
Theories/HProp.lean
: facts about heap-propositionsTheories/XSimp.lean
: implementation of anxsimp
tactic for heap entailment simplificationTheories/SepLog.lean
: Separation logic formalizationTheories/WP1.lean
: Weakest-Precondition formalizationExperiments/Misc.lean
: Some case studies
xsimp
: simplifies heap entailments. For instance,xsimp
turnsH1 ∗ H ∗ H2 ==> H3 ∗ H ∗ H4
intoH1 ∗ H2 ==> H3 ∗ H4
xstep
: does one step of symbolic execution. This tactic can have an optional argumenttriple_lemma
of type... -> { P }[ c ]{ Q }
. In this case, it will try advance the top-most instruction according totriple_lemma
xapp triple_lemma
: appliestriple_lemma
of type... -> { P }[ c ]{ Q }
. If first argument is omitted,xapp
will try to find a correspondent lemma in@[xapp]
hint databasexif
/xval
/xref
: tactics forif
,return
andref
statementsxfor
/xwhile
: tactics forfor
andwhile
loops
xsimp
tactic can be slow for big heap entailments- We only support
for
andwhile
loops. Recursion is not supported (yet) - We only support programs in an SSA-normal form