Unless the commands are so simple they aren't Turing-complete, or their
form is extremely restricted and stereotyped, I suspect this reduces to
solving Rice's theorem, which is of course impossible in the general case
for just the same reason solving the halting problem is, and is
ridiculously difficult even in most useful special cases.