# Autonomic Semantic-Based Context-Aware Platform for Mobile Applications in Pervasive Environments
## 3 Kali-Smart: Autonomic Semantic-Based Context-Aware Adaptation Platform
### Platform Architecture  
Here is a general overview of the on the fly smart semantic-based services adaptation architecture (Figure 1). It is composed of four layers (Figure 1):  
1. The **Knowledge Base (KB) Management Layer** is the part of the platform that is responsible for the representation of the context information in OWL-DL(Description Logics). In our approach, KB consists of the central component, which corresponds to a knowledgebase of different users' profiles, semantic multimodal services and reconfigurations files and a knowledgebase of semantic service description. We exploit most of the capabilities that OWL provides, such as reusability, sharing and extensibility, in way to offer wide representation of the context in smart-* domains. 2. The **Semantic Context-aware Services Management Layer** is responsible for managing the adaptation process and providing a continuous response to a user by adapting dynamically its context provisioning paths according to the change happened during its execution. This core layer relies on the following components: * The **User Context Manager** is responsible for capturing user context changes and storing these in a KB repository. The user context is enriched from different explicit constraints and implicit resource characteristics, services with various modalities and shared multimedia documents. This component includes: * _Semantic Constraint Analyzer_: interprets the profile, which expresses the users' preferences (e.g., explicit constraint), context information about the device (memory size, battery level, CPU speed, screen resolution, location, etc. ), supported documents (media format, media type, content size, etc. ), network characteristics (bandwidth, protocol type, etc.). * _Constraint Translator_: converts some semantic users' constraints specified in qualitative terms into triplet pattern in the OWL format. * _Context Collector_: collects static and dynamic context (user's information, device's information and sensor data) via different interfaces. The collected information will be integrated to make the low-level context and stored as the XML format. * _Context Pre-Processor_: is responsible for analyzing sensor data in order to remove duplicated data und unify sensor data that can have different measurement units. * _Context Translator_: is responsible to convert the context data into a triplet pattern in the OWL format. * **Services Context Manager** is responsible for extracting and storing the context service multimodal description (gesture, voice, pen click and mouse click) with semantic context service constraints in a service repository. It is enriched by various QoS parameters (media quality, execution time, etc.). 3. **The Autonomic Semantic Service Adaptation Controller and Reconfiguration (ASSACR) Layer** supports the building of personalized and adapted process from available adaptation services. It is designed to follow an incremental dynamic strategy for provisioning services regarding the context changes during execution. We takes user's current context (battery level, CPU load, bandwidth, user location) and all of his or her surrounding resources as the input (local, remote). Solving the single user constraint in a low service space (local, neighbors) is easier and less time consuming. * **Context Monitor:** is responsible of verifying the user's context change by contacting the _User Context Manager_ component. * **Context Reasoner:** is responsible for making inferences on the ontology information, determining and deploying the appropriate services according to the deduced situations. This component includes: * _Situation Reasoner_: This is based on the JESS (Java Expert System Shell) inference engine [14], executes the SWRL (Semantic Web Rule Language) situation rules and infers the current situations. The SWRL situation rules include user-defined rules written and executed on the available context information in order to infer additional knowledge and conclusions about it.