SlideShare a Scribd company logo
1 of 32
Download to read offline
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, SPAIN


XII Jornadas sobre Programación y Lenguajes   PROLE’12   18-19/IX/2012   Almería, SPAIN – p. 1/32
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 Research

XII Jornadas sobre Programación y Lenguajes   PROLE’12   18-19/IX/2012   Almería, SPAIN – p. 2/32
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
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
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
        [𝑠𝑒𝑎𝑠𝑜𝑛] = . . . = 3944056928109

XII Jornadas sobre Programación y Lenguajes   PROLE’12   18-19/IX/2012   Almería, SPAIN – p. 5/32
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
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.5

XII Jornadas sobre Programación y Lenguajes   PROLE’12   18-19/IX/2012   Almería, SPAIN – p. 7/32
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
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
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
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
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
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
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
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
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
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
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
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
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
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations




XII Jornadas sobre Programación y Lenguajes   PROLE’12   18-19/IX/2012   Almería, SPAIN – p. 21/32
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
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
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
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
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
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations




XII Jornadas sobre Programación y Lenguajes   PROLE’12   18-19/IX/2012   Almería, SPAIN – p. 27/32
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations




XII Jornadas sobre Programación y Lenguajes   PROLE’12   18-19/IX/2012   Almería, SPAIN – p. 28/32
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
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations




XII Jornadas sobre Programación y Lenguajes   PROLE’12   18-19/IX/2012   Almería, SPAIN – p. 30/32
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 effort

XII Jornadas sobre Programación y Lenguajes   PROLE’12   18-19/IX/2012   Almería, SPAIN – p. 31/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 documents



XII Jornadas sobre Programación y Lenguajes   PROLE’12   18-19/IX/2012   Almería, SPAIN – p. 32/32

More Related Content

What's hot

"Java 8, Lambda e la programmazione funzionale" by Theodor Dumitrescu
"Java 8, Lambda e la programmazione funzionale" by Theodor Dumitrescu"Java 8, Lambda e la programmazione funzionale" by Theodor Dumitrescu
"Java 8, Lambda e la programmazione funzionale" by Theodor DumitrescuThinkOpen
 
Cs2303 theory of computation all anna University question papers
Cs2303 theory of computation all anna University question papersCs2303 theory of computation all anna University question papers
Cs2303 theory of computation all anna University question papersappasami
 
Cs2303 theory of computation november december 2015
Cs2303 theory of computation november december 2015Cs2303 theory of computation november december 2015
Cs2303 theory of computation november december 2015appasami
 
Loss Calibrated Variational Inference
Loss Calibrated Variational InferenceLoss Calibrated Variational Inference
Loss Calibrated Variational InferenceTomasz Kusmierczyk
 
Cs6660 compiler design may june 2017 answer key
Cs6660 compiler design may june 2017  answer keyCs6660 compiler design may june 2017  answer key
Cs6660 compiler design may june 2017 answer keyappasami
 
P, NP, NP-Complete, and NP-Hard
P, NP, NP-Complete, and NP-HardP, NP, NP-Complete, and NP-Hard
P, NP, NP-Complete, and NP-HardAnimesh Chaturvedi
 
Vectorial types, non-determinism and probabilistic systems: Towards a computa...
Vectorial types, non-determinism and probabilistic systems: Towards a computa...Vectorial types, non-determinism and probabilistic systems: Towards a computa...
Vectorial types, non-determinism and probabilistic systems: Towards a computa...Alejandro Díaz-Caro
 
Complexity of multiobjective optimization
Complexity of multiobjective optimizationComplexity of multiobjective optimization
Complexity of multiobjective optimizationOlivier Teytaud
 
Cs6660 compiler design november december 2016 Answer key
Cs6660 compiler design november december 2016 Answer keyCs6660 compiler design november december 2016 Answer key
Cs6660 compiler design november december 2016 Answer keyappasami
 
Automatski - Solution to NP-Complete Graph Coloring
Automatski - Solution to NP-Complete Graph ColoringAutomatski - Solution to NP-Complete Graph Coloring
Automatski - Solution to NP-Complete Graph ColoringAditya Yadav
 
Csr2011 june16 16_30_golovach
Csr2011 june16 16_30_golovachCsr2011 june16 16_30_golovach
Csr2011 june16 16_30_golovachCSR2011
 
Automatski - NP-Complete - TSP - Travelling Salesman Problem Solved in O(N^4)
Automatski - NP-Complete - TSP - Travelling Salesman Problem Solved in O(N^4)Automatski - NP-Complete - TSP - Travelling Salesman Problem Solved in O(N^4)
Automatski - NP-Complete - TSP - Travelling Salesman Problem Solved in O(N^4)Aditya Yadav
 
Dedalo, looking for Cluster Explanations in a labyrinth of Linked Data
Dedalo, looking for Cluster Explanations in a labyrinth of Linked DataDedalo, looking for Cluster Explanations in a labyrinth of Linked Data
Dedalo, looking for Cluster Explanations in a labyrinth of Linked DataVrije Universiteit Amsterdam
 
M Gumbel - SCABIO: a framework for bioinformatics algorithms in Scala
M Gumbel - SCABIO: a framework for bioinformatics algorithms in ScalaM Gumbel - SCABIO: a framework for bioinformatics algorithms in Scala
M Gumbel - SCABIO: a framework for bioinformatics algorithms in ScalaJan Aerts
 

What's hot (20)

"Java 8, Lambda e la programmazione funzionale" by Theodor Dumitrescu
"Java 8, Lambda e la programmazione funzionale" by Theodor Dumitrescu"Java 8, Lambda e la programmazione funzionale" by Theodor Dumitrescu
"Java 8, Lambda e la programmazione funzionale" by Theodor Dumitrescu
 
Cs2303 theory of computation all anna University question papers
Cs2303 theory of computation all anna University question papersCs2303 theory of computation all anna University question papers
Cs2303 theory of computation all anna University question papers
 
Gremlin's Anatomy
Gremlin's AnatomyGremlin's Anatomy
Gremlin's Anatomy
 
Elm talk bayhac2015
Elm talk bayhac2015Elm talk bayhac2015
Elm talk bayhac2015
 
Cs2303 theory of computation november december 2015
Cs2303 theory of computation november december 2015Cs2303 theory of computation november december 2015
Cs2303 theory of computation november december 2015
 
Loss Calibrated Variational Inference
Loss Calibrated Variational InferenceLoss Calibrated Variational Inference
Loss Calibrated Variational Inference
 
Cs6660 compiler design may june 2017 answer key
Cs6660 compiler design may june 2017  answer keyCs6660 compiler design may june 2017  answer key
Cs6660 compiler design may june 2017 answer key
 
Nu2422512255
Nu2422512255Nu2422512255
Nu2422512255
 
Daa notes 3
Daa notes 3Daa notes 3
Daa notes 3
 
P, NP, NP-Complete, and NP-Hard
P, NP, NP-Complete, and NP-HardP, NP, NP-Complete, and NP-Hard
P, NP, NP-Complete, and NP-Hard
 
Vectorial types, non-determinism and probabilistic systems: Towards a computa...
Vectorial types, non-determinism and probabilistic systems: Towards a computa...Vectorial types, non-determinism and probabilistic systems: Towards a computa...
Vectorial types, non-determinism and probabilistic systems: Towards a computa...
 
Complexity of multiobjective optimization
Complexity of multiobjective optimizationComplexity of multiobjective optimization
Complexity of multiobjective optimization
 
Cs6660 compiler design november december 2016 Answer key
Cs6660 compiler design november december 2016 Answer keyCs6660 compiler design november december 2016 Answer key
Cs6660 compiler design november december 2016 Answer key
 
Automatski - Solution to NP-Complete Graph Coloring
Automatski - Solution to NP-Complete Graph ColoringAutomatski - Solution to NP-Complete Graph Coloring
Automatski - Solution to NP-Complete Graph Coloring
 
Functional programming
Functional programmingFunctional programming
Functional programming
 
Csr2011 june16 16_30_golovach
Csr2011 june16 16_30_golovachCsr2011 june16 16_30_golovach
Csr2011 june16 16_30_golovach
 
Automatski - NP-Complete - TSP - Travelling Salesman Problem Solved in O(N^4)
Automatski - NP-Complete - TSP - Travelling Salesman Problem Solved in O(N^4)Automatski - NP-Complete - TSP - Travelling Salesman Problem Solved in O(N^4)
Automatski - NP-Complete - TSP - Travelling Salesman Problem Solved in O(N^4)
 
Dedalo, looking for Cluster Explanations in a labyrinth of Linked Data
Dedalo, looking for Cluster Explanations in a labyrinth of Linked DataDedalo, looking for Cluster Explanations in a labyrinth of Linked Data
Dedalo, looking for Cluster Explanations in a labyrinth of Linked Data
 
Lecture26
Lecture26Lecture26
Lecture26
 
M Gumbel - SCABIO: a framework for bioinformatics algorithms in Scala
M Gumbel - SCABIO: a framework for bioinformatics algorithms in ScalaM Gumbel - SCABIO: a framework for bioinformatics algorithms in Scala
M Gumbel - SCABIO: a framework for bioinformatics algorithms in Scala
 

Viewers also liked

Viewers also liked (11)

DEBUGGING FUZZY XPATH QUERIES
DEBUGGING FUZZY XPATH QUERIESDEBUGGING FUZZY XPATH QUERIES
DEBUGGING FUZZY XPATH QUERIES
 
Homemade soda
Homemade sodaHomemade soda
Homemade soda
 
Eu sei coidarme, e ti
Eu sei coidarme, e tiEu sei coidarme, e ti
Eu sei coidarme, e ti
 
Space and functional programming shfc
Space and functional programming shfcSpace and functional programming shfc
Space and functional programming shfc
 
RESUME
RESUMERESUME
RESUME
 
Sawabona!!
Sawabona!!Sawabona!!
Sawabona!!
 
A proposal on service execution measures for the improvement of business proc...
A proposal on service execution measures for the improvement of business proc...A proposal on service execution measures for the improvement of business proc...
A proposal on service execution measures for the improvement of business proc...
 
Making change happen
Making change happen Making change happen
Making change happen
 
Social Psychology-Conformity puga
Social Psychology-Conformity pugaSocial Psychology-Conformity puga
Social Psychology-Conformity puga
 
Invariant-Free Clausal Temporal Resolution
Invariant-Free Clausal Temporal ResolutionInvariant-Free Clausal Temporal Resolution
Invariant-Free Clausal Temporal Resolution
 
cronologia de la guerra del Chaco desde la vision boliviana
cronologia de la guerra del Chaco desde la vision bolivianacronologia de la guerra del Chaco desde la vision boliviana
cronologia de la guerra del Chaco desde la vision boliviana
 

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

Scala as a Declarative Language
Scala as a Declarative LanguageScala as a Declarative Language
Scala as a Declarative Languagevsssuresh
 
RuleML2015: Similarity-Based Strict Equality in a Fully Integrated Fuzzy Logi...
RuleML2015: Similarity-Based Strict Equality in a Fully Integrated Fuzzy Logi...RuleML2015: Similarity-Based Strict Equality in a Fully Integrated Fuzzy Logi...
RuleML2015: Similarity-Based Strict Equality in a Fully Integrated Fuzzy Logi...RuleML
 
Cs6503 theory of computation november december 2015 be cse anna university q...
Cs6503 theory of computation november december 2015  be cse anna university q...Cs6503 theory of computation november december 2015  be cse anna university q...
Cs6503 theory of computation november december 2015 be cse anna university q...appasami
 
Sets, maps and hash tables (Java Collections)
Sets, maps and hash tables (Java Collections)Sets, maps and hash tables (Java Collections)
Sets, maps and hash tables (Java Collections)Fulvio Corno
 
Inductive Triple Graphs: A purely functional approach to represent RDF
Inductive Triple Graphs: A purely functional approach to represent RDFInductive Triple Graphs: A purely functional approach to represent RDF
Inductive Triple Graphs: A purely functional approach to represent RDFJose Emilio Labra Gayo
 
Crystal Ball Event Prediction and Log Analysis with Hadoop MapReduce and Spark
Crystal Ball Event Prediction and Log Analysis with Hadoop MapReduce and SparkCrystal Ball Event Prediction and Log Analysis with Hadoop MapReduce and Spark
Crystal Ball Event Prediction and Log Analysis with Hadoop MapReduce and SparkJivan Nepali
 
Rapport_Cemracs2012
Rapport_Cemracs2012Rapport_Cemracs2012
Rapport_Cemracs2012Jussara F.M.
 
Asynchronous Stochastic Optimization, New Analysis and Algorithms
Asynchronous Stochastic Optimization, New Analysis and AlgorithmsAsynchronous Stochastic Optimization, New Analysis and Algorithms
Asynchronous Stochastic Optimization, New Analysis and AlgorithmsFabian Pedregosa
 
Extending lifespan with Hadoop and R
Extending lifespan with Hadoop and RExtending lifespan with Hadoop and R
Extending lifespan with Hadoop and RRadek Maciaszek
 
Integrative Parallel Programming in HPC
Integrative Parallel Programming in HPCIntegrative Parallel Programming in HPC
Integrative Parallel Programming in HPCVictor Eijkhout
 
CodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-Issue
CodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-IssueCodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-Issue
CodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-IssueDhaval Dalal
 
From Data to Knowledge thru Grailog Visualization
From Data to Knowledge thru Grailog VisualizationFrom Data to Knowledge thru Grailog Visualization
From Data to Knowledge thru Grailog Visualizationgiurca
 
Sparse matrix computations in MapReduce
Sparse matrix computations in MapReduceSparse matrix computations in MapReduce
Sparse matrix computations in MapReduceDavid Gleich
 
Introduction to Algorithms and Asymptotic Notation
Introduction to Algorithms and Asymptotic NotationIntroduction to Algorithms and Asymptotic Notation
Introduction to Algorithms and Asymptotic NotationAmrinder Arora
 
Behm Shah Pagerank
Behm Shah PagerankBehm Shah Pagerank
Behm Shah Pagerankgothicane
 
RDFS with Attribute Equations via SPARQL Rewriting
RDFS with Attribute Equations via SPARQL RewritingRDFS with Attribute Equations via SPARQL Rewriting
RDFS with Attribute Equations via SPARQL RewritingStefan Bischof
 

Similar to String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations (20)

Scala as a Declarative Language
Scala as a Declarative LanguageScala as a Declarative Language
Scala as a Declarative Language
 
RuleML2015: Similarity-Based Strict Equality in a Fully Integrated Fuzzy Logi...
RuleML2015: Similarity-Based Strict Equality in a Fully Integrated Fuzzy Logi...RuleML2015: Similarity-Based Strict Equality in a Fully Integrated Fuzzy Logi...
RuleML2015: Similarity-Based Strict Equality in a Fully Integrated Fuzzy Logi...
 
Cs6503 theory of computation november december 2015 be cse anna university q...
Cs6503 theory of computation november december 2015  be cse anna university q...Cs6503 theory of computation november december 2015  be cse anna university q...
Cs6503 theory of computation november december 2015 be cse anna university q...
 
An Intoduction to R
An Intoduction to RAn Intoduction to R
An Intoduction to R
 
Sets, maps and hash tables (Java Collections)
Sets, maps and hash tables (Java Collections)Sets, maps and hash tables (Java Collections)
Sets, maps and hash tables (Java Collections)
 
Inductive Triple Graphs: A purely functional approach to represent RDF
Inductive Triple Graphs: A purely functional approach to represent RDFInductive Triple Graphs: A purely functional approach to represent RDF
Inductive Triple Graphs: A purely functional approach to represent RDF
 
Crystal Ball Event Prediction and Log Analysis with Hadoop MapReduce and Spark
Crystal Ball Event Prediction and Log Analysis with Hadoop MapReduce and SparkCrystal Ball Event Prediction and Log Analysis with Hadoop MapReduce and Spark
Crystal Ball Event Prediction and Log Analysis with Hadoop MapReduce and Spark
 
Rapport_Cemracs2012
Rapport_Cemracs2012Rapport_Cemracs2012
Rapport_Cemracs2012
 
Asynchronous Stochastic Optimization, New Analysis and Algorithms
Asynchronous Stochastic Optimization, New Analysis and AlgorithmsAsynchronous Stochastic Optimization, New Analysis and Algorithms
Asynchronous Stochastic Optimization, New Analysis and Algorithms
 
Extending lifespan with Hadoop and R
Extending lifespan with Hadoop and RExtending lifespan with Hadoop and R
Extending lifespan with Hadoop and R
 
3.5
3.53.5
3.5
 
Integrative Parallel Programming in HPC
Integrative Parallel Programming in HPCIntegrative Parallel Programming in HPC
Integrative Parallel Programming in HPC
 
12_applications.pdf
12_applications.pdf12_applications.pdf
12_applications.pdf
 
Special topics in finance lecture 2
Special topics in finance   lecture 2Special topics in finance   lecture 2
Special topics in finance lecture 2
 
CodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-Issue
CodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-IssueCodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-Issue
CodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-Issue
 
From Data to Knowledge thru Grailog Visualization
From Data to Knowledge thru Grailog VisualizationFrom Data to Knowledge thru Grailog Visualization
From Data to Knowledge thru Grailog Visualization
 
Sparse matrix computations in MapReduce
Sparse matrix computations in MapReduceSparse matrix computations in MapReduce
Sparse matrix computations in MapReduce
 
Introduction to Algorithms and Asymptotic Notation
Introduction to Algorithms and Asymptotic NotationIntroduction to Algorithms and Asymptotic Notation
Introduction to Algorithms and Asymptotic Notation
 
Behm Shah Pagerank
Behm Shah PagerankBehm Shah Pagerank
Behm Shah Pagerank
 
RDFS with Attribute Equations via SPARQL Rewriting
RDFS with Attribute Equations via SPARQL RewritingRDFS with Attribute Equations via SPARQL Rewriting
RDFS with Attribute Equations via SPARQL Rewriting
 

More from Jornadas SISTEDES 2012 {JISBD; PROLE; JCIS}

Un experimento para validar transformaciones QVT para la generación de modelo...
Un experimento para validar transformaciones QVT para la generación de modelo...Un experimento para validar transformaciones QVT para la generación de modelo...
Un experimento para validar transformaciones QVT para la generación de modelo...Jornadas SISTEDES 2012 {JISBD; PROLE; JCIS}
 
Un Método de Generación de Pruebas de Rendimiento para Múltiples Tecnologías ...
Un Método de Generación de Pruebas de Rendimiento para Múltiples Tecnologías ...Un Método de Generación de Pruebas de Rendimiento para Múltiples Tecnologías ...
Un Método de Generación de Pruebas de Rendimiento para Múltiples Tecnologías ...Jornadas SISTEDES 2012 {JISBD; PROLE; JCIS}
 
Tecnología funcional en aplicaciones de televisión interactiva: acceso a rede...
Tecnología funcional en aplicaciones de televisión interactiva: acceso a rede...Tecnología funcional en aplicaciones de televisión interactiva: acceso a rede...
Tecnología funcional en aplicaciones de televisión interactiva: acceso a rede...Jornadas SISTEDES 2012 {JISBD; PROLE; JCIS}
 
Un proceso de modernización dirigido por modelos de sistemas web heredados ha...
Un proceso de modernización dirigido por modelos de sistemas web heredados ha...Un proceso de modernización dirigido por modelos de sistemas web heredados ha...
Un proceso de modernización dirigido por modelos de sistemas web heredados ha...Jornadas SISTEDES 2012 {JISBD; PROLE; JCIS}
 
Enfoque dirigido por modelos para probar Sistemas de Información con Bases de...
Enfoque dirigido por modelos para probar Sistemas de Información con Bases de...Enfoque dirigido por modelos para probar Sistemas de Información con Bases de...
Enfoque dirigido por modelos para probar Sistemas de Información con Bases de...Jornadas SISTEDES 2012 {JISBD; PROLE; JCIS}
 
Diseño de Niveles y uso de Motores en el Desarrollo de Videojuegos dirigido p...
Diseño de Niveles y uso de Motores en el Desarrollo de Videojuegos dirigido p...Diseño de Niveles y uso de Motores en el Desarrollo de Videojuegos dirigido p...
Diseño de Niveles y uso de Motores en el Desarrollo de Videojuegos dirigido p...Jornadas SISTEDES 2012 {JISBD; PROLE; JCIS}
 

More from Jornadas SISTEDES 2012 {JISBD; PROLE; JCIS} (11)

Synthesis of secure adaptors
Synthesis of secure adaptorsSynthesis of secure adaptors
Synthesis of secure adaptors
 
Un experimento para validar transformaciones QVT para la generación de modelo...
Un experimento para validar transformaciones QVT para la generación de modelo...Un experimento para validar transformaciones QVT para la generación de modelo...
Un experimento para validar transformaciones QVT para la generación de modelo...
 
MuBPEL: una Herramienta de Mutación Firme para WS-BPEL 2.0
MuBPEL: una Herramienta de Mutación Firme para WS-BPEL 2.0MuBPEL: una Herramienta de Mutación Firme para WS-BPEL 2.0
MuBPEL: una Herramienta de Mutación Firme para WS-BPEL 2.0
 
Un Método de Generación de Pruebas de Rendimiento para Múltiples Tecnologías ...
Un Método de Generación de Pruebas de Rendimiento para Múltiples Tecnologías ...Un Método de Generación de Pruebas de Rendimiento para Múltiples Tecnologías ...
Un Método de Generación de Pruebas de Rendimiento para Múltiples Tecnologías ...
 
Tecnología funcional en aplicaciones de televisión interactiva: acceso a rede...
Tecnología funcional en aplicaciones de televisión interactiva: acceso a rede...Tecnología funcional en aplicaciones de televisión interactiva: acceso a rede...
Tecnología funcional en aplicaciones de televisión interactiva: acceso a rede...
 
Un proceso de modernización dirigido por modelos de sistemas web heredados ha...
Un proceso de modernización dirigido por modelos de sistemas web heredados ha...Un proceso de modernización dirigido por modelos de sistemas web heredados ha...
Un proceso de modernización dirigido por modelos de sistemas web heredados ha...
 
Enfoque dirigido por modelos para probar Sistemas de Información con Bases de...
Enfoque dirigido por modelos para probar Sistemas de Información con Bases de...Enfoque dirigido por modelos para probar Sistemas de Información con Bases de...
Enfoque dirigido por modelos para probar Sistemas de Información con Bases de...
 
Modelado Seguro de Consultas OLAP y su Evolución
Modelado Seguro de Consultas OLAP y su EvoluciónModelado Seguro de Consultas OLAP y su Evolución
Modelado Seguro de Consultas OLAP y su Evolución
 
Diseño de Niveles y uso de Motores en el Desarrollo de Videojuegos dirigido p...
Diseño de Niveles y uso de Motores en el Desarrollo de Videojuegos dirigido p...Diseño de Niveles y uso de Motores en el Desarrollo de Videojuegos dirigido p...
Diseño de Niveles y uso de Motores en el Desarrollo de Videojuegos dirigido p...
 
SISTEMA DE EXTRACCIÓN, TRANSFORMACIÓN Y CARGA
SISTEMA DE EXTRACCIÓN, TRANSFORMACIÓN Y CARGASISTEMA DE EXTRACCIÓN, TRANSFORMACIÓN Y CARGA
SISTEMA DE EXTRACCIÓN, TRANSFORMACIÓN Y CARGA
 
Estudio bibliométrico de la Investigación en Informática en España
Estudio bibliométrico de la Investigación en Informática en EspañaEstudio bibliométrico de la Investigación en Informática en España
Estudio bibliométrico de la Investigación en Informática en España
 

Recently uploaded

ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxLigayaBacuel1
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxsqpmdrvczh
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 

Recently uploaded (20)

ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptx
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 

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

  • 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, SPAIN XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 1/32
  • 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 Research XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 2/32
  • 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. 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. 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 [𝑠𝑒𝑎𝑠𝑜𝑛] = . . . = 3944056928109 XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 5/32
  • 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. 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.5 XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 7/32
  • 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 21/32
  • 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. 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. 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. 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. 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. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 27/32
  • 28. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 28/32
  • 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. String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 30/32
  • 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 effort XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 31/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 documents XII Jornadas sobre Programación y Lenguajes PROLE’12 18-19/IX/2012 Almería, SPAIN – p. 32/32