labelled variables in logic programming
play

Labelled Variables in Logic Programming: A First Prototype in - PowerPoint PPT Presentation

Labelled Variables in Logic Programming: A First Prototype in tuProlog Roberta Calegari, Enrico Denti, Andrea Omicini { roberta.calegari, enrico.denti, andrea.omicini } @unibo.it DISI Alma Mater Studiorum Universit` a di Bologna Talk @ 14th


  1. Labelled Variables in Logic Programming: A First Prototype in tuProlog Roberta Calegari, Enrico Denti, Andrea Omicini { roberta.calegari, enrico.denti, andrea.omicini } @unibo.it DISI Alma Mater Studiorum —Universit` a di Bologna Talk @ 14th Conference of the Italian Association for Artificial Intelligence University of Ferrara - 23rd September 2015 R. C., E. D., A. O. (DISI, Alma Mater) Labelled Variables LP AI*IA-DC, 23/9/2015 1 / 34

  2. Outline Scope & Goals 1 The Labelled Variables Model in Logic Programming 2 Unification rules Examples Prototype in tuProlog 3 System architecture The language extension Case studies 4 Interval CLP Dress Selection Conclusions & Further Work 5 R. C., E. D., A. O. (DISI, Alma Mater) Labelled Variables LP AI*IA-DC, 23/9/2015 2 / 34

  3. Scope & Goals Outline Scope & Goals 1 The Labelled Variables Model in Logic Programming 2 Unification rules Examples Prototype in tuProlog 3 System architecture The language extension Case studies 4 Interval CLP Dress Selection Conclusions & Further Work 5 R. C., E. D., A. O. (DISI, Alma Mater) Labelled Variables LP AI*IA-DC, 23/9/2015 3 / 34

  4. Scope & Goals Context and Motivation Explore models and technologies to face the challenges of pervasive system complex intelligent distributed situated From distributed intelligence towards distributed situated intelligence situated (intelligent) component for pervasive (intelligent) systems Logic Programming (LP) extensions for interacting with the environment Prodromes of situated LP Forms of control which generalises data-driven computation, e.g. CLP [Jaffar and Lassez, 1987] Ability to be domain-specific – e.g. CHR [Fruhwirth, 1998] However they are designed against a landscape different from nowadays pervasive systems. R. C., E. D., A. O. (DISI, Alma Mater) Labelled Variables LP AI*IA-DC, 23/9/2015 4 / 34

  5. Scope & Goals Archeology [Jaffar and Lassez, 1987] defines CLP as a merger of two declarative paradigms: constraint solving and logic programming → capability for reasoning in the specific finite domain of application [Fruhwirth, 1998] introduces CHR as a high-level and declarative language for implementing constraint solver. User-defined constraints led to widely domain applications (constraint solving, type checking, natural language processing, multi-agent systems,...) [Neumerkel, 1990] presentes metastructures to extend syntactic unification: data types whose (unification) semantics are specified by user-defined predicates [Holzbaur, 1992] introduces attributed variables as mechanism to support of CLP languages , yet inside the LP context [Gabbay, 1996] introduces Labelled Deductive System: general notion of label and a new unifying methodology for logic R. C., E. D., A. O. (DISI, Alma Mater) Labelled Variables LP AI*IA-DC, 23/9/2015 5 / 34

  6. Scope & Goals Goals Aim To devise out simple and expressive mechanisms enabling data-driven and domain specific within a LP framework To acquire information from any source of data (constraint store, data base, sensors,...) → infer knowledge Method Investigating LP extension based on labelled variables 1 To define a labelled variables logic programming model where labels are exploited to define computations in domain-specific contexts 2 To exploit labelled variables for enabling computations at a separate level, while retaining the general coherence of the LP approach 3 To present a first prototype of Labelled tuProlog R. C., E. D., A. O. (DISI, Alma Mater) Labelled Variables LP AI*IA-DC, 23/9/2015 6 / 34

  7. Scope & Goals Conceptual Architecture R. C., E. D., A. O. (DISI, Alma Mater) Labelled Variables LP AI*IA-DC, 23/9/2015 7 / 34

  8. The Labelled Variables Model in Logic Programming Outline Scope & Goals 1 The Labelled Variables Model in Logic Programming 2 Unification rules Examples Prototype in tuProlog 3 System architecture The language extension Case studies 4 Interval CLP Dress Selection Conclusions & Further Work 5 R. C., E. D., A. O. (DISI, Alma Mater) Labelled Variables LP AI*IA-DC, 23/9/2015 8 / 34

  9. The Labelled Variables Model in Logic Programming The Labelled Variables Model in Logic Programming Defined by: a set of basic labels B , where b ∈ B is the generic basic label here taking the form of a logic term, i.e. B ⊆ T ; a set of labels L , where l ∈ L is a generic label defined as a set of basic labels , i.e. l = { b 1 , .., b n } ; a labelling association denoted as � v , l � that associates the label l to the variable v . Unification of two labelled variables Represented by tuple (true/false, θ , label) : true/false represents if there is an answer θ represents the most general substitution label represents the new label associated to the unified variables R. C., E. D., A. O. (DISI, Alma Mater) Labelled Variables LP AI*IA-DC, 23/9/2015 9 / 34

  10. The Labelled Variables Model in Logic Programming Unification rules Outline Scope & Goals 1 The Labelled Variables Model in Logic Programming 2 Unification rules Examples Prototype in tuProlog 3 System architecture The language extension Case studies 4 Interval CLP Dress Selection Conclusions & Further Work 5 R. C., E. D., A. O. (DISI, Alma Mater) Labelled Variables LP AI*IA-DC, 23/9/2015 10 / 34

  11. The Labelled Variables Model in Logic Programming Unification rules Unification Rules Combining function f L to synthesise a new label from two given ones. i.e. combine two different labels: f L : L x L → L The function embeds the scenario-specific criterion for defining a new label → domain specific computation R. C., E. D., A. O. (DISI, Alma Mater) Labelled Variables LP AI*IA-DC, 23/9/2015 11 / 34

  12. The Labelled Variables Model in Logic Programming Examples Outline Scope & Goals 1 The Labelled Variables Model in Logic Programming 2 Unification rules Examples Prototype in tuProlog 3 System architecture The language extension Case studies 4 Interval CLP Dress Selection Conclusions & Further Work 5 R. C., E. D., A. O. (DISI, Alma Mater) Labelled Variables LP AI*IA-DC, 23/9/2015 12 / 34

  13. The Labelled Variables Model in Logic Programming Examples Examples I Arithmetic Inequalities 1/2 Basic labels are arithmetic intervals: b ∈ B takes one of the following forms (where a 3 , a 5 can also be −∞ , while a 4 , a 8 can also be + ∞ ) b = [ a 1 , a 2 ] = { x ∈ ❘ | a 1 ≤ x ≤ a 2 , a 1 , a 2 ∈ ❘ } b = ] a 3 , a 4 [ = { x ∈ ❘ | a 3 < x < a 4 , a 3 , a 4 ∈ ❘ } b = ] a 5 , a 6 ] = { x ∈ ❘ | a 5 < x ≤ a 6 , a 5 , a 6 ∈ ❘ } b = [ a 7 , a 8 [ = { x ∈ ❘ | a 7 ≤ x < a 8 , a 7 , a 8 ∈ ❘ } The combining function f L intersects intervals Given l 1 = { b 11 , .. b 1 n } and l 2 = { b 21 , .. b 2 m } , the resulting label defined as the union of all the possible intersections: f L : ( l 1 , l 2 ) = f L ( { b 11 , .. b 1 n } , { b 21 , .. b 2 m } ) = {{ ( b 11 ∩ b 21 ) ∪ .. ∪ ( b 11 ∩ b 2 m ) } , ..., { ( b 1 n ∩ b 21 ) ∪ .. ∪ ( b 1 n ∩ b 2 m ) }} R. C., E. D., A. O. (DISI, Alma Mater) Labelled Variables LP AI*IA-DC, 23/9/2015 13 / 34

  14. The Labelled Variables Model in Logic Programming Examples Examples II Arithmetic Inequalities 2/2 For instance, let X and Y two variables involved in two inequalities, with the following constraints: X { [3 .. 5] , [9 .. 10] } Y { [8 .. 10] } If these labels are eventually combined, the new label l 3 obtained by applying f L results: l 1 = { [3 .. 5] , [9 .. 10] } l 2 = { [8 .. 10] } l 3 = f L ( l 1 , l 2 ) = f L ( { [3 .. 5] , [9 .. 10] } , [8 .. 10]) = = { ([3 .. 5] ∩ [8 .. 10]) ∪ ([9 .. 10] ∩ [8 .. 10]) } = [9 .. 10] R. C., E. D., A. O. (DISI, Alma Mater) Labelled Variables LP AI*IA-DC, 23/9/2015 14 / 34

  15. The Labelled Variables Model in Logic Programming Examples Examples III RGB colour space 1/2 Basic labels assume the syntax of RGB triplet, so that b = ( r , g , b ) = { r , g , b ∈ ◆ | 0 ≤ r , g , b ≤ 255 } Label l ∈ L becomes the singleton l = ( r , g , b ) The combining function f L is supposed to blend colours according to the specific application needs: computing the arithmetic mean of the colour component labels � r 1 + r 2 , g 1 + g 2 , b 1 + b 2 � f L ( l 1 , l 2 ) = f L (( r 1 , g 1 , b 1 ) , ( r 2 , g 2 , b 2 )) = = l 3 2 2 2 R. C., E. D., A. O. (DISI, Alma Mater) Labelled Variables LP AI*IA-DC, 23/9/2015 15 / 34

  16. The Labelled Variables Model in Logic Programming Examples Examples IV RGB colour space 2/2 Let X represent a red object, Y a yellow one and Z a blue one: X (255 , 0 , 0) Y (255 , 255 , 0) Z (0 , 0 , 255) Combining X with Y according to the combine criterion embedded in f L leads to: l 1 = (255 , 0 , 0) l 2 = (255 , 255 , 0) l 3 = f L ( l 1 , l 2 ) = ((255 , 0 , 0) , (255 , 255 , 0)) = (255 , 128 , 0) = l 3 Combining X with Z , instead, would lead to a violet label l 4 = (128 , 0 , 128) R. C., E. D., A. O. (DISI, Alma Mater) Labelled Variables LP AI*IA-DC, 23/9/2015 16 / 34

  17. Prototype in tuProlog Outline Scope & Goals 1 The Labelled Variables Model in Logic Programming 2 Unification rules Examples Prototype in tuProlog 3 System architecture The language extension Case studies 4 Interval CLP Dress Selection Conclusions & Further Work 5 R. C., E. D., A. O. (DISI, Alma Mater) Labelled Variables LP AI*IA-DC, 23/9/2015 17 / 34

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend