Context Representation and Reasoning with Formal Ontologies