@@ -32,14 +32,6 @@ signature predicate isRegexpMatchingCandidateSig(
3232 * and the results can be read from the `matches` and `fillsCaptureGroup` predicates.
3333 */
3434module RegexpMatching< isRegexpMatchingCandidateSig / 4 isCandidate> {
35- private predicate test ( RootTerm reg , string str , boolean ignorePrefix ) {
36- isCandidate ( reg , str , ignorePrefix , false )
37- }
38-
39- private predicate testWithGroups ( RootTerm reg , string str , boolean ignorePrefix ) {
40- isCandidate ( reg , str , ignorePrefix , true )
41- }
42-
4335 /**
4436 * Gets a state the regular expression `reg` can be in after matching the `i`th char in `str`.
4537 * The regular expression is modeled as a non-determistic finite automaton,
@@ -123,7 +115,7 @@ module RegexpMatching<isRegexpMatchingCandidateSig/4 isCandidate> {
123115 */
124116 private State getAStateThatReachesAccept ( RootTerm reg , int i , string str , boolean ignorePrefix ) {
125117 // base case, reaches an accepting state from the last state in `getAState(..)`
126- testWithGroups ( reg , str , ignorePrefix ) and
118+ isCandidate ( reg , str , ignorePrefix , true ) and
127119 i = str .length ( ) - 1 and
128120 result = getAState ( reg , i , str , ignorePrefix ) and
129121 epsilonSucc * ( result ) = Accept ( _)
0 commit comments