Revision | 6c315c60604e5cd197eaf65997acb7ef94916299 (tree) |
---|---|
Time | 2022-10-01 02:57:47 |
Author | Albert Mietus < albert AT mietus DOT nl > |
Commiter | Albert Mietus < albert AT mietus DOT nl > |
AsIs
@@ -318,8 +318,10 @@ | ||
318 | 318 | So lets give a quick overview. And recall, the term ‘process’ is pretty general: it denotes on the ‘behaviour of a |
319 | 319 | system’, not the more limited practice most software-developers use. |
320 | 320 | |
321 | -Traditional ones | |
322 | ----------------- | |
321 | +.. include:: CCC-sidebar-calc-demo.irst | |
322 | + | |
323 | +Mathematical models | |
324 | +------------------- | |
323 | 325 | |
324 | 326 | Many Process-Calculus_\es are invented around 1980. As often, those traditional ones focus on the issues that where actual |
325 | 327 | back them. And although the are still useful, they might be unaware of moderen aspects of computing -- like huge code |
@@ -343,12 +345,11 @@ | ||
343 | 345 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
344 | 346 | |
345 | 347 | CSP_ is probably the best known *formal* language to describe (patterns in) concurrent systems. I started in 1978 as a |
346 | -kind of programming language, and has evolved since them. Occam_ --the language to program the one famous Transputer_-- | |
348 | +kind of programming language, and has evolved since them. Occam_ --the language to program the once famous Transputer_-- | |
347 | 349 | is based on CSP_. |
348 | 350 | |
349 | 351 | Also ‘Go_’ (the language) is influenced by CSP_. A sign the CSP_ isn’t to old. |
350 | 352 | |
351 | - | |
352 | 353 | Calculus of Communicating Systems |
353 | 354 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
354 | 355 |
@@ -364,7 +365,26 @@ | ||
364 | 365 | processes -- and prove the are the same (or nor). And look for patterns that should not (never) happen; like deadlocks_ |
365 | 366 | and livelocks_. |
366 | 367 | |
368 | +I like this algebra aspect, as we can use inside some Castle-Tool. | |
367 | 369 | |
370 | +Π-calculus | |
371 | +~~~~~~~~~~ | |
372 | + | |
373 | +Pi-Calculus_ is a more recent (1992) addition to the family of Process-Calculus_\es. It allow some dynamic behaviour; | |
374 | +like transmitting the names of channel -- which facilitates the grow & reconfiguration of the network during execution. | |
375 | +|BR| | |
376 | +That expect, by example is needed for the :ref:`standard-Sieve` example. | |
377 | +|BR| | |
378 | +It also show some of the shortcoming of “traditional” models, as hinted above. | |
379 | + | |
380 | +As it is a small (but expressive) “language”, that resembles λ-calculus a bit, it has some omissions too: no numbers, | |
381 | +no functions, not even an `if-statement` (all quite fundamental for a programming language). It is bases on **names**, | |
382 | +which mirrors both *variables* and *channels*. | |
383 | + | |
384 | +Actor Models | |
385 | +------------ | |
386 | + | |
387 | +Calculus-vs-Actors_ | |
368 | 388 | |
369 | 389 | ---------- |
370 | 390 |
@@ -442,3 +462,5 @@ | ||
442 | 462 | .. _CCS: https://en.wikipedia.org/wiki/Calculus_of_communicating_systems |
443 | 463 | .. _ACP: https://en.wikipedia.org/wiki/Algebra_of_communicating_processes |
444 | 464 | .. _Petri-Net: https://en.wikipedia.org/wiki/Petri_net |
465 | +.. _Calculus-vs-Actors: https://en.wikipedia.org/wiki/Actor_model_and_process_calculi | |
466 | +.. _Pi-Calculus: https://en.wikipedia.org/wiki/Π-calculus |
@@ -0,0 +1,48 @@ | ||
1 | +.. -*-rst-*- | |
2 | + included in `8.BusyCores-concepts.rst` | |
3 | + | |
4 | +.. sidebar:: Some examples/Demo's | |
5 | + | |
6 | + .. tabs:: | |
7 | + | |
8 | + .. tab:: Petri Net | |
9 | + | |
10 | + .. figure:: Wikipedia-PetriNet.gif | |
11 | + | |
12 | + A trivail PetriNet; image by `Wikipedia <https://commons.wikimedia.org/wiki/File:Animated_Petri_net_commons.gif>`__ | |
13 | + | |
14 | + .. tab:: ACP | |
15 | + | |
16 | + .. rubric:: Basic rules | |
17 | + | |
18 | + .. math:: | |
19 | + | |
20 | + x + y &=& y + x | |
21 | + | |
22 | + (x+y)+z&=& x+(y+z) | |
23 | + | |
24 | + x+x&=&x | |
25 | + | |
26 | + (x+y)\cdot z &=& (x\cdot z) + (y\cdot z) | |
27 | + | |
28 | + (x \cdot y)\cdot z &=& x \cdot (y \cdot z) | |
29 | + | |
30 | + .. rubric:: Deadlock | |
31 | + | |
32 | + .. math:: | |
33 | + | |
34 | + \delta + x &=& x | |
35 | + | |
36 | + \delta \cdot x &=& \delta | |
37 | + | |
38 | + All formulas from `wikipedia <https://en.wikipedia.org/wiki/Algebra_of_communicating_processes>`__ | |
39 | + | |
40 | + .. tab:: Π-calculus | |
41 | + | |
42 | + .. rubric:: Creation of a name | |
43 | + | |
44 | + Create the *name* ``x`` that acts as a (new) communication channel. This is done *process* ``P``. | |
45 | + | |
46 | + .. math:: \left(\nu x\right)P | |
47 | + | |
48 | + |