select the shortest possible reason

This commit is contained in:
Erik Krogh Kristensen
2021-01-14 13:37:42 +01:00
parent 03d8aeb7b6
commit 86e33d9d79
2 changed files with 96 additions and 96 deletions

View File

@@ -407,7 +407,7 @@ class PolynomialBackTrackingTerm extends InfiniteRepetitionQuantifier {
PolynomialBackTrackingTerm() {
reason = getReasonString(this, pump, prefixMsg, prev) and
// there might be many reasons for this term to have polynomial backtracking - we pick an arbitary one.
reason = min(string msg | msg = getReasonString(this, _, _, _))
reason = min(string msg | msg = getReasonString(this, _, _, _) | msg order by msg.length(), msg)
}
/**