Self modifying DFA