A Semi-Automatic Methodology for Repairing Faulty Web Sites M. - - PowerPoint PPT Presentation

a semi automatic methodology for repairing faulty web
SMART_READER_LITE
LIVE PREVIEW

A Semi-Automatic Methodology for Repairing Faulty Web Sites M. - - PowerPoint PPT Presentation

A Semi-Automatic Methodology for Repairing Faulty Web Sites M. Alpuente 1 , D. Ballis 2 , M. Falaschi 3 and J. Garca-Viv 1 1 DSIC, Universidad Politcnica de Valencia, Camino de Vera s/n, Apdo. 22012, 1 DSIC, Universidad Politcnica de


slide-1
SLIDE 1

A Semi-Automatic Methodology for Repairing Faulty Web Sites

  • M. Alpuente1, D. Ballis2, M. Falaschi3 and J. García-Vivó1

1 1 DSIC, Universidad Politécnica de Valencia, Camino de Vera s/n, Apdo. 22012,

DSIC, Universidad Politécnica de Valencia, Camino de Vera s/n, Apdo. 22012, 46071 Valencia, 46071 Valencia, Spain Spain. . Email Email: { : {alpuente alpuente, , jgarciavivo jgarciavivo} }@dsic.upv.es @dsic.upv.es. .

2 2

Dip Dip. . Matematica Matematica e e Informatica Informatica, , Via Via delle delle Scienze Scienze 206, 206, 33100 33100 Udine Udine, , Italy Italy. . Email Email: : demis@dimi.uniud.it demis@dimi.uniud.it. .

3 3

Dip

  • Dip. de

. de Scienze Scienze Matematiche Matematiche e e Informatiche Informatiche. . Pian Pian dei dei Mantellini Mantellini 44. 44. 53100 53100 Siena Siena, , Italy Italy. . Email Email: : moreno.falaschi@unisi.it moreno.falaschi@unisi.it

slide-2
SLIDE 2

14/11/2005 EU-INDIA 2005 2

Talk Plan

 Formal Verification of Web sites  Error Detection  Repairing Faulty Web sites

slide-3
SLIDE 3

14/11/2005 EU-INDIA 2005 3

Talk Plan

 Formal Verification of Web sites   Error Error Detection Detection   Repairing Repairing Faulty Faulty Web Web sites sites

slide-4
SLIDE 4

14/11/2005 EU-INDIA 2005 4

Motivation

 Web Sites can have a very complex structure  Development and maintenance of Web sites are difficult tasks  We use formal methods

 to verify Web sites w.r.t a given specification, which is able to express sintactic and semantic properties  to fix Web sites semi-automatically

slide-5
SLIDE 5

14/11/2005 EU-INDIA 2005 5

Verification of Web sites

 On a previous work, we provided a rule-based specification language for specifying integrity conditions for a given Web site  And a verification technique for automatically checking wether those conditions are fulfilled  Our verification framework is based on a rewriting- like technique called partial rewriting, more suitable for dealing with XML/XHTML data

slide-6
SLIDE 6

14/11/2005 EU-INDIA 2005 6

Web site denotation

 A Web page is a ground term. Consequently, we represent a Web Site as a finite collection of ground terms of a suitable term algebra

< <member

member> > member member( ( < <name name> > Peter Peter </ </name name> > name name( (“ “Peter Peter” ”) ) < <surname surname> > Hawkins Hawkins </ </surname surname> > surname surname ( (“ “Hawkins Hawkins” ”) ) <status> <status> Professor Professor </status> status ( </status> status (“ “Professor Professor” ”) ) < <teaching teaching> > teaching teaching( ( < <course course> > Algebra Algebra </ </course course> > course course ( (“ “Algebra Algebra” ”) ) </ </teaching teaching> ) > ) </ </member member> ) > )

slide-7
SLIDE 7

14/11/2005 EU-INDIA 2005 7

Web Specification

 A Web specification is made up of  a set of correctNess rules IN  a set of coMpletenes rules IM  a set of rewrite rules (i.e. a Term Rewriting System) R

slide-8
SLIDE 8

14/11/2005 EU-INDIA 2005 8

Correctness Rules

 A correctness rule has the following form: l → error | C where l is a term, error is a reserved constant and C is a sequence of equations and membership tests w.r.t. regular languages Interpretation : Given a Web site W, if l is recognized in some Web page of W and all the expressions represented in C are evaluated to True (or C is empty), the Web page is incorrect

e.g. project(year(X)) → error | X in [0-9]*, X<1990

slide-9
SLIDE 9

14/11/2005 EU-INDIA 2005 9

Completeness Rules

 A completeness rule has the following form: l → µ(r)<q> where l and r are terms, µ is a marking function for marking some symbols of r by means of the symbol #, and q is a universal/existential quantifier (A,E) Marks are used to select the Web pages on which we want to check a given condition.

e.g hpage(status(“Professor”)) → #hpage(#status(#“Professor”),teaching)<A>

slide-10
SLIDE 10

14/11/2005 EU-INDIA 2005 10

Completeness Rules – Interpretation

 Given a Web site W

 An existential completeness rule l → μ(r)<E> is interpreted as follows:

 if l is recognized in some Web page of W, then (the irreducible form of) r must be recognized in some Web page of W which contain the marked part of r.

 An universal completeness rule l → μ(r)<A> is interpreted as follows:

 if l is recognized in some Web page of W, then (the irreducible form of) r must be recognized in every Web page of W which contain the marked part of r.

slide-11
SLIDE 11

14/11/2005 EU-INDIA 2005 11

Tree Simulation

 Simulation allows us to recognize the structure and the labels of a Web page (template) into another. It provides a powerful pattern-matching mechanism:

 suitable for dealing with HTML/XML data (partial matching, unordered trees)  fast (efficient algorithms do exist)

 Minimal, injective simulations

slide-12
SLIDE 12

14/11/2005 EU-INDIA 2005 12

Partial Rewriting

 A rewriting relation in which:

 the traditional pattern matching mechanism is replaced by tree simulation  the context of selected reducible expressions is disregarded  we deal with marking information

slide-13
SLIDE 13

14/11/2005 EU-INDIA 2005 13

Partial Rewriting steps

 members( member(name(Peter), surname(Parker), status(Professor)), member(name(John), surname(Smith), status(technician)) )

is partially rewritten to #hpage(fullname(append(Peter,Parker),status) ⇀R #hpage(fullname(PeterParker),status) and #hpage(fullname(append(John,Smith),status) ⇀R hpage(fullname(JohnSmith),status) by rule member(name(X),surname(Y))#hpage(fullname(append(X, Y)), status)

slide-14
SLIDE 14

14/11/2005 EU-INDIA 2005 14

Talk Plan

  Formal Formal Verification Verification

  • f
  • f Web

Web sites sites  Error Detection   Repairing Repairing Faulty Faulty Web Web sites sites

slide-15
SLIDE 15

14/11/2005 EU-INDIA 2005 15

Error Detection

 Our formal verification methodology is able to detect forbidden/erroneous as well as incomplete information in a Web site W, by executing a Web specification on W.  Kind of errors:

 Correctness errors  Completeness errors

 missing Web pages  Universal completeness errors  Existential completeness errors

slide-16
SLIDE 16

14/11/2005 EU-INDIA 2005 16

Correctness errors

 Let W be a Web site and (IM,IN,R) be a Web

  • specification. Then the triple (p,v,lσ) is a

correctness error iff

 p≡(V,E,r,label)∈W is a Web page of W and v∈V is a vertex of p;  lσ is an instance of a left-hand side of a correctness rule belonging to IN which is “embedded” in p|v.

 We denote the set of all the correctness errors of a Web site risen by a set of correctness rules IN as EN

slide-17
SLIDE 17

14/11/2005 EU-INDIA 2005 17

Completeness errors – Missing Web pages

 Let W be a Web site and (IM,IN,R) be a Web

  • specification. Then the pair (r,W)is a missing Web

page error whenever r does not belong to W and there exists p∈W s.t. p⇀+IM r.

slide-18
SLIDE 18

15/11/2005 EU-INDIA 2005 18

Completeness errors – Incomplete Web pages

 Let W be a Web site and (IM,IN,R) be a Web

  • specification. Then the triple (r,{p1,...,pn},A) is a

universal completeness error, if there exists p∈W s.t.

p⇀+IMr and {p1,...,pn} is not universally complete w.r.t r, pi∈W,i=1..n.

 Let W be a Web site and (IM,IN,R) be a Web

  • specification. Then the triple (r,{p1,...,pn},E) is an

existential completeness error, if there exists p∈W s.t.

p⇀+IMr and {p1,...,pn} is not existentially complete w.r.t r, pi∈W,i=1..n.

slide-19
SLIDE 19

14/11/2005 EU-INDIA 2005 19

Completeness errors – Incomplete Web pages

 Note that we locate where the completeness errors

  • ccur and where the information must be included

 We denote the set of all the correctness errors of a Web site risen by a set of completeness rules IM as EM

slide-20
SLIDE 20

14/11/2005 EU-INDIA 2005 20

Talk Plan

  Formal Formal Verification Verification

  • f
  • f Web

Web sites sites   Error Error Detection Detection  Repairing Faulty Web sites

slide-21
SLIDE 21

14/11/2005 EU-INDIA 2005 21

Repairing a Faulty Web site

 Given a Faulty Web site W and the sets of errors EN and EM found in that Web site, there exist several repair actions to choose between

 change(p,v,t)  add(p,t)  add(p,W)  delete(p,t)

 The same error can be fixed executing different actions

slide-22
SLIDE 22

14/11/2005 EU-INDIA 2005 22

Repairing a Faulty Web site

 Our goal is to guarantee the completeness and correctness of the Web site after fixing all the errors found in the verification phase  If EN is empty, the Web site is Correct  If EM is empty, the Web site is Complete  Our method is built up of several stages

slide-23
SLIDE 23

14/11/2005 EU-INDIA 2005 23

Fixing Correctness errors

 Given a correctness error (p,v,lσ)

 If there exist r ≡ (l → error | C) in IN where C is empty, the only option will be delete  Otherwise, two options are avaliable: delete or

change  W’ = W – {p} U {delete(p,lσ)}  W’ = W – {p} U {change(p,lσ,t)}

…what is t?

slide-24
SLIDE 24

14/11/2005 EU-INDIA 2005 24

Fixing Correctness errors

 The set of conditions to be held by the new values is computed collecting the conditions of all the rules that simulate (or are simulated by) l

 project(grant1(x),grant2(y))→error | x < y  grant1(x) →error | x<50000

 We can use constraint programming techniques to provide sets of admissible values.  This method lets us find inconsistencies between the rules of the Web specification, whenever no admisible values are found

slide-25
SLIDE 25

14/11/2005 EU-INDIA 2005 25

Fixing Completeness errors

 After having fixed the Correctness Errors, we need to update the set of Completeness Errors EM  Given a completeness error, it always can be repaired by applying two different actions: add the missing information or delete all the information that caused the error

slide-26
SLIDE 26

14/11/2005 EU-INDIA 2005 26

Fixing Completeness errors - add

 missing Web pages

 W’ = add(r,W)

 Existential incompleteness errors

 W’ = W–{pi}U{add(pi,r)}, with pi selected arbitrary

from {p1,…,pn}

 Universal incompleteness errors

 W’ = W–{pi}U{add(pi,r)}, ∀pi ∈ {p1,...pn}

slide-27
SLIDE 27

14/11/2005 EU-INDIA 2005 27

Fixing Completeness errors - add

 The missing information can be accurately calculated using existing tools (XMLDiff)  The new information will be added to the Web site

  • nly if it does not cause new correctness errors.
slide-28
SLIDE 28

14/11/2005 EU-INDIA 2005 28

Fixing Completeness errors - delete

 W’ = {delete(p,ti) ,p∈W, t1⇀t2⇀…⇀r}

We delete all the terms in the partial rewriting sequences that allow us to derive the requirement r

member(name(X),surname(Y))→#hpage(name(X),#surname(#Y)) <E> hpage(name(X),surname(Y))→#pubs(pub(author(Y))) <E> member(name(“Demis”),surname(“Ballis”))

slide-29
SLIDE 29

14/11/2005 EU-INDIA 2005 29

Fixing Completeness errors - delete

 W’ = {delete(p,ti) ,p∈W, t1⇀t2⇀…⇀r}

We delete all the terms in the partial rewriting sequences that allow us to derive the requirement r

member(name(X),surname(Y))→#hpage(name(X),#surname(#Y)) <E> hpage(name(X),surname(Y))→#pubs(pub(author(Y))) <E> member(name(“Demis”),surname(“Ballis”)) →hpage(name(“Demis”),surname(“Ballis”))

slide-30
SLIDE 30

14/11/2005 EU-INDIA 2005 30

Fixing Completeness errors - delete

 W’ = {delete(p,ti) ,p∈W, t1⇀t2⇀…⇀r}

We delete all the terms in the partial rewriting sequences that allow us to derive the requirement r

member(name(X),surname(Y))→#hpage(name(X),#surname(#Y)) <E> hpage(name(X),surname(Y))→#pubs(pub(author(Y))) <E> member(name(“Demis”),surname(“Ballis”)) →hpage(name(“Demis”),surname(“Ballis”)) hpage(name(“Demis”),surname(“Ballis”))

slide-31
SLIDE 31

14/11/2005 EU-INDIA 2005 31

Fixing Completeness errors - delete

 W’ = {delete(p,ti) ,p∈W, t1⇀t2⇀…⇀r}

We delete all the terms in the partial rewriting sequences that allow us to derive the requirement r

member(name(X),surname(Y))→#hpage(name(X),#surname(#Y)) <E> hpage(name(X),surname(Y))→#pubs(pub(author(Y))) <E> member(name(“Demis”),surname(“Ballis”)) →hpage(name(“Demis”),surname(“Ballis”)) hpage(name(“Demis”),surname(“Ballis”)) → pubs(pub(author(“Ballis”)))

slide-32
SLIDE 32

14/11/2005 EU-INDIA 2005 32

Fixing Completeness errors - delete

 W’ = {delete(p,ti) ,p∈W, t1⇀t2⇀…⇀r}

We delete all the terms in the partial rewriting sequences that allow us to derive the requirement r

member(name(X),surname(Y))→#hpage(name(X),#surname(#Y)) <E> hpage(name(X),surname(Y))→#pubs(pub(author(Y))) <E> member(name(“Demis”),surname(“Ballis”)) →hpage(name(“Demis”),surname(“Ballis”)) hpage(name(“Demis”),surname(“Ballis”)) → pubs(pub(author(“Ballis”)

slide-33
SLIDE 33

14/11/2005 EU-INDIA 2005 33

Fixing Completeness errors - delete

 W’ = {delete(p,ti) ,p∈W, t1⇀t2⇀…⇀r}

We delete all the terms in the partial rewriting sequences that allow us to derive the requirement r

member(name(X),surname(Y))→#hpage(name(X),#surname(#Y)) <E> hpage(name(X),surname(Y))→#pubs(pub(author(Y))) <E> member(name(“Demis”),surname(“Ballis”)) →hpage(name(“Demis”),surname(“Ballis”)) hpage(name(“Demis”),surname(“Ballis”)) → pubs(pub(author( pubs(pub(author(“ “Ballis Ballis” ”) )

slide-34
SLIDE 34

14/11/2005 EU-INDIA 2005 34

Fixing Completeness errors - delete

 W’ = {delete(p,ti) ,p∈W, t1⇀t2⇀…⇀r}

We delete all the terms in the partial rewriting sequences that allow us to derive the requirement r

member(name(X),surname(Y))→#hpage(name(X),#surname(#Y)) <E> hpage(name(X),surname(Y))→#pubs(pub(author(Y))) <E> member(name(“Demis”),surname(“Ballis”)) →hpage(name( hpage(name(“ “Demis Demis” ”),surname( ),surname(“ “Ballis Ballis” ”)) )) hpage(name(“Demis”),surname(“Ballis”)) → pubs(pub(author( pubs(pub(author(“ “Ballis Ballis” ”) )

slide-35
SLIDE 35

14/11/2005 EU-INDIA 2005 35

Fixing Completeness errors - delete

 If the completeness rule that found the error has no variables, this method will probably delete too much information

e.g. hpage() → hpage(title(body()))<A>

slide-36
SLIDE 36

14/11/2005 EU-INDIA 2005 36

Conclusions

 On a previous work, we presented a rule-based verification methodology  Now, we have presented a novel methodology to repair a faulty Web site w.r.t a Web specification  After applying this method, we guarantee that the Web site is Correct and Complete

slide-37
SLIDE 37

14/11/2005 EU-INDIA 2005 37

Future Work

 Implementation of the repairing methodology  Implementation of an intuitive, graphical language for the definition of the Web site specifications (e.g. correctness, completeness properties)  Implementation of an adaptive, intelligent tutor for both tasks (defining properties and reparing the Web site)

slide-38
SLIDE 38

14/11/2005 EU-INDIA 2005 38

END