String-based Multi-adjoint Lattices for         Tracing Fuzzy Logic Computations                   Pedro J. Morcillo      ...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations                      Outline of the talk         ...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations                           Multi-Adjoint Lattices ...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations                           Multi-Adjoint Lattices ...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations                           Multi-Adjoint Lattices ...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations                Multi-Adjoint Logic Programming   ...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations                Multi-Adjoint Logic Programming   ...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations                Multi-Adjoint Logic Programming   ...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations                Multi-Adjoint Logic Programming   ...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations                 Multi-Adjoint Logic Programming  ...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations                 Multi-Adjoint Logic Programming  ...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations                 Multi-Adjoint Logic Programming  ...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations                 The Fuzzy Logic System FLOPER    ...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations                 The Fuzzy Logic System FLOPER    ...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations     The Fuzzy Logic System FLOPER. Option RUN  𝑃 ...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations      The Fuzzy Logic System FLOPER. Option LAT   ...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations      The Fuzzy Logic System FLOPER. Option LAT   ...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations      The Fuzzy Logic System FLOPER. Option LAT   ...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations    The Fuzzy Logic System FLOPER. Option TREE    ...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations    The Fuzzy Logic System FLOPER. Option TREE    ...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic ComputationsXII Jornadas sobre Programación y Lenguajes   PROL...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations             Fuzzy Computed Answers with Traces   ...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations             Fuzzy Computed Answers with Traces   ...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations             Fuzzy Computed Answers with Traces   ...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations             Fuzzy Computed Answers with Traces   ...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations     ⟨𝑝(𝑋); 𝑖𝑑⟩                                   ...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic ComputationsXII Jornadas sobre Programación y Lenguajes   PROL...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic ComputationsXII Jornadas sobre Programación y Lenguajes   PROL...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations             Fuzzy Computed Answers with Traces   ...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic ComputationsXII Jornadas sobre Programación y Lenguajes   PROL...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations               Conclusions and Further Research   ...
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations               Conclusions and Further Research   ...
Upcoming SlideShare
Loading in …5
×

String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations

229
-1

Published on

String-based Multi-adjoint Lattices for
Tracing Fuzzy Logic Computations
Jornadas SISTEDES 2012
Universidad de Almería

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
229
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations

  1. 1. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations Pedro J. Morcillo Ginés Moreno Jaime Penabad Carlos Vázquez Faculty of Computer Science Engineering University of Castilla – La Mancha 02005, Albacete, SPAINXII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 1/32
  2. 2. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations Outline of the talk Multi-Adjoint Lattices & Programs The Fuzzy Logic System FLOPER Fuzzy Computed Answers with Traces Conclusions and Further ResearchXII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 2/32
  3. 3. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations Multi-Adjoint Lattices A tuple (𝐿, ≤, ←1 , &1 , . . . , ←𝑛 , &𝑛 ) is a multi-adjoint lattice if it verifies the following claims: 𝑖) (𝐿, ≤) is a complete lattice, with ⊥ and ⊤ elements. 𝑖𝑖) (&𝑖 , ←𝑖 ) is an adjoint pair in (𝐿, ≤), i.e.: 1) &𝑖 is increasing in both arguments and ⊤&𝑖 𝑣 = 𝑣&𝑖 ⊤ = 𝑣 . 2) ←𝑖 is increasing in the first argument and decreasing in the second one. 3) Adjoint property: 𝑥 ≤ (𝑦 ←𝑖 𝑧) ⇐⇒ (𝑥&𝑖 𝑧) ≤ 𝑦 The Cartesian product 𝐿 = 𝐿1 × ⋅ ⋅ ⋅ × 𝐿𝑛 of multi-adjoint lattices is a multi-adjoint lattice too.XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 3/32
  4. 4. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations Multi-Adjoint Lattices ∙ ℬ . Boolean values with the classical adjoint pair (&, ←). ∙ 𝒱 . Real numbers in the unit interval with adjoint pairs from the fuzzy logics of Product, Gödel and Łukasiewicz : &P (𝑥, 𝑦) ≜ 𝑥 ∗ 𝑦 ←P (𝑥, 𝑦) ≜ min(1, 𝑥/𝑦) ⎧ ⎨1 if 𝑦 ≤ 𝑥 &G (𝑥, 𝑦) ≜ min(𝑥, 𝑦) ←G (𝑥, 𝑦) ≜ ⎩𝑥 otherwise &L (𝑥, 𝑦) ≜ max(0, 𝑥 + 𝑦 − 1) ←L (𝑥, 𝑦) ≜ min{𝑥 − 𝑦 + 1, 1} ∙ 𝒲 . Natural numbers with the inverted ordering where “+” plays the role of a conjuntion (or t-norm) operator.XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 4/32
  5. 5. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations Multi-Adjoint Lattices ∙ 𝒮 . Strings or sequences of symbols belonging to a given alphabet (ASCII) for which “𝑎𝑝𝑝𝑒𝑛𝑑” acts as a conjunctor. KEYPOINT. Establish a bijection between 𝒮 and 𝒲 !!! [𝑎1 . . . 𝑎𝑚 ] = (𝑐𝑜𝑑(𝑎1 ) + 1)𝑛𝑚−1 + ⋅ ⋅ ⋅ + (𝑐𝑜𝑑(𝑎𝑚 ) + 1)𝑛0 < 𝑚 >=< ⌊(𝑚 − 1)/𝑛⌋ > .𝑎𝑠𝑐((𝑚 − 1)%𝑛) [𝑠𝑒𝑎] = (𝑐𝑜𝑑(𝑠) − 1)1282 + (𝑐𝑜𝑑(𝑒) − 1)128 + (𝑐𝑜𝑑(𝑎) − 1) = (115 − 1)1282 + (101 − 1)128 + (97 − 1) = 1880672 [𝑠𝑜𝑛] = . . . = 1881965 [𝑠𝑒𝑎𝑠𝑜𝑛] = . . . = 3944056928109XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 5/32
  6. 6. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations Multi-Adjoint Logic Programming Let ℒ be a PROLOG-like first order language, with: constants variables functions predicates quantifiers: ∀, ∃ BUT MORE connectives!!! &1 , &2 , ..., &𝑘 (conjunctions) ∨1 , ∨2 , ..., ∨𝑙 (disjunctions) ←1 , ←2 , ..., ←𝑚 (implications) @1 , @2 , ..., @𝑛 (aggregations) Instead of naive {𝑡𝑟𝑢𝑒, 𝑓 𝑎𝑙𝑠𝑒}, use a multi–adjoint lattice to model truth degrees ⟨𝐿, ⪯, ←1 , &1 , . . . , ←𝑛 , &𝑛 ⟩. ⟨[0, 1], ⪯, ←Luka , &Luka , ←Prod , &Prod , ←Godel , &Godel ⟩XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 6/32
  7. 7. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations 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 ∨Luka (𝑥1 , 𝑥2 ) ≜ 𝑚𝑖𝑛(1, 𝑥1 + 𝑥2 ) - - in brief ∨L @aver (𝑥1 , 𝑥2 ) ≜ (𝑥1 + 𝑥2 )/2 A program is a set of “weighted” rules A ←i ℬ with 𝛼: ℛ1 : 𝑝(𝑋) ←P &G (𝑞(𝑋), @aver (𝑟(𝑋), 𝑠(𝑋))) 𝑤𝑖𝑡ℎ 0.9 ℛ2 : 𝑞(𝑎) ← 𝑤𝑖𝑡ℎ 0.8 ℛ3 : 𝑟(𝑋) ← 𝑤𝑖𝑡ℎ 0.7 ℛ4 : 𝑠(𝑋) ← 𝑤𝑖𝑡ℎ 0.5XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 7/32
  8. 8. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations 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 →𝐼𝑆XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 8/32
  9. 9. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations 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}⟩XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 9/32
  10. 10. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations 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}⟩XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 10/32
  11. 11. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations Multi-Adjoint Logic Programming INTERPRETIVE STEP →𝐼𝑆 ⟨𝑄[@(𝑟1 , 𝑟2 )]; 𝜎⟩ →𝐼𝑆 ⟨𝑄[@(𝑟1 ,𝑟2 )/[[@]](𝑟1 ,𝑟2 )];𝜎⟩ where [[@]] is the truth function of connective @ in the multi-adjoint lattice associated to 𝒫 EXAMPLE. Since the truth function associated to &prod is the product operator, then ⟨(0.8&luka ((0.7&prod 0.9)&G 0.7)); {𝑋/𝑎}⟩ →𝐼𝑆 ⟨(0.8&luka (0.63&G 0.7)); {𝑋/𝑎}⟩XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 11/32
  12. 12. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations Multi-Adjoint Logic Programming ⟨𝑝(𝑋); 𝑖𝑑⟩ →𝐴𝑆1 ℛ1 ⟨&P (0.9, &G (𝑞(𝑋1 ), @aver (𝑟(𝑋1), 𝑠(𝑋1)))); {𝑋/𝑋1 }⟩ →𝐴𝑆2 ℛ2 ⟨&P (0.9, &G (0.8, @aver (𝑟(𝑎), 𝑠(𝑎)))); {𝑋/𝑎}⟩ →𝐴𝑆2 ℛ3 ⟨&P (0.9, &G (0.8, @aver (0.7, 𝑠(𝑎)))); {𝑋/𝑎}⟩ →𝐴𝑆2 ℛ4 ⟨&P (0.9, &G (0.8, @aver (0.7, 0.5))); {𝑋/𝑎}⟩ →𝐼𝑆 ⟨&P (0.9, &G (0.8, 0.6)); {𝑋/𝑎}⟩ →𝐼𝑆 ⟨&P (0.9, 0.6); {𝑋/𝑎}⟩ →𝐼𝑆 ⟨0.54; {𝑋/𝑎}⟩ So, for derivation 𝐷1 the f.c.a is ⟨0.54; {𝑋/𝑎}⟩XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 12/32
  13. 13. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations The Fuzzy Logic System FLOPER http://dectau.uclm.es/floper/ PROLOG has been largely used for four purposes..... Implementing the tool (about 1000 clauses, DCG’s) Compiling fuzzy programs (compiled code in Prolog): ∙ HIGH LEVEL: transparent execution of goals ∙ LOW LEVEL: drawing derivations and trees Modeling multi-adjoint lattices (represent truth degrees)XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 13/32
  14. 14. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations The Fuzzy Logic System FLOPER Basic options for... ∙ Loading a prolog file with extension “.pl” ∙ Parsing a “.fpl” fuzzy program. The resulting Prolog code is also asserted in the system ∙ Saving the generated Prolog code into a “.pl” file ∙ Listing both the fuzzy and Prolog code ∙ Clean, Stop and Quit Advanced options for... ∙ Running a fuzzy program after introducing a goal ∙ Drawing derivations and unfolding trees (varying its depth and the level of detail of interpretive steps) ∙ Loading/showing multi-adjoint lattices (“.pl” files)XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 14/32
  15. 15. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations The Fuzzy Logic System FLOPER. Option RUN 𝑃 𝑅𝑂𝐺𝑅𝐴𝑀 : p(X) ←P &G (q(X), @aver (r(X), s(X))) with 0.9 q(a) with 0.8 r(X) with 0.7 s(_) with 0.5 ———————————————»»»»»> 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). r(X, 0.7). s(_, 0.5). 𝐺𝑂𝐴𝐿 : p(X) —–»»»»»> ? − p(X, Truth_degree) 𝑂𝑈 𝑇 𝑃 𝑈 𝑇 : [X = a, Truth_degree = 0.54]XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 15/32
  16. 16. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations The Fuzzy Logic System FLOPER. Option LAT ∙ Prolog file modeling an infinite lattice of real numbers [0, 1] member(X) :- number(X),0=<X,X=<1. leq(X,Y) :- X=<Y. bot(0). top(1). and_luka(X,Y,Z) :- pri_add(X,Y,U1),pri_sub(U1,1,U2),pri_max(0,U2,Z). and_godel(X,Y,Z) :- pri_min(X,Y,Z). and_prod(X,Y,Z) :- pri_prod(X,Y,Z). or_luka(X,Y,Z) :- pri_add(X,Y,U1),pri_min(U1,1,Z). or_godel(X,Y,Z) :- pri_max(X,Y,Z). or_prod(X,Y,Z) :- pri_prod(X,Y,U1),pri_add(X,Y,U2),pri_sub(U2,U1,Z). agr_aver(X,Y,Z) :- pri_add(X,Y,U),pri_div(U,2,Z). pri_add(X,Y,Z) :- Z is X+Y. pri_min(X,Y,Z) :- (X=<Y,Z=X;X>Y,Z=Y). pri_sub(X,Y,Z) :- Z is X-Y. pri_max(X,Y,Z) :- (X=<Y,Z=Y;X>Y,Z=X). pri_prod(X,Y,Z) :- Z is X * Y. pri_div(X,Y,Z) :- Z is X/Y.XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 16/32
  17. 17. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations The Fuzzy Logic System FLOPER. Option LAT ∙ Prolog file modeling a finite lattice with partial ordering members([bottom,alpha,beta,top]). ⊤ top(top). bot(bottom). leq(bottom,X). leq(alpha,alpha). leq(alpha,top). leq(beta,beta). leq(beta,top). leq(X,top). 𝛼 𝛽 and_godel(X,Y,Z) :- pri_inf(X,Y,Z). pri_inf(bottom,X,bottom):-!. pri_inf(alpha,X,alpha):-leq(alpha,X),!. pri_inf(beta,X,beta):-leq(beta,X),!. ⊥ pri_inf(top,X,X):-!. pri_inf(X,Y,bottom).XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 17/32
  18. 18. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations The Fuzzy Logic System FLOPER. Option LAT EXAMPLE: maintain the program and goal, but change the lattice of truth degrees, redefining “average”: Instead of: @aver (𝑥1 , 𝑥2 ) ≜ (𝑥1 + 𝑥2 )/2, in PROLOG: agr_aver(X, Y, Z) : −pri_add(X, Y, U), pri_div(U, 2, Z). Use now: @aver (𝑥1 , 𝑥2 ) ≜ (∨G (𝑥1 , 𝑥2 ) + ∨L (𝑥1 , 𝑥2 ))/2 agr_aver(X, Y, Z) : −or_godel(X, Y, Z1), or_luka(X, Y, Z2), pri_add(Z1, Z2, Z3), pri_div(Z3, 2, Z). Now, without changing the same program and goal, the solution for p(X) is not [Truth = 0.54, X = a] but [Truth = 0.72, X = a]XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 18/32
  19. 19. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations The Fuzzy Logic System FLOPER. Option TREE 𝑝(𝑋) ←P &G (𝑞(𝑋), @aver (𝑟(𝑋), 𝑠(𝑋))) with 0.9 —————————————————————–»»»»»»> rule(number(1), head(atom(pred(p,1),[var(’X’)])), impl(prod), body(and(godel,2, [atom(pred(q,1),[var(’X’)]), agr(aver,2, [atom(pred(r,1),[var(’X’)]), atom(pred(s,1),[var(’X’)]) ])])), td(0.9)).XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 19/32
  20. 20. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations The Fuzzy Logic System FLOPER. Option TREE ∙ Unfolding tree showing admissible steps R0 <p(X),{}> R1 <&prod(0.9,&godel(q(X1),@aver(r(X1),s(X1)))),{X/X1} > R2 <&prod(0.9,&godel(0.8,@aver(r(a),s(a)))),{X/a,X1/a}> R3 <&prod(0.9,&godel(0.8,@aver(0.7,s(a)))),{X/a,X1/a,X11/a}> R4 <&prod(0.9,&godel(0.8,@aver(0.7,0.5))),{X/a,X1/a,X11/a}> result < 0.7200000000000001,{X/a,X1/a,X11/a}> ∙ Unfolding tree displaying interpretive steps too R0 <p(X),{}> R1 <&prod(0.9,&godel(q(X1),@aver(r(X1),s(X1)))),{X/X1} > R2 <&prod(0.9,&godel(0.8,@aver(r(a),s(a)))),{X/a,X1/a}> R3 <&prod(0.9,&godel(0.8,@aver(0.7,s(a)))),{X/a,X1/a,X11/a}> R4 <&prod(0.9,&godel(0.8,@aver(0.7,0.5))),{X/a,X1/a,X11/a}> is <&prod(0.9,&godel(0.8,0.85)),{X/a,X1/a,X11/a}> is <&prod(0.9,0.8),{X/a,X1/a,X11/a}> is <0.7200000000000001,{X/a,X1/a,X11/a}>XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 20/32
  21. 21. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic ComputationsXII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 21/32
  22. 22. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations Fuzzy Computed Answers with Traces Let the “proof weight” lattice 𝒲 of [Rodríguez & Romero-08] that is, natural numbers with the inverted ordering and operator “+” assigned to all connectives ( &P , &G , @aver ) ℛ1 : 𝑝(𝑋) ←P &G (𝑞(𝑋), @aver (𝑟(𝑋), 𝑠(𝑋))) 𝑤𝑖𝑡ℎ 1 ℛ2 : 𝑞(𝑎) ← 𝑤𝑖𝑡ℎ 1 ℛ3 : 𝑟(𝑋) ← 𝑤𝑖𝑡ℎ 1 ℛ4 : 𝑠(𝑋) ← 𝑤𝑖𝑡ℎ 1 Fuzzy Computed Answer counting admissible steps » run. [Truth_degree=4, X=a]XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 22/32
  23. 23. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations Fuzzy Computed Answers with Traces Consider a lattice where truth degrees are strings and append is assigned to all connectives ( &P , &G , @aver ) 𝑝(𝑋) ←P &G (𝑞(𝑋), @aver (𝑟(𝑋), 𝑠(𝑋))) 𝑤𝑖𝑡ℎ ′ 𝑟𝑢𝑙𝑒1.′ 𝑞(𝑎) ← 𝑤𝑖𝑡ℎ ′ 𝑟𝑢𝑙𝑒2.′ 𝑟(𝑋) ← 𝑤𝑖𝑡ℎ ′ 𝑟𝑢𝑙𝑒3.′ 𝑠(𝑋) ← 𝑤𝑖𝑡ℎ ′ 𝑟𝑢𝑙𝑒4.′ Fuzzy Computed Answer detailing admissible steps » run. [Truth_degree=’rule1.rule2.rule3 rule4.’,X=a]XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 23/32
  24. 24. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations Fuzzy Computed Answers with Traces ∙ Multi-adjoint lattices as CARTESIAN PRODUCTS: member(info(X,Y)):-number(X),0=<X,X=<1,string(Y). bot(info(0,_)). leq(info(X1,_),info(X2,_)) :- X1 =< X2. top(info(1,_)). and_prod(info(X1,X2),info(Y1,Y2),info(Z1,Z2)) :- pri_prod(X1,Y1,Z1), pri_app(X2,Y2,Label),pri_app(Label,’&PROD.’,Z2). pri_app(X,Y,Z) :- name(X,L1),name(Y,L2),append(L1,L2,L3),name(Z,L3). 𝑝(𝑋) ←P &G (𝑞(𝑋), @aver (𝑟(𝑋), 𝑠(𝑋))) with info(0.9,′ rule1.′ ) ... ∙ [X=a, Truth_degree=info(0.72, rule1.rule2.rule3.rule4. @AVER. &GODEL. &PROD. )]XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 24/32
  25. 25. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations Fuzzy Computed Answers with Traces ∙ More on multi-adjoint lattices as Cartesian products: “attaching” now appropriate labels to primitive operators pri_prod(X,Y,Z,’#PROD.’):-Z is X * Y. and_prod(info(X1,X2),info(Y1,Y2),info(Z1,Z2)):- pri_prod(X1,Y1,Z1,DatPROD),pri_app(X2,Y2,Dat1), pri_app(Dat1,’&PROD.’,Dat2),pri_app(Dat2,DatPROD,Z2). ∙ [X=a, Truth_degree=info(0.72, rule1.rule2.rule3.rule4. @AVER. |GODEL. #MAX. |LUKA. #ADD.#MIN. @aver. #ADD.#DIV. &GODEL. #MIN. &PROD. #PROD. )]XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 25/32
  26. 26. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations ⟨𝑝(𝑋); 𝑖𝑑⟩ →𝐴𝑆1 ℛ1 ⟨&P (info(0.9, ‘RULE1.′ ), &G (𝑞(𝑋1 ), @aver2 (𝑟(𝑋1), 𝑠(𝑋1)))); {𝑋/𝑋1 }⟩ →𝐴𝑆2 ℛ2 ⟨&P (info(0.9, ‘RULE1.′ ), &G (info(0.8, ‘RULE2.′ ), @aver2 (𝑟(𝑎), 𝑠(𝑎))))); {𝑋/𝑎}⟩ →𝐴𝑆2 ℛ3 ⟨&P (info(0.9, ‘RULE1.′ ), &G (info(0.8, ‘RULE2.′ ), @aver2 (info(0.7, ‘RULE3.′ ), 𝑠(𝑎))))); {𝑋/𝑎}⟩ →𝐴𝑆2 ℛ4 ⟨&P (info(0.9, ‘RULE1.′ ), &G (info(0.8, ‘RULE2.′ ), @aver2 (info(0.7, ‘RULE3.′ ), info(0.5, ‘RULE4.′ )))); {𝑋/𝑎}⟩ →𝐼𝑆 ⟨&P (info(0.9, ‘RULE1.’), &G (info(0.8, ‘RULE2.′ ), info(0.85, ∗))); {𝑋/𝑎}⟩ →𝐼𝑆 ⟨&P (info(0.9, ‘RULE1.′ ), info(0.8, ‘RULE2.RULE3...′ )); {𝑋/𝑎}⟩ →𝐼𝑆 ⟨info(0.72, ‘RULE1.RULE2.RULE3.RULE4.@AVER2.∣GODEL.#MAX.∣LUKA.....′ ); {𝑋/𝑎}⟩. ———————————————————————————————————————– ∗ ‘RULE3.RULE4.@AVER2.∣GODEL.#MAX.∣LUKA.#ADD.#MIN.@AVER.#ADD.#DIV.′XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 26/32
  27. 27. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic ComputationsXII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 27/32
  28. 28. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic ComputationsXII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 28/32
  29. 29. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations Fuzzy Computed Answers with Traces http://dectau.uclm.es/FuzzyXPath/ Management of XML documents by using flexible variants of standard XPath/XQuery languages MALP implementation using FLOPER & SWI-Prolog: member(tv(N,L)) :- number(N),0=<N,N=<1, (L=[];L=[_|_]). and_prod(tv(X1,X2),tv(Y1,Y2),tv(Z1,Z2)) :- Z1 is X1*Y1, append(X2,Y2,Z2).XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 29/32
  30. 30. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic ComputationsXII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 30/32
  31. 31. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations Conclusions and Further Research Fuzzy Logic Programming LANGUAGE: The Multi-Adjoint Logic Programming approach FLOPER provides advanced options with “fuzzy taste”: Compilation to Prolog code [RUN]: simplicity, transparency, complete evaluation of goals... Low level representation [TREE]: traces, derivations, detailed computation steps (interpretive)... Multi-adjoint lattices [LAT]: modeled in Prolog, rich/flexible behaviour of computations... f.c.a’s with traces: [RUN] with appropriate [LAT] mimics [TREE] without extra computational effortXII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 31/32
  32. 32. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations Conclusions and Further Research However, more efforts are needed for..... Increasing expressivity: new computation rules, testing formal properties of fuzzy connectives, connection with other fuzzy languages, graphical interface, etc Including transformation techniques: optimization by Fold/Unfold, specialization by Partial Evaluation, thresholded tabulation, etc Ongoing application: we are currently implementing with FLOPER fuzzy variants of XPath/XQuery for the flexible manipulation of XML documentsXII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 32/32
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×