hlisdero / cargo-check-deadlock

Find deadlocks in Rust code with Petri net model checking
Apache License 2.0
24 stars 1 forks source link

(Question) Do you plan to detect livelocks? #49

Open hardBSDk opened 4 months ago

hlisdero commented 3 months ago

Hi @hardBSDk,

Thank you for your question.

I haven't looked at livelocks in detail. Stated simply, livelocks are more difficult to detect with this framework. The source code would be translated to a Petri net that always has transitions that can fire, i.e., the net does not deadlock. Therefore, the model checker would not detect a problem. For livelocks you would have to enhance the translation to convert the livelock to a deadlock in a certain way, embedding a notion of "progress" in the Petri net somehow.

Livelocks were out of scope of my master thesis and I do not remember reading papers that dicussed applying Petri net methods to livelock detection during the literature review.

Hope that helps! Feel free to contact me if you have any further questions.