Context-aware pervasive systems are an important emerging category of software, increasingly pervading into daily life, play and work. These systems are characterized by capabilities for sensing the physical world and taking action, autonomously or in cooperation with users. This paper proposes an incremental approach to building contextaware pervasive systems, with a particular emphasis on systematically extending over time the contexts and situations a system can be aware of, and creating a formalism in which these systems can be composed. We present a formalism of operators for building context-aware pervasive systems incrementally and in a compositional manner (by combining multiple systems and subsystems), facilitating reuse in a formal way. The formalism can serve as (i) a basis for a scripting language for programming composite systems, and (ii) a language for specifying these systems (whether existing or to be built) and then reasoning with specifications of these systems.