SlideShare a Scribd company logo
Labelled Variables in Logic Programming:
Foundations
Roberta Calegari1, Enrico Denti1, Agostino Dovier2 Andrea Omicini1
{roberta.calegari, enrico.denti, andrea.omicini}@unibo.it
agostino.dovier@uniud.it
1Dipartimento di Informatica, Scienza e Ingegneriaā€”Universit`a di Bologna
2Dipartimento di Scienze Matematiche, Informatiche e Fisicheā€”Universit`a di Udine
Talk @ 31th Annual Conference of GULP (CILC 2016)
Universit`a di Milano-Bicocca, Italy
20 June 2016
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 1 / 31
Outline
1 Scope & Goals
Context & Motivation
Examples
2 The Labelled Variables Model in Logic Programming
Formal Model
Uniļ¬cation rules
3 Semantics
Fixpoint Semantics
Operational Semantics
Semantics Equivalence
4 Architecture
5 Conclusions & Further Work
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 2 / 31
Scope & Goals
Outline
1 Scope & Goals
Context & Motivation
Examples
2 The Labelled Variables Model in Logic Programming
Formal Model
Uniļ¬cation rules
3 Semantics
Fixpoint Semantics
Operational Semantics
Semantics Equivalence
4 Architecture
5 Conclusions & Further Work
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 3 / 31
Scope & Goals Context & Motivation
Context
Challenges of todayā€™s pervasive system [Mariani and Omicini, 2015]
complex distributed situated intelligent
distributed situated intelligence
enabling models and technologies
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 4 / 31
Scope & Goals Context & Motivation
Motivations I
Intelligence
Logic Programming
programs as logic theories
computation as deduction
programming with relations and inference
Distribution
multiple, distributed Prolog engines
minimal
(dynamically) conļ¬gurable
easily deployable
inter-operable
multi-platform
. . .
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 5 / 31
Scope & Goals Context & Motivation
Motivations II
Situatedness
reactiveness
! computational reactiveness
? environment reactiveness
domain-speciļ¬c
capture diverse computational models tailored to the local needs of
situated components / devices
ā†’ labels
[Gabbay, 1996] model
[Holzbaur, 1992] mechanism
Labelled Variables in Logic Programming (LVLP)
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 6 / 31
Scope & Goals Examples
WordNet I
Knowledge-Intensive Environment
A WordNet scenario representing a network of semantically-related words
wordnet_fact([ā€˜dogā€™,ā€˜domestic dogā€™,ā€˜canisā€™,ā€˜petā€™,ā€˜mammalā€™,ā€˜vertebrateā€™]).
wordnet_fact([ā€˜catā€™, ā€˜domestic catā€™, ā€˜petā€™, ā€˜mammalā€™, ā€˜vertebrateā€™]).
wordnet_fact([ā€˜fishā€™, ā€˜aquatic vertebratesā€™, ā€˜vertebrateā€™]).
wordnet_fact([ā€˜frogā€™, ā€˜toadā€™, ā€˜anauranā€™, ā€˜batrachianā€™]).
animal(X) :- X^[ā€˜petā€™], X = ā€˜minnieā€™.
animal(X) :- X^[ā€˜fishā€™], X = ā€˜nemoā€™.
animal(X) :- X^[ā€˜catā€™], X = ā€˜vmollyā€™.
animal(X) :- X^[ā€˜dogā€™], X = ā€˜fridaā€™.
animal(X) :- X^[ā€˜frogā€™], X = ā€˜craā€™.
Labels provide a customisable computational model (domain-speciļ¬c)
Bound to the standard LP computation
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 7 / 31
Scope & Goals Examples
WordNet II
?- X^[ā€˜petā€™], animal(X).
yes. X / ā€˜minnieā€™
[X^[ā€˜dogā€™, ā€˜domestic dogā€™, ā€˜canisā€™, ā€˜petā€™, ā€˜mammalā€™, ā€˜vertebrateā€™]] ;
yes. X / ā€˜minnieā€™
[X^[ā€˜catā€™, ā€˜domestic catā€™, ā€˜petā€™, ā€˜mammalā€™, ā€˜vertebrateā€™]] ;
yes. X / ā€˜mollyā€™
[X^[ā€˜catā€™, ā€˜domestic catā€™, ā€˜petā€™, ā€˜mammalā€™, ā€˜vertebrateā€™]] ;
yes. X / ā€˜fridaā€™
[X^[ā€˜dogā€™, ā€˜domestic dogā€™, ā€˜canisā€™, ā€˜petā€™, ā€˜mammalā€™, ā€˜vertebrateā€™]]
?- X^[ā€˜vertebrateā€™], animal(X).
yes. X = ā€˜minnieā€™
X^[ā€˜dogā€™, ā€˜domestic dogā€™, ā€˜canisā€™, ā€˜petā€™, ā€˜mammalā€™, ā€˜vertebrateā€™] ;
yes. X = ā€˜minnieā€™
X^[ā€˜catā€™, ā€˜domestic catā€™, ā€˜petā€™, ā€˜mammalā€™, ā€˜vertebrateā€™] ;
yes. X = ā€˜mollyā€™
X^[ā€˜catā€™, ā€˜domestic catā€™, ā€˜petā€™, ā€˜mammalā€™, ā€˜vertebrateā€™] ;
yes. X = ā€˜fridaā€™
X^[ā€˜dogā€™, ā€˜domestic dogā€™, ā€˜canisā€™, ā€˜petā€™, ā€˜mammalā€™, ā€˜vertebrateā€™] ;
yes. X = ā€˜nemoā€™
X^[ā€˜fishā€™,ā€˜aquatic vertebratesā€™, ā€˜vertebrateā€™]
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 8 / 31
Scope & Goals Examples
Hybrid Computations I
Recipe Scenario
The knowledge base contains a collection of ingredients
meat(M) :- M^[100g, 145cal, [curedMeats]], M=[ā€˜Parma hamā€™].
meat(M) :- M^[100g, 210cal, [curedMeats]], M=[ā€˜hamā€™].
meat(M) :- M^[200g, 220cal, [whiteMeats]], M=[ā€˜chickenā€™].
vegetable(V) :- V^[100g, 35cal, [vegetables]], V=[ā€˜carrotsā€™].
vegetable(V) :- V^[ 50g, 10cal, [vegetables]], V=[ā€˜saladā€™].
bread(B) :- B^[100g, 265cal, [whiteBread]], B=[ā€˜bread with poolishā€™].
bread(B) :- B^[100g, 240cal, [integralBread]], B=[ā€˜whole grain breadā€™].
recipe(R) :- R^ , meat(Meat), vegetable(Vegetable), R=[Meat,Vegetable].
recipe(R) :- R^ , Meat^[any, any, [curedMeats]], bread(Bread), meat(Meat),
vegetable(Vegetable), R=[Bread, Meat, Vegetable].
Labels are not subject to the single-assignment assumption
Diverse computational models next to LP: aļ¬€ecting set of solutions
Diverse matching criteria: domain/user dependent
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 9 / 31
Scope & Goals Examples
Hybrid Computations II
?- R^[any, 200cal, any], recipe(R).
yes. R / [ā€˜tofu meatballsā€™, ā€˜carrotsā€™]
R^[200g, 191cal, [alternativeMeats, vegetables]] ;
yes. R / [ā€˜tofu meatballsā€™, ā€˜saladā€™]
R^[200g, 166cal, [alternativeMeats, vegetables]] ;
yes. R / [ā€˜Parma hamā€™, ā€˜carrotsā€™]
R^[200g, 180cal, [curedMeats, vegetables]] ;
yes. R / [ā€˜hamā€™, ā€˜saladā€™]
R^[150g, 220cal, [curedMeats, vegetables]]
?- R^[any, 180cal,[alternativeMeats]], recipe(R).
yes. R / [ā€˜tofu meatballsā€™,ā€˜carrotsā€™]
R^[200g, 191cal, [alternativeMeats, vegetables]] ;
yes. R / [ā€˜tofu meatballsā€™,ā€˜saladā€™]
R^[150g, 166cal, [alternativeMeats, vegetables]]
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 10 / 31
Scope & Goals Examples
Standard LP extension Comparison I
Constraint Logic Programming
The computational model is supported
Computational eļ¬ƒciency is not comparable
interval(X):- X^[-1,4].
interval(X):- X^[6,10].
Labels used to represent the integer interval over which the logic variable
values span: take the form X^[min,max ]
?- X^[2,7], interval(X).
yes.
X^[2,4] ;
yes.
X^[6,7]
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 11 / 31
Scope & Goals Examples
Standard LP extension Comparison II
Integers with a Neighbourhood
The expressiveness of LVLP
easily move to more complex domains
integers with a neighbourhood
neighbourhood(X):- X^[-1,4], X=3.
neighbourhood(X):- X^[6,10], X=8.
?- X^[2,7], neighbourhood(X).
yes. X / 3
X^[2,4]
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 12 / 31
The Labelled Variables Model in Logic Programming
Outline
1 Scope & Goals
Context & Motivation
Examples
2 The Labelled Variables Model in Logic Programming
Formal Model
Uniļ¬cation rules
3 Semantics
Fixpoint Semantics
Operational Semantics
Semantics Equivalence
4 Architecture
5 Conclusions & Further Work
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 13 / 31
The Labelled Variables Model in Logic Programming Formal Model
Labelled Variables Model in Logic Programming: LVLP
A set B = {Ī²1, . . . , Ī²n} of basic labels that are the basic entities of
the domain of labels
A set L āŠ† ā„˜(B) of labels, where each āˆˆ L is a subset of B
A set of variables V , where v āˆˆ V is the generic variable
A labelling: a set of pairs vi , i , associating the label i to the
variable vi
A (label-)combining function fL, synthesising a new label from two
fL : L Ɨ L āˆ’ā†’ L
A compatibility function fC to check the compatibility between a term
t āˆˆ H and a label āˆˆ L
fC : H Ɨ L āˆ’ā†’ {true, false}
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 14 / 31
The Labelled Variables Model in Logic Programming Formal Model
LVLP Uniļ¬cation & Rules
Program Rule
Head ā† Labellings, Body.
Head is an atomic formula
Labellings is the list of Variable/Label associations in the clause
Body is a list of atomic formulas
Uniļ¬cation of two labelled variables
(true/false āˆ§ fC (Ī˜, A), Ī˜, A)
true/false represents if there is an answer
fC (Ī˜, A) compatibility between variable values and their labels
Ī˜ represents the most general substitution for all variables
A represents the corresponding label-variable associations
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 15 / 31
The Labelled Variables Model in Logic Programming Uniļ¬cation rules
Uniļ¬cation Rules
constant c2 variable v2 labelled variable v2, 2 compound term s2
constant if c1 = c2 true, {v2/c1} if fC (c1, 2) = true false
c1 then true then true, {v1/c2}, 1
else false else false
variable true, {v1/c2} true, {v1/v2} true, {v1/v2}, 2 if v1 does not occur in s2
v1 then true, {v1/s2}
else false
labelled variable if fC (c2, 1) = true true, {v1/v2}, 1 if fL( 1, 2) = āˆ… if v1 does not occur in s2 and
v1, 1 then true, {v1/c2}, 1 then true, {v1/v2}, fL( 1, 2) fL( 1, fL( 2, . . . , fL( nāˆ’1, n) . . . )) = āˆ…
else false else false where 2, ... n are labels
of variables in s2
then true, {v1/s2},
fL( 1, fL( 2, . . . , fL( nāˆ’1, n) . . . ))
else false
compound term false if v2 does not occur in s1 if v2 does not occur in s1 and if s1 and s2
s1 then true, {v2/s1} fL( 1, fL( 2, . . . , fL( nāˆ’1, n) . . . )) = āˆ… have same functor and arity
else false where 2, ... n are labels and arguments
of variables in s1 (recursively) unify
then true, {v2/s1}, then true
fL( 1, fL( 2, . . . , fL( nāˆ’1, n) . . . )) else false
else false
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 16 / 31
Semantics
Outline
1 Scope & Goals
Context & Motivation
Examples
2 The Labelled Variables Model in Logic Programming
Formal Model
Uniļ¬cation rules
3 Semantics
Fixpoint Semantics
Operational Semantics
Semantics Equivalence
4 Architecture
5 Conclusions & Further Work
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 17 / 31
Semantics Fixpoint Semantics
Fixpoint Semantics
Denotational Semantics based on TP
TP(I) = p(t), :
r = p(x) ā† Ī›x | b1, . . . , bn (1)
where r is a fresh renaming of a rule of P,
v is a valuation on H such that v(x) = t, (2)
n
i=1 āˆƒ i s.t. v(bi ), i āˆˆ I, (3)
X |= Ī›t āˆ§ n
i=1 fC v(bi ), i , (4)
= fL r, Ī›t, 1, Ā· Ā· Ā· , n (5)
where Ī›t = v(Ī›x ) = [ t1, 1 , . . . , tn, m ] if Ī›x = [ x1, 1 , . . . , xm, m ]
Soundness and Completeness of TP
We demonstrate that
TP is a monotonic and continuous mapping on partial orders
ā†’ fL is required to be ACI
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 18 / 31
Semantics Operational Semantics
Operational Semantics
Labelled-Machine State Ļƒ = t0 t1...tn, W , Ī›
t0 t1...tn is the list of terms (goals)
W is the current list of variables bindings
Ī› is the set of the current labelling associations on W
Inference Step by Program Rule s0 ā† Ī› , s1, s2, . . . , sm
conditions
āˆƒ mgu Īø such that Īø(t0) = Īø(s0)
fĪøL(Ī›, Īø(Ī› )) = āˆ…
ļ¬nal state
Ļƒ = Īø(s1, . . . , sm, t1, . . . , tn), W = W ā—¦ Īø, Ī› = fĪøL(Ī›, Īø(Ī› ))
Labelled-Machine Final State Ļƒf = ( , Wf , Ī›f )
is the empty sequence, Wf is the ļ¬nal list of variables and bindings, Ī›f is the
corresponding labelling associations set
A sequence of applications of inference steps is said a derivation
A derivation is successful if it ends in a ļ¬nal state, failing if it ends in a non-ļ¬nal state
where no inference step is possible
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 19 / 31
Semantics Semantics Equivalence
Semantics Equivalence
Proposition
Let p(x) be an atom, v a valuation on H such that v(x) = t where t are
ground terms, and a list of labels
Then there is a successful derivation for p(t), v, v(x), iļ¬€
p(t), āˆˆ TP ā†‘ Ļ‰
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 20 / 31
Architecture
Outline
1 Scope & Goals
Context & Motivation
Examples
2 The Labelled Variables Model in Logic Programming
Formal Model
Uniļ¬cation rules
3 Semantics
Fixpoint Semantics
Operational Semantics
Semantics Equivalence
4 Architecture
5 Conclusions & Further Work
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 21 / 31
Architecture
Labelled tuProlog Engine
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 22 / 31
Architecture
tuProlog Middleware Architecture
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 23 / 31
Conclusions & Further Work
Outline
1 Scope & Goals
Context & Motivation
Examples
2 The Labelled Variables Model in Logic Programming
Formal Model
Uniļ¬cation rules
3 Semantics
Fixpoint Semantics
Operational Semantics
Semantics Equivalence
4 Architecture
5 Conclusions & Further Work
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 24 / 31
Conclusions & Further Work
Conclusions
Deļ¬nition of the LVLP theoretical framework
Domain-speciļ¬c computational models can be expressed via labelled
variables
Present the ļ¬xpoint and operational semantics, discuss correctness,
completeness, and equivalence
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 25 / 31
Conclusions & Further Work
Future Work
Further development of the Labelled tuProlog [Denti et al., 2005]
prototype
Design and implementation of a full-ļ¬‚edged middleware for tuProlog
and LVLP
Deeper exploration and better understanding of the consequences of
applying labels to formulas
Application of the LVLP framework to diļ¬€erent scenarios and
approaches (probabilistic [Skarlatidis et al., 2015], distributed ASP
reasoning [Dovier and Pontelli, 2009],...)
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 26 / 31
Conclusions & Further Work
Thanks
Thank you for your attention
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 27 / 31
References
References I
Denti, E., Omicini, A., and Ricci, A. (2005).
Multi-paradigm Java-Prolog integration in tuProlog.
Science of Computer Programming, 57(2):217ā€“250.
Dovier, A. and Pontelli, E. (2009).
Present and future challenges for ASP systems.
In Erdem, E., Lin, F., and Schaub, T., editors, Logic Programming and Nonmonotonic
Reasoning. 10th International Conference, LPNMR 2009, Potsdam, Germany, September
14-18, 2009. Proceedings, pages 622ā€“624. Springer.
Gabbay, D. M. (1996).
Labelled Deductive Systems, Volume 1.
Clarendon Press, Oxford Logic Guides 33.
Holzbaur, C. (1992).
Metastructures vs. attributed variables in the context of extensible uniļ¬cation.
In Bruynooghe, M. and Wirsing, M., editors, Programming Language Implementation and
Logic Programming, volume 631 of Lecture Notes in Computer Science, pages 260ā€“268.
Springer.
4th International Symposium (PLILPā€™92) Leuven, Belgium, August 26ā€“28, 1992
Proceedings.
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 28 / 31
References
References II
Mariani, S. and Omicini, A. (2015).
Coordinating activities and change: An event-driven architecture for situated MAS.
Engineering Applications of Artiļ¬cial Intelligence, 41:298ā€“309.
Skarlatidis, A., Artikis, A., Filippou, J., and Paliouras, G. (2015).
A probabilistic logic programming event calculus.
Theory and Practice of Logic Programming, 15(Special Issue 02 (Probability, Logic and
Learning)):213ā€“245.
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 29 / 31
Extras
URLs
Slides
On APICe
ā†’ http://apice.unibo.it/xwiki/bin/view/Talks/Label2pCilc016
On SlideShare
ā†’ http://www.slideshare.net/rcalegari1/
labelled-variables-in-logic-programming-foundations
Paper
On APICe
ā†’ http://apice.unibo.it/xwiki/bin/view/Publications/Label2pCilc016
On CEUR
ā†’ http://ceur-ws.org/Vol-1645/paper 7.pdf
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 30 / 31
Labelled Variables in Logic Programming:
Foundations
Roberta Calegari1, Enrico Denti1, Agostino Dovier2 Andrea Omicini1
{roberta.calegari, enrico.denti, andrea.omicini}@unibo.it
agostino.dovier@uniud.it
1Dipartimento di Informatica, Scienza e Ingegneriaā€”Universit`a di Bologna
2Dipartimento di Scienze Matematiche, Informatiche e Fisicheā€”Universit`a di Udine
Talk @ 31th Annual Conference of GULP (CILC 2016)
Universit`a di Milano-Bicocca, Italy
20 June 2016
Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 31 / 31

More Related Content

Similar to Labelled Variables in Logic Programming: Foundations

String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic ComputationsString-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations
Jornadas SISTEDES 2012 {JISBD; PROLE; JCIS}
Ā 
Efficient Hill Climber for Constrained Pseudo-Boolean Optimization Problems
Efficient Hill Climber for Constrained Pseudo-Boolean Optimization ProblemsEfficient Hill Climber for Constrained Pseudo-Boolean Optimization Problems
Efficient Hill Climber for Constrained Pseudo-Boolean Optimization Problems
jfrchicanog
Ā 
AN IMPROVED DECISION SUPPORT SYSTEM BASED ON THE BDM (BIT DECISION MAKING) ME...
AN IMPROVED DECISION SUPPORT SYSTEM BASED ON THE BDM (BIT DECISION MAKING) ME...AN IMPROVED DECISION SUPPORT SYSTEM BASED ON THE BDM (BIT DECISION MAKING) ME...
AN IMPROVED DECISION SUPPORT SYSTEM BASED ON THE BDM (BIT DECISION MAKING) ME...
ijmpict
Ā 
Sat4j: from the lab to desktop computers. OW2con'15, November 17, Paris.
Sat4j: from the lab to desktop computers. OW2con'15, November 17, Paris. Sat4j: from the lab to desktop computers. OW2con'15, November 17, Paris.
Sat4j: from the lab to desktop computers. OW2con'15, November 17, Paris.
OW2
Ā 
Formulas for Surface Weighted Numbers on Graph
Formulas for Surface Weighted Numbers on GraphFormulas for Surface Weighted Numbers on Graph
Formulas for Surface Weighted Numbers on Graph
ijtsrd
Ā 
Relational Algebra and Calculus.ppt
Relational Algebra and Calculus.pptRelational Algebra and Calculus.ppt
Relational Algebra and Calculus.ppt
Ankush138
Ā 
Survival and hazard estimation of weibull distribution based on
Survival and hazard estimation of weibull distribution based onSurvival and hazard estimation of weibull distribution based on
Survival and hazard estimation of weibull distribution based on
Alexander Decker
Ā 
Catalan Tau Collocation for Numerical Solution of 2-Dimentional Nonlinear Par...
Catalan Tau Collocation for Numerical Solution of 2-Dimentional Nonlinear Par...Catalan Tau Collocation for Numerical Solution of 2-Dimentional Nonlinear Par...
Catalan Tau Collocation for Numerical Solution of 2-Dimentional Nonlinear Par...
IJERA Editor
Ā 
Labelled Variables in Logic Programming: A First Prototipe in tuProlog
Labelled Variables in Logic Programming: A First Prototipe in tuPrologLabelled Variables in Logic Programming: A First Prototipe in tuProlog
Labelled Variables in Logic Programming: A First Prototipe in tuProlog
Roberta Calegari
Ā 
C2.0 propositional logic
C2.0 propositional logicC2.0 propositional logic
C2.0 propositional logic
Melaku Bayih Demessie
Ā 
cemracs_vivabrain_slides
cemracs_vivabrain_slidescemracs_vivabrain_slides
cemracs_vivabrain_slidesJussara F.M.
Ā 
A Systematic Approach To Probabilistic Pointer Analysis
A Systematic Approach To Probabilistic Pointer AnalysisA Systematic Approach To Probabilistic Pointer Analysis
A Systematic Approach To Probabilistic Pointer Analysis
Monica Franklin
Ā 
Building WordSpaces via Random Indexing from simple to complex spaces
Building WordSpaces via Random Indexing from simple to complex spacesBuilding WordSpaces via Random Indexing from simple to complex spaces
Building WordSpaces via Random Indexing from simple to complex spaces
Pierpaolo Basile
Ā 
[ABDO] Data Integration
[ABDO] Data Integration[ABDO] Data Integration
[ABDO] Data IntegrationCarles FarrƩ
Ā 
1 s2.0-s0307904 x10004634-main
1 s2.0-s0307904 x10004634-main1 s2.0-s0307904 x10004634-main
1 s2.0-s0307904 x10004634-main
raushan kumar
Ā 
Development of implicit rational runge kutta schemes for second order ordinar...
Development of implicit rational runge kutta schemes for second order ordinar...Development of implicit rational runge kutta schemes for second order ordinar...
Development of implicit rational runge kutta schemes for second order ordinar...
Alexander Decker
Ā 
Compiler Construction | Lecture 8 | Type Constraints
Compiler Construction | Lecture 8 | Type ConstraintsCompiler Construction | Lecture 8 | Type Constraints
Compiler Construction | Lecture 8 | Type Constraints
Eelco Visser
Ā 
Introducing a Tool for Concurrent Argumentation
Introducing a Tool for Concurrent ArgumentationIntroducing a Tool for Concurrent Argumentation
Introducing a Tool for Concurrent Argumentation
Carlo Taticchi
Ā 
Distributed Ledger and Robust Consensus for Agreements
Distributed Ledger and Robust Consensus for AgreementsDistributed Ledger and Robust Consensus for Agreements
Distributed Ledger and Robust Consensus for Agreements
Miguel Rebollo
Ā 
A POSSIBLE RESOLUTION TO HILBERTā€™S FIRST PROBLEM BY APPLYING CANTORā€™S DIAGONA...
A POSSIBLE RESOLUTION TO HILBERTā€™S FIRST PROBLEM BY APPLYING CANTORā€™S DIAGONA...A POSSIBLE RESOLUTION TO HILBERTā€™S FIRST PROBLEM BY APPLYING CANTORā€™S DIAGONA...
A POSSIBLE RESOLUTION TO HILBERTā€™S FIRST PROBLEM BY APPLYING CANTORā€™S DIAGONA...
mathsjournal
Ā 

Similar to Labelled Variables in Logic Programming: Foundations (20)

String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic ComputationsString-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations
Ā 
Efficient Hill Climber for Constrained Pseudo-Boolean Optimization Problems
Efficient Hill Climber for Constrained Pseudo-Boolean Optimization ProblemsEfficient Hill Climber for Constrained Pseudo-Boolean Optimization Problems
Efficient Hill Climber for Constrained Pseudo-Boolean Optimization Problems
Ā 
AN IMPROVED DECISION SUPPORT SYSTEM BASED ON THE BDM (BIT DECISION MAKING) ME...
AN IMPROVED DECISION SUPPORT SYSTEM BASED ON THE BDM (BIT DECISION MAKING) ME...AN IMPROVED DECISION SUPPORT SYSTEM BASED ON THE BDM (BIT DECISION MAKING) ME...
AN IMPROVED DECISION SUPPORT SYSTEM BASED ON THE BDM (BIT DECISION MAKING) ME...
Ā 
Sat4j: from the lab to desktop computers. OW2con'15, November 17, Paris.
Sat4j: from the lab to desktop computers. OW2con'15, November 17, Paris. Sat4j: from the lab to desktop computers. OW2con'15, November 17, Paris.
Sat4j: from the lab to desktop computers. OW2con'15, November 17, Paris.
Ā 
Formulas for Surface Weighted Numbers on Graph
Formulas for Surface Weighted Numbers on GraphFormulas for Surface Weighted Numbers on Graph
Formulas for Surface Weighted Numbers on Graph
Ā 
Relational Algebra and Calculus.ppt
Relational Algebra and Calculus.pptRelational Algebra and Calculus.ppt
Relational Algebra and Calculus.ppt
Ā 
Survival and hazard estimation of weibull distribution based on
Survival and hazard estimation of weibull distribution based onSurvival and hazard estimation of weibull distribution based on
Survival and hazard estimation of weibull distribution based on
Ā 
Catalan Tau Collocation for Numerical Solution of 2-Dimentional Nonlinear Par...
Catalan Tau Collocation for Numerical Solution of 2-Dimentional Nonlinear Par...Catalan Tau Collocation for Numerical Solution of 2-Dimentional Nonlinear Par...
Catalan Tau Collocation for Numerical Solution of 2-Dimentional Nonlinear Par...
Ā 
Labelled Variables in Logic Programming: A First Prototipe in tuProlog
Labelled Variables in Logic Programming: A First Prototipe in tuPrologLabelled Variables in Logic Programming: A First Prototipe in tuProlog
Labelled Variables in Logic Programming: A First Prototipe in tuProlog
Ā 
C2.0 propositional logic
C2.0 propositional logicC2.0 propositional logic
C2.0 propositional logic
Ā 
cemracs_vivabrain_slides
cemracs_vivabrain_slidescemracs_vivabrain_slides
cemracs_vivabrain_slides
Ā 
A Systematic Approach To Probabilistic Pointer Analysis
A Systematic Approach To Probabilistic Pointer AnalysisA Systematic Approach To Probabilistic Pointer Analysis
A Systematic Approach To Probabilistic Pointer Analysis
Ā 
Building WordSpaces via Random Indexing from simple to complex spaces
Building WordSpaces via Random Indexing from simple to complex spacesBuilding WordSpaces via Random Indexing from simple to complex spaces
Building WordSpaces via Random Indexing from simple to complex spaces
Ā 
[ABDO] Data Integration
[ABDO] Data Integration[ABDO] Data Integration
[ABDO] Data Integration
Ā 
1 s2.0-s0307904 x10004634-main
1 s2.0-s0307904 x10004634-main1 s2.0-s0307904 x10004634-main
1 s2.0-s0307904 x10004634-main
Ā 
Development of implicit rational runge kutta schemes for second order ordinar...
Development of implicit rational runge kutta schemes for second order ordinar...Development of implicit rational runge kutta schemes for second order ordinar...
Development of implicit rational runge kutta schemes for second order ordinar...
Ā 
Compiler Construction | Lecture 8 | Type Constraints
Compiler Construction | Lecture 8 | Type ConstraintsCompiler Construction | Lecture 8 | Type Constraints
Compiler Construction | Lecture 8 | Type Constraints
Ā 
Introducing a Tool for Concurrent Argumentation
Introducing a Tool for Concurrent ArgumentationIntroducing a Tool for Concurrent Argumentation
Introducing a Tool for Concurrent Argumentation
Ā 
Distributed Ledger and Robust Consensus for Agreements
Distributed Ledger and Robust Consensus for AgreementsDistributed Ledger and Robust Consensus for Agreements
Distributed Ledger and Robust Consensus for Agreements
Ā 
A POSSIBLE RESOLUTION TO HILBERTā€™S FIRST PROBLEM BY APPLYING CANTORā€™S DIAGONA...
A POSSIBLE RESOLUTION TO HILBERTā€™S FIRST PROBLEM BY APPLYING CANTORā€™S DIAGONA...A POSSIBLE RESOLUTION TO HILBERTā€™S FIRST PROBLEM BY APPLYING CANTORā€™S DIAGONA...
A POSSIBLE RESOLUTION TO HILBERTā€™S FIRST PROBLEM BY APPLYING CANTORā€™S DIAGONA...
Ā 

Recently uploaded

Structural Classification Of Protein (SCOP)
Structural Classification Of Protein  (SCOP)Structural Classification Of Protein  (SCOP)
Structural Classification Of Protein (SCOP)
aishnasrivastava
Ā 
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptxBody fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
muralinath2
Ā 
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
muralinath2
Ā 
GBSN- Microbiology (Lab 3) Gram Staining
GBSN- Microbiology (Lab 3) Gram StainingGBSN- Microbiology (Lab 3) Gram Staining
GBSN- Microbiology (Lab 3) Gram Staining
Areesha Ahmad
Ā 
What is greenhouse gasses and how many gasses are there to affect the Earth.
What is greenhouse gasses and how many gasses are there to affect the Earth.What is greenhouse gasses and how many gasses are there to affect the Earth.
What is greenhouse gasses and how many gasses are there to affect the Earth.
moosaasad1975
Ā 
Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...
Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...
Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...
Ana LuĆ­sa Pinho
Ā 
Hemoglobin metabolism_pathophysiology.pptx
Hemoglobin metabolism_pathophysiology.pptxHemoglobin metabolism_pathophysiology.pptx
Hemoglobin metabolism_pathophysiology.pptx
muralinath2
Ā 
insect taxonomy importance systematics and classification
insect taxonomy importance systematics and classificationinsect taxonomy importance systematics and classification
insect taxonomy importance systematics and classification
anitaento25
Ā 
EY - Supply Chain Services 2018_template.pptx
EY - Supply Chain Services 2018_template.pptxEY - Supply Chain Services 2018_template.pptx
EY - Supply Chain Services 2018_template.pptx
AlguinaldoKong
Ā 
Seminar of U.V. Spectroscopy by SAMIR PANDA
 Seminar of U.V. Spectroscopy by SAMIR PANDA Seminar of U.V. Spectroscopy by SAMIR PANDA
Seminar of U.V. Spectroscopy by SAMIR PANDA
SAMIR PANDA
Ā 
platelets_clotting_biogenesis.clot retractionpptx
platelets_clotting_biogenesis.clot retractionpptxplatelets_clotting_biogenesis.clot retractionpptx
platelets_clotting_biogenesis.clot retractionpptx
muralinath2
Ā 
Multi-source connectivity as the driver of solar wind variability in the heli...
Multi-source connectivity as the driver of solar wind variability in the heli...Multi-source connectivity as the driver of solar wind variability in the heli...
Multi-source connectivity as the driver of solar wind variability in the heli...
SĆ©rgio Sacani
Ā 
platelets- lifespan -Clot retraction-disorders.pptx
platelets- lifespan -Clot retraction-disorders.pptxplatelets- lifespan -Clot retraction-disorders.pptx
platelets- lifespan -Clot retraction-disorders.pptx
muralinath2
Ā 
Hemostasis_importance& clinical significance.pptx
Hemostasis_importance& clinical significance.pptxHemostasis_importance& clinical significance.pptx
Hemostasis_importance& clinical significance.pptx
muralinath2
Ā 
RNA INTERFERENCE: UNRAVELING GENETIC SILENCING
RNA INTERFERENCE: UNRAVELING GENETIC SILENCINGRNA INTERFERENCE: UNRAVELING GENETIC SILENCING
RNA INTERFERENCE: UNRAVELING GENETIC SILENCING
AADYARAJPANDEY1
Ā 
Observation of Ioā€™s Resurfacing via Plume Deposition Using Ground-based Adapt...
Observation of Ioā€™s Resurfacing via Plume Deposition Using Ground-based Adapt...Observation of Ioā€™s Resurfacing via Plume Deposition Using Ground-based Adapt...
Observation of Ioā€™s Resurfacing via Plume Deposition Using Ground-based Adapt...
SĆ©rgio Sacani
Ā 
SCHIZOPHRENIA Disorder/ Brain Disorder.pdf
SCHIZOPHRENIA Disorder/ Brain Disorder.pdfSCHIZOPHRENIA Disorder/ Brain Disorder.pdf
SCHIZOPHRENIA Disorder/ Brain Disorder.pdf
SELF-EXPLANATORY
Ā 
extra-chromosomal-inheritance[1].pptx.pdfpdf
extra-chromosomal-inheritance[1].pptx.pdfpdfextra-chromosomal-inheritance[1].pptx.pdfpdf
extra-chromosomal-inheritance[1].pptx.pdfpdf
DiyaBiswas10
Ā 
Mammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also FunctionsMammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also Functions
YOGESH DOGRA
Ā 
general properties of oerganologametal.ppt
general properties of oerganologametal.pptgeneral properties of oerganologametal.ppt
general properties of oerganologametal.ppt
IqrimaNabilatulhusni
Ā 

Recently uploaded (20)

Structural Classification Of Protein (SCOP)
Structural Classification Of Protein  (SCOP)Structural Classification Of Protein  (SCOP)
Structural Classification Of Protein (SCOP)
Ā 
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptxBody fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
Ā 
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
Ā 
GBSN- Microbiology (Lab 3) Gram Staining
GBSN- Microbiology (Lab 3) Gram StainingGBSN- Microbiology (Lab 3) Gram Staining
GBSN- Microbiology (Lab 3) Gram Staining
Ā 
What is greenhouse gasses and how many gasses are there to affect the Earth.
What is greenhouse gasses and how many gasses are there to affect the Earth.What is greenhouse gasses and how many gasses are there to affect the Earth.
What is greenhouse gasses and how many gasses are there to affect the Earth.
Ā 
Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...
Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...
Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...
Ā 
Hemoglobin metabolism_pathophysiology.pptx
Hemoglobin metabolism_pathophysiology.pptxHemoglobin metabolism_pathophysiology.pptx
Hemoglobin metabolism_pathophysiology.pptx
Ā 
insect taxonomy importance systematics and classification
insect taxonomy importance systematics and classificationinsect taxonomy importance systematics and classification
insect taxonomy importance systematics and classification
Ā 
EY - Supply Chain Services 2018_template.pptx
EY - Supply Chain Services 2018_template.pptxEY - Supply Chain Services 2018_template.pptx
EY - Supply Chain Services 2018_template.pptx
Ā 
Seminar of U.V. Spectroscopy by SAMIR PANDA
 Seminar of U.V. Spectroscopy by SAMIR PANDA Seminar of U.V. Spectroscopy by SAMIR PANDA
Seminar of U.V. Spectroscopy by SAMIR PANDA
Ā 
platelets_clotting_biogenesis.clot retractionpptx
platelets_clotting_biogenesis.clot retractionpptxplatelets_clotting_biogenesis.clot retractionpptx
platelets_clotting_biogenesis.clot retractionpptx
Ā 
Multi-source connectivity as the driver of solar wind variability in the heli...
Multi-source connectivity as the driver of solar wind variability in the heli...Multi-source connectivity as the driver of solar wind variability in the heli...
Multi-source connectivity as the driver of solar wind variability in the heli...
Ā 
platelets- lifespan -Clot retraction-disorders.pptx
platelets- lifespan -Clot retraction-disorders.pptxplatelets- lifespan -Clot retraction-disorders.pptx
platelets- lifespan -Clot retraction-disorders.pptx
Ā 
Hemostasis_importance& clinical significance.pptx
Hemostasis_importance& clinical significance.pptxHemostasis_importance& clinical significance.pptx
Hemostasis_importance& clinical significance.pptx
Ā 
RNA INTERFERENCE: UNRAVELING GENETIC SILENCING
RNA INTERFERENCE: UNRAVELING GENETIC SILENCINGRNA INTERFERENCE: UNRAVELING GENETIC SILENCING
RNA INTERFERENCE: UNRAVELING GENETIC SILENCING
Ā 
Observation of Ioā€™s Resurfacing via Plume Deposition Using Ground-based Adapt...
Observation of Ioā€™s Resurfacing via Plume Deposition Using Ground-based Adapt...Observation of Ioā€™s Resurfacing via Plume Deposition Using Ground-based Adapt...
Observation of Ioā€™s Resurfacing via Plume Deposition Using Ground-based Adapt...
Ā 
SCHIZOPHRENIA Disorder/ Brain Disorder.pdf
SCHIZOPHRENIA Disorder/ Brain Disorder.pdfSCHIZOPHRENIA Disorder/ Brain Disorder.pdf
SCHIZOPHRENIA Disorder/ Brain Disorder.pdf
Ā 
extra-chromosomal-inheritance[1].pptx.pdfpdf
extra-chromosomal-inheritance[1].pptx.pdfpdfextra-chromosomal-inheritance[1].pptx.pdfpdf
extra-chromosomal-inheritance[1].pptx.pdfpdf
Ā 
Mammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also FunctionsMammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also Functions
Ā 
general properties of oerganologametal.ppt
general properties of oerganologametal.pptgeneral properties of oerganologametal.ppt
general properties of oerganologametal.ppt
Ā 

Labelled Variables in Logic Programming: Foundations

  • 1. Labelled Variables in Logic Programming: Foundations Roberta Calegari1, Enrico Denti1, Agostino Dovier2 Andrea Omicini1 {roberta.calegari, enrico.denti, andrea.omicini}@unibo.it agostino.dovier@uniud.it 1Dipartimento di Informatica, Scienza e Ingegneriaā€”Universit`a di Bologna 2Dipartimento di Scienze Matematiche, Informatiche e Fisicheā€”Universit`a di Udine Talk @ 31th Annual Conference of GULP (CILC 2016) Universit`a di Milano-Bicocca, Italy 20 June 2016 Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 1 / 31
  • 2. Outline 1 Scope & Goals Context & Motivation Examples 2 The Labelled Variables Model in Logic Programming Formal Model Uniļ¬cation rules 3 Semantics Fixpoint Semantics Operational Semantics Semantics Equivalence 4 Architecture 5 Conclusions & Further Work Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 2 / 31
  • 3. Scope & Goals Outline 1 Scope & Goals Context & Motivation Examples 2 The Labelled Variables Model in Logic Programming Formal Model Uniļ¬cation rules 3 Semantics Fixpoint Semantics Operational Semantics Semantics Equivalence 4 Architecture 5 Conclusions & Further Work Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 3 / 31
  • 4. Scope & Goals Context & Motivation Context Challenges of todayā€™s pervasive system [Mariani and Omicini, 2015] complex distributed situated intelligent distributed situated intelligence enabling models and technologies Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 4 / 31
  • 5. Scope & Goals Context & Motivation Motivations I Intelligence Logic Programming programs as logic theories computation as deduction programming with relations and inference Distribution multiple, distributed Prolog engines minimal (dynamically) conļ¬gurable easily deployable inter-operable multi-platform . . . Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 5 / 31
  • 6. Scope & Goals Context & Motivation Motivations II Situatedness reactiveness ! computational reactiveness ? environment reactiveness domain-speciļ¬c capture diverse computational models tailored to the local needs of situated components / devices ā†’ labels [Gabbay, 1996] model [Holzbaur, 1992] mechanism Labelled Variables in Logic Programming (LVLP) Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 6 / 31
  • 7. Scope & Goals Examples WordNet I Knowledge-Intensive Environment A WordNet scenario representing a network of semantically-related words wordnet_fact([ā€˜dogā€™,ā€˜domestic dogā€™,ā€˜canisā€™,ā€˜petā€™,ā€˜mammalā€™,ā€˜vertebrateā€™]). wordnet_fact([ā€˜catā€™, ā€˜domestic catā€™, ā€˜petā€™, ā€˜mammalā€™, ā€˜vertebrateā€™]). wordnet_fact([ā€˜fishā€™, ā€˜aquatic vertebratesā€™, ā€˜vertebrateā€™]). wordnet_fact([ā€˜frogā€™, ā€˜toadā€™, ā€˜anauranā€™, ā€˜batrachianā€™]). animal(X) :- X^[ā€˜petā€™], X = ā€˜minnieā€™. animal(X) :- X^[ā€˜fishā€™], X = ā€˜nemoā€™. animal(X) :- X^[ā€˜catā€™], X = ā€˜vmollyā€™. animal(X) :- X^[ā€˜dogā€™], X = ā€˜fridaā€™. animal(X) :- X^[ā€˜frogā€™], X = ā€˜craā€™. Labels provide a customisable computational model (domain-speciļ¬c) Bound to the standard LP computation Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 7 / 31
  • 8. Scope & Goals Examples WordNet II ?- X^[ā€˜petā€™], animal(X). yes. X / ā€˜minnieā€™ [X^[ā€˜dogā€™, ā€˜domestic dogā€™, ā€˜canisā€™, ā€˜petā€™, ā€˜mammalā€™, ā€˜vertebrateā€™]] ; yes. X / ā€˜minnieā€™ [X^[ā€˜catā€™, ā€˜domestic catā€™, ā€˜petā€™, ā€˜mammalā€™, ā€˜vertebrateā€™]] ; yes. X / ā€˜mollyā€™ [X^[ā€˜catā€™, ā€˜domestic catā€™, ā€˜petā€™, ā€˜mammalā€™, ā€˜vertebrateā€™]] ; yes. X / ā€˜fridaā€™ [X^[ā€˜dogā€™, ā€˜domestic dogā€™, ā€˜canisā€™, ā€˜petā€™, ā€˜mammalā€™, ā€˜vertebrateā€™]] ?- X^[ā€˜vertebrateā€™], animal(X). yes. X = ā€˜minnieā€™ X^[ā€˜dogā€™, ā€˜domestic dogā€™, ā€˜canisā€™, ā€˜petā€™, ā€˜mammalā€™, ā€˜vertebrateā€™] ; yes. X = ā€˜minnieā€™ X^[ā€˜catā€™, ā€˜domestic catā€™, ā€˜petā€™, ā€˜mammalā€™, ā€˜vertebrateā€™] ; yes. X = ā€˜mollyā€™ X^[ā€˜catā€™, ā€˜domestic catā€™, ā€˜petā€™, ā€˜mammalā€™, ā€˜vertebrateā€™] ; yes. X = ā€˜fridaā€™ X^[ā€˜dogā€™, ā€˜domestic dogā€™, ā€˜canisā€™, ā€˜petā€™, ā€˜mammalā€™, ā€˜vertebrateā€™] ; yes. X = ā€˜nemoā€™ X^[ā€˜fishā€™,ā€˜aquatic vertebratesā€™, ā€˜vertebrateā€™] Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 8 / 31
  • 9. Scope & Goals Examples Hybrid Computations I Recipe Scenario The knowledge base contains a collection of ingredients meat(M) :- M^[100g, 145cal, [curedMeats]], M=[ā€˜Parma hamā€™]. meat(M) :- M^[100g, 210cal, [curedMeats]], M=[ā€˜hamā€™]. meat(M) :- M^[200g, 220cal, [whiteMeats]], M=[ā€˜chickenā€™]. vegetable(V) :- V^[100g, 35cal, [vegetables]], V=[ā€˜carrotsā€™]. vegetable(V) :- V^[ 50g, 10cal, [vegetables]], V=[ā€˜saladā€™]. bread(B) :- B^[100g, 265cal, [whiteBread]], B=[ā€˜bread with poolishā€™]. bread(B) :- B^[100g, 240cal, [integralBread]], B=[ā€˜whole grain breadā€™]. recipe(R) :- R^ , meat(Meat), vegetable(Vegetable), R=[Meat,Vegetable]. recipe(R) :- R^ , Meat^[any, any, [curedMeats]], bread(Bread), meat(Meat), vegetable(Vegetable), R=[Bread, Meat, Vegetable]. Labels are not subject to the single-assignment assumption Diverse computational models next to LP: aļ¬€ecting set of solutions Diverse matching criteria: domain/user dependent Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 9 / 31
  • 10. Scope & Goals Examples Hybrid Computations II ?- R^[any, 200cal, any], recipe(R). yes. R / [ā€˜tofu meatballsā€™, ā€˜carrotsā€™] R^[200g, 191cal, [alternativeMeats, vegetables]] ; yes. R / [ā€˜tofu meatballsā€™, ā€˜saladā€™] R^[200g, 166cal, [alternativeMeats, vegetables]] ; yes. R / [ā€˜Parma hamā€™, ā€˜carrotsā€™] R^[200g, 180cal, [curedMeats, vegetables]] ; yes. R / [ā€˜hamā€™, ā€˜saladā€™] R^[150g, 220cal, [curedMeats, vegetables]] ?- R^[any, 180cal,[alternativeMeats]], recipe(R). yes. R / [ā€˜tofu meatballsā€™,ā€˜carrotsā€™] R^[200g, 191cal, [alternativeMeats, vegetables]] ; yes. R / [ā€˜tofu meatballsā€™,ā€˜saladā€™] R^[150g, 166cal, [alternativeMeats, vegetables]] Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 10 / 31
  • 11. Scope & Goals Examples Standard LP extension Comparison I Constraint Logic Programming The computational model is supported Computational eļ¬ƒciency is not comparable interval(X):- X^[-1,4]. interval(X):- X^[6,10]. Labels used to represent the integer interval over which the logic variable values span: take the form X^[min,max ] ?- X^[2,7], interval(X). yes. X^[2,4] ; yes. X^[6,7] Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 11 / 31
  • 12. Scope & Goals Examples Standard LP extension Comparison II Integers with a Neighbourhood The expressiveness of LVLP easily move to more complex domains integers with a neighbourhood neighbourhood(X):- X^[-1,4], X=3. neighbourhood(X):- X^[6,10], X=8. ?- X^[2,7], neighbourhood(X). yes. X / 3 X^[2,4] Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 12 / 31
  • 13. The Labelled Variables Model in Logic Programming Outline 1 Scope & Goals Context & Motivation Examples 2 The Labelled Variables Model in Logic Programming Formal Model Uniļ¬cation rules 3 Semantics Fixpoint Semantics Operational Semantics Semantics Equivalence 4 Architecture 5 Conclusions & Further Work Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 13 / 31
  • 14. The Labelled Variables Model in Logic Programming Formal Model Labelled Variables Model in Logic Programming: LVLP A set B = {Ī²1, . . . , Ī²n} of basic labels that are the basic entities of the domain of labels A set L āŠ† ā„˜(B) of labels, where each āˆˆ L is a subset of B A set of variables V , where v āˆˆ V is the generic variable A labelling: a set of pairs vi , i , associating the label i to the variable vi A (label-)combining function fL, synthesising a new label from two fL : L Ɨ L āˆ’ā†’ L A compatibility function fC to check the compatibility between a term t āˆˆ H and a label āˆˆ L fC : H Ɨ L āˆ’ā†’ {true, false} Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 14 / 31
  • 15. The Labelled Variables Model in Logic Programming Formal Model LVLP Uniļ¬cation & Rules Program Rule Head ā† Labellings, Body. Head is an atomic formula Labellings is the list of Variable/Label associations in the clause Body is a list of atomic formulas Uniļ¬cation of two labelled variables (true/false āˆ§ fC (Ī˜, A), Ī˜, A) true/false represents if there is an answer fC (Ī˜, A) compatibility between variable values and their labels Ī˜ represents the most general substitution for all variables A represents the corresponding label-variable associations Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 15 / 31
  • 16. The Labelled Variables Model in Logic Programming Uniļ¬cation rules Uniļ¬cation Rules constant c2 variable v2 labelled variable v2, 2 compound term s2 constant if c1 = c2 true, {v2/c1} if fC (c1, 2) = true false c1 then true then true, {v1/c2}, 1 else false else false variable true, {v1/c2} true, {v1/v2} true, {v1/v2}, 2 if v1 does not occur in s2 v1 then true, {v1/s2} else false labelled variable if fC (c2, 1) = true true, {v1/v2}, 1 if fL( 1, 2) = āˆ… if v1 does not occur in s2 and v1, 1 then true, {v1/c2}, 1 then true, {v1/v2}, fL( 1, 2) fL( 1, fL( 2, . . . , fL( nāˆ’1, n) . . . )) = āˆ… else false else false where 2, ... n are labels of variables in s2 then true, {v1/s2}, fL( 1, fL( 2, . . . , fL( nāˆ’1, n) . . . )) else false compound term false if v2 does not occur in s1 if v2 does not occur in s1 and if s1 and s2 s1 then true, {v2/s1} fL( 1, fL( 2, . . . , fL( nāˆ’1, n) . . . )) = āˆ… have same functor and arity else false where 2, ... n are labels and arguments of variables in s1 (recursively) unify then true, {v2/s1}, then true fL( 1, fL( 2, . . . , fL( nāˆ’1, n) . . . )) else false else false Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 16 / 31
  • 17. Semantics Outline 1 Scope & Goals Context & Motivation Examples 2 The Labelled Variables Model in Logic Programming Formal Model Uniļ¬cation rules 3 Semantics Fixpoint Semantics Operational Semantics Semantics Equivalence 4 Architecture 5 Conclusions & Further Work Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 17 / 31
  • 18. Semantics Fixpoint Semantics Fixpoint Semantics Denotational Semantics based on TP TP(I) = p(t), : r = p(x) ā† Ī›x | b1, . . . , bn (1) where r is a fresh renaming of a rule of P, v is a valuation on H such that v(x) = t, (2) n i=1 āˆƒ i s.t. v(bi ), i āˆˆ I, (3) X |= Ī›t āˆ§ n i=1 fC v(bi ), i , (4) = fL r, Ī›t, 1, Ā· Ā· Ā· , n (5) where Ī›t = v(Ī›x ) = [ t1, 1 , . . . , tn, m ] if Ī›x = [ x1, 1 , . . . , xm, m ] Soundness and Completeness of TP We demonstrate that TP is a monotonic and continuous mapping on partial orders ā†’ fL is required to be ACI Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 18 / 31
  • 19. Semantics Operational Semantics Operational Semantics Labelled-Machine State Ļƒ = t0 t1...tn, W , Ī› t0 t1...tn is the list of terms (goals) W is the current list of variables bindings Ī› is the set of the current labelling associations on W Inference Step by Program Rule s0 ā† Ī› , s1, s2, . . . , sm conditions āˆƒ mgu Īø such that Īø(t0) = Īø(s0) fĪøL(Ī›, Īø(Ī› )) = āˆ… ļ¬nal state Ļƒ = Īø(s1, . . . , sm, t1, . . . , tn), W = W ā—¦ Īø, Ī› = fĪøL(Ī›, Īø(Ī› )) Labelled-Machine Final State Ļƒf = ( , Wf , Ī›f ) is the empty sequence, Wf is the ļ¬nal list of variables and bindings, Ī›f is the corresponding labelling associations set A sequence of applications of inference steps is said a derivation A derivation is successful if it ends in a ļ¬nal state, failing if it ends in a non-ļ¬nal state where no inference step is possible Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 19 / 31
  • 20. Semantics Semantics Equivalence Semantics Equivalence Proposition Let p(x) be an atom, v a valuation on H such that v(x) = t where t are ground terms, and a list of labels Then there is a successful derivation for p(t), v, v(x), iļ¬€ p(t), āˆˆ TP ā†‘ Ļ‰ Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 20 / 31
  • 21. Architecture Outline 1 Scope & Goals Context & Motivation Examples 2 The Labelled Variables Model in Logic Programming Formal Model Uniļ¬cation rules 3 Semantics Fixpoint Semantics Operational Semantics Semantics Equivalence 4 Architecture 5 Conclusions & Further Work Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 21 / 31
  • 22. Architecture Labelled tuProlog Engine Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 22 / 31
  • 23. Architecture tuProlog Middleware Architecture Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 23 / 31
  • 24. Conclusions & Further Work Outline 1 Scope & Goals Context & Motivation Examples 2 The Labelled Variables Model in Logic Programming Formal Model Uniļ¬cation rules 3 Semantics Fixpoint Semantics Operational Semantics Semantics Equivalence 4 Architecture 5 Conclusions & Further Work Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 24 / 31
  • 25. Conclusions & Further Work Conclusions Deļ¬nition of the LVLP theoretical framework Domain-speciļ¬c computational models can be expressed via labelled variables Present the ļ¬xpoint and operational semantics, discuss correctness, completeness, and equivalence Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 25 / 31
  • 26. Conclusions & Further Work Future Work Further development of the Labelled tuProlog [Denti et al., 2005] prototype Design and implementation of a full-ļ¬‚edged middleware for tuProlog and LVLP Deeper exploration and better understanding of the consequences of applying labels to formulas Application of the LVLP framework to diļ¬€erent scenarios and approaches (probabilistic [Skarlatidis et al., 2015], distributed ASP reasoning [Dovier and Pontelli, 2009],...) Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 26 / 31
  • 27. Conclusions & Further Work Thanks Thank you for your attention Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 27 / 31
  • 28. References References I Denti, E., Omicini, A., and Ricci, A. (2005). Multi-paradigm Java-Prolog integration in tuProlog. Science of Computer Programming, 57(2):217ā€“250. Dovier, A. and Pontelli, E. (2009). Present and future challenges for ASP systems. In Erdem, E., Lin, F., and Schaub, T., editors, Logic Programming and Nonmonotonic Reasoning. 10th International Conference, LPNMR 2009, Potsdam, Germany, September 14-18, 2009. Proceedings, pages 622ā€“624. Springer. Gabbay, D. M. (1996). Labelled Deductive Systems, Volume 1. Clarendon Press, Oxford Logic Guides 33. Holzbaur, C. (1992). Metastructures vs. attributed variables in the context of extensible uniļ¬cation. In Bruynooghe, M. and Wirsing, M., editors, Programming Language Implementation and Logic Programming, volume 631 of Lecture Notes in Computer Science, pages 260ā€“268. Springer. 4th International Symposium (PLILPā€™92) Leuven, Belgium, August 26ā€“28, 1992 Proceedings. Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 28 / 31
  • 29. References References II Mariani, S. and Omicini, A. (2015). Coordinating activities and change: An event-driven architecture for situated MAS. Engineering Applications of Artiļ¬cial Intelligence, 41:298ā€“309. Skarlatidis, A., Artikis, A., Filippou, J., and Paliouras, G. (2015). A probabilistic logic programming event calculus. Theory and Practice of Logic Programming, 15(Special Issue 02 (Probability, Logic and Learning)):213ā€“245. Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 29 / 31
  • 30. Extras URLs Slides On APICe ā†’ http://apice.unibo.it/xwiki/bin/view/Talks/Label2pCilc016 On SlideShare ā†’ http://www.slideshare.net/rcalegari1/ labelled-variables-in-logic-programming-foundations Paper On APICe ā†’ http://apice.unibo.it/xwiki/bin/view/Publications/Label2pCilc016 On CEUR ā†’ http://ceur-ws.org/Vol-1645/paper 7.pdf Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 30 / 31
  • 31. Labelled Variables in Logic Programming: Foundations Roberta Calegari1, Enrico Denti1, Agostino Dovier2 Andrea Omicini1 {roberta.calegari, enrico.denti, andrea.omicini}@unibo.it agostino.dovier@uniud.it 1Dipartimento di Informatica, Scienza e Ingegneriaā€”Universit`a di Bologna 2Dipartimento di Scienze Matematiche, Informatiche e Fisicheā€”Universit`a di Udine Talk @ 31th Annual Conference of GULP (CILC 2016) Universit`a di Milano-Bicocca, Italy 20 June 2016 Calegari, Denti, Dovier, Omicini Labelled Variables in Logic Programming CILC 2016, 20/6/2016 31 / 31