The Architecture and Design of a Malleable Object-Oriented Prolog Engine