Compositional program analysis