public static < I , D > List < Word < I > > findShahbaz ( Query < I , D > ceQuery , AccessSequenceTransformer < I > asTransformer ) { Word < I > queryWord = ceQuery . getInput ( ) ; int queryLen = queryWord . length ( ) ; Word < I > prefix = ceQuery . getPrefix ( ) ; int i = prefix . length ( ) ; while ( i <= queryLen ) { Word < I > nextPrefix = queryWord . prefix ( i ) ; if ( ! asTransformer . isAccessSequence ( nextPrefix ) ) { break ; } i ++ ; } return queryWord . subWord ( i ) . suffixes ( false ) ; }
Returns all suffixes of the counterexample word as distinguishing suffixes after stripping a maximal one - letter extension of an access sequence as suggested by Shahbaz .