lh-l4v/lib/Monads
Gerwin Klein 12c9c2bc21
lib: apply consistent style to OptionMonad
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-02-06 09:57:37 +11:00
..
wp lib/monads: move Datatype_Schematic into wp 2023-01-24 11:30:05 +11:00
Fun_Pred_Syntax.thy lib: move more monad thys into Monads directory 2023-01-24 11:30:05 +11:00
Less_Monad_Syntax.thy lib+READMEs: rename Monad_WP to Monads 2023-01-24 11:30:05 +11:00
MonadEq.thy lib: introduce Monads session 2023-01-24 11:30:05 +11:00
MonadEq_Lemmas.thy lib: introduce Monads session 2023-01-24 11:30:05 +11:00
Monad_Equations.thy lib+refine: eliminate select_singleton_is_return 2023-01-25 11:48:38 +11:00
Monad_Lib.thy lib+crefine: zipWith lemma [simp] consolidation 2023-01-25 10:19:41 +11:00
More_NonDetMonadVCG.thy lib+proof+autocorres: consolidate when[E]/unless[E]_wp naming 2023-01-25 11:48:39 +11:00
No_Fail.thy lib: move more monad thys into Monads directory 2023-01-24 11:30:05 +11:00
No_Throw.thy lib: move more monad thys into Monads directory 2023-01-24 11:30:05 +11:00
NonDetMonad.thy lib+READMEs: rename Monad_WP to Monads 2023-01-24 11:30:05 +11:00
NonDetMonadLemmas.thy lib+READMEs: rename Monad_WP to Monads 2023-01-24 11:30:05 +11:00
NonDetMonadVCG.thy lib+ainvs+aarch64 ainvs: cleanup + move lemmas into lib 2023-02-06 09:56:37 +11:00
OptionMonad.thy lib: apply consistent style to OptionMonad 2023-02-06 09:57:37 +11:00
OptionMonadND.thy lib+READMEs: rename Monad_WP to Monads 2023-01-24 11:30:05 +11:00
OptionMonadWP.thy lib+READMEs: rename Monad_WP to Monads 2023-01-24 11:30:05 +11:00
README.md lib: README.md files for the new sessions 2023-01-25 11:49:59 +11:00
ROOT lib+autocorres: remove last AutoCorres Lib dependency 2023-01-25 10:19:03 +11:00
Strengthen.thy lib+READMEs: rename Monad_WP to Monads 2023-01-24 11:30:05 +11:00
Strengthen_Demo.thy lib+READMEs: rename Monad_WP to Monads 2023-01-24 11:30:05 +11:00
TraceMonad.thy lib+READMEs: rename Monad_WP to Monads 2023-01-24 11:30:05 +11:00
TraceMonadLemmas.thy lib+READMEs: rename Monad_WP to Monads 2023-01-24 11:30:05 +11:00
TraceMonadVCG.thy lib+proof+autocorres: consolidate when[E]/unless[E]_wp naming 2023-01-25 11:48:39 +11:00
WhileLoopRules.thy lib+READMEs: rename Monad_WP to Monads 2023-01-24 11:30:05 +11:00
WhileLoopRulesCompleteness.thy lib+READMEs: rename Monad_WP to Monads 2023-01-24 11:30:05 +11:00
tests.xml lib: introduce Monads session 2023-01-24 11:30:05 +11:00

README.md

Monad Definitions and Tactics

This session contains definitions of various monads useful in [AutoCorres] and the seL4 verification for the verification of C programs.

In particular, this session defines:

  • a nondeterministic state monad with failure to express stateful computation. There is a variation of this monad that also allows computation with exceptions (throw/catch).

  • a reader option monad to express computation that can depend on state and can fail, but does not change state. It can also be used to express projections from the state in preconditions and other state assertions.

  • a trace monad that stores a set of traces for expressing concurrent computation.

  • for each of these monads, weakest-precondition lemmas and corresponding tool setup.

  • for the nondeterministic state monad, additional concepts such as wellformedness with respect to failure (empty_fail), absence of failure (no_fail), absence of exceptions (no_throw). See the respective theories for more details.

The directory wp/ contains proof methods to reason about these monads in weakest-precondition style.