Software Engineering for Collective Cyber-Physical Ecosystems