Take the program
This should randomly remove some a atoms before printing the number of a atoms and terminating. However, with your optimisations, it repeats the a+c->c rule either 0 or as many times as it can before any other rule, meaning it only outputs 10 or 0.
Take the program
This should randomly remove some
aatoms before printing the number ofaatoms and terminating. However, with your optimisations, it repeats thea+c->crule either 0 or as many times as it can before any other rule, meaning it only outputs10or0.