nickng / dingo-hunter

Static analyser for finding Deadlocks in Go
Apache License 2.0
316 stars 28 forks source link

Actions following the end of a branching get assigned to only one branch. #19

Open antonis19 opened 6 years ago

antonis19 commented 6 years ago

Actions after an internal choice or after an external choice (select-case) are assigned to one branch of each choice. (so there is no merge point after the choice).

For example, the file smallexample.go consists of a Sender goroutine that generates a random integer. If that integer is even it sends that integer through an int channel. If that integer is odd it sends a string through a string channel. Then it signals to main that it is done by sending a boolean to a bool channel.

!bool on the end channel (which is used to signal to main that a goroutine is exiting) is added to only one of the branches of the CFSMs (see output_cfsms_a_machines.svg, machines 4 and 5).