In ubiquitous computing, systems evolve surrounded by a heterogeneous smart-devices and software services, offering functionalities that enable new applications to be created. In such system, we need to consider the unpredictability of software infrastructure changes. To tackle the issue of the dynamic variation of the software infrastructure, compositional adaptation is now often used. The problem is that adaptation entities are independent-written. In such case, they may interfere when they are composed. In this paper, we propose a formal approach that allows composing applications at run time and managing these interferences. The formal model of the system and adaptations are defined in term of graphs. In particular, we demonstrate the symmetry property of our composition process.