Frequent itemset matching prototype (not tested)