On the Compilation of a Domain-Based Prolog