Temporal Preference Models and their Deduction-based Analysis
for Pervasive Applications
Radosław Klimek
AGH University of Science and Technology, al. A. Mickiewicza 30, 30-059 Krakow, Poland
Keywords:
Preference Modeling, Context-aware Applications, Patterns, Temporal Logic, Deduction, Semantic Tableaux.
Abstract:
This work concerns preference models and their formal analysis using a deductive approach, i.e. temporal
logic for both specification and verification, and the semantic tableaux method for reasoning. The architecture
of an automatic and deduction-based verification system for preference models is also proposed. It allows
analysis of both desired properties of models and their semantic contradictions. Preference models are built
from predefined patterns which enable automatic generation of logical specifications for preferences.
1 INTRODUCTION
Preference modeling enables customization of soft-
ware behavior to a user’s needs. Preference models
are particularly important in pervasive computing and
ubiquitous computing which are paradigms related
to the behavior of software highly oriented towards
users and their needs, assuming also the omnipres-
ence of computing. Preference modeling is essential
and crucial, and constitutes a type of bridge between
a support-oriented user and a system which is itself
able to provide support.
The model of preference might be constructed us-
ing fuzzy sets, classical logic and multi-valued logic.
Classical logic, and particulary rule-based systems,
are especially popular while non-classical logic and
especially temporal logic, are rather less popular.
However, temporal logic is a well established formal-
ism for describing reactivity. At the same time, a
typical pervasive application should be characterized
by reactivity and flexibility in adapting to preference
changes on the user’s side. After building a prefer-
ence model in temporal logic, one can analyze it using
a deductive approach. The goal is to search, if possi-
ble, for contradictions in a model or to infer some-
thing about the correctness of the preference objec-
tives. Temporal logic enables illustration the dynamic
aspect of preferences over flows of time.
Motivations and Contributions
The general motivation is the lack of satisfactory and
documented results of using temporal logic and the
deduction-based approach for formal analysis of pref-
erence models. Another motivation factor is the lack
of tools for automatic extraction of logical specifica-
tions for preference models.
The main contributions are the automation of the
generation process of logical specifications for pref-
erence models, predefined preference patterns, and
generation algorithm for preference patterns. Another
contribution is the use of a non-standard method for
deduction for preferences.
Related Works
Instead of discussion of related works, beyond the
fundamental work by
¨
Ozt¨urk et al. (
¨
Ozt¨urk et al.,
2005), let us pay attention on work by Fong et
al. (Fong et al., 2011). It includes an excellent section
on the state of the art of preference modeling. It is a
highly in-deep and comprehensive review. This work
is an attempt to extend the view of problems of pref-
erence modeling expressed in (Fong et al., 2011) by
introducing temporal logic and the semantic tableaux
method.
2 MODEL OF PREFERENCES
Preference models are discussed below. The proposed
preference model is based on predefined patterns of
rules which are shown in Fig. 1. These rules are ex-
pressed in temporal logic. Temporal logic and the de-
ductive system are discussed in section 3. However, it
is assumed that well-formed and syntactically correct
131
Klimek R..
Temporal Preference Models and their Deduction-based Analysis for Pervasive Applications.
DOI: 10.5220/0004314901310134
In Proceedings of the 3rd International Conference on Pervasive Embedded Computing and Communication Systems (PECCS-2013), pages 131-134
ISBN: 978-989-8565-43-3
Copyright
c
2013 SCITEPRESS (Science and Technology Publications, Lda.)
f1
f2
(a) Sequence
f1
f2 f3
+
(b) Branch
f1
f2
+
(c) SimpleBranch
Figure 1: Patterns for preferences.
temporal logic formulas have already been defined,
c.f. (Wolter and Wooldridge, 2011).
Preference models consist of some basic patterns.
A pattern is a predefined solution for a special con-
text where there are preference issues. They are gen-
erally indicated as pat(), where pat is a name of a
given pattern, and their parameters are included in
parentheses. The following three patterns are con-
sidered: Branch, SimpleBranch and Sequence. It is
a kind of illustration of the if-then scheme. Pat-
terns of behaviors and preferences can be nested. It
follows from the scenario of multi-stage decision-
making. A basic set of patterns Σ is a set of temporal
logic formulas describing both liveliness and safety
properties of a pattern. A set of three patterns, i.e.
Σ = {Branch, SimpleBranch, Sequence}, will be con-
sidered. Let us define temporal properties for these
patterns. Hence, set Branch( f
1
, f
2
, f
3
) = { c( f
1
)
f
2
¬ f
3
, ¬c( f
1
) ¬ f
2
f
3
, ¬( f
1
( f
2
f
3
))} describes property of the Branch pattern
and SimpleBranch( f
1
, f
2
) = {c( f
1
) f
2
, ¬c( f
1
)
¬ f
2
, ¬( f
1
f
2
)} the SimpleBranch pattern. Set
Sequence( f
1
, f
2
) = { f
1
f
2
, ¬( f
1
f
2
)} defines
the Sequence pattern. For the meanings of these pat-
terns, refer to Fig. 1. Formulas f
1
, f
2
etc. are atomic
formulas for a pattern, and constitute some formal ar-
guments for these pattern. f means that sometime
(or eventually in the future) activity f is completed.
In addition, c( f) means that the logical condition as-
sociated with activity f has been evaluated and is sat-
isfied.
The entire preference model can be written in the
form of logical expressions, which is similar to some
well-known regular expression. The goal is to write
preference models in a concise and literal notation. A
logical expression W
L
is a structure created using the
following rules:
every elementary set pat(a
i
), where i > 0 and ev-
ery a
i
is an atomic formula, is a logical expres-
sion,
every pat(A
i
), where i > 0 and every A
i
is either
an atomic formula a
j
, where j > 0, or
a set pat(a
j
), where j > 0 and a
j
is an atomic
formula, or
a logical expression pat(A
j
), where j > 0
is also a logical expression.
Any logical expression may represent an arbitrary
structure of patterns and examples of this are expres-
sion Branch(a, SimpleBranch( f, g), c) and expres-
sion Sequence(Branch(a, b, c), SimpleBranch(d, e)).
In the first case, the combination (and nesting) of
two branchings is considered, i.e. the ordinary and
the simple one. In this expression, a and f are the
conditions. In the second case, the sequence of two
branchings is considered.
An individual preference may belong to a set of
preferences P, i.e. P = {p
1
, p
2
, ... p
n
}, where p
i
is a
preference which is expressed as a single logical ex-
pression, i.e. p
i
= W
Li
.
3 DEDUCTION SYSTEM
The logical background is discussed further below.
The important argument for a deductive approach is
how natural it is for human beings and it is used
commonly and intuitively in everyday life. Tempo-
ral Logic TL is a valuable formalism, e.g. (Wolter
and Wooldridge, 2011), which has strong applica-
tions for the specification and verification of mod-
els. It exists in many variations, however, consid-
erations in this paper are limited to the Linear Tem-
poral Logic LTL, i.e. logic for which the time struc-
ture is considered as linear. Furthermore, considera-
tions are limited to the smallest, or minimal, temporal
logic, e.g. (Chellas, 1980), also known as temporal
logic of class K. The following formulas may be con-
sidered as significant examples of minimal temporal
logic: quest answer, (action react), liv,
¬(bad) or ¬(ev1 (ev2 ev3)), etc.
Semantic tableaux is a decision-making procedure
for checking satisfiability of a formula. The method
is well known in classical logic but it can also be ap-
plied in modal and temporal logics (d’Agostino et al.,
1999). The method is based on formula decomposi-
tions. At the end of the decomposition procedure, all
branches of the received tree are searched for contra-
dictions. When all branches of the tree have contra-
dictions, it means that the inference tree is closed. If
PECCS2013-InternationalConferenceonPervasiveandEmbeddedComputingandCommunicationSystems
132
[1,]
1 : (f c) (c p) ¬(p ¬q) ¬(¬ f q)
[2,1]
1 : ( f c)
[3,1]
1 : (c p)
[4,1]
1 : ¬(p ¬q)
[5,1]
1 : ¬(¬f q)
[6,2]
1 : ¬f
[9,3]
1 : ¬c
[15,4]
1.(x) : ¬(p ¬q)
[18,15]
1 : ¬p
[19,15]
1 : q
[24,5]
1.(y) : ¬(¬ f q)
[25,24]
1 : f
×
[26,24]
1 : ¬q
×
[10,3]
1 : p
[11,10]
1.[p] : p
[16,4]
1.(x) : ¬(p ¬q)
[20,16]
1 : ¬p
[21,16]
1 : q
×
[7,2]
1 : c
[8,7]
1.[c] : c
[12,3]
1 : ¬c
×
[13,3]
1 : p
[14,13]
1.[p] : p
[17,4]
1.(x) : ¬(p ¬q)
[22,17]
1 : ¬p
[23,17]
1 : q
×
Figure 2: Truth tree of the inference process.
the negation of the initial formula is placed in the root,
this leads to the statement that the initial formula is
true. This method has some advantages over the tra-
ditional axiomatic approach. In the classical reason-
ing approach, starting from axioms, longer and more
complicated formulas are generated and derived. For-
mulas become longer and longer step by step, and
only one of them will lead to the verified formula.
The method of semantic tableaux is characterized by
the reverse strategy. The method provides, through
so-called open branches of the semantic tree, infor-
mation about the source of an error, if one is found,
which is another and very important advantage of the
method.
Let us consider the following example. The pref-
erence model is constructed from a natural text: If
he buys a Ferrari then he sometime smokes a Cuban
cigar. If he smokes a Cuban cigar then he some-
time drinks a Dom Perignon champagne. However,
it is never so that he drinks a Dom Perignon cham-
pagne or he does not quit drinking alcohol. More-
over, it is not so that he does not buy a Ferrari and
quit drinking alcohol. The following simple sen-
tences are extracted: “to buy a Ferrari” f, ‘to
smoke a Cuban cigar” – c, “to drink a Dom Perignon
champagne” p, and “to quit drinking alcohol” q.
Then, the following formulas of temporal logic are
extracted: ( f c) and (c p) and ¬(p ¬q)
and ¬(¬ f q). These formulas express the prefer-
ence model. The first two formulas express the live-
ness aspect of the model, and the last two formulas
express the safety aspect of the model. The prefer-
ence model is analyzed using the method of sematic
tableaux, c.f. Fig. 2. All branches contain contradic-
tions (×). This means there is no valuation for ex-
tracted propositions that satisfies the formula which
is placed in the tree root. The preference model is
semantically contradictory.
4 TOWARDS AUTOMATION
Building a logical model for preferences in the form
of temporal logic formulas, i.e. P = {p
1
, p
2
, ... p
n
},
enables examination two important aspects of the sys-
tem:
1. semantic contradiction, or
2. correctness of the model due to some properties.
Analysis of semantic contradiction is shown in the
previous section. In turn, formal verification of prop-
erties of the preference model leads to the analysis of
formula p
1
. . . p
n
Q, where Q is a desired prop-
erty of the preference model {p
1
, p
2
, ... p
n
}.
The system of automatic inference on preference
models is proposed in Fig. 3. The Modeler module
allows (instead of natural language) the preparation
a preference model using preference patterns shown
in Fig. 1. The output of the Modeler is preference
models expressed as logical expressions W
L
.
The next module is the Generator module and its
inputs are logical expressions W
L
and predefined set
of preference patterns Σ. The output is a logical spec-
ification L understood as being a set of temporal logic
TemporalPreferenceModelsandtheirDeduction-basedAnalysisforPervasiveApplications
133
MODELER
Σ
GENERATOR
PROVER
Q
Y/N
Contr.
W
L
L
Figure 3: Deduction system.
formulas. The sketch of the generating algorithm is
the following:
1. at the beginning, the logical specification is
empty, i.e. L =
/
0;
2. the most nested pattern or patterns are processed
first, then the least nested patterns are processed
one by one, i.e. patterns that are located more to-
wards the outside;
3. if the currently analyzed pattern consists only of
atomic formulas, the logical specification is ex-
tended, by summing sets and by formulas linked
to the type of the analyzed pattern pat(), i.e. L =
L pat();
4. if any argument is a pattern itself, then the logical
disjunction of all its arguments, including nested
arguments, is substituted in place of the pattern.
The above algorithm refers to similar ideas in
work (Klimek, 2012). Let us supplement the algo-
rithm with some examples. The example for the
step 3: Seq(p, q), givesL = {p q, ¬(pq)} and
Branch(a, b, c) gives L = {c(a) b¬c, ¬c(a)
¬b c, ¬(a (b c))}. The example for the
step 4: Sequence(Branch(a, b, c), d) leads to L =
{c(a) b ¬c, ¬c(a) ¬b c, ¬(a (b
c)), (a b c) d, ¬((a b c) d)}.
The last module is the Prover module that works
using the semantic tableaux method. The inputs for
the Prover are a logical specification L and a query Q
which is a simple temporal logic formula which ex-
presses the desired property of the preference model.
(This formula can be prepared using a simple text ed-
itor.) The Prover provides examination for two cases:
1. correctness of the model due to some properties,
i.e. the formal verification of the formula:
p
1
. . . p
n
Q (1)
or
2. semantic contradiction, i.e. the formal analysis of
the formula:
p
1
. . . p
n
(2)
In the case of correctness, the negation of the for-
mula 1 is placed in the root and the Yes/No output is
produced. In the case of contradiction, the formula 2
is placed in the root and the information about the se-
mantic contradiction is produced.
5 CONCLUSIONS
The work presents a new approach to the formal anal-
ysis of preference models using temporal logic and
the semantic tableaux method. Future work may in-
clude the implementation of the logical specification
generation module and a deduction engine. The ap-
proach should results in a CASE software providing
modeling preferences.
ACKNOWLEDGEMENTS
This work was supported by the AGH UST internal
grant no. 11.11.120.859.
REFERENCES
Chellas, B. F. (1980). Modal Logic. Cambridge University
Press.
d’Agostino, M., Gabbay, D., H¨ahnle, R., and Posegga, J.
(1999). Handbook of Tableau Methods. Kluwer Aca-
demic Publishers.
Fong, J., Indulska, J., and Robinson, R. (2011). A pref-
erence modelling approach to support intelligibility in
pervasive applications. In 8th IEEE Workshop on Con-
text Modeling and Reasoning (CoMoRea 2011), Seat-
tle, USA, 21–25 March 2011, pages 409–414. IEEE.
Klimek, R. (2012). Proposal to improve the requirements
process through formal verification using deductive
approach. In Filipe, J. and Maciaszek, L., editors,
Proceedings of 7th International Conference on Eval-
uation of Novel Approaches to Software Engineering
(ENASE 2012), 29-30 June, 2012, Wrocław, Poland
[extended version is to be published in Springer
Verlag], pages 105–114. SciTePress.
¨
Ozt¨urk, M., Tsouki`as, A., and Vincke, P. (2005). Pref-
erence modelling. In Figueira, J., Greco, S., and
Ehrgott, M., editors, Multiple Criteria Decision Anal-
ysis: State of the Art Surveys, pages 27–72. Springer
Verlag, Boston, Dordrecht, London.
Wolter, F. and Wooldridge, M. (2011). Temporal and dy-
namic logic. Journal of Indian Council of Philosoph-
ical Research, XXVII(1):249–276.
PECCS2013-InternationalConferenceonPervasiveandEmbeddedComputingandCommunicationSystems
134