application case in constraint generation and corrected orientation of result tuple in merging process