Reverse Engineering and Abstraction of Legacy Systems