public static AddressSet getCompatibleAddressSet(AddressSetView set, Program otherProgram) {
		AddressSet otherSet = new AddressSet();
		AddressRangeIterator rangeIter = set.getAddressRanges();
		while (rangeIter.hasNext()) {
			AddressRange range = rangeIter.next();
			AddressSet compatibleSet = getCompatibleAddressSet(range, otherProgram, false);
			if (compatibleSet != null) {
				otherSet.add(compatibleSet);
			}
		}
		return otherSet;
	}
Convert an address-set from one program to a compatible address-set in the 
specified otherProgram.  Those regions which can not be mapped will be eliminated 
from the new address-set.  Only memory addresses will be considered.
@param set address-set corresponding to program
@param otherProgram target program which corresponds to the returned address set.
@return translated address-set
Ghidra/Features/Base/src/main/java/ghidra/program/util/DiffUtility.java