class SymbolicAddressMap {

	public void joinReturned(SymbolicAddressMap returned, int framePtr) {
		if(returned == null) {
			throw new AssertionError("joinReturned: returned map is undefined ?");
		}
		if(this.isTop()) return;
		else if(returned.isTop()) {
			setTop();
			return;
		}

		for(Entry<Location, BoundedSet<SymbolicAddress>> entry : returned.mapP.entrySet()) {
			Location locReturnedFrame = entry.getKey();
			Location locCallerFrame; 
			if(locReturnedFrame.isHeapLoc()) {
				locCallerFrame = locReturnedFrame;
			} else {
				locCallerFrame = new Location(locReturnedFrame.stackLoc + framePtr); 
			}
			BoundedSet<SymbolicAddress> callerSet = mapP.get(locCallerFrame);
			BoundedSet<SymbolicAddress> returnedSet = returned.mapP.get(locReturnedFrame);
			put(locCallerFrame, returnedSet.join(callerSet));
		}		
	}

	public  SymbolicAddressMap(BoundedSetFactory<SymbolicAddress> bsFactory);
	private  SymbolicAddressMap(BoundedSetFactory<SymbolicAddress> bsFactory,
							   HashMap<Location,BoundedSet<SymbolicAddress>> initP,
							   HashMap<String,BoundedSet<SymbolicAddress>> initA);

}