ArticlePDF Available

Abstract and Figures

Context prediction is a promoting research topic with a lot of challenges and opportunities. Indeed, with the constant evolution of context-aware systems, context prediction remains a complex task due to the lack of formal approach. In this paper, we propose a new approach to enhance context prediction using a probabilistic temporal logic and model checking. The probabilistic temporal logic PCTL is used to provide an efficient expressivity and a reasoning based on temporal logic in order to fit with the dynamic and non-deterministic nature of the system's environment. Whereas, the probabilistic model checking is used for automatically verifying that a probabilistic system satisfies a property with a given likelihood. Our new approach allows a formal expressivity of a multidimensional context prediction. Tested on real data our model was able to achieve 78 % of the future activities prediction accuracy.
Content may be subject to copyright.
Computing and Informatics, Vol. 37, 2018, 1411–1442, doi: 10.4149/cai 2018 6 1411
Darine Ameyed
Synchromedia Laboratory, Quebec University, ´
Ecole de Technologie Sup´erieure
Montreal, Canada
Moeiz Miraoui
Higher Institute of Applied Science and Technology of Gafsa, University of Gafsa
Gafsa, Tunisia
Atef Zaguia
College of Computers and Information Technology, Taif University, Hawiyah
Taif, Kingdom of Saudi Arabia
Fehmi Jaafar
Faculty of Management of Concordia University of Edmonton
Chakib Tadj
MMS Laboratory, Quebec University, ´
Ecole de Technologie Sup´erieure
Montreal, Canada
1412 D. Ameyed, M. Miraoui, A. Zaguia, F. Jaafar, C. Tadj
Abstract. Context prediction is a promoting research topic with a lot of challenges
and opportunities. Indeed, with the constant evolution of context-aware systems,
context prediction remains a complex task due to the lack of formal approach.
In this paper, we propose a new approach to enhance context prediction using
a probabilistic temporal logic and model checking. The probabilistic temporal logic
PCTL is used to provide an efficient expressivity and a reasoning based on temporal
logic in order to fit with the dynamic and non-deterministic nature of the system’s
environment. Whereas, the probabilistic model checking is used for automatically
verifying that a probabilistic system satisfies a property with a given likelihood. Our
new approach allows a formal expressivity of a multidimensional context prediction.
Tested on real data our model was able to achieve 78% of the future activities
prediction accuracy.
Keywords: Context prediction, logic, PCTL, pervasive system, context-aware sys-
tem, stochastic, transition model
Mathematics Subject Classification 2010: 68T01, 68T30, 68T37, 68U35
Prediction is a research topic in different fields: meteorology, economy, trends of
prices and stocks as well as in computer science and software engineering such as
predicting failure in software [1]. Predictive mechanisms help to anticipate actions
and to implement the appropriate preventive measures. Ubiquitous computing sys-
tems are no exception in this respect; they do actually follow this trend. To be more
proactive, ubiquitous systems have to provide service adaptation, according to the
dynamic evolution of their context, in order to offer an adequate service fitting the
user’s needs.
One significant challenge, in particular, is to proactively assess the user’s needs in
the real world without requiring explicit input. Furthermore, a ubiquitous system
must provide the user with services well adapted to the overall context. Indeed,
services will be triggered dynamically and without an explicit user intervention in
a proactive way. Making use of the context in applications is a current area of
research known as “context-awareness” [2, 7]. A sensitive-context application must
perceive the context of the users and their environment and adapt its behaviour
accordingly. Most of the work on service adaptation in context-awareness is focused
on the current context.
In ubiquitous computing several studies and research have been conducted too,
under the prediction topic [2, 3, 4, 5]. These works aim to introduce new prediction
techniques to increase the dynamic nature and the proactivity of those pervasive
Using PCTL and Model Checking for Context Prediction 1413
1.1 Problem and Motivation
Predict the future context allows the pervasive system to choose the most effective
strategies to achieve its goals and to provide an active and fast adaptation to future
However, the existing approaches face key issues that need to be addressed:
1. provide a multi-dimensional context prediction,
2. support a temporal constraint and identify the expected time of context varia-
3. improve expressiveness and provide a clear semantics.
Current approaches in context prediction only deduce one-dimensional informa-
tion for the future context (e.g. future location). As a consequence, their expressive-
ness and effectiveness are limited. Even more so, if the system is unable to recognize
the expected time of such context changes and the underlying behavior.
Moreover, these approaches face a common challenge: the lack of formal and
general approaches for dealing with context prediction and more specifically, allow-
ing proactivity and service anticipation using context prediction. They assert the
lack of a common development framework for context prediction as well as formal
representation for the context and a formal approach for the prediction.
Over the past few years, a more general research trend emerged, focusing on
context prediction such as the work described in [5, 6], which discussed directions
for research on this issue. They pointed out that the work in this area is mostly
limited to location information, and a challenge they face is:
1. to consider more general context information,
2. to be able to support a temporal constraint and
3. to provide a logic-based expressive prediction with a clear semantic and formal-
1.2 Proposition
Pervasive proactive systems need, therefore, the ability to reason with time de-
pendencies and even more complex than that: spatiotemporal dimensions and the
overall context. To be able to recognise a future contextual information (e.g., where
is the location of the user X in the next 5 minutes?) and to provide an answer and
anticipate a service associated with a future context must be possible (e.g., activ-
ity X can be executed on location Y in the next Z minute). A system that can
include this kind of knowledge provides more flexibility and allows the ability to act
in a more efficient manner.
In previous research work, we emphasized on context prediction context in perva-
sive context-aware systems. We proposed a new definition that supports prediction
1414 D. Ameyed, M. Miraoui, A. Zaguia, F. Jaafar, C. Tadj
in the same multi-dimension reasoning [8]. In another step towards the goal of pro-
viding formal prediction approach to context modeling we proposed a logic-based
model including a temporal constraint [9]. This paper is, therefore, another step to
provide a new spatiotemporal expressive prediction based on a formal semantic of
probabilistic temporal logic and stochastic transition model.
1.3 Contribution
The efficient deployment of a context-sensitive prediction, its dynamic and unpre-
dictable evolution, is still limited due to a semantic gap between the data provided
by the physical detection devices and the information needed to predict the future
behavior of the system and its users. Our proposed approach exceeds the weaknesses
identified in the literature [5, 10, 11] by providing: better context expressivity, more
efficient prediction based on logical reasoning, stochastic, non-deterministic mod-
eling and below a multidimensional approach, what fitting better the nature of
ambient systems.
In this paper, we are formalizing a new approach to express context prediction in
context-aware systems. We express context and the transition in a pervasive system
with a formal semantic, using a probabilistic temporal logic PCTL (a probabilistic
extension of temporal logic). We propose a probabilistic transition model to encode
the system’s behavior over the time. Combining PCTL with a stochastic model,
we can trace, analyze and predict the future context. Thus, we propose to use the
model checking verification to verify the future state properties with a quantitative
result and return the future state that has the maximum probability.
1.4 Paper’s Structure
The paper is organized as follows. First, we give an overview of the available predic-
tion methods (Section 2) with a synthesis and an evaluation. After that, we present
our approach (Section 3) starting with a presentation of temporal logic and an ex-
planation of the choice of probabilistic temporal logic. We then present a model
detailing each included component. And we finish this section by explaining the
prediction process. Before concluding the paper, we present the evaluation of our
approach (Sections 3.6, 3.7) and expected future work (Section 4).
In this section we give an overview of the available research within the context pre-
diction topic, specifically including proactive adaptation for pervasive systems; we
analyze, discuss those various works, and later we present an evaluation/synthesis
according to a selected set of criteria. As we have discussed and analyzed the pre-
diction research work in a previous survey [11], according to the technical prediction
approaches, we tried in this overview to discuss other related work, mostly from
recent research in chronological order.
Using PCTL and Model Checking for Context Prediction 1415
Also, we circumscribed a survey to research proposing generic models to sup-
port context prediction. Hence, the chosen works should support generic context
information: works specifically devoted to the location prediction were not consid-
ered relevant. As discussed in recent surveys [11, 12] the development of generic
approaches is a challenge in this research area.
One of the first contributions in context prediction was proposed by Mayrho-
fer [13]. Mayrhofer proposed architecture and a framework for context prediction
that are based on an unsupervised classification, attempting to find context clus-
ters, previously unknown from the input data. These context clusters represented
recurring patterns in the input data. This approach modeled the context as a finite
sequence of states where a user or a device triggers the change of the current state
from one state to another. This modeling helped to predict the next states of the
context based on the current state. He suggested a five-step process, taking sets of
observations, each recorded at a specific time, as input and providing as output the
current context of the user as well as predicting the future states of the context.
The proposed stages are sensor data acquisition, feature extraction, classification,
labeling, and prediction.
Mayrhofer proposed a prediction module based on the sequence prediction tech-
nique. This technique is based on the prediction task of a theoretical computer
sequence and can only be applied if the context is broken down into some form of
event flow. The context prediction in this work is based only on high-level context,
and the framework does not have any mechanism to support an adaptive strategy.
Like Mayrhofer, Sigg et al. [14, 6] provided a formal definition for the context
prediction task relevant to the issues raised on the quality of the context and on
how to handle the ambiguity of incomplete data. This method is also based on
patterns of context the learning algorithm builds to enable the prediction module.
The context prediction module is based on an alignment method that attempts to
predict the most likely continuation of a time series starting from the suffix of the
observed sequence.
Finally, Sigg et al. [6] also offer a continuous learning module to adapt to the
change in the environment or user habits. It continuously monitors the recorded
time series stored in context history and updates the relevant patterns.
However, we did not find in this work any specific implementation for this learn-
ing module. Only its constraints were given, including the interface specified by
the context history and language description of the rules, representing patterns.
Sigg does not describe any adaptive mechanism for prediction neither considers any
specification for context information.
Meiners et al. [15] suggested a context prediction approach called SCP (Struc-
tured Context Prediction). This approach is based on two key principles. The first
is making use of knowledge of the application domain that developers can integrate
when designing the application. This knowledge is described as a prediction model
that specifies how the predictions are to be executed and which configures the pre-
diction system. The second principle sets out the application of several prediction
methods, which are interchangeable. These methods are proposed to ensure the
1416 D. Ameyed, M. Miraoui, A. Zaguia, F. Jaafar, C. Tadj
accuracy and effectiveness of predictions relevant to a given domain. They can be
selected and combined by the application developers. According to [15] the predic-
tion model assigns a method for each variable to predict its value. The method uses
as input the values of other variables that are either already predicted by their own
methods, or simply measured by sensors. Also, the authors proposed an architecture
for a prediction system which can be used as a reusable component by context-aware
In this work, the proposed Contexts Prediction architecture supports an adaptive
mechanism for contexts prediction. However, this mechanism is manual, that is, the
designer needs to choose at design time the most suitable algorithms for predictions.
Furthermore, the architecture also has a learning component and supports only
low-level context data and does not have a formal context representation.
Contextual spaces theory is an approach developed by Andrey Boytsov [3], to
best define context-awareness and to deal with sensor problems that create uncer-
tainty and incur a lack of reliability. This theory used spatial metaphors to represent
the context as a multidimensional space. It was designed to make context-awareness
The theory of context space was initially submitted by Padovitz and Zaslav-
sky [16]. The authors attempted to provide a general model to help thinking about
and to describe the context and develop context-aware applications. This work will
be later the basis for several researches of Zaslavzky and Boytsov [4, 3, 17]. Boytsov
and Zaslavsky presented the CALCHAS system, which offered context prediction
and used an extension to the context space theory to provide proactive adaptation.
This approach addressed the context prediction problem in a general sense. In
context spaces theory several methods were tested and used for reasoning about the
context. The authors judged sequence technique as the most prospective prediction
For adaptation mechanisms, algebraic operations on situations and some logic-
based methods were developed for reasoning regarding situations [18].
This works had presented a general framework model, included an adaptation
approach based on prediction but did not propose a new formal or a generic predic-
tion method.
In her work on services prediction, Salma Najar offered a mechanism of discov-
ery and prediction guided both by context and user intent [19]. She used semantic
similarity techniques. The system is based on the implementation of a matching al-
gorithm, which computes the matching degree between the intention and the current
context of the user and the set of semantic services described accordingly. OWL-
SIC (OWL-S Intentional & Contextual) is an extension of OWL-S (Web Ontology
Language-Semantic, is an ontology, within the OWL-based framework of the Se-
The similarity approach required historical data, to select and recommend ser-
vices that are not always available. In fact, it needs a first phase of a collec-
tion to get enough data which will be processed after that. The intentional
approach provided by Najar [19] was a user-centered approach but can generate
Using PCTL and Model Checking for Context Prediction 1417
conflict: for instance a problem of interoperability between services. Indeed, two
compatible intentions do not necessarily map to two technically compatible ser-
vices. This work also proposed a conceptual framework focused on services predic-
Joao et al. [5] proposed new framework including a prediction-algorithms library.
They named the proposed model ORACON. The architecture of this model is based
on the Model-View-Controller (MVC) design pattern. It has three layers, two agents,
one library of prediction algorithms, External Histories, External Ontologies, and
External Applications. ORACON proposed prediction of entities. An entity, in this
sense, can be a living being, an object or even a location. Each entity can have
many applications, modeled as External Applications, which can interact with the
model in order to obtain predictions. This work focused more on the framework; it
did not propose a specific prediction approach. There prediction algorithm library
contains four prediction approaches: alignment, enhanced alignment, semi-Markov
and collaboration [5]. This proposed model was an interesting work which can be
enhanced with many extensions to improve the performance, increase the accuracy
of classification and optimize the processing time.
oll et al. [20] proposed a PreCon as a multi-dimensional context predicting
method, composed of three parts: a stochastic model to represent context changes,
an expressive temporal-logic query language using CSL (continuous stochastic lan-
guage) and stochastic algorithms to predict the context. The model based on user
behavior was presented as an SMC (Semi-Markov Chain).
This work was the unique formal work using the CSL as a query language of
the system, and a Semi-Markov Chain. There is also another work that had tried
to automate the recognition of activities using the LTL formalism with a model
checking [21].
They concluded their work, noting that a probabilistic extension using a PCTL
can increase the expressive power of the formal core.
We found this to be the most relevant work, and we based our approach on it,
specifically in a model checking verification. We use PCTL formalism and include
action in a model to get a more descriptive model.
2.1 Synthesis
Table 1 summarizes a comparison of the related works. As we can see the majority
of works do not support formal representation of the context, low and high context
level. They focused more on providing a framework including a predictive module,
rather than on the prediction module itself. The essential part of a prediction model
being the approach used in the prediction process itself.
Ubiquitous environments are highly dynamic, that is, applications can interact
with a great number of different and unknown applications all the time [22, 23, 24].
Hence, it is essential to define a formal representation for the context, so that
different systems can easily communicate. Thus, specifying a context represen-
tation is considered a key feature for model prediction. This is why we choose
1418 D. Ameyed, M. Miraoui, A. Zaguia, F. Jaafar, C. Tadj
no no no yes sequence
no no yes yes trajectory
yes no yes yes Bayesian yes
yes yes no yes sequence
the most
S. F¨oll
no no yes yes temporal
S. Najar
yes no no yes semantic
H. Joa
yes yes yes yes alignment
Table 1. Comparative overview of context prediction research work
a formal context representation based on a logic perspective [9]. Also, we build
a model in a temporal logic formalism providing clear formal semantics by using
a probabilistic temporal logic (PCTL), and we propose a new probabilistic-labeled
transaction model Model-LPTM. One might also conclude that the prediction ap-
proaches supported by previous works compute the most probable future context,
based on simple uni-dimensional context information. Existing systems do not al-
low a formal context prediction through temporal-semantics and multidimensional
In this paper, we propose to investigate the application of probabilistic temporal
logic as a powerful formal presentation for context prediction. It also proposes
a formal prediction approach based on temporal logic in a multidimensional context
space and on a new formalism that integrates probability and labeling; which provide
a new probabilistic labeled transaction model thus helping effective context-aware
Using PCTL and Model Checking for Context Prediction 1419
3.1 Temporal Logic in the Context Aware System
Time is a fascinating subject. We are moving through time continuously, and in
order to survive and manage ourselves, we regularly have to make temporal-logic-
based decisions. In daily lives, people are using time-dependent information, e.g.
when to go to the dentist? When is a meeting to be held? With the rise of ubiquitous
systems (which ideally aim to provide a smart user-focused service; like reminder
services, assisted-living services and more), temporal analysis and reasoning appear
best-suited to ensure the proper functioning for this kind of system. Temporal logic
can also be used as a programming language. The basic paradigm is to review the
past and then take action in the future. Abstractly we have an initial state and
certain actions that can be performed in a given state if it satisfies a certain set of
conditions. Performing an action on a state produces a new state.
We have defined a variant of TL (temporal logic) as a language for the specifica-
tion of each situation and its related context. In general, TL has been developed and
applied as a formalism for reasoning about the ordering and quantitative timing of
events [25]. Several formulations have been proposed to satisfy the needs of different
contexts. TL may be classified according to the underlying nature of time: linear
temporal logic LTL and computational tree logic CTL.
LTL, CTL and CTL* can express qualitative properties of a system. Real sys-
tems such as a pervasive system, however, are quite often characterized by non-
deterministic behavior and this is because of the human presence. In order to pro-
vide efficient services, to be user-centric and more realistic, those systems should be
attuned to the unpredictable behavior of humans. Taking probabilities into account,
in addition to non-deterministic behavior, would expand this aspect of the system
allowing the quantification of unpredictable behavior, if the specification holds with
an arbitrary probability value and within a given time limit.
We propose to use PCTL, which had the expressive power of probabilistic tem-
poral logic (it introduces probability to extend CTL which is inadequate in dealing
with a real-life system like a ubiquitous computing system) (Figure 1).
3.2 Probabilistic Temporal Logic Specification
Temporal logic extends the traditional modal logic to allow the description of when
a formula is true. That is, rather than just “necessity” or “possibility”, a formula
may be true at the next point in time or at some other point in the future.
Branching time logic, such as Computation Tree Logic (CTL) [26], enables the
choice of a path among multiple possible paths in a tree structure describing probable
future events. So that, each choice has to mirror the possible set of behaviors starting
from the current state. As opposed to linear-time temporal logic, for which, there
is only one possible future path, we can express whether a property holds for all
possible paths (A formula), or if there exists at least one path for which it is true
1420 D. Ameyed, M. Miraoui, A. Zaguia, F. Jaafar, C. Tadj
Figure 1. Expressivity CTL vs. LTL vs. CTL* vs. PCTL
(E formula). The values of these formulas are determined with a Kripke structure:
a graph with a set of states, transitions between states, and labels indicating which
propositions are true within the states.
We will use a probabilistic extension of CTL, Probabilistic Computation Tree
Logic (PCTL) [27, 28] as it allows probabilistic state transitions, as well as explicit
deadlines for when a formula must hold.
The proposed PCTL syntax is based on the syntax and semantics proposed
in [27, 28]. For the sake of clarity, some specific notations, as well as the underlying
probabilistic model, have been slightly modified from the original syntax presented
by those papers, in order to adapt them to the work context.
In this section, we present the proposed model for the context prediction prob-
lem based on the real-world situation and the related features; which represent the
contextual information of each situation (e.g. location, time, occupation, ambient
information, sound, temperature, etc.).
Figure 2 summarizes the proposed approach. It is based on PCTL formalism,
a probabilistic labeled transition model which will be detailed later (Subsection 3.3).
The context prediction is based on model checking, which will return the future
situation and its probability.
A. Formalism
a. Context
Definition 1. In order to specify this situation-context, let s= (c1, c2,...,
Cn)S,sbeing an n-dimension vector of context information described by
a preposition or a combination of prepositions, where each component ciof s
Using PCTL and Model Checking for Context Prediction 1421
Figure 2. Overview of the proposed approach
is of a specific context type Ci(e.g. hlocationi,hoccupationi, . . . ). A state s
can be multidimensional and expresses composite contextual data describing
the features of a specific situation; e.g., s= ((meeting-room)x(power-point)
×(occupation = 5)) designates the presentation situation on a meeting room.
For each new combination of context information (c1, . . . , cn) that has not
been observed before, is detected, a new state swill be inserted into the
model and labeled with (c1, . . . , cn). For more details about the context
logic-based modeling we refer to previous related work [9].
b. Path and state
The prediction semantics is based on PCTL syntax. For this let p[0,1] be
a probability, let tR+be a time-bound, and let (Ci, ci) be a contextual
value ciof type Cias defined earlier.
Definition 2. Path formulas express the properties and behaviour allocated
to paths.
State formulas express the properties and behaviour allocated to states
Φ := tt|ff |(Ci, ci)|(A, a)Φ|Φ1Φ2|Φ1Φ2|Pp(ϕ)
where ci2AP AP a set of atomic propositions describing situation context
(e.g. location: hmeeting roomi, light: hbrighti, occupation: h3i, application-
1422 D. Ameyed, M. Miraoui, A. Zaguia, F. Jaafar, C. Tadj
running: hpower-pointi), aAis a finite set of actions, and is a com-
parison operator ∼∈ {h,i,,≥}, and pis a probability threshold p[0,1].
Path quantifiers as in PCTL are built from one of the temporal modalities: X
(next) or U(until) (Table 2). tis a time constraint defining an upper bound
on a time interval to describe the duration of a situation, the subsequent
transition and when an action will be active.
Quantifiers over Paths
AΦ – All Φ has to hold on all paths starting from
the current state.
EΦ Exists There exists at least one path starting
from the current state where Φ holds.
Path-Specific Quantifiers
GΦ – Globally Φ has to hold on the entire subsequent
FΦ – finally Φ eventually has to hold
XΦ – Next Φ has to hold at the next state
ΦUψ – Until Φ has to hold at least until at some po-
sition ψholds. ψwill be verified in the
Table 2. Paths quantifiers
Considering Φ a state formula expressed as a pair (Ci, ci), which describes
the type of context and the specific context value in this state (e.g.: location,
meeting-room). We leverage these operators to analyze the future context
Fis the Eventually operator used to verify if a condition φeventually
has to hold in any state from ssomewhere on a subsequent path in the
Gis the Globally operator, and it can be used to check if the condition
φholds in every state on all subsequent paths starting in s.
Xis the Next operator: it evaluates a condition φon all immediate
successor states to the current state s. It has to hold at the next state
(this operator is sometimes noted Ninstead of X). Since we focus on
immediate prediction, we will build a prediction model on this operator
in this paper.
Uis the Until operator and expresses that Φ2will be verified in the future.
And Φ1has to hold starting at the current state at least until at some
further position Φ2holds.
The PCTL state formula Pp(ϕ) asserts that, under all schedulers [28],
the probability for the event expressed by the path formula ϕmeets the
bound specified by p. The probability bounds “p” can be understood
as quantitative counterparts to the CTL path quantifiers and .
Using PCTL and Model Checking for Context Prediction 1423
B. PCTL Semantic
Definition 3. Let M= (S, AP, L) be a PCTL model, sis a state M,AP
a set of an atomic preposition, Lis a labeling function, and φis a PCTL formula.
The satisfaction relation is noted as M,sφ.
Let sbe a state, sSwe can define the satisfaction relation for state formulas
as follows:
M,strue sS,
M,sφ1φ2M,φ1and sφ2,
M,sφ1φ2M,φ1or sφ2,
M,sPp(ϕ)P{πPaths(s)|M,πϕ} ∼ p.
The satisfaction relation for path formula is defined inductively as follows:
M,π|=XΦπ=s0a0,t0s1a1,t1. . . snan1,tn1snand M,s1|= Φ,
M,π|= Φ1UΦ2π=s0a0,t0s1a1,t1. . . snan1,tn1snand k.M ,
sk|= Φ2and
• ∀j < k.M ,sj|= Φ2.
C. Labeled Probabilistic Transition Model: Model-LPTM
A pervasive system follows various behavioral patterns depending on user’s be-
havior. Those patterns cannot be described in a deterministic way. Hence,
our choice of a probabilistic non-deterministic model. In the following, we give
a description of this model and the proposed approach to predicting the next
situation using this formalism.
We represent an LPTM model as a transition system which combines probabilis-
tic choice as in Markov chains with a non-deterministic choice. We define the
model with a timed probabilistic transition based on models defined in [27, 28].
The model integrates time and action and will be presented as follows.
Definition 4. Let LPTM be a Kripke (S, A, P, L): a labeled transition proba-
bilistic model defined as follows:
S: a finite set of states where sSand sinit S,
Act: a finite set of actions where aAand AAct,
L:S2AP state labeling function assigning to each state one or several
atomic prepositions AP ,
PS×A×R+×Dist(S) is the function assigning a probabilistic transition
distribution, such that if (s, δt, a, ρ)Dist(S) and δt > 0 after a span time
4tin a situation swas spent and ais an active A(s) then ρis a point
1424 D. Ameyed, M. Miraoui, A. Zaguia, F. Jaafar, C. Tadj
As for probabilistic systems, we can introduce paths for timed probabilistic
systems except that transitions are now labeled by a (duration,action,distribution)
tuple. Each transition is labeled by a tuple (δt, a, ρ)Dist(S), where:
δt is the time span between siand sj(Section 3.6),
P(si, sj) is the probability assigned to the path transition between siand sj
(Section 3.4),
aA(si) is an action active between two states siand sj(Section 3.5).
Our contribution using this model consists in considering every siSas de-
scribed by a set of context parameters (ciCi) such that L(si) = ciand an action
for a transition path with a temporal duration constraint δt.
To avoid transient states, we choose to integrate them as proposals in paths.
Thus, the path describes a transient context as an accomplishment action or activity
action (see Section 3.5). That can be part of the next state. This makes the modeling
more context-aware and proactive.
Using this LPTM, we can formalize the behavior trace and context variation by
an infinite state tree like in MDP. The context can be a composite context. The
variation of one or several context’s element introduces changes on the state. We
can describe a pervasive environment according to the user’s behaviour with action
semantic (Section 3.4), and context variation, at each spatiotemporal interval, we
have an active state describing a specific context siS. While the user (e.g.:
walking, driving, be, . . . ) or the environment and the system environment (running
process, etc.) act, the context changes and the LPTM moves to the new state
sjSexpressing the property of new context. This successor state sjis visited
with a probability p(si, sj). Before leaving the current state si, the context does
not change and stay active for a limited duration of time δt spent in si. Example:
model (Figure 3).
Explanation: To lead the next situation from the current situation ito the next
one jwe count:
as,n represents an action active for a given state (e.g., a01 describes the active
action from S0to S1),
δtij represents the time span between siand sj(e.g., δt01 describes transition
duration from S0to S1),
Pij refers to the transition probability from the situation sito the situation sj
such that ΣjPij = 1.
a. Transition Probability
For each transition (Si, Sj), the transition probability will be:
p(si, sj) = P(Xn+1 =sj|Xn=si) (1)
where Xnis the random variable that models the stochastic behavior at the
current state and Xn+1 model the stochastic behavior at the next state.
Using PCTL and Model Checking for Context Prediction 1425
Figure 3. Transition model
Recall that the formulas are defined about a probabilistic structure, as described
earlier. While the used structures consist of labeled states and path, they only
imply that it is possible to transition from the state at the tail to the state at
the head with some non-zero probability.
We express a model as a causal model. In this paper, we assume a dependent
relation between current state and the next one. The probabilistic transition
Figure 4. State transition probability
1426 D. Ameyed, M. Miraoui, A. Zaguia, F. Jaafar, C. Tadj
depends only on the current state siand sjis independent of all previous state
The transition probability and the set of prepositions describing contextual fea-
ture situations can be estimated and deduced from the history of past trace of
state transitions and their linked contextual features.
As in statistic computation, let the transition weight be ωij, which defines the
number of transitions observed from sito sj. The transition probability is
calculated as follows:
p(si, sj) = P(Xn+1 =sj|Xn=si) = ωsi,sj
The probability of transition between two states is the ratio of the number of
observed state transitions from sito sjto the number of all observed transitions
from si.
Example: We have a current state s0that can lead to any of the immediate next
states as in Figure 5 as a distributed probability.
Figure 5. State transition
The probability without any constraint of time or action to lead to any next
state when φwill be verified as a Next (optimal) in S1, S2and as a Next (all) in
S3be S3or S1.
Using PCTL and Model Checking for Context Prediction 1427
b. Action
Observing the system’s and user’s behavior, we also noted information describing
actions which influence a service process and make a change in a situation in
the feature context. Based on reference work discussing the linguistics of time
and the semantic verbs and time [30, 31], these actions can use the aspectual
verbs according to the categories in Table 3.
Expressivity Dynamic Durative Telic (bound)
Accomplishment Describing Yes Yes Yes
Durative action
Ending by a culmination point
Activity describing Yes Yes No
durative action
State Often durative No Yes (temporary state) Yes
No (permanent state)
Achievement Change of state Yes No Yes
near punctual duration
Table 3. The four aspectual categories
In the proposed model we can use accomplishment and activity to describe
a transition over a path and a state and achievement in a situation (node).
The computation over the proposed model we use the accomplishment-action
on the path because we are reasoning in a dynamic system with a time-bound
and we count the durative actions in a bound time during a transition. We can
label a graph with state-action and achievement to clearly describe a scenario
or an example.
In the proposed model, actions depend on transition and describe a transition
over a special path. The set of actions available at sSis denoted by A(s). For
each action aA(si), the probabilities can be estimated as other observations from
the history of past trace. We count the probability of transitioning from sito sj
under the action a, and we denote this probability by αs
ai(sj). We refer to [32] for
more details about computation in mapping and learning steps.
Example: We have a set A(s0) = {a1, a2}and a transition and s0can lead to
any of the immediate states as in Figure 6.
In this example, the probability next φto occur with any action aA(s0) is
PsjSP(sj, si)·PsjSsjαsi
a(sj)= 0.45,
the optimal next will be the path with a strategy probability 0.45 in this case
that will be the transition (S0, S2) under the action a2.
3.3 Space Time Duration
We will show how we can estimate the time span between siand the next sj. The
time was considered in the model as the constraint parameter for states as well as
1428 D. Ameyed, M. Miraoui, A. Zaguia, F. Jaafar, C. Tadj
Figure 6. Action transition
transitions (path), as described in a previous contextual definition and model. Every
situation has a time interval describing its start time and end time which can be
useful as a learning data base [24, 8].
We express the time span as a probability function where µand αare the mean
and standard deviation values, calculated from the time span. In order to limit
the computation, we consider in the current work only the observation falling with
standard deviation
f(δtij ,(µ, σ)) = 1
2δtij µ
Figure 7 gives an example of transition time span: the typical time span falls in
the following range.
We model the time span as a random variable Dnexpressing the time spent
between siand sj. To figure out Dn, we observe the time periods spent between
consecutive states transitions, and we associate an individual distribution to every
transition between siand sj. Formally the distribution can be presented as:
ij (δt) = P(Dn=δt|Xn+1 =Sj, Xn=Si).(4)
The cumulative distribution is given by 4ij which is given as Rb
04ij (δt) dδt
and can be computed as the sum of probabilities associated with consecutive in-
tervals up to a desired upper time bound b. The probability of a time span to
Using PCTL and Model Checking for Context Prediction 1429
Figure 7. Transition span time
lie within the interval [a, b] can be derived from the cumulative distribution as
04ij (δt) dδt.
3.4 Immediate-Context Prediction Processing
The state space can be traversed by going from one state to the next as allowed by
transitions among states. The resulting series of visited states (path) models one
possible spatiotemporal behavior of context. For context prediction we start at the
state siSoccupied in the real world, and we evaluate the possible path starting
at siand leading to the next state sj. The state and path follow the PCTL semantic,
as explained in Section 3.2.
In the proposed model we can evaluate a satisfaction relation for the path for-
mula as follows:
Xn+1 argmaxXn+1 P(Xn+1 =sj|Xn=si, a A(si)).(5)
The path formula ϕis satisfied after 4tunit of time elapsed in a situation s
and under an action aif and only if the probability P((s, a, 4t)ϕ) satisfies the
threshold p.
In our case, we need to be able to verify that a given state satisfies the context’s
state preposition φ= (Ci, ci) (as described in Section 3.3). We also need to consider
the temporal operator Next Pp[X φ] and define its probability computation.
Using a PCTL, we can investigate the reachability properties using the Next
operator, evaluating a condition state formula φ, expressed over the contextual in-
formation (Ci, ci), on all immediate successor states sjof the current situation si.
1430 D. Ameyed, M. Miraoui, A. Zaguia, F. Jaafar, C. Tadj
Using this reasoning, the system is able to predict a variety of information about
the context (e.g. the next location, the next activity, what time the user finishes
work, at what time the next meeting starts, what is the optimal strategy to lead the
next situation, etc.). The high threshold probabilities according to a special action
describing a transition reduce the number of false prediction prepositions and make
the prediction more efficient and more context-aware.
We can derive the prediction based on next operator in PCTL as explained in
the next subsection using the verification algorithm in a model checking based on
symbolic method [33, 34].
3.5 Computation for PCTL Next Operator
In this paper, we focus on immediate prediction. Thus, we will only use the next
operator. In future work, we might extend the proposed approach with the two
more temporal operators: (i) Until: Pp[φ1φ2] and (ii) Bounded Until: P
p[φ1kφ2] which can be useful for a long-term prediction.
The Next operator restricts the space of satisfaction property of path formula ϕ
to the immediate successor the next state sjof the current state si. We need to
determine the Next (optimal) φ=Pmax=?([X φ]) which is the maximum probability
satisfying Next φ.
Xn+1 argmaxXn+1 P(Xn+1 =sj|Xn=si).(6)
Or the all Next (all) φ=P. ([Xφ]); here we can find all the policies that satisfy
the next state with φproperty, where:
P(Xn+1 =sj|Xn=si, a A(si)) (7)
=PsjSsj|=φP(sj, si).PsjSsj|=φαsi
4tTij (δt) dδt
PsjSP(sj, si).PsjSsjαsi
4tTij (δt) dδt .(9)
The optimization function log(P(φ|λ)) is proposed to avoid data overflow in the
computation of feed forward probability.
The prediction approach is based on the traces contained in the stochastic user
model. The traces are used as a search space of possible context changes. Infor-
mation about the recent sensed context changes (current state’s context) is used to
condition the prediction on what the optimal Next might be expected in the imme-
diate future. Using a model based on statistical knowledge, the predictions in the
proposed approach, work as a scanning process in a stochastic transition system to
find the Next verifying the property expressed in the formula. A component diagram
of the prediction model can be represented, as shown in Figure 8.
Using PCTL and Model Checking for Context Prediction 1431
Figure 8. Component diagram of LPTM system
3.6 Use Case and Test
In this section, we present the experimental results for the proposed model. Before
getting into the evaluation of the prediction model, we describe the data set we
used [35, 36].
We use a real-world context traces from Domus smart home case study. The
Domus smart home is one-bedroom apartment mounted inside the University of
Sherbrooke. The apartment is equipped with different types of sensors. During the
experiments, users have participated to evaluate the early morning routines, which
correspond to the basic everyday tasks during the morning. The routine describes
morning activities as follow: wake up, toileting, preparing breakfast, having break-
fast and other activities. We use this study case to predict the Next activity. The
activities we consider in the simulation are as follows: wake up, use toilet, preparing
breakfast, having breakfast.
As a simulator tool, we use Petri nets, that means formal models of information
flow which support timing specifications and a non-deterministic behavior for more
details about tools we refer to [37]. We first model the prediction model as shown
in Figure 9.
The model is composed mainly of:
Generation: this module generates the current context and constraints as a ran-
dom choice.
Get related activity: the module gives the activity probability (Section 3.4).
Get related activity Action: the module determines the action probability (Sec-
tion 3.5).
Get related activity time: the module defines the time span probability (Sec-
tion 3.6).
1432 D. Ameyed, M. Miraoui, A. Zaguia, F. Jaafar, C. Tadj
Figure 9. General view of prediction model
Using PCTL and Model Checking for Context Prediction 1433
Probability calculation: the module gives the probability of the most probable
Next activity (Section 3.7).
The transition between different activities are learned based on the LPTM trace
Model as shown in Figure 10.
Figure 10. Activities transitions information
To recognize the next activity, we generate a random for a variety of activity
(context value) time and action as shown in Figure 10. When an event is detected,
this module generates automatically the actual context, the action and the transition
time (Figure 10).
As we mentioned before, the Dumas data set that we used for actual context
is limited to having breakfast, other activities, preparing breakfast, use toilet, wake
up, washing dishes, for action is limited to (close door, open door) and for time is
limited to (5,10,15,20,25,30,35,40,45,50) The outputs of this module are:
The actual context used as input by the transition Get related activity to de-
termine the activity probability.
The action used as input by the transition Get related activity Action to deter-
mine the activity probability.
The transition time used as input by the transition Get related activity time to
determine the time span probability.
The transitions between different activities are learned based on the LPTM trace
model, as shown in Figure 11. The input of this module is the actual activity
selected randomly by the generator (Figure 10). According to this activity the
transition “Get activities and Prob” selects the adequate activities and probabilities
1434 D. Ameyed, M. Miraoui, A. Zaguia, F. Jaafar, C. Tadj
from the place Trace LPTM. As output of this module, we have three parameters:
the actual activity presented by the variable SeleAC as string, the list of activities
presented by the list ACL and the list of probabilities presented by the list LPA.
For instance, if the actual activity is “Wake up” (SeleAC) then the output
of this module will be (“wake up”, [“use toilet”, “preparing breakfast”], [0.9,0.1])
the different probabilities in the place “Trace LPTM” are computed from dataset
DUMAS. After we get all probabilities, the transition “Probability calculation and
Activity selection” (Figure 9) determines the next activity (Section 3.7). Then the
role of the transition “verifying result” to test the result generated by the transition
“probability calculation and Activity selection” The actual activity and the next
activity are the input of this module. We compare the result obtained by the values
in the place “DB-Real-Flow Evidence”.
Figure 11. Action-time generators
Finally, after getting the Next activity identified, we evaluate the results based
on real flow evidence as shown in Figure 12.
The diagram in Figure 13 resumes the prediction results for each activity. The
average of the prediction model was 65%, we also get 78 % in some activity, as
shown in the following diagram.
3.7 Result Discussion
The accuracy criteria can usually be ranging from low/worst performance to high/
best performance, depending on the capacity of the approach to be effective in
Using PCTL and Model Checking for Context Prediction 1435
Figure 12. Verifying results Next activity
Figure 13. The activities prediction accuracy
a ubiquitous environment. Our model is in the high rang performance comparing to
other context prediction model tested in real data. Using Lezi algorithm [38], the
authors obtained prediction rate nearing 47 %. Using Markov and Bayes [39], the
prediction accuracy achieved was 70 % to 80 %. In Najar’s work [19], the system
was based on the implementation of matching algorithm the prediction had a result
that neared 60 %. Sigg et al. [40] have used ARMA in an analytical test, and we
disregarded it for our work because is applicable only for a numerical data set. Da
Rosa et al. [5] obtained an average accuracy of 60% for the alignment method and
72 % for the Semi-Markov approach, and the model does not make a distinction
between low or high context level. oll et al. [41] used CSL and Semi-Markov-
1436 D. Ameyed, M. Miraoui, A. Zaguia, F. Jaafar, C. Tadj
Chain, they achieved 87%, and they concluded their work noting using PCTL could
increase the expressive power of the formal core. Which constitutes an essential and
valuable contribution presented in our model including the semantic of action and
span time duration as a probability function, to improve the expressivity and obtain
better precision for the prediction.
Figure 14 summarizes the comparison of the existing approach and our proposed
approach, regarding the different evaluation criteria [11].
Figure 14. Comparative analysis of approaches
The prediction of future context has become a central element in pervasive systems to
provide proactive context-awareness adaptation. However, the effective deployment
of a context-aware prediction is still limited due to a semantic gap between the data
provided by the physical sensing devices and the necessary information to predict
future behavior of the system and its users. In this paper, we have demonstrated how
formal methods could be adapted to offer a formal ground to reduce this semantic
gap and provide improved expressiveness via the PCTL logic. And therefore, verify
reachability a next-state in the future. Introducing the constraints of time and
action adds logic-based expressiveness and provides a clear tracing and learning
model. Thus, increasing the effectiveness of probabilistic measures.
Using PCTL and Model Checking for Context Prediction 1437
In this paper, we present a new formal approach using probabilistic tempo-
ral logic and model checking to provide an immediate prediction. The proposed
approach allows a formal expressivity of prediction. This is useful in pervasive
computing systems to deal with their inherently heterogeneous nature. The model
offers a real-time ability to discover a future context on multidimensional space and
can handle a general context in low or high level. Adopting a PCTL as formal-
ism provides better expressivity to describe the nondeterministic nature of human
behavior which can provide an efficient prediction and consequently offer adequate
proactivity, fitting with the user’s needs. In fact, PCTL can be used to specify prop-
erties of probabilistic timed automata adding the semantic of action in our model,
Thus, we think it will be useful to specify properties of probabilistic timed labelled
automata. Regarding the complexity of model checking with probabilistic timed
labelled automata, we consider this in a separate future work after more research in
this direction.
In future work, we will extend the current research to include the long-term
prediction and possibly discuss a generic framework that can support the pro-
posed prediction model to automating proactive adaptation based on predicted
context. We will try to investigate more, the issue of semantic in action to be
able to provide a more expressive model, inducing cognitive and linguistic sup-
[1] Salfner, F.—Lenk, M.—Malek, M.: A Survey of Online Failure Prediction
Methods. ACM Computing Surveys (CSUR), Vol. 42, 2010, No. 3, Art. No. 10, doi:
[2] Boytsov, A.: Context Reasoning, Context Prediction and Proactive Adaptation in
Pervasive Computing Systems. Thesis, Lule˚a Tekniska Universitet, 2011.
[3] Boytsov, A.—Zaslavsky, A.: Extending Context Spaces Theory by Proactive
Adaptation. In: Balandin, S., Dunaytsev, R., Koucheryavy, Y. (Eds.): Smart Spaces
and Next Generation Wired/Wireless Networking (ruSMART 2010, NEW2AN 2010).
Springer, Berlin, Heidelberg, Lecture Notes in Computer Science, Vol. 6294, 2010,
pp. 1–12, doi: 10.1007/978-3-642-14891-0 1.
[4] Boytsov, A.—Zaslavsky, A.—Synnes, K.: Extending Context Spaces Theory
by Predicting Run-Time Context. In: Balandin, S., Moltchanov, D., Koucheryavy, Y.
(Eds.): Smart Spaces and Next-Generation Wired/Wireless Networking (ruSMART
2009, NEW2AN 2009). Springer, Berlin, Heidelberg, Lecture Notes in Computer
Science, Vol. 5764, 2009, pp. 8–21, doi: 10.1007/978-3-642-04190-7 2.
[5] da Rosa, J. H.—Barbosa, J. L. V.—Ribeiro, G. D.: ORACON: An Adaptive
Model for Context Prediction. Expert Systems with Applications, Vol. 45, 2016,
pp. 56–70, doi: 10.1016/j.eswa.2015.09.016.
1438 D. Ameyed, M. Miraoui, A. Zaguia, F. Jaafar, C. Tadj
[6] Sigg, S.—Haseloff, S.—David, K.: An Alignment Approach for Context Pre-
diction Tasks in UbiComp Environments. IEEE Pervasive Computing, Vol. 9, 2010,
No. 4, pp. 90–97, doi: 10.1109/mprv.2010.23.
[7] Zaguia, A.—Tadj, C.—Ramdane-Cherif, A.: Context-Based Method Using
Bayesian Network in Multimodal Fission System. International Journal of Computa-
tional Intelligence Systems, Vol. 8, 2015, No. 6, pp. 1076–1090, doi: 10.21307/ijssis-
[8] Ameyed, D.—Miraoui, M.—Tadj, C.: A Spatiotemporal Context Definition for
Service Adaptation Prediction in a Pervasive Computing Environment. arXiv preprint
arXiv:1505.01071, 2015.
[9] Ameyed, D.—Miraoui, M.—Tadj, C.: Spatiotemporal Context Modelling in Per-
vasive Context-Aware Computing Environment: A Logic Perspective. International
Journal of Advanced Computer Science and Applications (IJACSA), Vol. 7, 2016,
No. 4, pp. 407–414, doi: 10.14569/ijacsa.2016.070454.
[10] Barbosa, J. L. V.: Ubiquitous Computing: Applications and Research Opportuni-
ties. 2015 IEEE International Conference on Computational Intelligence and Com-
puting Research (ICCIC), 2015, doi: 10.1109/iccic.2015.7435625.
[11] Ameyed, D.—Miraoui, M.—Tadj, C.: A Survey of Prediction Approach in Perva-
sive Computing. International Journal of Scientific and Engineering Research, Vol. 6,
2015, No. 5, pp. 306–316.
[12] David, K.—Kusber, R.—Lau, S. L.—Sigg, S.—Ziebart, B.: 3rd Workshop
on Recent Advances in Behavior Prediction and Pro-Active Pervasive Computing.
Proceedings of the 2014 ACM International Joint Conference on Pervasive and Ubiq-
uitous Computing: Adjunct Publication (UbiComp ’14 Adjunct), 2014, pp. 415–420,
doi: 10.1145/2638728.2641675.
[13] Mayrhofer, R.: Context Prediction Based on Context Histories: Expected Bene-
fits, Issues and Current State-of-the-Art. Cognitive Science Research Paper, Univer-
sity of Sussex CSRP, 2005, Vol. 577, p. 31.
[14] Sigg, S.—Haseloff, S.—David, K.: A Novel Approach to Context Prediction
in Ubicomp Environments. 2006 IEEE 17th International Symposium on Personal,
Indoor and Mobile Radio Communications, 2006, doi: 10.1109/pimrc.2006.254051.
[15] Meiners, M.—Zaplata, S.—Lamersdorf, W.: Structured Context Prediction:
A Generic Approach. In: Eliassen, F., Kapitza, R. (Eds.): Distributed Applications
and Interoperable Systems (DAIS 2010). Springer, Berlin, Heidelberg, Lecture Notes
in Computer Science, Vol. 6115, 2010, pp. 84–97, doi: 10.1007/978-3-642-13645-0 7.
[16] Padovitz, A.—Loke, S. W.—Zaslavsky, A.: Towards a Theory of Context
Spaces. In Proceedings of the Second IEEE Annual Conference on Pervasive Com-
puting and Communications Workshops, 2004, doi: 10.1109/percomw.2004.1276902.
[17] Boytsov, A.—Zaslavsky, A.: Context Prediction in Pervasive Computing Sys-
tems: Achievements and Challenges. In: Burstein, F., Br´ezillon, P., Zaslavsky, A.
(Eds.): Supporting Real-Time Decision-Making. Springer, Boston, MA, Annals of
Information Systems, Vol. 13, 2011, pp. 35–63, doi: 10.1007/978-1-4419-7406-8 3.
[18] Abowd, G. D.—Dey, A. K.—Brown, P. J.—Davies, N.—Smith, M.—
Steggles, P.: Towards a Better Understanding of Context and Context-Awareness.
Using PCTL and Model Checking for Context Prediction 1439
In: Gellersen, H. W. (Ed.): Handheld and Ubiquitous Computing (HUC 1999).
Springer, Berlin, Heidelberg, Lecture Notes in Computer Science, Vol. 1707, 1999,
pp. 304–307, doi: 10.1007/3-540-48157-5 29.
[19] Najar, S.—Kirsch Pinheiro, M.—Souveyet, C.: A New Approach for Ser-
vice Discovery and Prediction on Pervasive Information System. Procedia Computer
Science, Vol. 32, 2014, pp. 421–428, doi: 10.1016/j.procs.2014.05.443.
[20] F¨
oll, S.—Herrmann, K.—Rothermel, K.: PreCon – Expressive Context Pre-
diction Using Stochastic Model Checking. In: Hsu, C. H., Yang, L.T., Ma, J., Zhu, C.
(Eds.): Ubiquitous Intelligence and Computing (UIC 2011). Springer, Berlin, Hei-
delberg, Lecture Notes in Computer Science, Vol. 6905, 2011, pp. 350–364, doi:
10.1007/978-3-642-23641-9 29.
[21] Magherini, T.—Fantechi, A.—Nugent, C. D.—Vicario, E.: Using Tempo-
ral Logic and Model Checking in Automated Recognition of Human Activities for
Ambient-Assisted Living. IEEE Transactions on Human-Machine Systems, Vol. 43,
2013, No. 6, pp. 509–521, doi: 10.1109/tsmc.2013.2283661.
[22] Wagner, A.—Barbosa, J. L. V.—Barbosa, D. N. F.: A Model for Profile Man-
agement Applied to Ubiquitous Learning Environments. Expert Systems with Appli-
cations, Vol. 41, 2014, No. 4, Part 2, pp. 2023–2034, doi: 10.1016/j.eswa.2013.08.098.
[23] Miraoui, M.: Dynamic Adaptation in Ubiquitous Services: A Conceptual Architec-
ture. In: Ramanathan, R., Raja, K. (Eds.): Handbook of Research on Architectural
Trends in Service-Driven Computing, Chapter 7. IGI Global, 2014, pp. 160–180, doi:
[24] Bohn, J.—Coroam˘
a, V.—Langheinrich, M.—Mattern, F.—Rohs, M.: So-
cial, Economic, and Ethical Implications of Ambient Intelligence and Ubiquitous
Computing. In: Weber, W., Rabaey, J.M., Aarts, E. (Eds.): Ambient Intelligence.
Springer, Berlin, Heidelberg, 2005, pp. 5–29, doi: 10.1007/3-540-27139-2 2.
[25] Schnoebelen, P.: The Complexity of Temporal Logic Model Checking. Advances
in Modal Logic, Vol. 4, 2002, pp. 393–436.
[26] Clarke, E.—Grumberg, O.—Peled, D.: A Model Checking. MIT Press, 1999.
[27] Kwiatkowska, M.—Norman, G.—Sproston, J.—Wang, F.: Symbolic Model
Checking for Probabilistic Timed Automata. Information and Computation, Vol. 205,
2007, No. 7, pp. 1027–1077, doi: 10.1016/j.ic.2007.01.004.
[28] Baier, C.—de Alfaro, L.—Forejt, V.—Kwiatkowska, M.: Model Check-
ing Probabilistic Systems. In: Clarke, E., Henzinger, T., Veith, H., Bloem, R.
(Eds.): Handbook of Model Checking. Chapter 28. Springer, 2018, pp. 963–1000,
doi: 10.1007/978-3-319-10575-8 28.
[29] Wolovick, N.—Johr, S.: A Characterization of Meaningful Schedulers for
Continuous-Time Markov Decision Processes. In: Asarin, E., Bouyer, P. (Eds.): For-
mal Modeling and Analysis of Timed Systems (FORMATS 2006). Springer, Berlin,
Heidelberg, Lecture Notes in Computer Science, Vol. 4202, 2006, pp. 352–367, doi:
10.1007/11867340 25.
[30] Vendler, Z.: Verbs and Times. The Philosophical Review, Vol. 66, 1957, No. 2,
pp. 143–160, doi: 10.2307/2182371.
[31] Ratt´
e, S.—Ratt´
e, S.: Computational Event Structures – Part I. 1994.
1440 D. Ameyed, M. Miraoui, A. Zaguia, F. Jaafar, C. Tadj
[32] Lahijanian, M.—Andersson, S. B.—Belta, C.: Control of Markov Decision
Processes from PCTL Specifications. Proceedings of the 2011 American Control Con-
ference, 2011, IEEE, doi: 10.1109/acc.2011.5990952.
[33] Kwiatkowska, M.—Norman, G.—Parker, D.: Stochastic Model Checking. In:
Bernardo, M., Hillston, J. (Eds.): Formal Methods for Performance Evaluation (SFM
2007). Springer, Berlin, Heidelberg, Lecture Notes in Computer Science, Vol. 4486,
pp. 220–270, doi: 10.1007/978-3-540-72522-0 6.
[34] Kwiatkowska, M.—Norman, G.—Sproston, J.: PCTL Model Checking of
Symbolic Probabilistic Systems. Technical report CSR-03-2, University of Birming-
ham, School of Computer Science, 2003.
[35] Kadouche, R.—Pigot, H.—Abdulrazaka, B.—Giroux, S.: Support Vector
Machines for Inhabitant Identification in Smart Houses. In: Yu, Z., Liscano, R.,
Chen, G., Zhang, D., Zhou, X. (Eds.): Ubiquitous Intelligence and Computing (UIC
2010). Springer, Berlin, Heidelberg, Lecture Notes in Computer Science, Vol. 6406,
2010, pp. 83–95, doi: 10.1007/978-3-642-16355-5 9.
[36] Chikhaoui, B.—Wang, S.—Pigot, H.: A New Algorithm Based on Sequential
Pattern Mining for Person Identification in Ubiquitous Environments. KDD Work-
shop on Knowledge Discovery from Sensor Data, 2010.
[37] Liu, Y.—Miao, H.-K.—Zeng, H.-W.—Ma, Y.—Liu, P.: Nondeterministic
Probabilistic Petri Net – A New Method to Study Qualitative and Quantitative Be-
haviors of System. Journal of Computer Science and Technology, Vol. 28, 2013, No. 1,
pp. 203–216, doi: 10.1007/s11390-013-1323-7.
[38] Gopalratnam, K.—Cook, D. J.: Active LeZi: An Incremental Parsing Algo-
rithm for Sequential Prediction. International Journal on Artificial Intelligence Tools,
Vol. 13, 2004, No. 4, pp. 917–929, doi: 10.1142/s0218213004001892.
[39] Kaowthumrong, K.—Lebsack, J.—Han, R.: Automated Selection of the Ac-
tive Device in Interactive Multi-Device Smart Spaces. Workshop at UbiComp, 2002,
[40] Sigg, S.: Development of a Novel Context Prediction Algorithm and Analysis of
Context Prediction Schemes. Kassel University Press GmbH, 2008.
[41] F¨
oll, S.: State-Based Context Prediction in Mobile Systems. Dissertation, Univer-
sity of Stuttgart, 2014.
Using PCTL and Model Checking for Context Prediction 1441
Darine is currently Post-Doctoral Researcher in Synchromedia Laboratory in
the ´
Ecole de T´echnologie Sup´erieure ( ´
ETS). She received her Ph.D. in engineering from the
Ecole de T´echnologie Sup´erieure ( ´
ETS), University of Quebec, Montreal, Canada, in 2016.
She obtained her M.Sc. in digital art and technology from the University Rennes 2 (UR2),
University of Upper Brittany, France, in 2010. She obtained her M.Sc. in multimedia
engineering from the University Paris-Est Marne-la-Vall´ee (UPEM), University of Paris 11,
France, in 2008. She received her B.Sc. in software and management from the Institut
Sup´erieur de Gestion (ISG), University of Tunis, Tunisia, in 2005. Her research interests
include pervasive and ubiquitous computing, context-aware systems, predictive modelling,
activity recognition, human centred computing, cognitive IoT. She has published papers in
national and international conferences and journals. She had also several years of industry
experience in Canada and Africa in the areas of software engineering, mobile computing,
ubiquitous computing, CIoT, and management.
Moeiz received his Ph.D. (2009) in computer science from the ´
Ecole de Tech-
nologie Sup´erieure ( ´
ETS), University of Quebec, Montreal, Canada. He obtained his
M.Sc. in computer science from the National Engineering School of Sfax, University of
Sfax, Tunisia, in 2003. He received his B.Sc. Ing. in computer science from the National
School for Computer Science, University of Tunis, Tunisia, in 1999. He began working as
Assistant Professor in computer science at High Institute of Applied Science and Tech-
nology, University of Gafsa, Tunisia, in 2009. He has supervised several M.Sc. students
and co-supervises Ph.D. projects. His research interests include pervasive and ubiquitous
computing, context-aware systems and smart spaces. He has many published papers in
national and international conferences and journals, and he is a reviewer and a technical
committee member of several journals and conferences.
Atef is currently Assistant Professor in College of Computers and Information
Technology, Taif University, Kingdom of Saudi Arabia. He received his Ph.D. and M.Sc.
degrees in computer science from ´
Ecole de T´echnologie Sup´erieure ( ´
ETS), University of
Quebec, Montreal, Canada, and his Bachelor degree in computer engineering from Ot-
tawa University. He spent one year at ´
Ecole de T´echnologie Sup´erieure ( ´
ETS), University
of Quebec, Montreal, Canada, as a postdoctoral fellow. He was working on developing
application for newborn cry-based diagnosis system with the integration of interaction
context, financial by Bill and Melinda Gates Foundation. His research interests include
a multimodal system, pervasive and ubiquitous computing and context-aware systems. He
has published papers in national and international conferences and journals. He was in
Program Committee for the Tenth International Conference on Mobile Ubiquitous Com-
puting, Systems, Services and Technologies UBICOMM 2016, Venice, Italy.
1442 D. Ameyed, M. Miraoui, A. Zaguia, F. Jaafar, C. Tadj
Fehmi is Adjunct Professor in the Faculty of Management of Concordia Univer-
sity of Edmonton, Canada. Previously, he was postdoctoral fellow at Queen’s University
and Polytechnique Montreal, and Research Scientist in computer security and software
engineering at the Research and Development Team of Ubitrak Inc. He received his Ph.D.
from the Department of Computers Sciences and Operations Research of the Universit´e
de Montr´eal in Quebec, Canada, 2013. His research interests include the analysis of soft-
ware quality and evolution, cyber security, and techniques and tools for mining software
repositories. He also had several years of industry experience in Canada and Africa in the
areas of software engineering, computer security, web and mobile computing, and business
process management.
Chakib serves as Professor at ´
Ecole de Technologie Sup´erieure (´
ETS), University of
Quebec, Montreal, Canada. He received his Ph.D. degree in signal and image processing
from ENST Paris, Paris, France, in 1995. His main research interests include signal
processing, speech recognition, pervasive computing and multimodal systems.
The era of modern computing has fascinated the masses and has outreached to their daily grinds via provisioning day-to-day services for facilitating their work. With this extensive reachability of human populace on service-oriented paradigms, the requirement to manage the existing resources has also escalated. Cloud being the global capturer of pay-per-utility model has become the point of convergence of modern technologies in serving the clients in their day-to-day chores. The extensions of cloud computing, majorly, IoT, Fog Model, and NBIoT, have proliferated across geographical boundaries to every corner of the world. Thus, the exaggerating use of such platforms for services has created a dire need for resource management and is becoming as a major challenge to be addressed before service providers. Besides, the increasing traffic on cloud has also posed a threatening alarm before the cloud human entities and, as per the available statistics, electricity consumption will hike from 632 to 1963 Billion Kilo Watt Hours by the end of 2020 and CO2 emission would be ~1034 megatons. Although it has encapsulated the research focus, and many heuristics have been proposed in this direction, still an infallible solution strategy needs to be derived. Bin packing is an upstanding solution to the problem, and its pragmatic implementation is realized through employing live migration strategies. Consequently, this research study presents an extensive exploration in the direction of resource management and energy management in cloud along with the techniques of live migration as a mitigation.
Full-text available
Ubiquitous (or Pervasive) Computing is a new domain in Computer Science resulting from the emergence and evolution of both distributed systems and mobile computing. Technology is moving beyond the personal computer towards a growing trend of embedded microprocessors in everyday objects and is demanding an unobtrusive connectivity between them in order to serve users at anytime and anywhere. The main objective of a ubiquitous computing system is to provide adaptive services proactively, without explicit user intervention and according to the user's current context. Despite interesting previous research works, there is still a lack of software tools and related research in terms of comprehensive context modeling, architecture of context-aware ubiquitous systems, and dynamic adaptation approaches in ubiquitous service computing environments. This chapter proposes a conceptual architecture to provide dynamic adaptability in ubiquitous services based on context-awareness and user preferences. As part of this proposal, the authors detail an ontology-based context modeling approach, a multi-agent architecture to support the development of ubiquitous computing applications, and a case-based reasoning method for service adaptation.
Full-text available
Pervasive context-aware computing, is one of the topics that received particular attention from researchers. The context, itself is an important notion explored in many works discussing its: acquisition, definition, modelling, reasoning and more. Given the permanent evolution of context-aware systems, context modeling is still a complex task, due to the lack of an adequate, dynamic, formal and relevant context representation. This paper discusses various context modeling approaches and previous logic-based works. It also proposes a preliminary formal spatiotemporal context modelling based on first order logic, derived from the structure of natural languages.
Full-text available
Today, technology allows us to produce extensive multimodal systems which are totally under human control. These systems are equipped with multimodal interfaces, which enable more natural and more efficient interaction between man and machine. End users can take advantage of natural modalities (e.g. audio, eye gaze, speech, gestures, etc.) to communicate or exchange information with applications. In this work, we assume that a number of these modalities are available to the user. In this paper, we present a prototype of a multimodal architecture, and show how modality selection and fission algorithms are implemented in such a system. We use a pattern technique to divide a complex command into elementary subtasks and select suitable modalities for each of them. We integrate a context-based method using a Bayesian network to resolve ambiguous or uncertain situations.
Full-text available
Context awareness is one of the fundamental principles underpinning pervasive computing. Context prediction, a new trend in pervasive computing, is an open-ended research topic with a lot of challenges and opportunities for innovation. This work presents and analyses the development in this area and compares different context prediction techniques and approaches.
Full-text available
Pervasive systems refers to context-aware systems that can sense their context, and adapt their behavior accordingly to provide adaptable services. Proactive adaptation of such systems allows changing the service and the context based on prediction. However, the definition of the context is still vague and not suitable to prediction. In this paper we discuss and classify previous definitions of context. Then, we present a new definition which allows pervasive systems to understand and predict their contexts. We analyze the essential lines that fall within the context definition, and propose some scenarios to make it clear our approach.
The model-checking approach was originally formulated for verifying qualitative properties of systems, for example safety and liveness (see Chap. 2), and subsequently extended to also handle quantitative features, such as real time (see Chap. 29), continuous flows (see Chap. 30), as well as stochastic phenomena, where system evolution is governed by a given probability distribution. Probabilistic model checking aims to establish the correctness of probabilistic system models against quantitative probabilistic specifications, such as those capable of expressing, for example, the probability of an unsafe event occurring, expected time to termination, or expected power consumption in the start-up phase. In this chapter, we present the foundations of probabilistic model checking, focusing on finite-state Markov decision processes as models and quantitative properties expressed in probabilistic temporal logic. Markov decision processes can be thought of as a probabilistic variant of labelled transition systems in the following sense: transitions are labelled with actions, which can be chosen nondeterministically, and successor states for the chosen action are specified by means of discrete probabilistic distributions, thus specifying the probability of transiting to each successor state. To reason about expectations, we additionally annotate Markov decision processes with quantitative costs, which are incurred upon taking the selected action from a given state. Quantitative properties are expressed as formulas of the probabilistic computation tree logic (PCTL) or using linear temporal logic (LTL). We summarise the main model-checking algorithms for both PCTL and LTL, and illustrate their working through examples. The chapter ends with a brief overview of extensions to more expressive models and temporal logics, existing probabilistic model-checking tool support, and main application domains.
Context prediction has been receiving considerable attention in the last years. This research area seems to be the next logical step in context-aware computing, which, until a few years ago, had been concerned more with the present and the past temporal dimensions. Most of research works related to context prediction employ the same algorithm for all cases. We did not find any approach that automatically decides the best prediction method according to the situation. Therefore, we propose the ORACON model. ORACON adapts itself in order to apply the best algorithm to the case. This adaptive behavior is the main contribution of this work and differentiates the proposed model of other related works. Furthermore, ORACON supports other important aspects of ubiquitous computing, such as, context formal representation and privacy. We have built a functional prototype that allowed us to conduct two experiments. The first experiment successfully tested the main functionalities provided by ORACON to support context prediction and privacy aspects. The test used context histories generated with a location database that contains 22 millions chekins across 220,000 users in the location sharing services Foursquare and Twitter. The second experiment assessed the adaptive feature of the ORACON. The test simulated the behavior of 30 users for a period of 30 days, using context histories generated through the Siafu simulator. This tool generates data for the evaluation and the comparison of machine learning methods in mobile context-aware settings. We concluded that ORACON chose the most accurate prediction algorithm in the simulated scenario, proving that the model reached the main contribution sought by this research.
Context-aware computing has developed from a pure research area to a widely acknowledged design principle of modern mobile systems over the last years. Mobile applications, able to automatically adapt to a user’s dynamic context and improve the ease of human-computer interactions, are commonly available today. However, with current context-aware services such as restaurant finders or mobile tour guides, it is possible to support users with respect to their present behaviour only. As the next stage in context-aware computing more intelligent proactive applications are envisioned which can not only respond to the current, but also the future context of humans: Smart homes capable of controlling the ambient environment in expectation of the inhabitants’ prospective actions; Social network applications which alert users about places where their friends might be going to; Personalized mobile recommender system to promote events and offers at venues which are relevant to the daily schedules of humans. The development of suitable context prediction methodologies to turn such applications into a reality is however a challenge. The reason is that future context information, hidden in the raw context traces left by users in the real world, is not immediately accessible to applications. Therefore, sophisticated context prediction approaches are required that are able to discover and mine patterns of a user’s behaviour from observed context histories. However, approaches which make accurate and expressive context predictions available and exploit this knowledge to optimize context-aware systems are missing in current research. As a consequence, the full potential of context-aware technologies has not been completely realised yet. In order to address this issue, we contribute in this work new context prediction algorithms and models for state-based context data, suitable for a range of different context types, such as a user’s locations or activities. To this end, this thesis makes the following contributions. In the first part of this thesis, we develop a novel context prediction system which applies statistical modeling concepts to automatically learn a machine-processable model of a user’s behaviour and infer context predictions. With our context prediction system, we identify and address two shortcomings of existing approaches, prediction accuracy and prediction expressiveness, and propose suitable techniques and algorithms to improve them. For increasing the prediction accuracy over current systems, we develop a new context predictor that is able to exploit the conditional dependency of context changes on a user’s activities to anticipate forthcoming context states. Further, in order to overcome the limited expressiveness of prevailing prediction approaches, we explore the application of model checking algorithms for enabling expressive time-dependent forecasts in context prediction systems. Based on the algorithms and models developed in the first part of this thesis, we are able to significantly increase the amount and accuracy of the knowledge provided to proactive applications for the prediction of future context information. In the second part of this thesis, we shift our attention towards tailored context prediction approaches to optimize the performance of mobile sensing applications. These applications represent a new class of mobile systems in the focus of current research, designed to forward streams of sensed context updates to interested parties over wireless communication channels. As mobile data communication induces a substantial energy overhead on mobile devices, we develop novel prediction-based protocols for improving the energy efficiency of mobile sensing applications. First, we present update protocols which are able to exploit context predictions for reducing the number of transmitted context update messages and trading off context accuracy vs. energy consumption. Then, we extend our approach and show how knowledge about a user’s future behaviour can be used to find the optimal update schedule for both sensing and communicating context data given hard bounds on the energy consumption on a mobile device. We have implemented and validated our context prediction models in detailed experimental evaluations using synthetic and real-world context data. The results of our experiments demonstrate the effectiveness of our concepts for enhancing the accuracy and expressive power of predictions, as well as for increasing the energy efficiency of context-aware mobile systems.
Conference Paper
When humans talk with humans, they are able to use implicit situational information, or context, to increase the conversational bandwidth. Unfortunately, this ability to convey ideas does not transfer well to humans interacting with computers. In traditional interactive computing, users have an impoverished mechanism for providing input to computers. By improving the computer’s access to context, we increase the richness of communication in human-computer interaction and make it possible to produce more useful computational services. The use of context is increasingly important in the fields of handheld and ubiquitous computing, where the user?s context is changing rapidly. In this panel, we want to discuss some of the research challenges in understanding context and in developing context-aware applications.