0

I was working on some concurrent programs for the past few weeks and was wondering if there is any tool that can automatically detect what type of progress condition its operations guarantees, that is whether it is wait-free, lock-free or obstruction-free.

I searched online and didn't find any such tool.

Can one tell how to deduce progress condition of a program?

kishoredbn
  • 2,007
  • 4
  • 28
  • 47
  • 2
    (1) No, as it is essentually boils down to halting problem. (2) By staring menacingly at the code and trying to figure out all possible paths and situations. – Revolver_Ocelot May 13 '16 at 14:57
  • 1
    @Revolver_Ocelot Can you elaborate why you think this problem as an unsolvable halting problem. – kishoredbn May 13 '16 at 15:08

1 Answers1

3

Assume that I have a program called a wait-freedom decider that can read a concurrent program describing a data structure and detect whether it is wait free, i.e. "one that guarantees that any process can complete any operation in a finite number of steps" ala Herlihy's "Wait-Free Synchronization". Then, given a single-threaded program P, create a program that we will feed into the wait-freedom decider:

class DataStructure:
    def operation(this):
        P
        pass

Now DataStructure.operation completes in a finite number of steps if and only if P halts.

This would solve the halting problem. That's impossible, so, by contradiction, we must not be able to create a wait-freedom decider.

jbapple
  • 3,297
  • 1
  • 24
  • 38