The ability of reconfiguring software architectures in order to adapt them to new requirements or a changing environment has been of growing interest, but there is still not much formal work in the area. Most existing approaches deal with run-time changes in a deficient way. The language to express computations is often at a very low level of specification, and the integration of two different formalisms for the computations and reconfigurations require sometimes substantial changes. To address these problems, we propose a uniform algebraic approach with the following characteristics. 1. Components are written in a high-level program design language with the usual notion of state. 2. The approach combines two existing frameworks - one to specify architectures, the other to rewrite labelled graphs - just through small additions to either of them. 3. It deals with certain typical problems such as guaranteeing that new components are introduced in the correct state (possibly transferred from the old components they replace). 4. It shows the relationships between reconfigurations and computations while keeping them separate, because the approach provides a semantics to a given architecture through the algebraic construction of an equivalent program, whose computations can be mirrored at the architectural level.