An incremental algorithm for software analysis