In a component-based software system the components are specified, designed and implemented with the intention to be reused, and are assembled in various contexts in order to produce a multitude of software systems. However, this ideal scenario is not always the case, e.g., the integration with legacy components. In this context, one main problem in component assembly arises. It is related to the ability to automatically and efficiently (i.e., by reducing the state-explosion phenomenon) synthesize an assembly code for a set of, possibly incompatible, software components. Moreover, this assembly should be able to evolve when things change and to be correct-by-construction, i.e., despite the changes, it always ensures a set of properties of interest. In this paper we propose a Software Architecture (SA) based approach in which architectural analysis and code synthesis are combined together in order to efficiently and correctly assemble a system out of a set of already implemented com...