@@ -32,14 +32,6 @@ signature predicate isRegexpMatchingCandidateSig(
32
32
* and the results can be read from the `matches` and `fillsCaptureGroup` predicates.
33
33
*/
34
34
module 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
-
43
35
/**
44
36
* Gets a state the regular expression `reg` can be in after matching the `i`th char in `str`.
45
37
* The regular expression is modeled as a non-determistic finite automaton,
@@ -123,7 +115,7 @@ module RegexpMatching<isRegexpMatchingCandidateSig/4 isCandidate> {
123
115
*/
124
116
private State getAStateThatReachesAccept ( RootTerm reg , int i , string str , boolean ignorePrefix ) {
125
117
// 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
127
119
i = str .length ( ) - 1 and
128
120
result = getAState ( reg , i , str , ignorePrefix ) and
129
121
epsilonSucc * ( result ) = Accept ( _)
0 commit comments