Reverse Engineering of Rule-based Systems