A first-order logic model for context-awareness in distributed sensor-driven systems