Engineering Contextual Knowledge for Autonomic Pervasive Services