Guideline: Producing the Platform Specific Model
The two primary ways for producing a PSM from a Platform Independent Model (PIM) are elaboration and translation.
Relationships
Related Elements
Main Description

The PSM must support the same semantic functionality as its corresponding PIM, but also incorporates design and technology decisions intended to optimize the application against its requirements and especially its required QoS. In Harmony, design is all about optimization against various design criteria including QoS. These design aspects can be added in two primary means - translation and elaboration.

In translation, a translator (model compiler) is constructed that incorporate the design decisions (e.g. design patterns) and technology selections (e.g. CORBA). The translator is then applied against the PIM to produce the PSM. Elaboration is an interactive process in which the Software Modeler;applies design patterns to evolve the PIM into a PSM. Both approaches work and both have their benefits and costs.

Translation requires expertise in compiler construction as well as in the technologies and design patterns to be applied. Various tags in the PIM are added to identify to the translator which patterns to apply to which PIM elements. Translators tend to be forward-only, so that the generated PSM or Platform-Specific Implementation (PSI) code cannot be modified by the developer without breaking the connection between the PIM and the PSM. That means that it may be difficult to get precise optimizations a developer might require. Further, reverse engineering is often problematic. However, once constructed, a translator is constructed, reapplying the translator is generally quick and easy.

Elaboration, on the other hand, provides a great flexibility in the achievement of specific optimizations the develop may desire. It is typically design pattern oriented (and certainly is in the Harmony Process). On the downside, this elaboration is manual, so that if a problem is discovered after the elaboration, then either the separate PIM must be updated and then the elaboration manually reapplied, the change must be reapplied to the separate PIM and PSM independently, or the evolving PSM is modified (and the "PIM-ness" is lost because the PIM is not separately maintained.

The Harmony process recommends a combination of both approaches. Some patterns and technology selections are easy to apply via a translator in a general, but efficient way, and others are not. By selecting the appropriate mechanism, the developer's efficiency can be maintained along with the flexibility of the design approach.

As implied, the developer has choice as to whether to maintain a separate PIM and PSM, or simply evolve the PIM into the PSM. This decision is independent of the selection of translation versus elaboration. Both approaches have benefits and costs as well. Maintaining both models means that new PSMs can relatively easily be created by applying different patterns or technologies to support a different platform. However, if a problem is discovered in a PSM that affects the PIM, then the PIM must be updated and all generated PSM must be recreated. If there is only a single model (a combined PIM/PSM) then there is only a single place to make the change but the downside is that creation of other PSM is more work. The selection of the approach depends on the products required reusability and the nature of that expected reuse. If the purpose is to create a family of products, then two models is undoubtedly the best approach. If the goal is to create a single system with stable technologies, then a single model is more efficient. Most systems fall between these two extremes and the decision must be made on the exact nature of the product and its intended usage.