Skip to content

Commit be6feec

Browse files
1 parent ed2d7c6 commit be6feec

4 files changed

Lines changed: 30 additions & 34 deletions

File tree

refman/.buildinfo

Lines changed: 0 additions & 4 deletions
This file was deleted.

refman/_sources/tactics/skip.rst.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22
Tactic: `skip`
33
========================================================================
44

5-
The `skip` tactic applies to program-logic goals where the program(s) under
6-
consideration are empty. In this situation, program execution performs
7-
no computation and produces no state changes.
5+
The ``skip`` tactic applies to program-logic goals where the program(s)
6+
under consideration are empty. In this situation, program execution
7+
performs no computation and produces no state changes.
88

9-
Applying `skip` eliminates the program component of the goal and reduces
9+
Applying ``skip`` eliminates the program component of the goal and reduces
1010
the proof obligation to a pure logical goal. Concretely, the remaining
1111
task is to prove that the precondition implies the postcondition.
1212

13-
The `skip` tactic does not attempt to solve this logical obligation itself.
13+
The ``skip`` tactic does not attempt to solve this logical obligation itself.
1414

1515
.. contents::
1616
:local:
1717

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

2222
.. ecproof::
@@ -39,7 +39,7 @@ In Hoare logic
3939
abort.
4040

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

4545
In the relational Hoare logic setting, the `skip`` tactic applies only
@@ -66,14 +66,14 @@ judgment to obligations on the preconditions and postconditions alone.
6666
abort.
6767

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

72-
In the probabilistic Hoare logic setting, applying `skip` generates an
72+
In the probabilistic Hoare logic setting, applying ``skip`` generates an
7373
additional proof obligation compared to the pure Hoare case. Besides the
7474
logical implication between the precondition and the postcondition, one
7575
must also prove that the probability weight of the empty program, namely
76-
`1%r`, satisfies the bound specified in the judgment.
76+
``1%r``, satisfies the bound specified in the judgment.
7777

7878
.. ecproof::
7979
:title: Probabilistic Hoare logic example

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/skip.html

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@
4848
<ul class="current">
4949
<li class="toctree-l1 current"><a class="reference internal" href="../tactics.html">Proof tactics reference</a><ul class="current">
5050
<li class="toctree-l2 current"><a class="current reference internal" href="#">Tactic: <cite>skip</cite></a><ul>
51-
<li class="toctree-l3"><a class="reference internal" href="#in-hoare-logic">In Hoare logic</a></li>
52-
<li class="toctree-l3"><a class="reference internal" href="#in-relational-hoare-logic">In Relational Hoare logic</a></li>
53-
<li class="toctree-l3"><a class="reference internal" href="#in-probabilistic-hoare-logic">In Probabilistic Hoare logic</a></li>
51+
<li class="toctree-l3"><a class="reference internal" href="#variant-skip-hoare-logic">Variant: <code class="docutils literal notranslate"><span class="pre">skip</span></code> (Hoare logic)</a></li>
52+
<li class="toctree-l3"><a class="reference internal" href="#variant-skip-relational-hoare-logic">Variant: <code class="docutils literal notranslate"><span class="pre">skip</span></code> (Relational Hoare logic)</a></li>
53+
<li class="toctree-l3"><a class="reference internal" href="#variant-skip-probabilistic-hoare-logic">Variant: <code class="docutils literal notranslate"><span class="pre">skip</span></code> (Probabilistic Hoare logic)</a></li>
5454
</ul>
5555
</li>
5656
</ul>
@@ -84,30 +84,30 @@
8484

8585
<section id="tactic-skip">
8686
<h1>Tactic: <cite>skip</cite><a class="headerlink" href="#tactic-skip" title="Link to this heading"></a></h1>
87-
<p>The <cite>skip</cite> tactic applies to program-logic goals where the program(s) under
88-
consideration are empty. In this situation, program execution performs
89-
no computation and produces no state changes.</p>
90-
<p>Applying <cite>skip</cite> eliminates the program component of the goal and reduces
87+
<p>The <code class="docutils literal notranslate"><span class="pre">skip</span></code> tactic applies to program-logic goals where the program(s)
88+
under consideration are empty. In this situation, program execution
89+
performs no computation and produces no state changes.</p>
90+
<p>Applying <code class="docutils literal notranslate"><span class="pre">skip</span></code> eliminates the program component of the goal and reduces
9191
the proof obligation to a pure logical goal. Concretely, the remaining
9292
task is to prove that the precondition implies the postcondition.</p>
93-
<p>The <cite>skip</cite> tactic does not attempt to solve this logical obligation itself.</p>
93+
<p>The <code class="docutils literal notranslate"><span class="pre">skip</span></code> tactic does not attempt to solve this logical obligation itself.</p>
9494
<nav class="contents local" id="contents">
9595
<ul class="simple">
96-
<li><p><a class="reference internal" href="#in-hoare-logic" id="id1">In Hoare logic</a></p></li>
97-
<li><p><a class="reference internal" href="#in-relational-hoare-logic" id="id2">In Relational Hoare logic</a></p></li>
98-
<li><p><a class="reference internal" href="#in-probabilistic-hoare-logic" id="id3">In Probabilistic Hoare logic</a></p></li>
96+
<li><p><a class="reference internal" href="#variant-skip-hoare-logic" id="id1">Variant: <code class="docutils literal notranslate"><span class="pre">skip</span></code> (Hoare logic)</a></p></li>
97+
<li><p><a class="reference internal" href="#variant-skip-relational-hoare-logic" id="id2">Variant: <code class="docutils literal notranslate"><span class="pre">skip</span></code> (Relational Hoare logic)</a></p></li>
98+
<li><p><a class="reference internal" href="#variant-skip-probabilistic-hoare-logic" id="id3">Variant: <code class="docutils literal notranslate"><span class="pre">skip</span></code> (Probabilistic Hoare logic)</a></p></li>
9999
</ul>
100100
</nav>
101-
<section id="in-hoare-logic">
102-
<h2><a class="toc-backref" href="#id1" role="doc-backlink">In Hoare logic</a><a class="headerlink" href="#in-hoare-logic" title="Link to this heading"></a></h2>
101+
<section id="variant-skip-hoare-logic">
102+
<h2><a class="toc-backref" href="#id1" role="doc-backlink">Variant: <code class="docutils literal notranslate"><span class="pre">skip</span></code> (Hoare logic)</a><a class="headerlink" href="#variant-skip-hoare-logic" title="Link to this heading"></a></h2>
103103

104104
<div class="proofnav-sphinx">
105105
<div id="proofnav-0" class="proofnav-mount"></div>
106106
<script type="application/json" id="proofnav-0-data">{"source":"require import AllCore.\n\nmodule M = {\n proc f(x : int) = {\n return x;\n }\n}.\n\npred p : int.\npred q : int.\n\nlemma L : hoare[M.f : p x ==> q res].\nproof.\n proc. skip.\nabort.\n","sentenceEnds":[23,80,95,109,148,155,163,169,176],"sentences":[{"goals":[],"message":""},{"goals":[],"message":""},{"goals":[],"message":"info: added predicate p : int -> bool"},{"goals":[],"message":"info: added predicate q : int -> bool"},{"goals":["Type variables: <none>\n\n------------------------------------------------------------------------\npre = p arg\n\n M.f \n\npost = q res\n"],"message":""},{"goals":["Type variables: <none>\n\n------------------------------------------------------------------------\npre = p arg\n\n M.f \n\npost = q res\n"],"message":""},{"goals":["Type variables: <none>\n\n------------------------------------------------------------------------\nContext : hr: {x : int}\n\npre = p x\n\n\npost = q x\n"],"message":""},{"goals":["Type variables: <none>\n\n------------------------------------------------------------------------\nforall &hr, p x{hr} => q x{hr}\n"],"message":""},{"goals":[],"message":""}],"initialSentence":6,"title":"Hoare logic example"}</script>
107107
</div>
108108
</section>
109-
<section id="in-relational-hoare-logic">
110-
<h2><a class="toc-backref" href="#id2" role="doc-backlink">In Relational Hoare logic</a><a class="headerlink" href="#in-relational-hoare-logic" title="Link to this heading"></a></h2>
109+
<section id="variant-skip-relational-hoare-logic">
110+
<h2><a class="toc-backref" href="#id2" role="doc-backlink">Variant: <code class="docutils literal notranslate"><span class="pre">skip</span></code> (Relational Hoare logic)</a><a class="headerlink" href="#variant-skip-relational-hoare-logic" title="Link to this heading"></a></h2>
111111
<p>In the relational Hoare logic setting, the <cite>skip`</cite> tactic applies only
112112
when both programs are empty, in which case it reduces the relational
113113
judgment to obligations on the preconditions and postconditions alone.</p>
@@ -117,13 +117,13 @@ <h2><a class="toc-backref" href="#id2" role="doc-backlink">In Relational Hoare l
117117
<script type="application/json" id="proofnav-1-data">{"source":"require import AllCore.\n\nmodule M = {\n proc f(x : int) = {\n return x;\n }\n}.\n\npred p : int & int.\npred q : int & int.\n\nlemma L : equiv[M.f ~ M.f : p x{1} x{2} ==> q res{1} res{2}].\nproof.\n proc. skip.\nabort.\n","sentenceEnds":[23,80,101,121,184,191,199,205,212],"sentences":[{"goals":[],"message":""},{"goals":[],"message":""},{"goals":[],"message":"info: added predicate p : int -> int -> bool"},{"goals":[],"message":"info: added predicate q : int -> int -> bool"},{"goals":["Type variables: <none>\n\n------------------------------------------------------------------------\npre = p arg{1} arg{2}\n\n M.f ~ M.f \n\npost = q res{1} res{2}\n"],"message":""},{"goals":["Type variables: <none>\n\n------------------------------------------------------------------------\npre = p arg{1} arg{2}\n\n M.f ~ M.f \n\npost = q res{1} res{2}\n"],"message":""},{"goals":["Type variables: <none>\n\n------------------------------------------------------------------------\n&1 (left ) : {x : int} [programs are in sync]\n&2 (right) : {x : int}\n\npre = p x{1} x{2}\n\n\npost = q x{1} x{2}\n"],"message":""},{"goals":["Type variables: <none>\n\n------------------------------------------------------------------------\nforall &1 &2, p x{1} x{2} => q x{1} x{2}\n"],"message":""},{"goals":[],"message":""}],"initialSentence":6,"title":"Relational Hoare logic example"}</script>
118118
</div>
119119
</section>
120-
<section id="in-probabilistic-hoare-logic">
121-
<h2><a class="toc-backref" href="#id3" role="doc-backlink">In Probabilistic Hoare logic</a><a class="headerlink" href="#in-probabilistic-hoare-logic" title="Link to this heading"></a></h2>
122-
<p>In the probabilistic Hoare logic setting, applying <cite>skip</cite> generates an
120+
<section id="variant-skip-probabilistic-hoare-logic">
121+
<h2><a class="toc-backref" href="#id3" role="doc-backlink">Variant: <code class="docutils literal notranslate"><span class="pre">skip</span></code> (Probabilistic Hoare logic)</a><a class="headerlink" href="#variant-skip-probabilistic-hoare-logic" title="Link to this heading"></a></h2>
122+
<p>In the probabilistic Hoare logic setting, applying <code class="docutils literal notranslate"><span class="pre">skip</span></code> generates an
123123
additional proof obligation compared to the pure Hoare case. Besides the
124124
logical implication between the precondition and the postcondition, one
125125
must also prove that the probability weight of the empty program, namely
126-
<cite>1%r</cite>, satisfies the bound specified in the judgment.</p>
126+
<code class="docutils literal notranslate"><span class="pre">1%r</span></code>, satisfies the bound specified in the judgment.</p>
127127

128128
<div class="proofnav-sphinx">
129129
<div id="proofnav-2" class="proofnav-mount"></div>

0 commit comments

Comments
 (0)