Mobile Cloud Computing (MCC) is an emerging paradigm to transparently provide support for demanding tasks on resource-constrained mobile devices by relying on the integration with remote cloud services. Research in this field is tackling the multiple conceptual and technical challenges (e.g., how and when to offload) that are hindering the full realization of MCC. The Networked Autonomic Machine (NAM) framework is a tool that supports and facilitates the design networks of hardware and software autonomic entities, providing or consuming services or resources. Such a framework can be applied, in particular, to MCC scenarios. In this paper, we focus on NAM's features related to the key aspects of MCC, in particular those concerning code mobility capabilities and autonomic offloading strategies. Our first contribution is the definition of a set of high-level actions supporting MCC. The second contribution is the proposal of a formal semantics for those actions, which provides the core NAM features with a precise formal characterization. Thus, the third contribution is the further development of the NAM conceptual framework and, in particular, the partial re-engineering of the related Java middleware. We show the effectiveness of the revised middleware by discussing the implementation of a Global Ambient Intelligence case study.