Abstract Compilation for Sharing Analysis