Towards a framework for engineering product families and self-adaptive systems