This paper introduces a new planning algorithm which relies on a set ofiterative macros and a set of necessary goal ordering constraints that are generated during a compilation phase prior to planning. The main contribution of domain compilation is to speed up planning and is achieved at the price of a well specified domain model that has been engineered into a sort abstracted form. This means that object classes have been identified and object states specified by means of state invariants. A typical planning state corresponds therefore to a conjunction of separate object states. Rather than being a burden for real applications, the use of a structured domain specification, and domain processing tools, is consistent with proper validation of the planning model when viewed from a software engineering perspective.