SlideShare uma empresa Scribd logo
1 de 21
QwalKeko,
a History Querying Tool
         Reinout Stevens
       resteven@vub.ac.be
        @ReinoutStevens
Context




  Program
Comprehension

                2
Was this method pulled up?
Who introduced
  this class?
                                  Who has made changes to
                                        my classes?

         History Questions
                                   How often is this method
Why were these changes                    changed?
     introduced?         Template-based Reconstruction of Complex Refactorings
                         Kyle Prete, Napol Rachatasumrit, Nikita Sudan, Miryung Kim
                         International Conference on Software Maintenance (ICSM), p.1--10, 2010

                         Using Information Fragments to Answer the Questions Developers Ask
                         Thomas Fritz and Gail C. Murphy
                         International Conference on Software Engineering (ICSE), p.175--184, 2010
                                3
Was this method pulled up?
Who introduced
  this class?
                                  Who has made changes to
                                        my classes?

         History Questions
                                   How often is this method
Why were these changes                    changed?
     introduced?         Template-based Reconstruction of Complex Refactorings
                         Kyle Prete, Napol Rachatasumrit, Nikita Sudan, Miryung Kim
                         International Conference on Software Maintenance (ICSM), p.1--10, 2010

                         Using Information Fragments to Answer the Questions Developers Ask
                         Thomas Fritz and Gail C. Murphy
                         International Conference on Software Engineering (ICSE), p.175--184, 2010
                                3
Pulled up Method
1   pull_up_method(fShortName, tChildFullName, tParentFullName) :-
2     move_method(fShortName, tChildFullName, tParentFullName) ^
3     before_subtype(tParentFullName, tChildFullName)




                               Template-based Reconstruction of Complex Refactorings
                               Kyle Prete, Napol Rachatasumrit, Nikita Sudan, Miryung Kim
                               International Conference on Software Maintenance (ICSM), p.1--10, 2010

                                      4
Pulled up Method
1   pull_up_method(fShortName, tChildFullName, tParentFullName) :-
2     move_method(fShortName, tChildFullName, tParentFullName) ^
3     before_subtype(tParentFullName, tChildFullName)




1   move_method(mShortName, t1Fullname, t2FullName) :-
2     deleted_method(mFullName, mShortName, t1FullName) ^
3     added_method(newmName, mShortName, t2FullName) ^
4     similarbody(newmName, newmBody, mFullName, mBody)




                               Template-based Reconstruction of Complex Refactorings
                               Kyle Prete, Napol Rachatasumrit, Nikita Sudan, Miryung Kim
                               International Conference on Software Maintenance (ICSM), p.1--10, 2010

                                      4
Version Control Systems
                          Version   Version
                            3a        4a




                                              Version
  Version 1   Version 2                          5




                          Version   Version
                            3b        4b




                          5
History Query Tool
        Pr                Graph Query
          og                Language
            ra
         La m




                                                     od ry
           ng Q           Move through the




                                                       sto
                                                       el
             ua ue        version graph




                                                  Hi
               ge ry




                                                    M
                                             Source code of each version
Specify characteristics                      Commit information
in a single version                          Entity tracking
                                             ...




                                 6
QwalKeko
Pr             Graph Query
  og             Language
    ra
 La m




                              od ry
   ng Q           Qwal




                                sto
                                el
     ua ue




                             Hi
       ge ry




                             M
 Ekeko                        +




                    7
Applicative LMP
... specify code characteristics through Ekeko relations,
leave search to core.logic
                            collection of all substitutions for ?s and ?e


       (run* [?s ?e]
           (ast :ReturnStatement ?s)
           (has :expression ?s ?e)
           (ast :NullLiteral ?e))


                             such that the following Ekeko relations hold:
                                  ast/2 holds for :ReturnStatement, ?s        ?e is the value of the
                                                                                     property
                                  has/3 holds for :expression, ?s, and ?e
                                                                              named :expression of
([?s1 ?e2] ... [?sn ?en])         ast/2 holds for :NullLiteral, ?e                 ASTNode ?s


                ([#<ReturnStatement return null;
                  #<NullLiteral null>]
                 ...
                                                                        actual search performed by
                 [#<ReturnStatement return null;                        core.logic
                  #<NullLiteral null>])     8
Qwal
               foo       bar      baz




1   (run* [?end]
2     (qwal graph :foo ?end
3       []
4       (qcurrent [curr] (has-info curr :foo))




                         9
Qwal
               foo       bar      baz




1   (run* [?end]
2     (qwal graph :foo ?end
3       []
4       (qcurrent [curr] (has-info curr :foo))
5       q=>
6       (qcurrent [curr] (has-info curr :bar))




                         9
Qwal
               foo          bar      baz




1   (run* [?end]
2     (qwal graph    :foo ?end
3       []
4       (qcurrent    [curr] (has-info curr :foo))
5       q=>
6       (qcurrent    [curr] (has-info curr :bar))
7       q=>
8       (qcurrent    [curr] (has-info curr :baz)))




                            9
Introduced Subclasses
  1   (qwal graph start ?end [?parent ?child]
  2     (qin-current
  3       (ast :TypeDeclaration ?parent))
  4     (q=>+) ;;skip >= 1 versions
  5     (qin-current
  6       (subclass ?parent ?child)
  7       (introduced ?child)))




                      10
Same Predicate
(defn same [?entity ?other-entity]
  ...)

       Ground in a previous version

                   Ground in current version



                   11
Same Predicate
(defn same [?entity ?other-entity]
  ...)


       1   (defn introduced [?entity]
       2     (fresh [?same]
       3       q<=
       4       (not (same ?entity ?same)))




                         12
Recall...
1   pull_up_method(fShortName, tChildFullName, tParentFullName) :-
2     move_method(fShortName, tChildFullName, tParentFullName) ^
3     before_subtype(tParentFullName, tChildFullName)




1   move_method(mShortName, t1Fullname, t2FullName) :-
2     deleted_method(mFullName, mShortName, t1FullName) ^
3     added_method(newmName, mShortName, t2FullName) ^
4     similarbody(newmName, newmBody, mFullName, mBody)




                                   13
Pulled up Method
1       (defn pulled-up [?method ?pulled]
2         (fresh [?m-class ?p-class]
3           (method-moved ?method ?pulled)
4           (declaring-class ?method ?m-class)
5           (declaring-class ?pulled ?p-class)
6           (superclass ?m-class ?p-class)))


    1   (defn method-moved [?moved ?to]
    2     (removed ?moved) ;;implemented using same
    3     (ast :MethodDeclaration ?to)
    4     (== ?moved ?to) ;;unify when same signature
    5     (has-similar-body ?moved ?to)))




                           14
Pulled up Method

1 (qwal graph root ?end [?method ?pulled]
2   (qin-current
3     (ast :MethodDeclaration ?method))
4   q=> ;;go to next version
5   (qin-current
6     (pulled-up ?method ?pulled)))




                     15
Generalized Rule

1 (qwal graph root ?end [?method ?pulled]
2   (qin-current
3     (ast :MethodDeclaration ?method))
4   (q=>+) ;;skip >=1 versions
5   (qin-current
6     (pulled-up ?method ?pulled)))




                     16
Questions

               Reinout Stevens
             resteven@vub.ac.be
               @ReinoutStevens
http://github.com/ReinoutStevens/damp.qwal
  http://github.com/cderoove/damp.ekeko




                    17

Mais conteúdo relacionado

Mais procurados

Pf congres20110917 data-structures
Pf congres20110917 data-structuresPf congres20110917 data-structures
Pf congres20110917 data-structures
norm2782
 
Cp0675 03 may-2012-rm04
Cp0675 03 may-2012-rm04Cp0675 03 may-2012-rm04
Cp0675 03 may-2012-rm04
Parth Mudgal
 

Mais procurados (20)

Refactoring Edit History of Source Code
Refactoring Edit History of Source CodeRefactoring Edit History of Source Code
Refactoring Edit History of Source Code
 
Introduction to julia
Introduction to juliaIntroduction to julia
Introduction to julia
 
Metaprogramming in julia
Metaprogramming in juliaMetaprogramming in julia
Metaprogramming in julia
 
Commit ускоривший python 2.7.11 на 30% и новое в python 3.5
Commit ускоривший python 2.7.11 на 30% и новое в python 3.5Commit ускоривший python 2.7.11 на 30% и новое в python 3.5
Commit ускоривший python 2.7.11 на 30% и новое в python 3.5
 
OOP and FP
OOP and FPOOP and FP
OOP and FP
 
Automatic Task-based Code Generation for High Performance DSEL
Automatic Task-based Code Generation for High Performance DSELAutomatic Task-based Code Generation for High Performance DSEL
Automatic Task-based Code Generation for High Performance DSEL
 
Attention mechanisms with tensorflow
Attention mechanisms with tensorflowAttention mechanisms with tensorflow
Attention mechanisms with tensorflow
 
Cbse marking scheme 2006 2011
Cbse marking scheme 2006  2011Cbse marking scheme 2006  2011
Cbse marking scheme 2006 2011
 
901230 lecture5&6
901230 lecture5&6901230 lecture5&6
901230 lecture5&6
 
Chapter03
Chapter03Chapter03
Chapter03
 
Pf congres20110917 data-structures
Pf congres20110917 data-structuresPf congres20110917 data-structures
Pf congres20110917 data-structures
 
Structure and interpretation of computer programs modularity, objects, and ...
Structure and interpretation of computer programs   modularity, objects, and ...Structure and interpretation of computer programs   modularity, objects, and ...
Structure and interpretation of computer programs modularity, objects, and ...
 
Meta Object Protocols
Meta Object ProtocolsMeta Object Protocols
Meta Object Protocols
 
C++ questions And Answer
C++ questions And AnswerC++ questions And Answer
C++ questions And Answer
 
Boost.Dispatch
Boost.DispatchBoost.Dispatch
Boost.Dispatch
 
Logic programming a ruby perspective
Logic programming a ruby perspectiveLogic programming a ruby perspective
Logic programming a ruby perspective
 
Clojure: The Art of Abstraction
Clojure: The Art of AbstractionClojure: The Art of Abstraction
Clojure: The Art of Abstraction
 
Cp0675 03 may-2012-rm04
Cp0675 03 may-2012-rm04Cp0675 03 may-2012-rm04
Cp0675 03 may-2012-rm04
 
The Ring programming language version 1.4 book - Part 3 of 30
The Ring programming language version 1.4 book - Part 3 of 30The Ring programming language version 1.4 book - Part 3 of 30
The Ring programming language version 1.4 book - Part 3 of 30
 
Chapter 5 - THREADING & REGULAR exp - MAULIK BORSANIYA
Chapter 5 - THREADING & REGULAR exp - MAULIK BORSANIYAChapter 5 - THREADING & REGULAR exp - MAULIK BORSANIYA
Chapter 5 - THREADING & REGULAR exp - MAULIK BORSANIYA
 

Destaque

QwalKeko, a History Querying Tool
QwalKeko, a History Querying ToolQwalKeko, a History Querying Tool
QwalKeko, a History Querying Tool
stevensreinout
 
Reasoning over the evolution of source code using QRPE
Reasoning over the evolution of source code using QRPEReasoning over the evolution of source code using QRPE
Reasoning over the evolution of source code using QRPE
stevensreinout
 

Destaque (8)

QwalKeko, a History Querying Tool
QwalKeko, a History Querying ToolQwalKeko, a History Querying Tool
QwalKeko, a History Querying Tool
 
Query History of a Software Project
Query History of a Software ProjectQuery History of a Software Project
Query History of a Software Project
 
QwalKeko, a History Querying Tool
QwalKeko, a History Querying ToolQwalKeko, a History Querying Tool
QwalKeko, a History Querying Tool
 
Reasoning over the evolution of source code using QRPE
Reasoning over the evolution of source code using QRPEReasoning over the evolution of source code using QRPE
Reasoning over the evolution of source code using QRPE
 
Querying the History of Software Projects using QwalKeko
Querying the History of Software Projects using QwalKekoQuerying the History of Software Projects using QwalKeko
Querying the History of Software Projects using QwalKeko
 
SEO: Getting Personal
SEO: Getting PersonalSEO: Getting Personal
SEO: Getting Personal
 
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika AldabaLightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
 
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job? Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
 

Semelhante a QwalKeko, a History Querying Tool

Mksong proposal-slide
Mksong proposal-slideMksong proposal-slide
Mksong proposal-slide
mksong
 
If You Think You Can Stay Away from Functional Programming, You Are Wrong
If You Think You Can Stay Away from Functional Programming, You Are WrongIf You Think You Can Stay Away from Functional Programming, You Are Wrong
If You Think You Can Stay Away from Functional Programming, You Are Wrong
Mario Fusco
 
Python for Chemistry
Python for ChemistryPython for Chemistry
Python for Chemistry
guest5929fa7
 
Python for Chemistry
Python for ChemistryPython for Chemistry
Python for Chemistry
baoilleach
 
Threading Is Not A Model
Threading Is Not A ModelThreading Is Not A Model
Threading Is Not A Model
guest2a5acfb
 
Hands-on Learning with KubeFlow + Keras/TensorFlow 2.0 + TF Extended (TFX) + ...
Hands-on Learning with KubeFlow + Keras/TensorFlow 2.0 + TF Extended (TFX) + ...Hands-on Learning with KubeFlow + Keras/TensorFlow 2.0 + TF Extended (TFX) + ...
Hands-on Learning with KubeFlow + Keras/TensorFlow 2.0 + TF Extended (TFX) + ...
Chris Fregly
 
r,rstats,r language,r packages
r,rstats,r language,r packagesr,rstats,r language,r packages
r,rstats,r language,r packages
Ajay Ohri
 
NOSQL and Cassandra
NOSQL and CassandraNOSQL and Cassandra
NOSQL and Cassandra
rantav
 

Semelhante a QwalKeko, a History Querying Tool (20)

Extracting Executable Transformations from Distilled Code Changes
Extracting Executable Transformations from Distilled Code ChangesExtracting Executable Transformations from Distilled Code Changes
Extracting Executable Transformations from Distilled Code Changes
 
Profiling Ruby
Profiling RubyProfiling Ruby
Profiling Ruby
 
Mksong proposal-slide
Mksong proposal-slideMksong proposal-slide
Mksong proposal-slide
 
JavaScript OOPs
JavaScript OOPsJavaScript OOPs
JavaScript OOPs
 
If You Think You Can Stay Away from Functional Programming, You Are Wrong
If You Think You Can Stay Away from Functional Programming, You Are WrongIf You Think You Can Stay Away from Functional Programming, You Are Wrong
If You Think You Can Stay Away from Functional Programming, You Are Wrong
 
Python for Chemistry
Python for ChemistryPython for Chemistry
Python for Chemistry
 
Python for Chemistry
Python for ChemistryPython for Chemistry
Python for Chemistry
 
Threading Is Not A Model
Threading Is Not A ModelThreading Is Not A Model
Threading Is Not A Model
 
Pune Clojure Course Outline
Pune Clojure Course OutlinePune Clojure Course Outline
Pune Clojure Course Outline
 
Python 3.6 Features 20161207
Python 3.6 Features 20161207Python 3.6 Features 20161207
Python 3.6 Features 20161207
 
OracleCode One 2018: Java 5, 6, 7, 8, 9, 10, 11: What Did You Miss?
OracleCode One 2018: Java 5, 6, 7, 8, 9, 10, 11: What Did You Miss?OracleCode One 2018: Java 5, 6, 7, 8, 9, 10, 11: What Did You Miss?
OracleCode One 2018: Java 5, 6, 7, 8, 9, 10, 11: What Did You Miss?
 
Lisp Macros in 20 Minutes (Featuring Clojure)
Lisp Macros in 20 Minutes (Featuring Clojure)Lisp Macros in 20 Minutes (Featuring Clojure)
Lisp Macros in 20 Minutes (Featuring Clojure)
 
Hands-on Learning with KubeFlow + Keras/TensorFlow 2.0 + TF Extended (TFX) + ...
Hands-on Learning with KubeFlow + Keras/TensorFlow 2.0 + TF Extended (TFX) + ...Hands-on Learning with KubeFlow + Keras/TensorFlow 2.0 + TF Extended (TFX) + ...
Hands-on Learning with KubeFlow + Keras/TensorFlow 2.0 + TF Extended (TFX) + ...
 
Introduction to Julia
Introduction to JuliaIntroduction to Julia
Introduction to Julia
 
String Comparison Surprises: Did Postgres lose my data?
String Comparison Surprises: Did Postgres lose my data?String Comparison Surprises: Did Postgres lose my data?
String Comparison Surprises: Did Postgres lose my data?
 
r,rstats,r language,r packages
r,rstats,r language,r packagesr,rstats,r language,r packages
r,rstats,r language,r packages
 
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
 
MODEL OF A PROGRAM AS MULTITHREADED STOCHASTIC AUTOMATON AND ITS EQUIVALENT T...
MODEL OF A PROGRAM AS MULTITHREADED STOCHASTIC AUTOMATON AND ITS EQUIVALENT T...MODEL OF A PROGRAM AS MULTITHREADED STOCHASTIC AUTOMATON AND ITS EQUIVALENT T...
MODEL OF A PROGRAM AS MULTITHREADED STOCHASTIC AUTOMATON AND ITS EQUIVALENT T...
 
Continuation Passing Style and Macros in Clojure - Jan 2012
Continuation Passing Style and Macros in Clojure - Jan 2012Continuation Passing Style and Macros in Clojure - Jan 2012
Continuation Passing Style and Macros in Clojure - Jan 2012
 
NOSQL and Cassandra
NOSQL and CassandraNOSQL and Cassandra
NOSQL and Cassandra
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

QwalKeko, a History Querying Tool

  • 1. QwalKeko, a History Querying Tool Reinout Stevens resteven@vub.ac.be @ReinoutStevens
  • 3. Was this method pulled up? Who introduced this class? Who has made changes to my classes? History Questions How often is this method Why were these changes changed? introduced? Template-based Reconstruction of Complex Refactorings Kyle Prete, Napol Rachatasumrit, Nikita Sudan, Miryung Kim International Conference on Software Maintenance (ICSM), p.1--10, 2010 Using Information Fragments to Answer the Questions Developers Ask Thomas Fritz and Gail C. Murphy International Conference on Software Engineering (ICSE), p.175--184, 2010 3
  • 4. Was this method pulled up? Who introduced this class? Who has made changes to my classes? History Questions How often is this method Why were these changes changed? introduced? Template-based Reconstruction of Complex Refactorings Kyle Prete, Napol Rachatasumrit, Nikita Sudan, Miryung Kim International Conference on Software Maintenance (ICSM), p.1--10, 2010 Using Information Fragments to Answer the Questions Developers Ask Thomas Fritz and Gail C. Murphy International Conference on Software Engineering (ICSE), p.175--184, 2010 3
  • 5. Pulled up Method 1 pull_up_method(fShortName, tChildFullName, tParentFullName) :- 2 move_method(fShortName, tChildFullName, tParentFullName) ^ 3 before_subtype(tParentFullName, tChildFullName) Template-based Reconstruction of Complex Refactorings Kyle Prete, Napol Rachatasumrit, Nikita Sudan, Miryung Kim International Conference on Software Maintenance (ICSM), p.1--10, 2010 4
  • 6. Pulled up Method 1 pull_up_method(fShortName, tChildFullName, tParentFullName) :- 2 move_method(fShortName, tChildFullName, tParentFullName) ^ 3 before_subtype(tParentFullName, tChildFullName) 1 move_method(mShortName, t1Fullname, t2FullName) :- 2 deleted_method(mFullName, mShortName, t1FullName) ^ 3 added_method(newmName, mShortName, t2FullName) ^ 4 similarbody(newmName, newmBody, mFullName, mBody) Template-based Reconstruction of Complex Refactorings Kyle Prete, Napol Rachatasumrit, Nikita Sudan, Miryung Kim International Conference on Software Maintenance (ICSM), p.1--10, 2010 4
  • 7. Version Control Systems Version Version 3a 4a Version Version 1 Version 2 5 Version Version 3b 4b 5
  • 8. History Query Tool Pr Graph Query og Language ra La m od ry ng Q Move through the sto el ua ue version graph Hi ge ry M Source code of each version Specify characteristics Commit information in a single version Entity tracking ... 6
  • 9. QwalKeko Pr Graph Query og Language ra La m od ry ng Q Qwal sto el ua ue Hi ge ry M Ekeko + 7
  • 10. Applicative LMP ... specify code characteristics through Ekeko relations, leave search to core.logic collection of all substitutions for ?s and ?e (run* [?s ?e] (ast :ReturnStatement ?s) (has :expression ?s ?e) (ast :NullLiteral ?e)) such that the following Ekeko relations hold: ast/2 holds for :ReturnStatement, ?s ?e is the value of the property has/3 holds for :expression, ?s, and ?e named :expression of ([?s1 ?e2] ... [?sn ?en]) ast/2 holds for :NullLiteral, ?e ASTNode ?s ([#<ReturnStatement return null; #<NullLiteral null>] ... actual search performed by [#<ReturnStatement return null; core.logic #<NullLiteral null>]) 8
  • 11. Qwal foo bar baz 1 (run* [?end] 2 (qwal graph :foo ?end 3 [] 4 (qcurrent [curr] (has-info curr :foo)) 9
  • 12. Qwal foo bar baz 1 (run* [?end] 2 (qwal graph :foo ?end 3 [] 4 (qcurrent [curr] (has-info curr :foo)) 5 q=> 6 (qcurrent [curr] (has-info curr :bar)) 9
  • 13. Qwal foo bar baz 1 (run* [?end] 2 (qwal graph :foo ?end 3 [] 4 (qcurrent [curr] (has-info curr :foo)) 5 q=> 6 (qcurrent [curr] (has-info curr :bar)) 7 q=> 8 (qcurrent [curr] (has-info curr :baz))) 9
  • 14. Introduced Subclasses 1 (qwal graph start ?end [?parent ?child] 2 (qin-current 3 (ast :TypeDeclaration ?parent)) 4 (q=>+) ;;skip >= 1 versions 5 (qin-current 6 (subclass ?parent ?child) 7 (introduced ?child))) 10
  • 15. Same Predicate (defn same [?entity ?other-entity] ...) Ground in a previous version Ground in current version 11
  • 16. Same Predicate (defn same [?entity ?other-entity] ...) 1 (defn introduced [?entity] 2 (fresh [?same] 3 q<= 4 (not (same ?entity ?same))) 12
  • 17. Recall... 1 pull_up_method(fShortName, tChildFullName, tParentFullName) :- 2 move_method(fShortName, tChildFullName, tParentFullName) ^ 3 before_subtype(tParentFullName, tChildFullName) 1 move_method(mShortName, t1Fullname, t2FullName) :- 2 deleted_method(mFullName, mShortName, t1FullName) ^ 3 added_method(newmName, mShortName, t2FullName) ^ 4 similarbody(newmName, newmBody, mFullName, mBody) 13
  • 18. Pulled up Method 1 (defn pulled-up [?method ?pulled] 2 (fresh [?m-class ?p-class] 3 (method-moved ?method ?pulled) 4 (declaring-class ?method ?m-class) 5 (declaring-class ?pulled ?p-class) 6 (superclass ?m-class ?p-class))) 1 (defn method-moved [?moved ?to] 2 (removed ?moved) ;;implemented using same 3 (ast :MethodDeclaration ?to) 4 (== ?moved ?to) ;;unify when same signature 5 (has-similar-body ?moved ?to))) 14
  • 19. Pulled up Method 1 (qwal graph root ?end [?method ?pulled] 2 (qin-current 3 (ast :MethodDeclaration ?method)) 4 q=> ;;go to next version 5 (qin-current 6 (pulled-up ?method ?pulled))) 15
  • 20. Generalized Rule 1 (qwal graph root ?end [?method ?pulled] 2 (qin-current 3 (ast :MethodDeclaration ?method)) 4 (q=>+) ;;skip >=1 versions 5 (qin-current 6 (pulled-up ?method ?pulled))) 16
  • 21. Questions Reinout Stevens resteven@vub.ac.be @ReinoutStevens http://github.com/ReinoutStevens/damp.qwal http://github.com/cderoove/damp.ekeko 17

Notas do Editor

  1. \n
  2. software repositories are a large source of information regarding the history / evolution of a software project\nprogrammers have questions\n
  3. \n
  4. \n
  5. \n
  6. Explain their method -&gt; 2 eclipse projects, create factbase, use prologlike language\nGoal: reimplement these kind of rules, generalize them\nNeed source of information\n
  7. branching\nmerging\nno loops\n
  8. \n
  9. \n
  10. \n
  11. find all returnstatements that return null\n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. introduced -&gt; how do you do this?\n
  23. \n
  24. \n
  25. \n
  26. no temporal part yet...\nneeded in qwalkeko\n
  27. \n
  28. \n
  29. \n