## 4 Proposed Method
### Correspondence Between Components and Structured Features
#### 4.2.2 Remapping of Structured Features and Components  
As shown in Figure 3, the component identification phase in SFCAD can be performed iteratively. As the component-based software architecture is modified, the structured features previously mapped to the initial components are remapped to the components of the updated component-based software architecture. This iterative component decomposition and integration process includes modifications to the initial component-based software architecture. These modifications can be carried out by applying the Attribute-Driven Design (ADD) method [46] multiple times based on important quality attributes in the target embedded system. The mapping between structured features and components is redefined as the ADD process progresses. Remapping of the structured features occurs by redefining the relationship between component \(C_{i}\) in the existing component architecture and components \(C_{i+1}\) in the updated architecture after an ADD iteration. The remapping function \(remap(M_{i},C_{i},C_{i+1})\) is defined as follows:  
\[M_{i+1}=remap(M_{i},C_{i},C_{i+1}). \tag{3}\]  
The value of \(i\) in the above equation ranges from the initial component identification described in Section 4.2.1 to the end of ADD. The function \(remap(M_{i},C_{i},C_{i+1})\) is executed by checking the component decomposition conditions and remapping the structured features using the following steps:  
1. **Check component decomposition conditions. ** During the ADD process, the designer produces the \(i\)-th and \(i+1\)-th design results and checks the relationships between the components in the existing and new results, defined as follows: \[\forall C_{ic}\in C_{i},\exists C_{i+1c}\in C_{i+1}\mid C_{ic}\xrightarrow{ decomposedinto}C_{i+1c}.\] (4) For component set \(C_{i}\) in the \(i\)-th component architecture and updated component set \(C_{i+1}\) in the \(i+1\)-th architecture, it is determined whether component \(C_{ic}\) in \(C_{i}\) has been decomposed into components \(C_{i+1c}\) in \(C_{i+1}\). 2. **Remapping of structured features. ** If a component is determined to have been decomposed, the structured feature \(SF_{C(i)_{c}}\) mapped to the \(j\)-th component in the \(i\)-thcomponent architecture is remapped to the \(k\)-th component \(C_{(i+1)_{ck}}\) in the updated \(i+1\)-th component architecture using the algorithm shown below. First, in line 4 of Algorithm 1, Equation (4) is applied to determine \(SF_{C(i)_{c_{j}}}\) mapped to \(C_{(i)_{c_{j}}}\) in \(M_{i}\). The structured feature is then remapped to the decomposed component. The relationship between the remapped structured feature and the component is added to \(M_{i+1}\) and the remapping is returned, allowing the designer to maintain the traceability information. ```
0:\(i\)-th mapping information \(M_{i}\), \(i\)-th component set \(C_{i}\), (i+1)-th component set \(C_{i+1}\)
0:\(i\)-th mapping information \(M_{i+1}\)
1:for all \(j\)-th \(C_{(i)_{c_{j}}}\) in \(C_{i}\)do
2:for all \(k\)-th \(C_{(i+1)_{c_{k}}}\) in \(C_{i+1}\)do
3:if\(C_{(i)_{c_{j}}}\xrightarrow{decompostitor}C_{(i+1)_{c_{k}}}\)then
4:\(SF_{C(i+1)_{c_{k}}}\gets SF_{C(i)_{c_{j}}}\)
5: Put \(SF_{C(i+1)_{c_{k}}}\)'s mapping information into \(M_{i+1}\)
6:endif
7:endfor
8:endfor
9:return\(M_{i+1}\)
```  
**Algorithm 1** Update mapping info into \(M_{i+1}\)  
Through this process, the structured features are remapped to the updated components, allowing the initial relationship between the structured features and initial components to be redefined. By redefining the relationships between the components and structured features, natural traceability between requirements and components is achieved. Both the initial components and structured features share a common foundation based on the actions performed within the sensor-actuator pattern.