change data structure of P2Set to (MemNode, Constraint), because of merging. *need testing*