Software Engineering for Collective Autonomic Systems