I think this, like many problems, can be reefactored into the halting problem. Which we know how to solve…. Right?