The near future envisions a pervasive heterogeneous computing infrastructure that makes it possible for mobile users to run software services on a variety of devices, from networks of devices to stand-alone wireless resource-constrained ones. To ensure that users meet their non-functional requirements by experiencing the best Quality of Service according to their needs and the resource characteristics of the specific contexts of use, services need to be context-aware and adaptable. The development and the execution of such services proposes big challenges to the research community.

This thesis presents an approach to context-aware adaptable services based on a modified service oriented interaction pattern to discover and access adaptable services and on an Service Level Specification model to take care of the non functional dimensions. Services are implemented as adaptable components and are deployed on heterogeneous resource constrained mobile devices using an integrated framework that supplies a complete support for developing, reasoning and adapting Java programs with respect to heterogeneous execution environments. In particular the framework provides a programming model to develop in a flexible and declarative way Java adaptable applications and a static analyzer for inspecting Java programs with respect to their resource consumption in a given execution environment. The framework is based on a resource model for specifying resource provisions and consumptions and quantitatively comparing alternative versions of the same program in order to get the best adaptation with respect to the execution context.