# An Activity Theory-Based Approach for Context Analysis, Design and Evolution
## 1 Introduction  
The development of context-aware software systems is plagued by complexity. When addressing software context awareness in analysis and design, many underlying issues arise. These issues are mainly related to the nature of these software systems, especially those closely integrated with components that allow recognition, localization, or adaptation. All these components are also subject to continuous evolution, forcing context-aware software to adapt fluently to these environmental and technological changes in order to keep providing its services (e.g., environmental intelligence, ubiquitous and pervasive computing, intelligent surroundings, etc.).  
The problem of how to acquire a precise understanding of the adaptation needs posed by a system, and how to do it efficiently and smartly, is particularly challenging. This problem is directly related to the definition of the requirements, which should include evolvability in synchrony with the system's surrounding environment. However, formalizing and representing those needs, at a proper and workable abstraction level, is an ill-defined and error-prone task, especially when something as fluid as context is involved.  
Inadequate modeling or design can give rise to misadaptations that will result in future problems. Several studies and proposals on context-aware software engineering have been published, especially in areas such as requirements gathering [1], software architectures [2],middleware [3; 4], programming [5], and testing [6]. However, these approaches only provide pieces of a bigger puzzle that needs to be solved. The present paper deals with one relevant problem that remains open [7] in the field of context-aware software: _what are the characteristics of a general approach aimed to understand, model, and design contexts?_ Also, _how might context modelization facilitate and incorporate continuous evolutions and adaptations?_  
On a pragmatic level, an answer to these questions should address the need to establish some balance between the conceptual elaborations required in designing context-aware software and development cycles. The present work is rooted in the idea that designers and developers must deal with the understanding of context as the cornerstone for requirements definition and for adapting future behaviors into the software. The present work is an attempt to address this challenge, by proposing a heuristic-oriented approach rooted in a socio-technical perspective. This solution supports, as one of its contributions, the use of _activity theory_ for the tasks of gathering, describing, designing, and modeling contexts. Thus, this paper presents some of the ideas behind the proposal and explains how it contributes to context-aware software development in real-world scenarios.  
The paper is structured as follows: this introductory section presents general ideas about the problem addressed and its existing solutions. It also provides a quick overview of activity theory as the main theoretical and instrumental foundation of the current proposal. Section 2 focuses on understanding context complexity from a socio-human perspective, and introduces the reader to later design formalities. Section 3 describes, in practical terms, the use and application of the proposed approach through a proof of concept. Section 4 discusses empirical evidence that sustains the proposed solution, based on a comparison experiment, describing the experimental process, measured elements, applied procedures, results achieved, and potential threats to validity observed. Finally, Section 5 provides some conclusions.