by void_one · 4y ago · 0 comments
"behave_differently.sh" requires an argument, a program to be run and produce some output. If "behave_differently.sh" is run without any argument, then there is no specified correct behavior.
Thus, "paradox.sh" also requires "$1" to be non-empty, otherwise it's result is undefined. When invoking "./paradox.sh ./paradox.sh", the inner "paradox.sh" will be launched without any arguments, running "behave_differently.sh" also without arguments.
There is no logical impossibility, just constructed way to trigger unspecified behavior in "behave_differently.sh".
And behave_differently.sh is supposed to be an arbitrary program. It can run the input program but it doesn't have to, it can analyse it in any way it wishes.
In the broader formulation behave_differently.sh tells that its argument program terminates and produces finite input, which is a halting problem.
class RusselSet(set):
def __contains__(self, other):
return other not in other
paradox = RusselSet()
paradox in paradox # ?