UnorderedPair in platform
dfa: some minor things and caching
dfa: merge several states to account for variables with several possible values