SlideShare a Scribd company logo
UNIFICATION / ANTI-UNIFICATION
OVERVIEW
¡ Basics
¡ Unification
¡ Anti-Unification
BASICS
¡ term: variable, constant symbol, function symbol
¡ equation: <term> = <term>
¡ ex. f(x, g(z)) = f(a, y)
¡ function symbol (arity)
¡ constant symbol arity 0 function symbol
¡ equation set E
¡ grounding substitution: variable ground term
¡ ground term: variable
¡ ex. {x <- f(g(a)), y <- b}
¡ solution: E equation grounding
substitution
¡ ex. E={f(x, g(z)) = f(a, y)} {x <- a, y <- g(b), z <- b} solution
UNIFICATION
UNIFICATION PROBLEM
¡ Input: equation E
¡ Output: E equivalent Solved form equation set
¡ equation
¡ Solved form: equation variable variable
equation
¡ equivalent: solution
g(x) = g(g(z))
f(a, z) = f(a, y)
x = g(y)
z = y
Problem E Solved Form
equivalent
UNIFICATION ALGORITHM [LASSEZ ET AL.]
Input: equation set E
E equation
s, t , x variable, f, g function symbol
1. f(t1, ..., tn) = f(s1, ..., sn)
→ t1=s1, ..., tn=sn
2. f(t1, ..., tn) = g(s1, ..., sm) f ≠g
→
3. x = x
→ equation
( )
UNIFICATION ALGORITHM [LASSEZ ET AL.]
4. t = x t variable
→ x = t
5. x = t t x equation x
i. x t
→
ii. x t
→ equation x t
EXAMPLE
g(x) = g(g(z))
f(a, z) = f(a, y)
x = g(z)
f(a, z) = f(a, y)
1
x = g(z)
a = a
z = y
1
1x = g(z)
z = y
5.ii
x = g(y)
z = y
1. f(t1, ..., tn) = f(s1, ..., sn)
→ t1=s1, ..., tn=sn
2. f(t1, ..., tn) = g(s1, ..., sm) f ≠g
→
3. x = x
→ equation
4. t = x t variable
→ x = t
f
equation
5. x = t t x equation
x
i. x t
→
ii. x t
→ equation x t
variable function symbol
1 variable 1
1, 3, 4 5
5.ii
ANTI-UNIFICATION
ANTI-UNIFICATION PROBLEM
¡ θ = { v1 -> t1, ..., vn -> tn }
¡ tθ t vi ti term
¡ t s instance ⇔ s t anti-instance ⇔ s ≧ t
⇔ inst(s) ⊇ inst(t) ⇔ θ t = sθ
¡ inst(t): t instance
¡ variable renaming
≧ complete lattice (inst(⊥)=∅ ⊥ )
¡ ex. f(x, y) f(y, z)
¡ lattice least upper bound anti-unification
complete lattice
poset subset
greatest lower bound least
upper bound
EXAMPLE
f(a, g(a, y), a)
f(x, g(x, y), a)
f(x, g(x, b), a)
f(b, g(b, b), a)
x=a y=b
x=b
f(x, g(x, x), a)
y=x
x=b
anti-unification
f(x, g(x, x), y)
y=a
f(x, g(x, y), x)
x=a
... ...
...
ANTI-UNIFICATION ALGORITHM
¡ φ: T × T -> V': bijection term variable
¡ T: term , V': variable
¡ λ: Anti-unification
¡ λ( f(s1, ..., sm), f(t1, ..., tm) ) = f( λ(s1, t1), ..., λ(sm, tm) )
¡ λ( s, t ) = φ( s, t )
EXAMPLE
λ( f(a, g(a, y), a), f(b, g(b, b), a) )
= f( λ(a, b), λ(g(a, y), g(b, b)), g(a, a) )
= f( x, g( λ(a, b), λ(y, b) ), a )
= f( x, g( x, y ), a )
φ(a, b) = x
φ(y, b) = y

More Related Content

What's hot

Εφαπτομένη Ευθεία ΕΠΑΛ
Εφαπτομένη Ευθεία ΕΠΑΛΕφαπτομένη Ευθεία ΕΠΑΛ
Εφαπτομένη Ευθεία ΕΠΑΛ
Dina Kiourtidou
 
Functions
FunctionsFunctions
Pre-Cal 40S Slides February 29, 2008
Pre-Cal 40S Slides February 29, 2008Pre-Cal 40S Slides February 29, 2008
Pre-Cal 40S Slides February 29, 2008
Darren Kuropatwa
 
Matlab code for secant method
Matlab code for secant methodMatlab code for secant method
Matlab code for secant method
Taimoor Muzaffar Gondal
 
Intro to derivatives
Intro to derivativesIntro to derivatives
Intro to derivativesTyler Murphy
 
1.6 all notes
1.6 all notes1.6 all notes
1.6 all notes
Lorie Blickhan
 
A1 11 functions
A1 11 functionsA1 11 functions
A1 11 functionsvhiggins1
 
7.2 abs value function
7.2 abs value function7.2 abs value function
7.2 abs value function
Michael Cellini
 
X2 T04 03 cuve sketching - addition, subtraction, multiplication and division
X2 T04 03 cuve sketching - addition, subtraction,  multiplication and divisionX2 T04 03 cuve sketching - addition, subtraction,  multiplication and division
X2 T04 03 cuve sketching - addition, subtraction, multiplication and divisionNigel Simmons
 
Maple Code for Steepest Descent
Maple Code for Steepest DescentMaple Code for Steepest Descent
Maple Code for Steepest DescentJeremy Lane
 
Turunan Fungsi Aljabar
Turunan Fungsi AljabarTurunan Fungsi Aljabar
Turunan Fungsi Aljabar
EnidaMartianaSari
 
Derivadas
DerivadasDerivadas
Derivadas
JavierZerpaPerez
 
Day 6 examples u3f13
Day 6 examples u3f13Day 6 examples u3f13
Day 6 examples u3f13jchartiersjsd
 
X2 T07 02 transformations (2011)
X2 T07 02 transformations (2011)X2 T07 02 transformations (2011)
X2 T07 02 transformations (2011)Nigel Simmons
 
Infrome 7 matlab
Infrome 7 matlabInfrome 7 matlab
Infrome 7 matlab
Washo Ramos
 
PYTHON. AM CALL Pricing Trees
PYTHON. AM CALL Pricing TreesPYTHON. AM CALL Pricing Trees
PYTHON. AM CALL Pricing TreesTianqi Huang, CFA
 
5.3 Basic functions. A handout.
5.3 Basic functions. A handout.5.3 Basic functions. A handout.
5.3 Basic functions. A handout.
Jan Plaza
 

What's hot (20)

Εφαπτομένη Ευθεία ΕΠΑΛ
Εφαπτομένη Ευθεία ΕΠΑΛΕφαπτομένη Ευθεία ΕΠΑΛ
Εφαπτομένη Ευθεία ΕΠΑΛ
 
Functions
FunctionsFunctions
Functions
 
Pre-Cal 40S Slides February 29, 2008
Pre-Cal 40S Slides February 29, 2008Pre-Cal 40S Slides February 29, 2008
Pre-Cal 40S Slides February 29, 2008
 
Matlab code for secant method
Matlab code for secant methodMatlab code for secant method
Matlab code for secant method
 
Intro to derivatives
Intro to derivativesIntro to derivatives
Intro to derivatives
 
1.6 all notes
1.6 all notes1.6 all notes
1.6 all notes
 
A1 11 functions
A1 11 functionsA1 11 functions
A1 11 functions
 
7.2 abs value function
7.2 abs value function7.2 abs value function
7.2 abs value function
 
X2 T04 03 cuve sketching - addition, subtraction, multiplication and division
X2 T04 03 cuve sketching - addition, subtraction,  multiplication and divisionX2 T04 03 cuve sketching - addition, subtraction,  multiplication and division
X2 T04 03 cuve sketching - addition, subtraction, multiplication and division
 
Function Math 8
Function Math 8Function Math 8
Function Math 8
 
Maple Code for Steepest Descent
Maple Code for Steepest DescentMaple Code for Steepest Descent
Maple Code for Steepest Descent
 
Turunan Fungsi Aljabar
Turunan Fungsi AljabarTurunan Fungsi Aljabar
Turunan Fungsi Aljabar
 
Functions
FunctionsFunctions
Functions
 
Integrals
IntegralsIntegrals
Integrals
 
Derivadas
DerivadasDerivadas
Derivadas
 
Day 6 examples u3f13
Day 6 examples u3f13Day 6 examples u3f13
Day 6 examples u3f13
 
X2 T07 02 transformations (2011)
X2 T07 02 transformations (2011)X2 T07 02 transformations (2011)
X2 T07 02 transformations (2011)
 
Infrome 7 matlab
Infrome 7 matlabInfrome 7 matlab
Infrome 7 matlab
 
PYTHON. AM CALL Pricing Trees
PYTHON. AM CALL Pricing TreesPYTHON. AM CALL Pricing Trees
PYTHON. AM CALL Pricing Trees
 
5.3 Basic functions. A handout.
5.3 Basic functions. A handout.5.3 Basic functions. A handout.
5.3 Basic functions. A handout.
 

Similar to Unification and Anti-Unification Algorithm

2 integration and the substitution methods x
2 integration and the substitution methods x2 integration and the substitution methods x
2 integration and the substitution methods x
math266
 
Functions
FunctionsFunctions
Algebra 2 Section 5-1
Algebra 2 Section 5-1Algebra 2 Section 5-1
Algebra 2 Section 5-1
Jimbo Lamb
 
Functions for Grade 10
Functions for Grade 10Functions for Grade 10
Functions for Grade 10Boipelo Radebe
 
lesson10-thechainrule034slides-091006133832-phpapp01.pptx
lesson10-thechainrule034slides-091006133832-phpapp01.pptxlesson10-thechainrule034slides-091006133832-phpapp01.pptx
lesson10-thechainrule034slides-091006133832-phpapp01.pptx
JohnReyManzano2
 
3.5 Transformation of Functions
3.5 Transformation of Functions3.5 Transformation of Functions
3.5 Transformation of Functions
smiller5
 
THE CHORD GAP DIVERGENCE AND A GENERALIZATION OF THE BHATTACHARYYA DISTANCE
THE CHORD GAP DIVERGENCE AND A GENERALIZATION OF THE BHATTACHARYYA DISTANCETHE CHORD GAP DIVERGENCE AND A GENERALIZATION OF THE BHATTACHARYYA DISTANCE
THE CHORD GAP DIVERGENCE AND A GENERALIZATION OF THE BHATTACHARYYA DISTANCE
Frank Nielsen
 
Basic Calculus.docx
Basic Calculus.docxBasic Calculus.docx
Basic Calculus.docx
jericranoco
 
Evaluating definite integrals
Evaluating definite integralsEvaluating definite integrals
Evaluating definite integrals
منتدى الرياضيات المتقدمة
 
Compiler Construction | Lecture 9 | Constraint Resolution
Compiler Construction | Lecture 9 | Constraint ResolutionCompiler Construction | Lecture 9 | Constraint Resolution
Compiler Construction | Lecture 9 | Constraint Resolution
Eelco Visser
 
03 convexfunctions
03 convexfunctions03 convexfunctions
03 convexfunctions
Sufyan Sahoo
 
Calculusseveralvariables.ppt
Calculusseveralvariables.pptCalculusseveralvariables.ppt
Calculusseveralvariables.ppt
ssuser055963
 
2 evaluating functions
2 evaluating functions2 evaluating functions
2 evaluating functions
joellerios48
 
Lesson 4- Math 10 - W4Q1_General Form of a Polynomial Function.pptx
Lesson 4- Math 10 - W4Q1_General Form of a Polynomial Function.pptxLesson 4- Math 10 - W4Q1_General Form of a Polynomial Function.pptx
Lesson 4- Math 10 - W4Q1_General Form of a Polynomial Function.pptx
ErlenaMirador1
 
Introduccio al calculo vectorial
Introduccio  al calculo vectorialIntroduccio  al calculo vectorial
Introduccio al calculo vectorial
EDESMITCRUZ1
 
functions.pdf
functions.pdffunctions.pdf
functions.pdf
ssuser767529
 
Indefinite Integral
Indefinite IntegralIndefinite Integral
Indefinite IntegralJelaiAujero
 
Lesson 1: Functions
Lesson 1: FunctionsLesson 1: Functions
Lesson 1: Functions
Matthew Leingang
 
Murphy: Machine learning A probabilistic perspective: Ch.9
Murphy: Machine learning A probabilistic perspective: Ch.9Murphy: Machine learning A probabilistic perspective: Ch.9
Murphy: Machine learning A probabilistic perspective: Ch.9
Daisuke Yoneoka
 
Difrentiation
DifrentiationDifrentiation
Difrentiationlecturer
 

Similar to Unification and Anti-Unification Algorithm (20)

2 integration and the substitution methods x
2 integration and the substitution methods x2 integration and the substitution methods x
2 integration and the substitution methods x
 
Functions
FunctionsFunctions
Functions
 
Algebra 2 Section 5-1
Algebra 2 Section 5-1Algebra 2 Section 5-1
Algebra 2 Section 5-1
 
Functions for Grade 10
Functions for Grade 10Functions for Grade 10
Functions for Grade 10
 
lesson10-thechainrule034slides-091006133832-phpapp01.pptx
lesson10-thechainrule034slides-091006133832-phpapp01.pptxlesson10-thechainrule034slides-091006133832-phpapp01.pptx
lesson10-thechainrule034slides-091006133832-phpapp01.pptx
 
3.5 Transformation of Functions
3.5 Transformation of Functions3.5 Transformation of Functions
3.5 Transformation of Functions
 
THE CHORD GAP DIVERGENCE AND A GENERALIZATION OF THE BHATTACHARYYA DISTANCE
THE CHORD GAP DIVERGENCE AND A GENERALIZATION OF THE BHATTACHARYYA DISTANCETHE CHORD GAP DIVERGENCE AND A GENERALIZATION OF THE BHATTACHARYYA DISTANCE
THE CHORD GAP DIVERGENCE AND A GENERALIZATION OF THE BHATTACHARYYA DISTANCE
 
Basic Calculus.docx
Basic Calculus.docxBasic Calculus.docx
Basic Calculus.docx
 
Evaluating definite integrals
Evaluating definite integralsEvaluating definite integrals
Evaluating definite integrals
 
Compiler Construction | Lecture 9 | Constraint Resolution
Compiler Construction | Lecture 9 | Constraint ResolutionCompiler Construction | Lecture 9 | Constraint Resolution
Compiler Construction | Lecture 9 | Constraint Resolution
 
03 convexfunctions
03 convexfunctions03 convexfunctions
03 convexfunctions
 
Calculusseveralvariables.ppt
Calculusseveralvariables.pptCalculusseveralvariables.ppt
Calculusseveralvariables.ppt
 
2 evaluating functions
2 evaluating functions2 evaluating functions
2 evaluating functions
 
Lesson 4- Math 10 - W4Q1_General Form of a Polynomial Function.pptx
Lesson 4- Math 10 - W4Q1_General Form of a Polynomial Function.pptxLesson 4- Math 10 - W4Q1_General Form of a Polynomial Function.pptx
Lesson 4- Math 10 - W4Q1_General Form of a Polynomial Function.pptx
 
Introduccio al calculo vectorial
Introduccio  al calculo vectorialIntroduccio  al calculo vectorial
Introduccio al calculo vectorial
 
functions.pdf
functions.pdffunctions.pdf
functions.pdf
 
Indefinite Integral
Indefinite IntegralIndefinite Integral
Indefinite Integral
 
Lesson 1: Functions
Lesson 1: FunctionsLesson 1: Functions
Lesson 1: Functions
 
Murphy: Machine learning A probabilistic perspective: Ch.9
Murphy: Machine learning A probabilistic perspective: Ch.9Murphy: Machine learning A probabilistic perspective: Ch.9
Murphy: Machine learning A probabilistic perspective: Ch.9
 
Difrentiation
DifrentiationDifrentiation
Difrentiation
 

Recently uploaded

Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...
Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...
Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...
NathanBaughman3
 
Large scale production of streptomycin.pptx
Large scale production of streptomycin.pptxLarge scale production of streptomycin.pptx
Large scale production of streptomycin.pptx
Cherry
 
SCHIZOPHRENIA Disorder/ Brain Disorder.pdf
SCHIZOPHRENIA Disorder/ Brain Disorder.pdfSCHIZOPHRENIA Disorder/ Brain Disorder.pdf
SCHIZOPHRENIA Disorder/ Brain Disorder.pdf
SELF-EXPLANATORY
 
Mammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also FunctionsMammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also Functions
YOGESH DOGRA
 
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
Scintica Instrumentation
 
insect taxonomy importance systematics and classification
insect taxonomy importance systematics and classificationinsect taxonomy importance systematics and classification
insect taxonomy importance systematics and classification
anitaento25
 
Cancer cell metabolism: special Reference to Lactate Pathway
Cancer cell metabolism: special Reference to Lactate PathwayCancer cell metabolism: special Reference to Lactate Pathway
Cancer cell metabolism: special Reference to Lactate Pathway
AADYARAJPANDEY1
 
platelets- lifespan -Clot retraction-disorders.pptx
platelets- lifespan -Clot retraction-disorders.pptxplatelets- lifespan -Clot retraction-disorders.pptx
platelets- lifespan -Clot retraction-disorders.pptx
muralinath2
 
Hemoglobin metabolism_pathophysiology.pptx
Hemoglobin metabolism_pathophysiology.pptxHemoglobin metabolism_pathophysiology.pptx
Hemoglobin metabolism_pathophysiology.pptx
muralinath2
 
Penicillin...........................pptx
Penicillin...........................pptxPenicillin...........................pptx
Penicillin...........................pptx
Cherry
 
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATIONPRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
ChetanK57
 
general properties of oerganologametal.ppt
general properties of oerganologametal.pptgeneral properties of oerganologametal.ppt
general properties of oerganologametal.ppt
IqrimaNabilatulhusni
 
The ASGCT Annual Meeting was packed with exciting progress in the field advan...
The ASGCT Annual Meeting was packed with exciting progress in the field advan...The ASGCT Annual Meeting was packed with exciting progress in the field advan...
The ASGCT Annual Meeting was packed with exciting progress in the field advan...
Health Advances
 
Lateral Ventricles.pdf very easy good diagrams comprehensive
Lateral Ventricles.pdf very easy good diagrams comprehensiveLateral Ventricles.pdf very easy good diagrams comprehensive
Lateral Ventricles.pdf very easy good diagrams comprehensive
silvermistyshot
 
EY - Supply Chain Services 2018_template.pptx
EY - Supply Chain Services 2018_template.pptxEY - Supply Chain Services 2018_template.pptx
EY - Supply Chain Services 2018_template.pptx
AlguinaldoKong
 
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
muralinath2
 
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptxBody fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
muralinath2
 
THE IMPORTANCE OF MARTIAN ATMOSPHERE SAMPLE RETURN.
THE IMPORTANCE OF MARTIAN ATMOSPHERE SAMPLE RETURN.THE IMPORTANCE OF MARTIAN ATMOSPHERE SAMPLE RETURN.
THE IMPORTANCE OF MARTIAN ATMOSPHERE SAMPLE RETURN.
Sérgio Sacani
 
Structural Classification Of Protein (SCOP)
Structural Classification Of Protein  (SCOP)Structural Classification Of Protein  (SCOP)
Structural Classification Of Protein (SCOP)
aishnasrivastava
 
Structures and textures of metamorphic rocks
Structures and textures of metamorphic rocksStructures and textures of metamorphic rocks
Structures and textures of metamorphic rocks
kumarmathi863
 

Recently uploaded (20)

Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...
Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...
Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...
 
Large scale production of streptomycin.pptx
Large scale production of streptomycin.pptxLarge scale production of streptomycin.pptx
Large scale production of streptomycin.pptx
 
SCHIZOPHRENIA Disorder/ Brain Disorder.pdf
SCHIZOPHRENIA Disorder/ Brain Disorder.pdfSCHIZOPHRENIA Disorder/ Brain Disorder.pdf
SCHIZOPHRENIA Disorder/ Brain Disorder.pdf
 
Mammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also FunctionsMammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also Functions
 
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
 
insect taxonomy importance systematics and classification
insect taxonomy importance systematics and classificationinsect taxonomy importance systematics and classification
insect taxonomy importance systematics and classification
 
Cancer cell metabolism: special Reference to Lactate Pathway
Cancer cell metabolism: special Reference to Lactate PathwayCancer cell metabolism: special Reference to Lactate Pathway
Cancer cell metabolism: special Reference to Lactate Pathway
 
platelets- lifespan -Clot retraction-disorders.pptx
platelets- lifespan -Clot retraction-disorders.pptxplatelets- lifespan -Clot retraction-disorders.pptx
platelets- lifespan -Clot retraction-disorders.pptx
 
Hemoglobin metabolism_pathophysiology.pptx
Hemoglobin metabolism_pathophysiology.pptxHemoglobin metabolism_pathophysiology.pptx
Hemoglobin metabolism_pathophysiology.pptx
 
Penicillin...........................pptx
Penicillin...........................pptxPenicillin...........................pptx
Penicillin...........................pptx
 
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATIONPRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
 
general properties of oerganologametal.ppt
general properties of oerganologametal.pptgeneral properties of oerganologametal.ppt
general properties of oerganologametal.ppt
 
The ASGCT Annual Meeting was packed with exciting progress in the field advan...
The ASGCT Annual Meeting was packed with exciting progress in the field advan...The ASGCT Annual Meeting was packed with exciting progress in the field advan...
The ASGCT Annual Meeting was packed with exciting progress in the field advan...
 
Lateral Ventricles.pdf very easy good diagrams comprehensive
Lateral Ventricles.pdf very easy good diagrams comprehensiveLateral Ventricles.pdf very easy good diagrams comprehensive
Lateral Ventricles.pdf very easy good diagrams comprehensive
 
EY - Supply Chain Services 2018_template.pptx
EY - Supply Chain Services 2018_template.pptxEY - Supply Chain Services 2018_template.pptx
EY - Supply Chain Services 2018_template.pptx
 
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
 
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptxBody fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
Body fluids_tonicity_dehydration_hypovolemia_hypervolemia.pptx
 
THE IMPORTANCE OF MARTIAN ATMOSPHERE SAMPLE RETURN.
THE IMPORTANCE OF MARTIAN ATMOSPHERE SAMPLE RETURN.THE IMPORTANCE OF MARTIAN ATMOSPHERE SAMPLE RETURN.
THE IMPORTANCE OF MARTIAN ATMOSPHERE SAMPLE RETURN.
 
Structural Classification Of Protein (SCOP)
Structural Classification Of Protein  (SCOP)Structural Classification Of Protein  (SCOP)
Structural Classification Of Protein (SCOP)
 
Structures and textures of metamorphic rocks
Structures and textures of metamorphic rocksStructures and textures of metamorphic rocks
Structures and textures of metamorphic rocks
 

Unification and Anti-Unification Algorithm

  • 3. BASICS ¡ term: variable, constant symbol, function symbol ¡ equation: <term> = <term> ¡ ex. f(x, g(z)) = f(a, y) ¡ function symbol (arity) ¡ constant symbol arity 0 function symbol ¡ equation set E ¡ grounding substitution: variable ground term ¡ ground term: variable ¡ ex. {x <- f(g(a)), y <- b} ¡ solution: E equation grounding substitution ¡ ex. E={f(x, g(z)) = f(a, y)} {x <- a, y <- g(b), z <- b} solution
  • 5. UNIFICATION PROBLEM ¡ Input: equation E ¡ Output: E equivalent Solved form equation set ¡ equation ¡ Solved form: equation variable variable equation ¡ equivalent: solution g(x) = g(g(z)) f(a, z) = f(a, y) x = g(y) z = y Problem E Solved Form equivalent
  • 6. UNIFICATION ALGORITHM [LASSEZ ET AL.] Input: equation set E E equation s, t , x variable, f, g function symbol 1. f(t1, ..., tn) = f(s1, ..., sn) → t1=s1, ..., tn=sn 2. f(t1, ..., tn) = g(s1, ..., sm) f ≠g → 3. x = x → equation ( )
  • 7. UNIFICATION ALGORITHM [LASSEZ ET AL.] 4. t = x t variable → x = t 5. x = t t x equation x i. x t → ii. x t → equation x t
  • 8. EXAMPLE g(x) = g(g(z)) f(a, z) = f(a, y) x = g(z) f(a, z) = f(a, y) 1 x = g(z) a = a z = y 1 1x = g(z) z = y 5.ii x = g(y) z = y
  • 9. 1. f(t1, ..., tn) = f(s1, ..., sn) → t1=s1, ..., tn=sn 2. f(t1, ..., tn) = g(s1, ..., sm) f ≠g → 3. x = x → equation 4. t = x t variable → x = t f equation
  • 10. 5. x = t t x equation x i. x t → ii. x t → equation x t variable function symbol 1 variable 1
  • 11. 1, 3, 4 5 5.ii
  • 13. ANTI-UNIFICATION PROBLEM ¡ θ = { v1 -> t1, ..., vn -> tn } ¡ tθ t vi ti term ¡ t s instance ⇔ s t anti-instance ⇔ s ≧ t ⇔ inst(s) ⊇ inst(t) ⇔ θ t = sθ ¡ inst(t): t instance ¡ variable renaming ≧ complete lattice (inst(⊥)=∅ ⊥ ) ¡ ex. f(x, y) f(y, z) ¡ lattice least upper bound anti-unification complete lattice poset subset greatest lower bound least upper bound
  • 14. EXAMPLE f(a, g(a, y), a) f(x, g(x, y), a) f(x, g(x, b), a) f(b, g(b, b), a) x=a y=b x=b f(x, g(x, x), a) y=x x=b anti-unification f(x, g(x, x), y) y=a f(x, g(x, y), x) x=a ... ... ...
  • 15. ANTI-UNIFICATION ALGORITHM ¡ φ: T × T -> V': bijection term variable ¡ T: term , V': variable ¡ λ: Anti-unification ¡ λ( f(s1, ..., sm), f(t1, ..., tm) ) = f( λ(s1, t1), ..., λ(sm, tm) ) ¡ λ( s, t ) = φ( s, t )
  • 16. EXAMPLE λ( f(a, g(a, y), a), f(b, g(b, b), a) ) = f( λ(a, b), λ(g(a, y), g(b, b)), g(a, a) ) = f( x, g( λ(a, b), λ(y, b) ), a ) = f( x, g( x, y ), a ) φ(a, b) = x φ(y, b) = y