Is there a way to compact and concise record of the algorithm of multi-threaded programs?

First and foremost, interested in options with a textual representation.
July 8th 19 at 11:38
2 answers
July 8th 19 at 11:40
The solution of course a workaround, but is also the place to be. By the way among the free implementations is plantuml. The syntax that is suspiciously similar :) - jade.Kuhlman42 commented on July 8th 19 at 11:43
Looked a little better, this is plantuml. - jade.Kuhlman42 commented on July 8th 19 at 11:46
: well.. just to describe the process better than the UML I've never had to see. If you find something better - please let me know... - Kyleigh_Hills commented on July 8th 19 at 11:49
July 8th 19 at 11:42
And what is wrong?
Thread 1
while x < 10
 x = x + 10
return x * x

Thread 2
until x > 10
 x = x - 10
return sqrt(x)

Wait for(x = поток1, y = поток2)
the output x + y

A complete flight of fancy, write algorithm only formal system, You are free to do anything.
Flight of fancy, that's fine.

However, this record shows bad relationship flows. For example, nowhere does not clearly refer to the write operation in the memory oboyy that require synchronization. It is unclear what profit, this notation is compared with the code.

I would like to see something like PI-calculus, only more applicable to everyday life. It is desirable that it was to some extent formalized, but was allowed to make peremptory insertion.

The only option that I come across in practice, it was a sequence diagram. - jade.Kuhlman42 commented on July 8th 19 at 11:45
: O_o, why is that even necessary? In text form, well, write C-like code, as the CUDA label, loading data into memory etc. I Never understood the meaning of the text entry algorithms, if there is a pseudo-code - jade.Kuhlman42 commented on July 8th 19 at 11:48
: Well, let's say you have 3+ threads that are shared by two or more of the resource, the behavior of each thread depends on the state of resources. If this behavior is recorded in something like c++, with optimization and metaprogramming to parse this algorithm immediately, it is not very easy. But if it is documented, with emphasis on scenarios of interaction with reprom, understanding this algorithm will be significantly(if not much) easier and faster.

To be honest, I don't really believe in the existence of a clear textual notation, otherwise, she would most likely would have been quite common. - Kyleigh_Hills commented on July 8th 19 at 11:51
: sequence diagrams are also used in CoDeSys (SFC) and Matlab (Simulink from StateFlow) - jade.Kuhlman42 commented on July 8th 19 at 11:54

Find more questions by tags DocumentationmultithreadingAlgorithmsSpecifications