Abstract. Context management in pervasive computing environments must reflect the specific characteristics of these environments, e.g. distribution, mobility, resource-constrained devices, or heterogeneity of context sources. Although a number of context models have been presented in the literature, none of them supports all of these requirements to a sufficient extent at the same time. In this paper, we present a comprehensive and integrated approach for context modeling in pervasive computing environments. It combines the advantages of existing approaches and addresses the need for supporting effective software development. The proposed context model follows an ontology-based approach and has three layers of abstraction, i.e. conceptual layer, exchange layer, and functional layer. This layered approach facilitates a model-driven development of context-aware applications. Throughout the paper we compare our solution with the related work in order to clearly demonstrate why we needed to develop a new context management framework and where we have adopted existing ideas.