From e7876272b65140721f6f832769e16757e6713de0 Mon Sep 17 00:00:00 2001 From: reututy Date: Fri, 4 May 2018 13:09:22 +0300 Subject: [PATCH] . --- docs/source/example-hot-cold.rst | 3 --- docs/source/index.rst | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/source/example-hot-cold.rst b/docs/source/example-hot-cold.rst index 8824977e..7364c9ad 100644 --- a/docs/source/example-hot-cold.rst +++ b/docs/source/example-hot-cold.rst @@ -9,7 +9,6 @@ This program models a system that fills a bath with six parts water: three cold, .. literalinclude:: Examples_code/HC_listing1.js :linenos: :language: javascript - ``Listing 1. A naive implementation of bath-filling controller.`` The code in Listing 1 is not incorrect, but it also does not use the power of behavioral programming: it leaves no decision room for the event selection mechanism. Thus, when read as a specification, it is over-restrictive. An improved b-program is shown at Listing 2. @@ -17,7 +16,6 @@ The code in Listing 1 is not incorrect, but it also does not use the power of be .. literalinclude:: Examples_code/HC_listing2.js :linenos: :language: javascript - ``Listing 2. A more lenient version of the bath-filling controller.`` The code in Listing 2 consists of two b-threads: add-hot, which adds the hot water, and add-cold, hich adds the cold water. This improves on the previous version in a number of ways. First, any order in which the water parts are added is supported, as the event selection mechanism of the b-program @@ -28,7 +26,6 @@ To prevent these unbalanced scenarios, we can add an additional b-thread, that w .. literalinclude:: Examples_code/HC_listing3.js :linenos: :language: javascript - ``Listing 3. A b-thread that ensures safe water temperature by ensuring cold water are added before hot water are.`` As a useful exercise, we invite the reader to further elaborate the hot-cold example, e.g. by upporting the insertion of the baby while filling the bath (which would require blocking of the BABY_IN event when the water temperature is too high), or by altering control-temp to be more permissive. diff --git a/docs/source/index.rst b/docs/source/index.rst index df401b41..2bd8c312 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -34,7 +34,7 @@ Topics: extendBPjs/index glossary examples - + Indices and tables