Static Analysis and optimization of Object Oriented Systems