Labelled Variables in Logic Programming: A First Prototype in tuProlog Roberta Calegari, Enrico Denti, and Andrea Omicini Dipartimento di Informatica, Scienza e Ingegneria (DISI) Alma Mater Studiorum–Universit` a di Bologna, Italy {roberta.calegari, enrico.denti, andrea.omicini}@unibo.it Abstract. We present the first prototype of Labelled tuProlog, an ex- tension of tuProlog exploiting labelled variables to enable a sort of multi- paradigm / multi-language programming aimed at pervasive systems. 1 Context & Motivation To face the challenges of today pervasive system, which are inherently complex, distributed, situated [7] and intelligent, suitable models and technologies are re- quired to effectively support distributed situated intelligence. To this end, in this paper we investigate a logic programming (LP) extension based on labelled vari- ables, and test it by means of a prototype rooted in the tuProlog system [3, 9], called Labelled tuProlog. Our general aim is to define a unique blend of LP and labelled variables – a sort of multi-paradigm and multi-language programming framework for a distributed environment – where diverse computational models can be tailored to the local needs of situated systems by means of suitable la- belled variables systems, and work together against the common LP background according to the original tuProlog aim [3]. Our work builds upon the general notion of label defined by Gabbay [4], and adopts the techniques introduced by Holzbaur [6] to develop a generalisation of LP where labels are exploited to define computations in domain-specific contexts, while retaining the conventional syntax of LP. More generally, our work moves from the observation that pervasiveness of today systems requires awareness of the environment as well as the ability of reacting to changes. This mandates for models promoting system intelligence, and for technologies making it possible to spread intelligence wherever needed. While logic-based approaches are natural candidates for intelligent systems, a pure LP approach seems not to fit the needs of situated systems. Instead, a hybrid approach would make it possible to exploit LP for what it is most suited – symbolic computation –, while possibly delegating other aspects (such as situated computations) to other languages, or to other levels of computation. This is precisely where the notion of labelled variables can be of help: by enabling some parts of the computation to be expressed at a separate level, while retaining the general coherence of the LP approach. Being light-weight, intentionally designed around a minimal core, and Java- based, tuProlog is an ideal candidate to support the above goal—distributing situated intelligence while supporting labelled-variable-based computations.