Skip to content

Commit c0ce834

Browse files
1 parent 68f5a65 commit c0ce834

9 files changed

Lines changed: 79 additions & 37 deletions

File tree

refman/_sources/tactics/skip.rst.txt

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The ``skip`` tactic does not attempt to solve this logical obligation itself.
1616
:local:
1717

1818
------------------------------------------------------------------------
19-
Variant: ``skip`` (Hoare logic)
19+
Variant: ``skip`` (HL)
2020
------------------------------------------------------------------------
2121

2222
.. ecproof::
@@ -39,15 +39,15 @@ Variant: ``skip`` (Hoare logic)
3939
abort.
4040

4141
------------------------------------------------------------------------
42-
Variant: ``skip`` (Relational Probabilistic Hoare logic)
42+
Variant: ``skip`` (pRHL)
4343
------------------------------------------------------------------------
4444

4545
In the relational Hoare logic setting, the `skip`` tactic applies only
4646
when both programs are empty, in which case it reduces the relational
4747
judgment to obligations on the preconditions and postconditions alone.
4848

4949
.. ecproof::
50-
:title: Relational Hoare logic example
50+
:title: Probabilistic Relational Hoare logic example
5151

5252
require import AllCore.
5353

@@ -66,7 +66,7 @@ judgment to obligations on the preconditions and postconditions alone.
6666
abort.
6767

6868
------------------------------------------------------------------------
69-
Variant: ``skip`` (Probabilistic Hoare logic)
69+
Variant: ``skip`` (pHL)
7070
------------------------------------------------------------------------
7171

7272
In the probabilistic Hoare logic setting, applying ``skip`` generates an
@@ -93,3 +93,31 @@ must also prove that the probability weight of the empty program, namely
9393
proof.
9494
proc. (*$*) skip.
9595
abort.
96+
97+
------------------------------------------------------------------------
98+
Variant: ``skip`` (eHL)
99+
------------------------------------------------------------------------
100+
101+
In expectation Hoare logic, where the precondition and postcondition are
102+
respectively a pre-expectation and a post-expectation, applying skip generates
103+
the obligation to prove that the post-expectation is bounded above by the
104+
pre-expectation.
105+
106+
.. ecproof::
107+
:title: Expectation Hoare logic example
108+
109+
require import AllCore Xreal.
110+
111+
module M = {
112+
proc f(x : int) = {
113+
return x;
114+
}
115+
}.
116+
117+
op p : int -> xreal.
118+
op q : int -> xreal.
119+
120+
lemma L : ehoare[M.f : p x ==> q res].
121+
proof.
122+
proc. (*$*) skip.
123+
abort.

refman/_static/proofnav/proofnav.bundle.js

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

refman/_static/proofnav/proofnav.bundle.js.map

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

refman/genindex.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<script src="_static/documentation_options.js?v=5929fcd5"></script>
1818
<script src="_static/doctools.js?v=9bcbadda"></script>
1919
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
20-
<script defer="defer" src="_static/proofnav/proofnav.bundle.js?v=5e5ff161"></script>
20+
<script defer="defer" src="_static/proofnav/proofnav.bundle.js?v=3ab35e3c"></script>
2121
<script src="_static/design-tabs.js?v=f930bc37"></script>
2222
<script src="_static/js/theme.js"></script>
2323
<link rel="index" title="Index" href="#" />

refman/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<script src="_static/documentation_options.js?v=5929fcd5"></script>
1919
<script src="_static/doctools.js?v=9bcbadda"></script>
2020
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
21-
<script defer="defer" src="_static/proofnav/proofnav.bundle.js?v=5e5ff161"></script>
21+
<script defer="defer" src="_static/proofnav/proofnav.bundle.js?v=3ab35e3c"></script>
2222
<script src="_static/design-tabs.js?v=f930bc37"></script>
2323
<script src="_static/js/theme.js"></script>
2424
<link rel="index" title="Index" href="genindex.html" />

refman/search.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<script src="_static/documentation_options.js?v=5929fcd5"></script>
1919
<script src="_static/doctools.js?v=9bcbadda"></script>
2020
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
21-
<script defer="defer" src="_static/proofnav/proofnav.bundle.js?v=5e5ff161"></script>
21+
<script defer="defer" src="_static/proofnav/proofnav.bundle.js?v=3ab35e3c"></script>
2222
<script src="_static/design-tabs.js?v=f930bc37"></script>
2323
<script src="_static/js/theme.js"></script>
2424
<script src="_static/searchtools.js"></script>

refman/searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

refman/tactics.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<script src="_static/documentation_options.js?v=5929fcd5"></script>
1919
<script src="_static/doctools.js?v=9bcbadda"></script>
2020
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
21-
<script defer="defer" src="_static/proofnav/proofnav.bundle.js?v=5e5ff161"></script>
21+
<script defer="defer" src="_static/proofnav/proofnav.bundle.js?v=3ab35e3c"></script>
2222
<script src="_static/design-tabs.js?v=f930bc37"></script>
2323
<script src="_static/js/theme.js"></script>
2424
<link rel="index" title="Index" href="genindex.html" />

0 commit comments

Comments
 (0)