Marco Gavanelli – Università di Ferrara, Italy
Marco Alberti – Universidade nova de Lisboa, Portugal
Evelina Lamma – Università di Ferrara, Italy
Abductive Logic Programming
ALP = < KB, A, IC >
KB = logic program (set of clauses)
A = atoms without definitions, can be assumed
IC = Integrity constraints (usually, implications)
KB ╞═ G
KB ╞═ IC
Reasoning from effects to causes
Abductive Constraint Logic
Programming
E.g., ALP+CLP(FD),
KB = { p(X) :- a(X), 1 ≤ X ≤ 2. }
G = p(X)
0={a(1)}
1={a(2)}
2={a(1), a(2)}
KB |= p(1)
KB |= p(2)
KB |= p(1)
KB |= p(2)
Optimization in ALP
Find the best explanation, plan, … w.r.t. some given
objective function
Syntax:
min( X : p(X,Y) ) = M
means
M = min{ X : p(X,Y) }
Use the minimize predicate of
CLP(FD)
Operational semantics
p(X,Y)
X≤3
X≤3
X≤3
X=3
ok!
Implementation
Depends on the implementation of ALP
CHR [Abdennadher&Christiansen,
ok!
Christiansen&Dahl, Alberti et al., Badea et al.]
can call all the predicates of the host (CLP) language ->
also minimize!
p(X) :- a(X), 1 ≤ X ≤ 2.
min( X : p(X)) = M
0={a(1)}
1={a(2)}
2={a(1), a(2)}
KB |= p(1)
KB |= p(2)
KB |= p(1)
KB |= p(2)
Semantics of optimization
Semantics of optimization in CLP [Fages,
Marriot&Stuckey]
min( X : p(X,Y) )
p(X,Y) not( p(X1,Y1), X1 < X )
Naïve abductive semantics:
min( X : p(X,Y) )
KB ╞═ p(X,Y) not( p(X1,Y1), X1 < X )
Naïve declarative semantics
KB = { p(X) :- a(X), 1 ≤ X ≤ 2. }
?- min(X : p(X)) = M
KB |= p(X) not( p(X1), X1 < X )
KB{a(1), a(2)} |=
p(1) not(p(X1),X1<1)
KB{a(1)} |=
p(1) not(p(X1),X1<1)
M=1
KB{a(2)} |=
p(2) not(p(X1),X1<2)
M=2
M=1
What is wrong?
We are not optimizing w.r.t. the set :
KB ╞═ min( X : p(X,Y) )
We want the minimum to be among all the possible
sets .
Let us consider programs stratified both w.r.t. negation
and optimization
3-valued completion
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
H
not
False
True
3-valued completion
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
H
not
False
True
3-valued completion
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
H
not
False
True
3-valued completion for
abducibles
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
p(1) :- not q(1).
1
2
not
3
4
Tp for optimization (simplified)
Given the atom
min( X : p(X) ) = M
Suppose that all atoms from the grounding of p(X) are
either true or false
then min( X : p(X) )=M is true iff:
there exists some value v such that
p(v) is true
there is no v’<v s.t. p(v’) is true with the same
there is no v’’<v s.t. p(v’’) is true with another .
(false otherwise)
Example: Game Theory
[Gavanelli et al. ECAI 2008]
Interactions?
max
a(0)
a(Ma,Xa),b(Mb,Xb)->Xa=Xb=f(Ma,Mb).
max(Vb : a(Ma,Xa),
min(Xb : b(Mb,Xb),
) = Vb
)
a(1)
min
b(0)
b(1) b(0)
5
10
b(1)
4
• true iff for each possible , there is no better value
• Thus, the only option is ={a(1),b(1)}
• Second player plays also the move of the first!
3
Solution
Am
Add the set of literals Am that can be
’’
abduced “inside” min in the syntax:
minAm ( X : p(X) )
Suppose that all atoms from the grounding of p(X)
are either true or false
then minAm ( X : p(X) )=M is true iff:
there exists some value v such that
p(v) is true
there is no v’<v s.t. p(v’) is true with the same
there is no v’’<v s.t. p(v’’) is true with another ’’
∆’’ ∩ (A \ ∆ ) ⊆ A , ∆’’ ∩ (A \ A ) = ∆ ∩ (A \ A )
max
Interactions?
a(0)
max{a,b}(Vb : a(Ma,Xa),
b(0)
min{b}(Xb : b(Mb,Xb),
) = Vb
5
)
Now min{b} is
Am={b}
true in {a(0),b(o)} and
{a(1),b(1)}
false in {a(1), b(0)}
{a(0),b(1)}
a(1)
min
b(1) b(0)
10
b(0)
4
’’
3
Am={b}
b(1)
a(0)
b(1)
b(1)
a(1)
b(0)
’’
max
Interactions?
a(0)
max{a,b}(Vb : a(Ma,Xa),
b(0)
min{b}(Xb : b(Mb,Xb),
) = Vb
5
)
Now min{b} is
Am={b}
true in {a(0),b(o)} and
{a(1),b(1)}
false in {a(1), b(0)}
{a(0),b(1)}
max{a,b} is true for
{a(0),b(o)}
b(0)
a(1)
min
b(1)
3
Am={b}
b(1)
a(0)
a(1)
Soundness
Soundness of success: if
P ├─∆ G
with abductive answer (∆, σ), then
P |= ∆σ Gσ
Soundness of failure: if the SCIFFopt derivation for a
goal G finitely fails, then
P
G
Proved for SCIFF, but should hold for most (sound)
abductive procedures
Limitations
We do not currently consider the following cases
Optimization goals in the conditions of integrity
constraints:
min( X : p(X,Y) ) -> …
Conjunctions of optimization atoms
min( X : p(X) ), max( X : p(X) )
min( X : p(X),X>0 ), min( Y : q(Y),Y>0 ) p(X),q(X) -> false
Protected variables
Conclusions
First declarative semantics for abductive logic
programming (ALP) with optimization (for finding the
optimal )
Proof of soundness of ALP+optimization
Proved for SCIFF, should hold for all (sound)
abductive procedures
Directly usable in abductive proof-procedures
implemented in CHR
Thank you for your attention!
Questions?
© Copyright 2026 Paperzz