Skip to main content
Thesis defences

PhD Oral Exam - Ammar Abdulbasit Alsaig, Computer Science and Software Engineering

Contelog: A Formal Declarative Framework for Contextual Knowledge Representation and Reasoning

Monday, June 6, 2022 (all day)

This event is free


School of Graduate Studies


Dolly Grewal



When studying for a doctoral degree (PhD), candidates submit a thesis that provides a critical review of the current state of knowledge of the thesis subject as well as the student’s own contributions to the subject. The distinguishing criterion of doctoral graduate research is a significant and original contribution to knowledge.

Once accepted, the candidate presents the thesis orally. This oral exam is open to the public.


Context-awareness is at the core of providing timely adaptations in safety-critical secure applications of pervasive computing and Artificial Intelligence (AI) domains. In the current AI and application context-aware frameworks, the distinction between knowledge and context are blurred and not formally integrated. As a result, adaptation behaviors based on contextual reasoning cannot be formally derived and reasoned about. Also, in many smart systems such as automated manufacturing, decision making, and healthcare, it is essential for context-awareness units to synchronize with contextual reasoning modules to derive new knowledge in order to adapt, alert, and predict. A rigorous formalism is therefore essential to (1) represent contextual domain knowledge as well as application rules, and (2) efficiently and effectively reason to draw contextual conclusions. This thesis is a contribution in this direction. The thesis introduces first a formal context representation and a context calculus used to build context models for applications. Then, it introduces query processing and optimization techniques to perform context-based reasoning. The formal framework that achieves these two tasks is called Contelog Framework, obtained by a conservative extension of the syntax and semantics of Datalog. It models contextual knowledge and infers new knowledge. In its design, contextual knowledge and contextual reasoning are loosely coupled, and hence contextual knowledge is reusable on its own. The significance is that by fixing the contextual knowledge, rules in the program and/or query may be changed. Contelog provides a theory of context, in a way that is independent of the application logic rules. The context calculus developed in this thesis allows exporting knowledge inferred in one context to be used in another context. Following the idea of Magic sets from Datalog, Magic Contexts together with query rewriting algorithms are introduced to optimize bottom-up query evaluation of Contelog programs. A Book of Examples has been compiled for Contelog, and these examples are implemented to showcase a proof of concept for the generality, expressiveness, and rigor of the proposed Contelog framework. A variety of experiments that compare the performance of Contelog with earlier Datalog implementations reveal a significant improvement and bring out practical merits of current stage of Contelog and its potential for future extensions in context representation and reasoning of emerging applications of context-aware computing.

Back to top

© Concordia University