PatternMatchesGenerator realization. Not tested yet