Skip to content

Commit

Permalink
Allow forks with the same path in random path selector (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
CaelmBleidd authored Aug 17, 2023
1 parent fc7e03b commit 65eeeba
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ internal class RandomTreePathSelector<State : UState<*, *, *, Statement, *, Stat
}

// Leaf if reached
val nodeFromThisSelector = currentNode.states.singleOrNull { it in states }
// Note that we may have several nodes satisfying the predicate here since
// they might be created because of type forks or approximation forks.
// In such case, they have the same path but different path constraints.
val nodeFromThisSelector = currentNode.states.firstOrNull { it in states }
if (nodeFromThisSelector != null) {
peekedState = nodeFromThisSelector
break
Expand Down

0 comments on commit 65eeeba

Please sign in to comment.