This paper provides a unifying view for the engineering of
self-adaptive (SA) and self-organising (SO) systems. We first
identify requirements for designing and building trustworthy
self-adaptive and self-organising systems. Second, we propose a
generic framework combining design-time and run-time features,
which permit the definition and analysis at design-time of
mechanisms that both ensure and constrain the run-time behaviour of
an SA or SO system, thereby providing some assurance of its self-*
capabilities. We show how this framework applies to both an SA
and an SO system, and discuss several current proof-of-concept
studies on the enabling technologies