Splean
Separation Logic Proofs in Lean
Install / Use
/learn @verse-lab/SpleanREADME
SPLean: Separation Logic Proofs in Lean
This project provides a Separation Logic framework for simple heap-manipulating programs verification. Inspired by CFML
Building SPLean
To build this project tun
lake exe cache get; lake build
File Content
Theories/HProp.lean: facts about heap-propositionsTheories/XSimp.lean: implementation of anxsimptactic for heap entailment simplificationTheories/SepLog.lean: Separation logic formalizationTheories/WP1.lean: Weakest-Precondition formalizationExperiments/Misc.lean: Some case studies
Essential tactics
xsimp: simplifies heap entailments. For instance,xsimpturnsH1 ∗ H ∗ H2 ==> H3 ∗ H ∗ H4intoH1 ∗ H2 ==> H3 ∗ H4xstep: does one step of symbolic execution. This tactic can have an optional argumenttriple_lemmaof type... -> { P }[ c ]{ Q }. In this case, it will try advance the top-most instruction according totriple_lemmaxapp triple_lemma: appliestriple_lemmaof type... -> { P }[ c ]{ Q }. If first argument is omitted,xappwill try to find a correspondent lemma in@[xapp]hint databasexif/xval/xref: tactics forif,returnandrefstatementsxfor/xwhile: tactics forforandwhileloops
Limitations
xsimptactic can be slow for big heap entailments- We only support
forandwhileloops. Recursion is not supported (yet) - We only support programs in an SSA-normal form
