2. Definitions
Given a simple copy statement, C, the next reference of the variable on the right hand side, V, determines if C is "good for swapping". If V is "used" on any path, then C is "not good for swapping". In some cases, since V is a copy of the variable on the left, V2, V2 could be used in place of V, this fact makes the analysis of swapability conservative. If V is defined on all paths, or if V goes out of scope before being referenced again, then C is "good for swapping".
Example 2.1
Good for swapping (defined)

{
	int x;
	int y;//V
	x = y;//C
	y = 5;
}
Example 2.2
Good for swapping (out of scope, or UN-definition)

{
	int x;
	int y;//V
	x = y;//C
}
Example 2.3
Not good for swapping (use)


{
	int x, z;
	int y;//V
	x = y;//C
	z = y + 1;
}