execute several heuristics for pattern-matching and choose the best result
interface of pattern matching simplified