Statement of Interest Online Ontological Reasoning for Context-Aware Internet Services 1 Alessandra Agostini and Claudio Bettini and Daniele Riboni2 The research group of the DaKWE laboratory at the University of Milan has been working for the last three years at the specification and implementation of a middleware – named CARE3 – to support context-aware service adaptation for mobile users. CARE has three major goals: a) supporting the fusion and reconciliation of context data obtained from distributed sources, b) supporting context dynam- ics through an efficient form of reasoning, and c) capturing complex context data that go beyond simple attribute-value pairs. While goal b) has been considered in other works [6, 11], it be- comes more difficult to achieve when different sets of inference rules are provided by distributed sources. Even more difficult is to concili- ate efficient reasoning with the expressiveness requirements imposed by the goal c). Figure 1. The CARE middleware architecture. The CARE middleware and its underlying technical solutions have been presented in [1, 3]. In our framework the contextual data, being by nature distributed, is managed by different entities (i.e., the user, the network operator, and the service provider). We call profile a sub- is motivated by the fact that the description logic languages underly- set of context data collected and managed by a certain entity. Each ing the Lite and DL sublanguages of OWL guarantee completeness entity has a dedicated Profile Manager for handling its own context and decidability, while promising high expressiveness. Moreover, a data. Profiles include both shallow context data and ontology-based number of tools already exist for processing OWL ontologies and, context data which is expressed by means of references to ontologi- being OWL a W3C Recommendation, the available utilities should cal classes and relations. Both the user and the service provider can further increase. declare policies in the form of rules over profile data which guide For a framework in which efficiency is a fundamental requirement, the adaptation and final personalization of the service. A dedicated the introduction of ontological reasoning is particularly challenging. module is in charge of building the aggregated context data for the The hybrid approach implemented in CARE is based on a loose in- application logic. In particular, it evaluates adaptation policies and teraction between ontological and rule-based reasoning. While rule- solves possible conflicts arising among context data and/or policies based reasoning is performed at the time of the service request, on- provided by different entities. The ad-hoc rule-based reasoner is par- tological reasoning is mostly performed asynchronously by profile ticularly efficient if no ontological reasoning is performed, having managers. However, in particular cases, ontological reasoning must linear complexity. Experimental results have shown that the evalua- be performed at the time of the user request, after having populated tion of rules is executed in few milliseconds. the ontology with instances collected from the distributed profile In our framework we need to model both simple context data such managers. In order to illustrate the hybrid mechanism, suppose that as device capabilities or current network bearer, and socio-cultural a user declared a policy rule asking to set her status to busy when context data describing, for instance, the user current activity, the set involved in a business meeting: of persons and objects a user can interact with, and the user interests. While the first category, that we call shallow context data, can be nat- If Activity = ‘BusinessMeeting’ then Status = ‘Busy’ (1) urally modeled by means of attribute/value pairs, the second one calls for more sophisticated representation formalisms – such as ontolo- Since the rule precondition predicate Activity is an ontology-based gies – and we call it ontology-based context data. Similarly to other context parameter, its value must be inferred through ontological rea- research works (e.g., [5] and [7]), we have adopted OWL [10] as the soning before evaluating the rule. language for representing ontology-based context data. This choice As an example, consider a possible definition of the BusinessMeet- ing activity: 1 This work has been partially supported by Italian MIUR (FIRB ”Web- Minds” project N. RBNE01WEJT 005). 2 DICo, University of Milan, via Comelico 39, I-20135 Milan, Italy, email: {agostini,bettini,riboni}@dico.unimi.it BusinessMeeting ≡ Activity u ≥ 2 Actor u 3 Context Aggregation and REasoning middleware. ∀ Actor.Employee u ∃ Location.WorkLocation Based on this definition, in order to check whether the user is in- optimizations are based on the use of relational database techniques. volved in a business meeting it is necessary to have information about A well-known proposal in this sense is the InstanceStore system [9]. the people she is with (possibly derived by the user profile manager However, at the time of writing, InstanceStore has some limitations analyzing her agenda) and her current location (possibly provided by that are critical for our reasoning scenarios. Indeed, it does not al- the network operator). This data is added to the assertional part of low the introduction of relations between individuals into the ABox. the ontology (i.e., the ABox). An alternative proposal for optimizing ABox reasoning by means of Our initial experimental setup was based on the realization of the DBMS techniques can be found in [4]. Since in this case relations whole ABox upon receiving the context data from the profile man- between individuals are supported, we are investigating the use of agers. The current user activity was identified by performing nRQL similar techniques in our framework. queries to the well-known description logic reasoner Racer [8]. Even if OWL-DL guarantees completeness and decidability, per- REFERENCES forming online reasoning tasks with an OWL ontology could be com- putationally unfeasible, especially when providing an interactive ser- [1] A. Agostini, C. Bettini, N. Cesa-Bianchi, D. Maggiorini, D. Riboni, vice to a possibly huge number of users. Despite several assessments M. Ruberl, C. Sala, and D. Vitali, ‘Towards Highly Adaptive Services for Mobile Computing’, in Proceedings of IFIP TC8 Working Confer- on the performance of reasoning with description logics are avail- ence on Mobile Information Systems (MOBIS), pp. 121–134. Springer, able, we performed some tests in order to verify the feasibility of (2004). executing ontological reasoning at the time of the service request [2] The Description Logic Handbook: Theory, Implementation, and Ap- with our specific OWL-DL ontologies. As expected, experimental plications, eds., Franz Baader, Diego Calvanese, Deborah L. McGuin- ness, Daniele Nardi, and Peter F. Patel-Schneider, Cambridge Univer- results showed that query response times are strongly correlated to sity Press, 2003. the number of instances of the examined ontology class as well as to [3] C. Bettini and D. Riboni, ‘Profile Aggregation and Policy Evaluation the depth of the class within the ontology hierarchy. Our results con- for Adaptive Internet Services’, in Proceedings of The First Annual In- firmed that the execution of these ontological reasoning tasks at the ternational Conference on Mobile and Ubiquitous Systems: Network- time of the service request is unfeasible, even having a small ontol- ing and Services (Mobiquitous), pp. 290–298. IEEE Computer Society, (2004). ogy populated with few instances. In particular, query response times [4] Cui Ming Chen, ‘Large Abox Store (LAS): Database Support for in our experiments are in the order of seconds. Abox Queries’, Master Thesis, Concordia University, Montreal, Que- We are investigating alternative approaches for overcoming the bec, Canada, (September 2005). above mentioned computational issues. A possible solution consists [5] Harry Chen, Filip Perich, Timothy W. Finin, and Anupam Joshi, ‘SOUPA: Standard Ontology for Ubiquitous and Pervasive Applica- in keeping the terminological part of the ontology (i.e., the TBox) tions.’, in Proceedings of the 1st Annual International Conference on static, in order to be able to perform the TBox classification [2] of- Mobile and Ubiquitous Systems (MobiQuitous 2004), Networking and fline. In this way it is possible to save a good amount of computa- Services, pp. 258–267. IEEE Computer Society, (2004). tional time while serving user requests, since the ontology classifica- [6] B. Grosof, ‘Prioritized Conflict Handling for Logic Programs’, in Pro- tion task is particularly expensive. ceedings of the International Logic Programming Symposium (ILPS), pp. 197–211, (1997). Furthermore, the assertional part of the ontology can be filled of- [7] T. Gu, X. H. Wang, H. K. Pung, and D. Q. Zhang, ‘An Ontology-based fline with those instances that are known a priori, i.e., before retriev- Context Model in Intelligent Environments’, in Proceedings of Commu- ing context data from the distributed profile managers. This data ob- nication Networks and Distributed Systems Modeling and Simulation viously depends on the particular domain addressed by the ontology. Conference, (2004). [8] Volker Haarslev and Ralf Möller, ‘RACER System Description’, in In the case addressed by our example, the ABox should be populated Proceedings of Automated Reasoning, First International Joint Con- with a huge number of instances, including those that correspond to ference (IJCAR 2001), pp. 701–706. Springer, (2001). the employees of the user organization, and to particular locations [9] Ian Horrocks, Lei Li, Daniele Turi, and Sean Bechhofer, ‘The In- (e.g., rooms belonging to the organization). After having populated stance Store: DL Reasoning with Large Numbers of Individuals’, in Proceedings of the 2004 International Workshop on Description Log- the ontology with these instances, it is possible to perform the ABox ics (DL2004), volume 104 of CEUR Workshop Proceedings. CEUR- realization [2] offline. Once again, ABox realization is an expensive WS.org, (2004). reasoning task, which is unsuitable to perform online when the on- [10] Ian Horrocks, Peter F. Patel-Schneider, and Frank van Harmelen, ‘From tology contains a huge number of instances. SHIQ and RDF to OWL: The Making of a Web Ontology Language’, At the time of the user request, the ABox is filled with only those Journal of Web Semantics, 1(1), 7–26, (2003). [11] R. Hull, B. Kumar, D. Lieuwen, P. Patel-Schneider, A. Sahuguet, instances that are retrieved from the profile managers. Considering S. Varadarajan, and A. Vyas, ‘Enabling Context-Aware and privacy- the ontology definition (1) of our example, the instances to be in- Conscius User Data Sharing’, in Proceedings of the 2004 IEEE Inter- serted into the ontology correspond to a new activity currentActivity national Conference on Mobile Data Management, pp. 187–198. IEEE – the one performed by the user – and to the relations that link that Computer Society, (2004). activity to its actors and location. Adopting this approach, the only reasoning task that must be performed online is the instance checking of the single currentActivity instance with respect to the Business- Meeting concept. As a preliminary step for assessing the feasibility of this approach, we are going to perform extensive experiments for estimating the ex- ecution times of this task in relation to various dimensions, including the TBox size, the number of instances that are known a priori, and the number of instances that are introduced into the ABox at the time of the user request. Moreover, we are interested in testing some optimization tech- niques aimed at improving the efficiency of ABox reasoning. These