src/interpreter/finite-automaton/dfa/dfa-minimizer.js
function goToSameSet(s1, s2, table, symbol) {
  if (!currentTransitionMap[s1] || !currentTransitionMap[s2]) {
    return false;
  }

  const originalTransitionS1 = table[s1][symbol];
  const originalTransitionS2 = table[s2][symbol];

  // If no actual transition on this symbol, treat it as positive.
  if (!originalTransitionS1 && !originalTransitionS2) {
    return true;
  }

  // Otherwise, check if they are in the same sets.
  return currentTransitionMap[s1].has(originalTransitionS1) &&
    currentTransitionMap[s2].has(originalTransitionS2);
}
function goToSameSet(s1, s2, table, symbol) {
  if (!currentTransitionMap[s1] || !currentTransitionMap[s2]) {
    return false;
  }

  const originalTransitionS1 = table[s1][symbol];
  const originalTransitionS2 = table[s2][symbol];

  // If no actual transition on this symbol, treat it as positive.
  if (!originalTransitionS1 && !originalTransitionS2) {
    return true;
  }

  // Otherwise, check if they are in the same sets.
  return currentTransitionMap[s1].has(originalTransitionS1) &&
    currentTransitionMap[s2].has(originalTransitionS2);
}
function goToSameSet ( s1 , s2 , table , symbol ) { if ( ! currentTransitionMap [ s1 ] || ! currentTransitionMap [ s2 ] ) { return false ; } const originalTransitionS1 = table [ s1 ] [ symbol ] ; const originalTransitionS2 = table [ s2 ] [ symbol ] ; // If no actual transition on this symbol, treat it as positive. if ( ! originalTransitionS1 && ! originalTransitionS2 ) { return true ; } // Otherwise, check if they are in the same sets. return currentTransitionMap [ s1 ] . has ( originalTransitionS1 ) && currentTransitionMap [ s2 ] . has ( originalTransitionS2 ) ; }
Checks whether states go to the same set.
Checks whether states go to the same set .