Declarative Traces Into Fuzzy Computed Answers - Defeasible Logic

1 downloads 0 Views 400KB Size Report
and_prod(0.9,TV5,TV0). q(a,0.8). r(X,0.7). s(_,0.5). : p(X). —–»»»»»> ? − p(X,Truth_degree). : [X = a,Truth_degree = 0.54]. 5th International Symposium on Rules.
Declarative Traces Into Fuzzy Computed Answers Pedro J. Morcillo

Ginés Moreno

Jaime Penabad

Carlos Váquez

Faculty of Computer Science Engineering University of Castilla – La Mancha 02005, Albacete, SPAIN 5th International Symposium on Rules

RULEML’11

July 19-21, 2011

Barcelona, SPAIN – p. 1/33

Declarative Traces Into Fuzzy Computed Answers

Outline of the talk

Multi-Adjoint Logic Programming The Fuzzy Logic System FLOPER Fuzzy Computed Answers with Traces Conclusions and Further Research 5th International Symposium on Rules

RULEML’11

July 19-21, 2011

Barcelona, SPAIN – p. 2/33

Declarative Traces Into Fuzzy Computed Answers Multi-Adjoint Logic Programming FUZZY LOGIC PROGRAMMING

⇓ FUZZY LOGIC

+ LOGIC PROGRAMMING

5th International Symposium on Rules

RULEML’11

July 19-21, 2011

Barcelona, SPAIN – p. 3/33

Declarative Traces Into Fuzzy Computed Answers Multi-Adjoint Logic Programming Although there is no an standard language, we have found two major approaches: 1. Likelog [Arcelli & Formato-99] Bousi − Prolog [Julián & Rubio-07] SLD-resolution + FUZZY (similarity) unification 2. f-Prolog [Vojtas & Paulík-96] FUZZY SLD-resolution + (syntactic) unification MALP [Medina & Ojeda–Aciego & Vojtas-01] Admissible/Interpretive Computation + (syntactic) unification 5th International Symposium on Rules

RULEML’11

July 19-21, 2011

Barcelona, SPAIN – p. 4/33

Declarative Traces Into Fuzzy Computed Answers Multi-Adjoint Logic Programming Let ℒ be a PROLOG-like first order language, with: constants variables functions predicates quantifiers: ∀, ∃ BUT MORE connectives!!! &1 , ∨1 , ←1 , @1 ,

&2 , ∨2 , ←2 , @2 ,

..., ..., ..., ...,

&𝑘 ∨𝑙 ←𝑚 @𝑛

(conjunctions) (disjunctions) (implications) (aggregations)

Instead of naive {𝑡𝑟𝑢𝑒, 𝑓 𝑎𝑙𝑠𝑒}, use a multi–adjoint lattice to model truth degrees ⟨𝐿, ⪯, ←1 , &1 , . . . , ←𝑛 , &𝑛 ⟩. ⟨[0, 1], ⪯, ←Luka , &Luka , ←Prod , &Prod , ←Godel , &Godel ⟩ 5th International Symposium on Rules

RULEML’11

July 19-21, 2011

Barcelona, SPAIN – p. 5/33

Declarative Traces Into Fuzzy Computed Answers Multi-Adjoint Logic Programming SYNTAX: Assume some connective definitions like: &Godel (𝑥1 , 𝑥2 ) ≜ 𝑚𝑖𝑛(𝑥1 , 𝑥2 ) - - in brief &G &Prod (𝑥1 , 𝑥2 ) ≜ 𝑥1 ∗ 𝑥2 - - in brief &P ∨L ∨Luka (𝑥1 , 𝑥2 ) ≜ 𝑚𝑖𝑛(1, 𝑥1 + 𝑥2 ) - - in brief @aver (𝑥1 , 𝑥2 ) ≜ (𝑥1 + 𝑥2 )/2 A program is a set of “weighted” rules A ←i ℬ with 𝛼: ℛ1 ℛ2 ℛ3 ℛ4

: : : :

𝑝(𝑋) 𝑞(𝑎) 𝑟(𝑋) 𝑠(𝑋)

←P &G (𝑞(𝑋), @aver (𝑟(𝑋), 𝑠(𝑋))) ← ← ←

5th International Symposium on Rules

RULEML’11

July 19-21, 2011

𝑤𝑖𝑡ℎ 𝑤𝑖𝑡ℎ 𝑤𝑖𝑡ℎ 𝑤𝑖𝑡ℎ

0.9 0.8 0.7 0.5

Barcelona, SPAIN – p. 6/33

Declarative Traces Into Fuzzy Computed Answers Multi-Adjoint Logic Programming STATE : Is a pair with form ⟨𝑔𝑜𝑎𝑙; 𝑠𝑢𝑏𝑠𝑡𝑖𝑡𝑢𝑡𝑖𝑜𝑛⟩ INPUT (goal): For instance, ⟨𝑝(𝑋); 𝑖𝑑⟩ OUTPUT (fuzzy computed answer): Is a (final) state of the form ⟨𝑡𝑟𝑢𝑡ℎ_𝑑𝑒𝑔𝑟𝑒𝑒; 𝑠𝑢𝑏𝑠𝑡𝑖𝑡𝑢𝑡𝑖𝑜𝑛⟩ PROCEDURAL SEMANTICS: Operational phase: Admissible steps (→𝐴𝑆 ) Interpretive phase: Interpretive steps (→𝐼𝑆 ) Given a program 𝒫 , goal 𝒬 and substitution 𝜎 , we define an STATE TRANSITION SYSTEM whose transition relations are →𝐴𝑆 and →𝐼𝑆 5th International Symposium on Rules

RULEML’11

July 19-21, 2011

Barcelona, SPAIN – p. 7/33

Declarative Traces Into Fuzzy Computed Answers Multi-Adjoint Logic Programming ADMISSIBLE STEP OF KIND →𝐴𝑆1

⟨𝒬[𝐴]; 𝜎⟩ →𝐴𝑆1 ⟨(𝒬[𝐴/𝑣&𝑖 ℬ])𝜃; 𝜎𝜃⟩ if (1) 𝐴 is the selected atom in 𝒬, (2) 𝜃 = 𝑚𝑔𝑢({𝐴′ = 𝐴}), (3) 𝐴′ ←𝑖 ℬ with 𝑣 in 𝒫 and ℬ is not empty. EXAMPLE.

Let p(a)←prod p(f(a)) with 0.7 be a rule

⟨(p(b)&G p(X))&G q(X); id⟩ →𝐴𝑆1 ⟨(p(b)&G 0.7&prod p(f(a)))&G q(a); {X/a}⟩

5th International Symposium on Rules

RULEML’11

July 19-21, 2011

Barcelona, SPAIN – p. 8/33

Declarative Traces Into Fuzzy Computed Answers Multi-Adjoint Logic Programming ADMISSIBLE STEP OF KIND →𝐴𝑆2

⟨𝒬[𝐴]; 𝜎⟩ →𝐴𝑆2 ⟨(𝒬[𝐴/𝑣])𝜃; 𝜎𝜃⟩ if (1) 𝐴 is the selected atom in 𝒬, (2) 𝜃 = 𝑚𝑔𝑢({𝐴′ = 𝐴}), and (3) 𝐴′ ← with 𝑣 in 𝒫 . EXAMPLE.

Let p(a)← with 0.7 be a rule

⟨(p(b)&G p(X))&G q(X); id⟩ →𝐴𝑆2 ⟨(p(b)&G 0.7)&G q(a); {X/a}⟩

5th International Symposium on Rules

RULEML’11

July 19-21, 2011

Barcelona, SPAIN – p. 9/33

Declarative Traces Into Fuzzy Computed Answers Multi-Adjoint Logic Programming ADMISSIBLE STEP OF KIND →𝐴𝑆3

⟨𝒬[𝐴]; 𝜎⟩ →𝐴𝑆3 ⟨(𝒬[𝐴/⊥]); 𝜎⟩ if (1) 𝐴 is the selected atom in 𝒬, (2) There is no rule in 𝒫 whose head unifies with 𝐴

This case is introduced to cope with (possible) unsuccessful admissible derivations. For instance, with program p(a) p(X, TV0) : − q(X, TV1), r(Y, TV2), s(X, TV3), agr_aver(TV2, TV3, TV4), and_godel(TV1, TV4, TV5), and_prod(0.9, TV5, TV0). q(a, 0.8). 𝐺𝑂𝐴𝐿 :

p(X)

r(X, 0.7).

—–»»»»»>

𝑂𝑈 𝑇 𝑃 𝑈 𝑇 : 5th International Symposium on Rules

s(_, 0.5).

? − p(X, Truth_degree)

[X = a, Truth_degree = 0.54] RULEML’11

July 19-21, 2011

Barcelona, SPAIN – p. 17/33

Declarative Traces Into Fuzzy Computed Answers The Fuzzy Logic System FLOPER. Option LAT ∙ Prolog file modeling an infinite lattice of real numbers [0, 1] member(X) :- number(X),0=