sssee of the formation and the state of the state of the state of the state of the state of the state of the state of the state.

ing to the commutative and associative properties of the join operator. Remote-join-eval executes a join of two subqueries at a remote source, if the source is able to do so. Simple-Join-Swap:
retrieve(Q1, Source1) M [retrieve(Q2, Source2) M retrieve(Q3, Source3)] ↔
retrieve(Q2, Source2) ◄ [retrieve(Q1, Source1) ◄ retrieve(Q3, Source3)[
Remote-Join-Eval:
(retrieve(Q1, Source) ↑ retrieve(Q2, Source)) ↑ capability(Source, join)
⇒ retrieve(Q1 M Q2, Source)
Figure 1: Transformations in Query Planning In manufacturing, the problem is to find an economical plan of maining operations that implement the desired features of a design. In a feature-based approach (Nau, Gupta, & Regli, 1995), it is possible to enumerate the actions involved in building a piece by analyzing its CAD model. It is more difficult to find an ordering of the operations and the setups that optimize the machining cost. However, similar to query planning, it is possible to incrementally transform a (possibly inefficient) initial plan.  Often, the order of actions does not affect the design goal, only the quality of the plan, thus many actions can commute.

Also, it is important to minimize the number of setups because fixing a piece on a machine is a rather time consuming operation. Interestingly, such grouping of machining operations on a setup is analogous to evaluating a subquery at a remote information source.

As suggested by these examples, there are many problems that combine the characteristics of traditional planning satisfiability with quality optimization. For these domains there often exist natural transformations that may be used to efficiently obtain high-quality plans by iterative rewriting. Planning by Rewriting provides a domain-independent framework that allows plan transformations to be conveniently specified as declarative plan-rewriting rules and facilitates the exploration of efficient (local) search techniques.

## 1.2 Advantages Of Planning By Rewriting

There are several advantages to the planning style that PbR introduces. First, PbR is a declarative domain-independent framework. This facilitates the specification of planning domains, their evolution, and the principled extension of the planner with new capabilities. Moreover, the declarative rewriting rule language provides a natural and convenient mechanism to specify complex plan transformations.

Second, PbR accepts sophisticated quality measures because it operates on complete plans. Most previous planning approaches either have not addressed quality issues or have very simple quality measures, such as the number of steps in the plan, because only partial plans are available during the planning process. In general, a partial plan cannot offer enough information to evaluate a complex cost metric and/or guide the planning search effectively.