private boolean swap(SemanticFrame frame, int N, int M, int[] match, int[] invMatch, int p, int b, TIntArrayList args) {
		// p->a, q->b to p->b, q->a
		int a = match[p];
		int q = invMatch[b];
		
		if (p >= N && q >= N) {
			// both role labels are matched to null arguments
			return false;
		}
		else if (a >= M && b >= M) {
			// both arguments are matched to null labels
			return false;
		}
		
		if (p < N)
			frame.arglbids[args.get(p)] = b < M ? b : -1;
		if (q < N)
			frame.arglbids[args.get(q)] = a < M ? a : -1;
		
		match[p] = b; invMatch[b] = p;
		match[q] = a; invMatch[a] = q;
		
		return true;
	}