Abstract : Service adaptation is one of the main research subjects in Ubiquitous Computing. Dynamic service adaptation, at runtime, is necessary for services that cannot be stopped (banking, airport, etc.). The classical approaches for dynamic adaptation require predicting all service and context states in order to specify service and context-specific adaptation policies. This prediction may lead to a combinatorial explosion. The aim of this research is to create a service and context-independent adaptation mechanism. Our proposal is based on a service-context model that is causally connected with the service and context, in email@example.com. A closed-loop control principle is used for the adaptation mechanism. We introduce an equivalent for the error that is expressed by the notion of service-context distance. This distance represents a measure of how adequate is a service to its context. This distance is computed by some generic, reusable components. The adaptation algorithm that minimizes this distance is also service and context-independent.