Predicate isPumpable
Holds if matching repetitions of pump
can:
- Transition from
pivot
back topivot
. - Transition from
pivot
tosucc
. - Transition from
succ
tosucc
.
From theorem 3 in the paper linked in the top of this file we can therefore conclude that the regular expression has polynomial backtracking - if a rejecting suffix exists.
This predicate is used by SuperLinearReDoSConfiguration
, and the final results are
available in the hasReDoSResult
predicate.
Import path
import semmle.javascript.security.performance.SuperlinearBackTracking
predicate isPumpable(State pivot, State succ, string pump)