SlideShare une entreprise Scribd logo
1  sur  18
Télécharger pour lire hors ligne
A method for debugging XPath
DEBUGGING FUZZY XPATH QUERIES




                      PROLE 2012 – Almeria, Spain
                            Sep 18, 2012
A method for debugging XPath
        DEBUGGING FUZZY XPATH QUERIES
   Jesús M. Almendros-Jiménez               Alejandro Luna Tedesqui                   Ginés Moreno Valverde
Dept. of Languages and Computation        Dept. of Computing Systems                Dept. of Computing Systems
    University of Almeria, Spain     University of Castilla-La Mancha, Spain   University of Castilla-La Mancha, Spain
        Email: jalmen@ual.es          Emails: Alejandro.Luna@alu.uclm.es          Emails: Gines.Moreno@uclm.es




                                        PROLE 2012 – Almeria, Spain
                                              Sep 18, 2012
Outline of the talk


Introduction and Objetives
FuzzyXPath
Debug Xpath
Implementation
Conclusions

                              3/17
Introduction and objectives

• We will describe how XPath expressions can be manipulated
  in order to obtain a set of alternative XPath expressions that
  match to a given XML document.
• For each alternative XPath expression we will give a change
  degree that represents the degree in which the expression
  deviates from the initial expression.
• Thus, our work is focused on providing to the programmer a
  repertoire of paths that he can use to retrieve answers.
• The approach has been implemented and tested.



                                                             4/17
XML Path Language
• The XPath language has been proposed as a standard for
  XML querying.
• Based on the description of the path in the XML tree to be
  retrieved.
• XPath allows to specify the name of nodes (tags) and
  attributes together with boolean conditions.
• XPath querying mechanism is based on a boolean logic.

Examples:
            –   /bib/book/title
            –   /bib/book/title[text = “Don Quijote de la Mancha”]   Absolute Path
            –   /bib/book[@price < 30 and @year < 2006]
            –   //title                                              Relative Path
            –   //book[@price < 25]


                                                                                     5/17
fuzzyXPath
FuzzyXPath is an extension of the XPath query language
for the handling of flexible queries
      • Two structural constraints called deep and down for which a certain
        degree of relevance can be associated.
      • Fuzzy Operators and, or and avg for XPath conditions.

FuzzyXPath is defined by means of the following rules:
                   xpath := [deepdown]path
                    path := literal | text() | node | @att |
                            node/path | node//path
                   node := QName | QName[cond]
                    cond := path op path
.              deepdown := DEEP=degree; DOWN=degree
                      op := > | = | < | and | and+ | and- |
                             or | or+ | or- | avg | avg{A,B}
                                                                        6/17
Structural constraints DEEP/DOWN

A Fuzzy XPath expression can be adorned with
                       «[DEEP = r1, DOWN = r2]»
which means that the deepness of elements is penalized by r1 and that
the order of elements is penalized by r2, and such penalization is
proportional to the distance.




.

                                                                  7/17
Fuzzy Logic Operators
We consider three fuzzy versions for each one of the classical conjunction and
disjunction operators (also called connectives or aggregators) describing

     &P(x; y) = x ∗ y         ∨P(x; y) = x + y − x ∗ y
pessimistic, realistic and optimistic scenarios.
                                                          Product: and/or
     &G(x;y) = min(x,y)       VG(x;y) = max(x;y)          Gödel: and+/or-
     &L(x;y) = max(x+y-1;0)   VL(x;y) = min(x+y;1)        Łuka.: and-/or+
     @avg(x; y) = (x + y)/2                               Average

                      p       q        p&q       pVq     p @avg q
                       0      0          0        0         0
                       0      1          0        1        0.5
                       1      0          0        1        0.5
                       1      1          1        1         1
                      0.2     0.7       0.14     0.76      0.45
                      0.8     0.4       0.32     0.88      0.60
                      …       …          …        …         …

                                                                            8/17
Input XML document in our examples
                 XML Document                                         XML skeleton
<bib>
  <name>Classic Literature</name>
  <book year="2001" price="45.95">
    <title>Don Quijote de la Mancha</title>
    <author>Miguel de Cervantes Saavedra</author>
    <references>
       <novel year="1997" price="35.99">
          <name>La Galatea</name>
          <author>Miguel de Cervantes Saavedra</author>
          <references>
             <book year="1994" price="25.99">
               <title>Los trabajos de Persiles y Sigismunda</title>
               <author>Miguel de Cervantes Saavedra</author>
             </book>
          </references>
       </novel>
     </references>
  </book>
  <novel year="1999" price="25.65">
    <title>La Celestina</title>
    <author>Fernando de Rojas</author>
  </novel>
</bib>
Example fuzzyXPath
             /bib[DEEP=0.8;DOWN=0.9]//title




       //book[@year<2000 avg{3,1} @price<50]/title




/bib[DEEP=0.5]//book[@year<2000 avg{3,1} @price<50]/title




                                                            10/17
Debug XPath
Our debugging process accepts as inputs a query Q preceded by the [DEBUG = r] command, where
r is a real number in the unit interval.


                     «[DEBUG=0.5]/bib/book/title».
Our technique produces a set of alternative queries Q1, ...,Qn.

<result>
    <query cd=”1.0”>/bib/book/title</query>
    <query cd=”0.8” book=”novel”>/bib/[SWAP=0.8]novel/title</query>
    <query cd=”0.5” book=”//”>/bib/[JUMP=0.5]//title</query>
    <query cd=”0.5” bib=”//”>/[JUMP=0.5]//book/title</query>
    <query cd=”0.45” book=”” title=”name”>/bib/[DELETE=0.5][SWAP=0.9]name</query>
    <query cd=”0.225” bib=”” book=”//” title=”name”>/[DELETE=0.5][JUMP=0.5]//[SWAP =0.9]
                                                    name</query> ...
     …
</result>

                                                                                        11/17
Swapping case
The second query proposed this case:
        <query cd=”0.8” book=”novel”>/bib/[SWAP=0.8]novel/title</query>

1)    We have included the attribute book=”novel” in order to suggest that instead of
      looking now for a book, finding a novel should be also a good alternative,
2)    In the path we have replaced the tag book by novel and we have appropriately
      annotated the exact place where the change has been performed with the
      annotation [SWAP=0.8]
3)    The cd of the new query has been adjusted with the similarity degree 0.8 of the
      exchanged tags.

Execution of query “/bib/[SWAP=0.8]novel/title”

     <result>
        <title rsv=”0.8”>La Celestina</title>
     </result>



                                                                                   12/17
Jumping case
Even when tagi is not found at level i in the input XML document D, tagi+1 appears at a
deeper level (i.e, greater than i) in a branch of D. Then, we generate an alternative
query by adding the attribute tagi=”//”, which means that tagi has been jumped, and
replacing in the path the occurrence “tagi” by “[JUMP=r]//”, being r the value
associated to DEBUG.

Execution of query “/bib/[JUMP=0.5]//title”

<result>
            <title rsv=”0.5”>Don Quijote de la Mancha</title>
            <title rsv=”0.5”>La Celestina</title>
            <title rsv=”0.03125”>Los trabajos de Persiles y Sigismunda</title>
</result>



.


                                                                                     13/17
Deletion case
This situation emerges when at level i in the input XML document D, we found
tagi+1 instead of tagi. So, the intuition tell us that tagi should be removed from
the original query Q and hence, we generate an alternative query by adding
the attribute tagi=”” and replacing in the path the occurrence “tagi” by
“[DELETE=r]”, being r the value associated to DEBUG.

Execution of query “/bib/[DELETE=0.5][SWAP=0.9]name”

         <result>
                  <name rsv=”0.45”>Classic Literature</name>
         </result>



.

                                                                               14/17
Implementation
1. Implementation based on Fuzzy Logic Programming with
   MALP (Multi-Adjoint Logic Programming)
2. In order to run and manage MALP programs, during the
   last years we have designed the FLOPER system.
3. The parser of our tool has been implemented by using the
   classical DCG’s (Definite Clause Grammars) resource of the
   Prolog language
4. The core of our debugger is coded with MALP rules by
   reusing most modules of our fuzzy XPath interpreter.
5. And, of course, the parser of our debugger has been
   extended to recognize the new keywords DEBUG, SWAP,
   DELETE and JUMP, with their proper arguments.


                                                           15/17
Web Version
please, consult and visit:
                   http://dectau.uclm.es/fuzzyXPath/
where it is possible too to perform an on-line debugging session.




.

                                                                    16/17
Conclusions

• The result of the debugging process of a XPath expression is a set of
  alternative queries, each one associated to a chance degree.
• We have proposed JUMP, DELETE and SWAP operators that cover
  the main cases of programming errors when describing a path about
  an XML document.
• We have implemented and tested the approach.
• The approach has a fuzzy taste in the sense that XPath expressions
  are debugged by relaxing the path expression assigning a change
  degree to debugging points.
• The fuzzy taste is also illustrated when executing the annotated
  XPath expressions in a fuzzy based implementation of XPath.



                                                                    17/17
A method for debugging XPath
DEBUGGING FUZZY XPATH QUERIES




                      PROLE 2012 – Almeria, Spain
                            Sep 18, 2012

Contenu connexe

Tendances

php&mysql with Ethical Hacking
php&mysql with Ethical Hackingphp&mysql with Ethical Hacking
php&mysql with Ethical HackingBCET
 
WordPress Plugin Localization
WordPress Plugin LocalizationWordPress Plugin Localization
WordPress Plugin LocalizationRonald Huereca
 
Natural Language Processing and Python
Natural Language Processing and PythonNatural Language Processing and Python
Natural Language Processing and Pythonanntp
 
Benchmarking Perl (Chicago UniForum 2006)
Benchmarking Perl (Chicago UniForum 2006)Benchmarking Perl (Chicago UniForum 2006)
Benchmarking Perl (Chicago UniForum 2006)brian d foy
 
Zend Certification PHP 5 Sample Questions
Zend Certification PHP 5 Sample QuestionsZend Certification PHP 5 Sample Questions
Zend Certification PHP 5 Sample QuestionsJagat Kothari
 
Zend Certification Preparation Tutorial
Zend Certification Preparation TutorialZend Certification Preparation Tutorial
Zend Certification Preparation TutorialLorna Mitchell
 
Embedding Languages Without Breaking Tools
Embedding Languages Without Breaking ToolsEmbedding Languages Without Breaking Tools
Embedding Languages Without Breaking ToolsLukas Renggli
 
Benchmarking Perl Lightning Talk (NPW 2007)
Benchmarking Perl Lightning Talk (NPW 2007)Benchmarking Perl Lightning Talk (NPW 2007)
Benchmarking Perl Lightning Talk (NPW 2007)brian d foy
 
The art of readable code (ch1~ch4)
The art of readable code (ch1~ch4)The art of readable code (ch1~ch4)
The art of readable code (ch1~ch4)Ki Sung Bae
 
clean code book summary - uncle bob - English version
clean code book summary - uncle bob - English versionclean code book summary - uncle bob - English version
clean code book summary - uncle bob - English versionsaber tabatabaee
 
Erlang/OTP for Rubyists
Erlang/OTP for RubyistsErlang/OTP for Rubyists
Erlang/OTP for RubyistsSean Cribbs
 
Bioinformatica: Esercizi su Perl, espressioni regolari e altre amenità (BMR G...
Bioinformatica: Esercizi su Perl, espressioni regolari e altre amenità (BMR G...Bioinformatica: Esercizi su Perl, espressioni regolari e altre amenità (BMR G...
Bioinformatica: Esercizi su Perl, espressioni regolari e altre amenità (BMR G...Andrea Telatin
 
Can't Miss Features of PHP 5.3 and 5.4
Can't Miss Features of PHP 5.3 and 5.4Can't Miss Features of PHP 5.3 and 5.4
Can't Miss Features of PHP 5.3 and 5.4Jeff Carouth
 
7 rules of simple and maintainable code
7 rules of simple and maintainable code7 rules of simple and maintainable code
7 rules of simple and maintainable codeGeshan Manandhar
 
The Art Of Readable Code
The Art Of Readable CodeThe Art Of Readable Code
The Art Of Readable CodeBaidu, Inc.
 

Tendances (20)

php&mysql with Ethical Hacking
php&mysql with Ethical Hackingphp&mysql with Ethical Hacking
php&mysql with Ethical Hacking
 
WordPress Plugin Localization
WordPress Plugin LocalizationWordPress Plugin Localization
WordPress Plugin Localization
 
Natural Language Processing and Python
Natural Language Processing and PythonNatural Language Processing and Python
Natural Language Processing and Python
 
Benchmarking Perl (Chicago UniForum 2006)
Benchmarking Perl (Chicago UniForum 2006)Benchmarking Perl (Chicago UniForum 2006)
Benchmarking Perl (Chicago UniForum 2006)
 
Eclipse Banking Day
Eclipse Banking DayEclipse Banking Day
Eclipse Banking Day
 
Zend Certification PHP 5 Sample Questions
Zend Certification PHP 5 Sample QuestionsZend Certification PHP 5 Sample Questions
Zend Certification PHP 5 Sample Questions
 
Zend Certification Preparation Tutorial
Zend Certification Preparation TutorialZend Certification Preparation Tutorial
Zend Certification Preparation Tutorial
 
Embedding Languages Without Breaking Tools
Embedding Languages Without Breaking ToolsEmbedding Languages Without Breaking Tools
Embedding Languages Without Breaking Tools
 
Dsl
DslDsl
Dsl
 
Benchmarking Perl Lightning Talk (NPW 2007)
Benchmarking Perl Lightning Talk (NPW 2007)Benchmarking Perl Lightning Talk (NPW 2007)
Benchmarking Perl Lightning Talk (NPW 2007)
 
Practice exam php
Practice exam phpPractice exam php
Practice exam php
 
The art of readable code (ch1~ch4)
The art of readable code (ch1~ch4)The art of readable code (ch1~ch4)
The art of readable code (ch1~ch4)
 
mod_rewrite
mod_rewritemod_rewrite
mod_rewrite
 
clean code book summary - uncle bob - English version
clean code book summary - uncle bob - English versionclean code book summary - uncle bob - English version
clean code book summary - uncle bob - English version
 
Erlang/OTP for Rubyists
Erlang/OTP for RubyistsErlang/OTP for Rubyists
Erlang/OTP for Rubyists
 
Bioinformatica: Esercizi su Perl, espressioni regolari e altre amenità (BMR G...
Bioinformatica: Esercizi su Perl, espressioni regolari e altre amenità (BMR G...Bioinformatica: Esercizi su Perl, espressioni regolari e altre amenità (BMR G...
Bioinformatica: Esercizi su Perl, espressioni regolari e altre amenità (BMR G...
 
Can't Miss Features of PHP 5.3 and 5.4
Can't Miss Features of PHP 5.3 and 5.4Can't Miss Features of PHP 5.3 and 5.4
Can't Miss Features of PHP 5.3 and 5.4
 
7 rules of simple and maintainable code
7 rules of simple and maintainable code7 rules of simple and maintainable code
7 rules of simple and maintainable code
 
Xhtml tags reference
Xhtml tags referenceXhtml tags reference
Xhtml tags reference
 
The Art Of Readable Code
The Art Of Readable CodeThe Art Of Readable Code
The Art Of Readable Code
 

En vedette

Space and functional programming shfc
Space and functional programming shfcSpace and functional programming shfc
Space and functional programming shfctomfannin48
 
Sawabona!!
Sawabona!!Sawabona!!
Sawabona!!Ana Rosa
 
RESUME
RESUMERESUME
RESUMEbiju p
 
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...Jornadas SISTEDES 2012 {JISBD; PROLE; JCIS}
 
Eu sei coidarme, e ti
Eu sei coidarme, e tiEu sei coidarme, e ti
Eu sei coidarme, e tiAna Rosa
 
Making change happen
Making change happen Making change happen
Making change happen tomfannin48
 
Social Psychology-Conformity puga
Social Psychology-Conformity pugaSocial Psychology-Conformity puga
Social Psychology-Conformity pugajunpuga
 
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 bolivianaGoogle
 

En vedette (11)

Space and functional programming shfc
Space and functional programming shfcSpace and functional programming shfc
Space and functional programming shfc
 
Sawabona!!
Sawabona!!Sawabona!!
Sawabona!!
 
RESUME
RESUMERESUME
RESUME
 
Homemade soda
Homemade sodaHomemade soda
Homemade soda
 
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...
 
Eu sei coidarme, e ti
Eu sei coidarme, e tiEu sei coidarme, e ti
Eu sei coidarme, e ti
 
Making change happen
Making change happen Making change happen
Making change happen
 
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic ComputationsString-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations
String-based Multi-adjoint Lattices for Tracing Fuzzy Logic Computations
 
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
 

Similaire à DEBUGGING FUZZY XPATH QUERIES

Kerberizing Spark: Spark Summit East talk by Abel Rincon and Jorge Lopez-Malla
Kerberizing Spark: Spark Summit East talk by Abel Rincon and Jorge Lopez-MallaKerberizing Spark: Spark Summit East talk by Abel Rincon and Jorge Lopez-Malla
Kerberizing Spark: Spark Summit East talk by Abel Rincon and Jorge Lopez-MallaSpark Summit
 
Playfulness at Work
Playfulness at WorkPlayfulness at Work
Playfulness at WorkErin Dees
 
Groovy On Trading Desk (2010)
Groovy On Trading Desk (2010)Groovy On Trading Desk (2010)
Groovy On Trading Desk (2010)Jonathan Felch
 
Apache pig presentation_siddharth_mathur
Apache pig presentation_siddharth_mathurApache pig presentation_siddharth_mathur
Apache pig presentation_siddharth_mathurSiddharth Mathur
 
Writing MapReduce Programs using Java | Big Data Hadoop Spark Tutorial | Clou...
Writing MapReduce Programs using Java | Big Data Hadoop Spark Tutorial | Clou...Writing MapReduce Programs using Java | Big Data Hadoop Spark Tutorial | Clou...
Writing MapReduce Programs using Java | Big Data Hadoop Spark Tutorial | Clou...CloudxLab
 
Math-Bridge Additional Interactivity
Math-Bridge Additional InteractivityMath-Bridge Additional Interactivity
Math-Bridge Additional Interactivitymetamath
 
Spark 4th Meetup Londond - Building a Product with Spark
Spark 4th Meetup Londond - Building a Product with SparkSpark 4th Meetup Londond - Building a Product with Spark
Spark 4th Meetup Londond - Building a Product with Sparksamthemonad
 
Haskell retrospective
Haskell retrospectiveHaskell retrospective
Haskell retrospectivechenge2k
 
Introduction to source{d} Engine and source{d} Lookout
Introduction to source{d} Engine and source{d} Lookout Introduction to source{d} Engine and source{d} Lookout
Introduction to source{d} Engine and source{d} Lookout source{d}
 
Algorithm and Programming (Introduction of dev pascal, data type, value, and ...
Algorithm and Programming (Introduction of dev pascal, data type, value, and ...Algorithm and Programming (Introduction of dev pascal, data type, value, and ...
Algorithm and Programming (Introduction of dev pascal, data type, value, and ...Adam Mukharil Bachtiar
 
Advanced Perl Techniques
Advanced Perl TechniquesAdvanced Perl Techniques
Advanced Perl TechniquesDave Cross
 

Similaire à DEBUGGING FUZZY XPATH QUERIES (20)

Ruby Basics
Ruby BasicsRuby Basics
Ruby Basics
 
modeling.ppt
modeling.pptmodeling.ppt
modeling.ppt
 
Kerberizing Spark: Spark Summit East talk by Abel Rincon and Jorge Lopez-Malla
Kerberizing Spark: Spark Summit East talk by Abel Rincon and Jorge Lopez-MallaKerberizing Spark: Spark Summit East talk by Abel Rincon and Jorge Lopez-Malla
Kerberizing Spark: Spark Summit East talk by Abel Rincon and Jorge Lopez-Malla
 
Playfulness at Work
Playfulness at WorkPlayfulness at Work
Playfulness at Work
 
Groovy On Trading Desk (2010)
Groovy On Trading Desk (2010)Groovy On Trading Desk (2010)
Groovy On Trading Desk (2010)
 
Apache pig presentation_siddharth_mathur
Apache pig presentation_siddharth_mathurApache pig presentation_siddharth_mathur
Apache pig presentation_siddharth_mathur
 
Writing MapReduce Programs using Java | Big Data Hadoop Spark Tutorial | Clou...
Writing MapReduce Programs using Java | Big Data Hadoop Spark Tutorial | Clou...Writing MapReduce Programs using Java | Big Data Hadoop Spark Tutorial | Clou...
Writing MapReduce Programs using Java | Big Data Hadoop Spark Tutorial | Clou...
 
Math-Bridge Additional Interactivity
Math-Bridge Additional InteractivityMath-Bridge Additional Interactivity
Math-Bridge Additional Interactivity
 
Apache pig
Apache pigApache pig
Apache pig
 
Spark 4th Meetup Londond - Building a Product with Spark
Spark 4th Meetup Londond - Building a Product with SparkSpark 4th Meetup Londond - Building a Product with Spark
Spark 4th Meetup Londond - Building a Product with Spark
 
Haskell retrospective
Haskell retrospectiveHaskell retrospective
Haskell retrospective
 
Introduction to Perl and BioPerl
Introduction to Perl and BioPerlIntroduction to Perl and BioPerl
Introduction to Perl and BioPerl
 
Php + my sql
Php + my sqlPhp + my sql
Php + my sql
 
Introduction to source{d} Engine and source{d} Lookout
Introduction to source{d} Engine and source{d} Lookout Introduction to source{d} Engine and source{d} Lookout
Introduction to source{d} Engine and source{d} Lookout
 
Meta Object Protocols
Meta Object ProtocolsMeta Object Protocols
Meta Object Protocols
 
Algorithm and Programming (Introduction of dev pascal, data type, value, and ...
Algorithm and Programming (Introduction of dev pascal, data type, value, and ...Algorithm and Programming (Introduction of dev pascal, data type, value, and ...
Algorithm and Programming (Introduction of dev pascal, data type, value, and ...
 
Easy R
Easy REasy R
Easy R
 
Advanced Perl Techniques
Advanced Perl TechniquesAdvanced Perl Techniques
Advanced Perl Techniques
 
lab4_php
lab4_phplab4_php
lab4_php
 
lab4_php
lab4_phplab4_php
lab4_php
 

Plus de 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}
 

Plus de 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
 

Dernier

URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
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
 

Dernier (20)

URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
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
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 

DEBUGGING FUZZY XPATH QUERIES

  • 1. A method for debugging XPath DEBUGGING FUZZY XPATH QUERIES PROLE 2012 – Almeria, Spain Sep 18, 2012
  • 2. A method for debugging XPath DEBUGGING FUZZY XPATH QUERIES Jesús M. Almendros-Jiménez Alejandro Luna Tedesqui Ginés Moreno Valverde Dept. of Languages and Computation Dept. of Computing Systems Dept. of Computing Systems University of Almeria, Spain University of Castilla-La Mancha, Spain University of Castilla-La Mancha, Spain Email: jalmen@ual.es Emails: Alejandro.Luna@alu.uclm.es Emails: Gines.Moreno@uclm.es PROLE 2012 – Almeria, Spain Sep 18, 2012
  • 3. Outline of the talk Introduction and Objetives FuzzyXPath Debug Xpath Implementation Conclusions 3/17
  • 4. Introduction and objectives • We will describe how XPath expressions can be manipulated in order to obtain a set of alternative XPath expressions that match to a given XML document. • For each alternative XPath expression we will give a change degree that represents the degree in which the expression deviates from the initial expression. • Thus, our work is focused on providing to the programmer a repertoire of paths that he can use to retrieve answers. • The approach has been implemented and tested. 4/17
  • 5. XML Path Language • The XPath language has been proposed as a standard for XML querying. • Based on the description of the path in the XML tree to be retrieved. • XPath allows to specify the name of nodes (tags) and attributes together with boolean conditions. • XPath querying mechanism is based on a boolean logic. Examples: – /bib/book/title – /bib/book/title[text = “Don Quijote de la Mancha”] Absolute Path – /bib/book[@price < 30 and @year < 2006] – //title Relative Path – //book[@price < 25] 5/17
  • 6. fuzzyXPath FuzzyXPath is an extension of the XPath query language for the handling of flexible queries • Two structural constraints called deep and down for which a certain degree of relevance can be associated. • Fuzzy Operators and, or and avg for XPath conditions. FuzzyXPath is defined by means of the following rules: xpath := [deepdown]path path := literal | text() | node | @att | node/path | node//path node := QName | QName[cond] cond := path op path . deepdown := DEEP=degree; DOWN=degree op := > | = | < | and | and+ | and- | or | or+ | or- | avg | avg{A,B} 6/17
  • 7. Structural constraints DEEP/DOWN A Fuzzy XPath expression can be adorned with «[DEEP = r1, DOWN = r2]» which means that the deepness of elements is penalized by r1 and that the order of elements is penalized by r2, and such penalization is proportional to the distance. . 7/17
  • 8. Fuzzy Logic Operators We consider three fuzzy versions for each one of the classical conjunction and disjunction operators (also called connectives or aggregators) describing &P(x; y) = x ∗ y ∨P(x; y) = x + y − x ∗ y pessimistic, realistic and optimistic scenarios. Product: and/or &G(x;y) = min(x,y) VG(x;y) = max(x;y) Gödel: and+/or- &L(x;y) = max(x+y-1;0) VL(x;y) = min(x+y;1) Łuka.: and-/or+ @avg(x; y) = (x + y)/2 Average p q p&q pVq p @avg q 0 0 0 0 0 0 1 0 1 0.5 1 0 0 1 0.5 1 1 1 1 1 0.2 0.7 0.14 0.76 0.45 0.8 0.4 0.32 0.88 0.60 … … … … … 8/17
  • 9. Input XML document in our examples XML Document XML skeleton <bib> <name>Classic Literature</name> <book year="2001" price="45.95"> <title>Don Quijote de la Mancha</title> <author>Miguel de Cervantes Saavedra</author> <references> <novel year="1997" price="35.99"> <name>La Galatea</name> <author>Miguel de Cervantes Saavedra</author> <references> <book year="1994" price="25.99"> <title>Los trabajos de Persiles y Sigismunda</title> <author>Miguel de Cervantes Saavedra</author> </book> </references> </novel> </references> </book> <novel year="1999" price="25.65"> <title>La Celestina</title> <author>Fernando de Rojas</author> </novel> </bib>
  • 10. Example fuzzyXPath /bib[DEEP=0.8;DOWN=0.9]//title //book[@year<2000 avg{3,1} @price<50]/title /bib[DEEP=0.5]//book[@year<2000 avg{3,1} @price<50]/title 10/17
  • 11. Debug XPath Our debugging process accepts as inputs a query Q preceded by the [DEBUG = r] command, where r is a real number in the unit interval. «[DEBUG=0.5]/bib/book/title». Our technique produces a set of alternative queries Q1, ...,Qn. <result> <query cd=”1.0”>/bib/book/title</query> <query cd=”0.8” book=”novel”>/bib/[SWAP=0.8]novel/title</query> <query cd=”0.5” book=”//”>/bib/[JUMP=0.5]//title</query> <query cd=”0.5” bib=”//”>/[JUMP=0.5]//book/title</query> <query cd=”0.45” book=”” title=”name”>/bib/[DELETE=0.5][SWAP=0.9]name</query> <query cd=”0.225” bib=”” book=”//” title=”name”>/[DELETE=0.5][JUMP=0.5]//[SWAP =0.9] name</query> ... … </result> 11/17
  • 12. Swapping case The second query proposed this case: <query cd=”0.8” book=”novel”>/bib/[SWAP=0.8]novel/title</query> 1) We have included the attribute book=”novel” in order to suggest that instead of looking now for a book, finding a novel should be also a good alternative, 2) In the path we have replaced the tag book by novel and we have appropriately annotated the exact place where the change has been performed with the annotation [SWAP=0.8] 3) The cd of the new query has been adjusted with the similarity degree 0.8 of the exchanged tags. Execution of query “/bib/[SWAP=0.8]novel/title” <result> <title rsv=”0.8”>La Celestina</title> </result> 12/17
  • 13. Jumping case Even when tagi is not found at level i in the input XML document D, tagi+1 appears at a deeper level (i.e, greater than i) in a branch of D. Then, we generate an alternative query by adding the attribute tagi=”//”, which means that tagi has been jumped, and replacing in the path the occurrence “tagi” by “[JUMP=r]//”, being r the value associated to DEBUG. Execution of query “/bib/[JUMP=0.5]//title” <result> <title rsv=”0.5”>Don Quijote de la Mancha</title> <title rsv=”0.5”>La Celestina</title> <title rsv=”0.03125”>Los trabajos de Persiles y Sigismunda</title> </result> . 13/17
  • 14. Deletion case This situation emerges when at level i in the input XML document D, we found tagi+1 instead of tagi. So, the intuition tell us that tagi should be removed from the original query Q and hence, we generate an alternative query by adding the attribute tagi=”” and replacing in the path the occurrence “tagi” by “[DELETE=r]”, being r the value associated to DEBUG. Execution of query “/bib/[DELETE=0.5][SWAP=0.9]name” <result> <name rsv=”0.45”>Classic Literature</name> </result> . 14/17
  • 15. Implementation 1. Implementation based on Fuzzy Logic Programming with MALP (Multi-Adjoint Logic Programming) 2. In order to run and manage MALP programs, during the last years we have designed the FLOPER system. 3. The parser of our tool has been implemented by using the classical DCG’s (Definite Clause Grammars) resource of the Prolog language 4. The core of our debugger is coded with MALP rules by reusing most modules of our fuzzy XPath interpreter. 5. And, of course, the parser of our debugger has been extended to recognize the new keywords DEBUG, SWAP, DELETE and JUMP, with their proper arguments. 15/17
  • 16. Web Version please, consult and visit: http://dectau.uclm.es/fuzzyXPath/ where it is possible too to perform an on-line debugging session. . 16/17
  • 17. Conclusions • The result of the debugging process of a XPath expression is a set of alternative queries, each one associated to a chance degree. • We have proposed JUMP, DELETE and SWAP operators that cover the main cases of programming errors when describing a path about an XML document. • We have implemented and tested the approach. • The approach has a fuzzy taste in the sense that XPath expressions are debugged by relaxing the path expression assigning a change degree to debugging points. • The fuzzy taste is also illustrated when executing the annotated XPath expressions in a fuzzy based implementation of XPath. 17/17
  • 18. A method for debugging XPath DEBUGGING FUZZY XPATH QUERIES PROLE 2012 – Almeria, Spain Sep 18, 2012