In Code TreeDfaFast.scala
The code must use .toList before .map so that equal costs per-transition are NOT deduplicated. transitions is a Set[Transition], so a bare Set.map would return a Set[Double] and silently discard duplicate cost values.
The correct code should be:
idCost + labelCost + transitions.toList.map(tr => tr.from.multiplicities.map(p => idCost + log2(p._2)).sum + labelCost + idCost).sum
However, this change will cause the following test to fail "learnDisjointConcreteStrings"
We need to validate that fix and if correct if possible to reason why the test fails at this stage.
In Code TreeDfaFast.scala
The code must use .toList before .map so that equal costs per-transition are NOT deduplicated. transitions is a Set[Transition], so a bare Set.map would return a Set[Double] and silently discard duplicate cost values.
The correct code should be:
idCost + labelCost + transitions.toList.map(tr => tr.from.multiplicities.map(p => idCost + log2(p._2)).sum + labelCost + idCost).sum
However, this change will cause the following test to fail "learnDisjointConcreteStrings"
We need to validate that fix and if correct if possible to reason why the test fails at this stage.