[transforms] Implemented raw algorithm of 'implication prefix' detection