Implement Dot and transform function for DFA.