Components:
Product Line Diff Document

Product Line Diff Document

The diff document is an xADL 2.0 file that is able to capture the differences between architectures in terms of additions/removals of architectural elements.  The structure of the diff document is determined by the PLA diff schema that can be found on the xADL 2.0 webpage.  Note the PLA diff schema differs from the normal diff schema in that it captures fine-grained differences and hierarchical composition.  A simplified graphical view of the diff document structure is presented below:



The root of the diff document is the PLADiff element which must contain a single DiffPartDiffParts are the main elements within the diff document, they contain all the additions and removals.  As can be seen from the figure above, a DiffPart can also contain 0 or more DiffParts.  This embedding of DiffParts allows us to capture the layering of substructure (architectural hierarchy) that is possible within a xADL architecture.  The DiffLocation stores either the description of the component/connector instance (not the actual type) or the boolean guard of the variant that has the substructure.  For the initial DiffPart, its DiffLocation is set to the string *Root - Structure* if the initial starting point was an ArchStructure or the string *Root - Type* if the starting point was a type. Note that if the starting point was a type, the resulting diff document might have an initial DiffPart with nothing but another DiffPart with the same DiffLocation as the initial root location as shown below:


This is because the differencing process start at the type level and may not detect any differences until it has reach the substructure of the type (if it has one).

The Add element can either include an AddStructuralEntity or an AddTypeEntity. The distinction between structural and type entities are made because they reside in different parts of the xADL document.  Structural entities reside within an ArchStructure  directly (e.g. Component) or can be found within components/connectors/links (e.g. Optional - the optionality guard for optional components).  Type entities on the other hand reside within a component or connector type.  All type entities also contain a DiffLocation containing either the description of the particular component/connector instance or the boolean guard of the variant of the type where the difference was detected. The structure of the Remove element mirrors the structure of the Add element and thus is not shown here for simplicity.  The exact information contained in the additions and removals are summarized in the table below:

Element
Addition
Removal
Component
1. Copy of actual xADL component
1. Description of the component
Connector
1. Copy of actual xADL connector 1. Description of the connector
Link
1. Copy of actual xADL link
2. Description of the component/connector and its interface at both endpoints
1. Description of the link
Interface
1. Description of the component/connector that contains this interface
2. Copy of actual xADL interface
1. Description of the component/connector that contains this interface
2. Description of the interface
Optional
1. Description of the component/connector that contains this optionality guard
2. Copy of actual xADL optionality guard
1. Description of the component/connector that contains this optionality guard
2. Description of the optionality guard (the boolean expression)
Signature
1. Copy of actual xADL signature 1. Description of the signature
Variant
1. Copy of actual xADL variant 1. Description of the variant (the boolean expression)
Signature Interface Mapping
1. Copy of actual xADL signature interface mapping
2. Description of the outer component and its signature
3. Description of the inner component and its interface
1. Description of the outer component and its signature
2. Description of the inner component and its interface
Substructure
1. Description of ArchStructure for this substructure 1. N/A (only 1 substructure in a type)


Example

This section presents a brief example of a diff document.  Below is two different architectures to calculate the difference on, the one on the left is considered the base or original architecture whereas the one on the right is the new architecture.

The changes in the new architecture are highlighted in red.  In particular, it has a new optional component DVD Player, a new variant Antenna, and replaced the original CD Player with a new Multi-CD Player (in Media Player's substructure).  The resulting diff document (assuming the starting point is the Entertainment System component type) in abbreviated non-XML notation is shown below:

PLADiff
{ DiffPart { (description) DiffLocation = *Root - Type* DiffPart {
(description) DiffLocation = *Root - Type* Add { AddStructuralEntity { (component) Component = Optional DVD Player component } } Add { AddStructuralEntity { AddLink { (link) Link = link from DVD Player component to TV component InterfaceEndPoint { (description) InterfaceDescription = DVD Player interface (description) ConnectingElementDescription = DVD Player } InterfaceEndPoint { (description) InterfaceDescription = TV interface (description) ConnectingElementDescription = TV } } } } Add { AddTypeEntity { (description) DiffLocation = Signal Source (variant) Variant = Antenna variant } } DiffPart { (description) DiffLocation = Media Player Add { AddStructuralEntity { (component) Component = Multi-CD Player component } } Add { AddStructuralEntity { Link { (link) Link = link from Multi-CD Player component to Speakers component InterfaceEndPoint { (description) InterfaceDescription = Multi-CD Player interface (description) ConnectingElementDescription = Multi-CD Player } InterfaceEndPoint { (description) InterfaceDescription = Speakers interface (description) ConnectingElementDescription = Speakers } } } } Remove { RemoveStructuralEntity { (description) Component = CD Player component } } Remove { RemoveStructuralEntity { (description) Link = link from CD Player component to Speakers component } } }
}
}
}



Additional questions about the PLA Diff Document should be sent to Ping H. Chen.