Supporting policy-based contextual reconfiguration and adaptation in ubiquitous computing