Designing Self-Aware Adaptive Systems: from Autonomic Computing to Cognitive Immune Networks