http://wiki.apidesign.org/wiki/Impossible
I had a look at this and I do not understand why this problem seems to be impossible. String given to the "machine" will be always finite right?
So even if I have 1 billion zeros, and 1 billion ones, one could easily write a script that returns true or false for that string (which it will be true/accepted).
Another input could be a "00011" which makes it invalid.
I probably didn't understand something here, but this problem seems "codeable" to me.