# Autonomic Semantic-Based Context-Aware Platform for Mobile Applications in Pervasive Environments
## 5 Potentials Scenarios and Validation
### Real-Life Scenarios  
We aim at demonstrating that our proposed Context Monitor/Context Reasoner/Service Controller and Ontology-Rule-based architecture has the ability to infer situations and determine services that must be provided to the user according to his or her current situations (at home, working, on the car, etc.) and other environmental factors, such as the current available devices and services.  
User A is a diabetic person and needs to monitor his or her health. He or she uses an intelligent environment, which includes smart devices, sensors (glucose meter, weight scale, video camera) and services. This intelligent environment specifies an ambient system that allows him or her to live safely and to identify urgent situations. For example, the situation of \"diabetic coma or too high temperature\" is deduced by referencing the average glucose level and the temperature level in the profile. To make better informed choices, to help User A manage his or her situations in a more practical way by User B (e.g., doctor) (see Figure 17), User A needs to check his or her blood sugar level. He or she uses a bio-sensor that connects to his or her smart phone via Bluetooth technology. According to his or her blood sugar level, the system will execute the appropriate service. If his or her blood sugar level is out of the normal range determined by his or her doctor, there will be three possible situations (see Table 3). When \"User A\" takes a shower, he or she activates the faucet, and the \"Adjusting water Temperature\" service will be executed automatically in order to adjust the water temperature. When \"User A\" has breakfast, he or she reads his or her personal emails, and so, the email app is deployed and launched, whereas the previous \"Adjusting water Temperature\" service is removed silently. As he or she enters his or her car, the GPS is automatically connected to the phone; the mail app is automatically enhanced to integrate the vocal reading email functionality, whereas a traffic guide is launched and indicates the best way to go to work. He or she preferred to translate text to speech (see Table 4). As he or she is a bit late, an audio conference is dynamically deployed in order to ensure his or her participation in a scheduled conference that he or she has to attend. When entering the office, the audio conference is migrated to the desktop PC, and the video functionality is added to continue the discussion. In his or her smart office environment, when the system detects abnormal situations representing too high temperature and too low humidity, the \"Fire Station Call\" service is automatically triggered, and the service notifies the emergency status to the nearby fire station (Table 5).  
Figure 16: Screenshots of the Kali-Smart platform (**a**) authentication, (**b**) my space, (**c**) new account.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Location** & **Situation** & **Constraint Description** \\ \hline \multirow{3}{*}{_Any_} & _Low battery level_ & **Every time IF** battery level is **low THEN** migrate service \\  & _High battery level_ & **Every time IF** battery level is **High THEN** replace service \\  & _Schedule Time_ & **IF** activity scheduled time is come **THEN** activate service \\  & _Schedule Time_ & **IF** activity scheduled time is out **THEN** remove service \\ \hline \hline \end{tabular}
\end{table}
Table 4: Constraints specified by the developer.  
Figure 17: Potential scenarios.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Location** & **Situation** & **Constraint Description** \\ \hline \multirow{3}{*}{_Any_} & _High Blood Sugar_ & **Every time IF** blood sugar level is **high THEN** adjust insulin dose and \\  & _Danger Blood Sugar_ & **Every time IF** blood sugar level is **danger THEN** activate emergency call \\ \cline{2-3}  & _Low Blood Sugar_ & **Every time IF** blood sugar level is **low THEN** activate diabetes guide \\ \hline \hline \end{tabular}
\end{table}
Table 3: Constraints specified by the doctor.