SlideShare a Scribd company logo
1 of 17
Querying the History
of a Software Project
        Reinout Stevens
      resteven@vub.ac.be
       @ReinoutStevens




              1
Context




Mining Software
 Repositories
                  2
Context




   Program
 Comprehension
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
Context




   Program                                                Development Process
 Comprehension                                                Verification
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
Logic Meta-Programming

• Querying a single program version.
• Describe characteristics of the code.
• Ekeko, PQL, CodeQuest, JTL, SOUL, ...

                     4
History Query Tool



    {
        Temporal Query Language


        Repository Representation


        Program Query Language



         5
Implementation



  {
      Regular Path Expressions


          Git + Eclipse Model


                Ekeko



      6
RPE


     Core.logic                      Eclipse

                                      Ekeko


(defrel parento parent child)
(fact parento ‘bob ‘alice)
(fact parento ‘kate ‘alice)
(fact parento ‘bob ‘chris)
(fact parento ‘kate ‘chris)

(defn sibling [?x ?y]
  (fresh [?parent]
     (parento parent ?x)
     (parento parent ?y)
     (!= ?x ?y)))

> (run* [?sib]
    (sibling 'alice ?sib))
(chris chris)


       https://github.com/clojure/core.logic/
                 7
RPE


                   Core.logic ctd’ed                                                               Eclipse

                                                                                                   Ekeko

                                                       (sibling 'alice ?sib)
> (run* [?sib]
    (sibling 'alice ?sib))
(chris chris)                                     (fresh [parent]
                                                       (parento parent 'alice)
                                                       (parento parent ?sib)
                                                       (!= 'alice ?sib)))




                     ;; parent -> 'bob                                                ;; parent -> 'kate
                     (parento 'bob ?sib)                                              (parento 'kate ?sib)
                     (!= 'alice ?sib)                                                 (!= 'alice ?sib)




    ;; parent -> 'bob             ;; parent -> 'bob              ;; parent -> 'kate                ;; parent -> 'kate
    ;; ?sib -> 'alice             ;; ?sib -> 'chris              ;; ?sib -> 'alice                 ;; ?sib -> 'chris
    (!= 'alice 'alice)            (!= 'alice 'chris)             (!= 'alice 'alice)                (!= 'alice 'chris)




                                                       8
RPE


                          Ekeko                           Eclipse

                                                          Ekeko



                                     +
       (ekeko* [?m ?value]
         (damp.ekeko.jdt.reification/ast :MethodDeclaration ?m)
         (damp.ekeko.jdt.reification/has :name ?m ?value))




https://github.com/cderoove/damp.ekeko
                                 9
RPE


                History Model                           Eclipse

                                                        Ekeko




                      +

https://github.com/ReinoutStevens/damp.scrapperplugin
                                10
RPE


                                   QWAL                               Eclipse

                                                                      Ekeko
                          foo           bar            baz   quux




           1   (run* [end]
           2     (qwal graph       start 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       q=>
           0       (qcurrent       [curr] (has-info curr :quux)))))
  Universal regular path queries
  Oege De Moor and David Lacey and Eric Van Wyk

https://github.com/ReinoutStevens/damp.qwal
                                                  11
RPE


                                   QWAL                               Eclipse

                                                                      Ekeko
                          foo           bar            baz   quux




           1   (run* [end]
           2     (qwal graph       start 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       q=>
           0       (qcurrent       [curr] (has-info curr :quux)))))
  Universal regular path queries
  Oege De Moor and David Lacey and Eric Van Wyk

https://github.com/ReinoutStevens/damp.qwal
                                                  11
RPE


                    QWAL                              Eclipse

                                                      Ekeko


              foo      bar        baz   quux




1   (run* [end]
2       (qwal graph start end
3         []
4         (q=>*
5            (qcurrent [curr]
6              (fresh [info]
7                (has-info curr info))))
8         (qcurrent [curr] (has-info curr :quux))))




                             12
RPE


                        QWAL                  Eclipse

                                              Ekeko


             (q=>* & goals)



            (q=>+ & goals)



              (q? & goals)


https://github.com/ReinoutStevens/damp.qwal
                               13
NoName
1   (run* [?name1]
2     (fresh [?end ?method1 ?method2 ?name2]
3       (qwal graph root ?end
4        []
5        (q=>*) ;;skip arbitrary number of versions
6        (qcurrent [current] ;;in this version do
7           (ast :MethodDeclaration ?method1) ;;find a method
8           (has :name ?method1 ?name1)) ;;with a name
9        (q=>+) ;;skip arbitrary number of versions, >1
0        (qcurrent [current] ;;in this version do
1           (ast :MethodDeclaration ?method2) ;;find a method
2           (has :name ?method2 ?name2) ;;with a name
3           (!= (get-identifier ?name1) ;;that is different from
4               (get-identifier ?name2));;the previous method
5           (has-same-body ?method1 ?method2)))))


                                14
Future Work
• Extend History Model
 • Unification across versions
 • Detect and precompute refactorings
• Large-scale projects
• Include other sources of information
• Semantic Patches
                    15

More Related Content

What's hot

Profiling and optimization
Profiling and optimizationProfiling and optimization
Profiling and optimization
g3_nittala
 
«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains
«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains
«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains
it-people
 
Python Performance 101
Python Performance 101Python Performance 101
Python Performance 101
Ankur Gupta
 
Wprowadzenie do technologi Big Data i Apache Hadoop
Wprowadzenie do technologi Big Data i Apache HadoopWprowadzenie do technologi Big Data i Apache Hadoop
Wprowadzenie do technologi Big Data i Apache Hadoop
Sages
 

What's hot (20)

Naïveté vs. Experience
Naïveté vs. ExperienceNaïveté vs. Experience
Naïveté vs. Experience
 
Euro python2011 High Performance Python
Euro python2011 High Performance PythonEuro python2011 High Performance Python
Euro python2011 High Performance Python
 
Profiling and optimization
Profiling and optimizationProfiling and optimization
Profiling and optimization
 
«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains
«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains
«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains
 
The Ring programming language version 1.9 book - Part 20 of 210
The Ring programming language version 1.9 book - Part 20 of 210The Ring programming language version 1.9 book - Part 20 of 210
The Ring programming language version 1.9 book - Part 20 of 210
 
Functional Programming & Event Sourcing - a pair made in heaven
Functional Programming & Event Sourcing - a pair made in heavenFunctional Programming & Event Sourcing - a pair made in heaven
Functional Programming & Event Sourcing - a pair made in heaven
 
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
 
Python Performance 101
Python Performance 101Python Performance 101
Python Performance 101
 
Renaming Tokens
Renaming TokensRenaming Tokens
Renaming Tokens
 
Python于Web 2.0网站的应用 - QCon Beijing 2010
Python于Web 2.0网站的应用 - QCon Beijing 2010Python于Web 2.0网站的应用 - QCon Beijing 2010
Python于Web 2.0网站的应用 - QCon Beijing 2010
 
The Ring programming language version 1.2 book - Part 79 of 84
The Ring programming language version 1.2 book - Part 79 of 84The Ring programming language version 1.2 book - Part 79 of 84
The Ring programming language version 1.2 book - Part 79 of 84
 
JPoint 2016 - Валеев Тагир - Странности Stream API
JPoint 2016 - Валеев Тагир - Странности Stream APIJPoint 2016 - Валеев Тагир - Странности Stream API
JPoint 2016 - Валеев Тагир - Странности Stream API
 
Wprowadzenie do technologi Big Data i Apache Hadoop
Wprowadzenie do technologi Big Data i Apache HadoopWprowadzenie do technologi Big Data i Apache Hadoop
Wprowadzenie do technologi Big Data i Apache Hadoop
 
Dagger & rxjava & retrofit
Dagger & rxjava & retrofitDagger & rxjava & retrofit
Dagger & rxjava & retrofit
 
The Ring programming language version 1.10 book - Part 208 of 212
The Ring programming language version 1.10 book - Part 208 of 212The Ring programming language version 1.10 book - Part 208 of 212
The Ring programming language version 1.10 book - Part 208 of 212
 
Racing To Win: Using Race Conditions to Build Correct and Concurrent Software
Racing To Win: Using Race Conditions to Build Correct and Concurrent SoftwareRacing To Win: Using Race Conditions to Build Correct and Concurrent Software
Racing To Win: Using Race Conditions to Build Correct and Concurrent Software
 
The Ring programming language version 1.9 book - Part 90 of 210
The Ring programming language version 1.9 book - Part 90 of 210The Ring programming language version 1.9 book - Part 90 of 210
The Ring programming language version 1.9 book - Part 90 of 210
 
The Ring programming language version 1.5.1 book - Part 12 of 180
The Ring programming language version 1.5.1 book - Part 12 of 180The Ring programming language version 1.5.1 book - Part 12 of 180
The Ring programming language version 1.5.1 book - Part 12 of 180
 
The Ring programming language version 1.3 book - Part 84 of 88
The Ring programming language version 1.3 book - Part 84 of 88The Ring programming language version 1.3 book - Part 84 of 88
The Ring programming language version 1.3 book - Part 84 of 88
 
C++の話(本当にあった怖い話)
C++の話(本当にあった怖い話)C++の話(本当にあった怖い話)
C++の話(本当にあった怖い話)
 

Viewers also liked

QwalKeko, a History Querying Tool
QwalKeko, a History Querying ToolQwalKeko, a History Querying Tool
QwalKeko, a History Querying Tool
stevensreinout
 
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
 

Viewers also liked (8)

QwalKeko, a History Querying Tool
QwalKeko, a History Querying ToolQwalKeko, a History Querying Tool
QwalKeko, a History Querying Tool
 
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
 
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
 
QwalKeko, a History Querying Tool
QwalKeko, a History Querying ToolQwalKeko, a History Querying Tool
QwalKeko, a History Querying Tool
 
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?
 

Similar to Query History of a Software Project

Spark with Elasticsearch - umd version 2014
Spark with Elasticsearch - umd version 2014Spark with Elasticsearch - umd version 2014
Spark with Elasticsearch - umd version 2014
Holden Karau
 
Coq to Rubyによる証明駆動開発@名古屋ruby会議02
Coq to Rubyによる証明駆動開発@名古屋ruby会議02Coq to Rubyによる証明駆動開発@名古屋ruby会議02
Coq to Rubyによる証明駆動開発@名古屋ruby会議02
Hiroki Mizuno
 

Similar to Query History of a Software Project (20)

Being functional in PHP (PHPDay Italy 2016)
Being functional in PHP (PHPDay Italy 2016)Being functional in PHP (PHPDay Italy 2016)
Being functional in PHP (PHPDay Italy 2016)
 
CoreOS + Kubernetes @ All Things Open 2015
CoreOS + Kubernetes @ All Things Open 2015CoreOS + Kubernetes @ All Things Open 2015
CoreOS + Kubernetes @ All Things Open 2015
 
Scala and Hadoop @ eBay
Scala and Hadoop @ eBayScala and Hadoop @ eBay
Scala and Hadoop @ eBay
 
Spark with Elasticsearch - umd version 2014
Spark with Elasticsearch - umd version 2014Spark with Elasticsearch - umd version 2014
Spark with Elasticsearch - umd version 2014
 
core.logic introduction
core.logic introductioncore.logic introduction
core.logic introduction
 
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
 
A Recovering Java Developer Learns to Go
A Recovering Java Developer Learns to GoA Recovering Java Developer Learns to Go
A Recovering Java Developer Learns to Go
 
The Future of JVM Languages
The Future of JVM Languages The Future of JVM Languages
The Future of JVM Languages
 
Hadoop in a Box
Hadoop in a BoxHadoop in a Box
Hadoop in a Box
 
Big Data Processing with .NET and Spark (SQLBits 2020)
Big Data Processing with .NET and Spark (SQLBits 2020)Big Data Processing with .NET and Spark (SQLBits 2020)
Big Data Processing with .NET and Spark (SQLBits 2020)
 
Conf soat tests_unitaires_Mockito_jUnit_170113
Conf soat tests_unitaires_Mockito_jUnit_170113Conf soat tests_unitaires_Mockito_jUnit_170113
Conf soat tests_unitaires_Mockito_jUnit_170113
 
Coq to Rubyによる証明駆動開発@名古屋ruby会議02
Coq to Rubyによる証明駆動開発@名古屋ruby会議02Coq to Rubyによる証明駆動開発@名古屋ruby会議02
Coq to Rubyによる証明駆動開発@名古屋ruby会議02
 
Introduction to Assembly Language
Introduction to Assembly LanguageIntroduction to Assembly Language
Introduction to Assembly Language
 
05 - Bypassing DEP, or why ASLR matters
05 - Bypassing DEP, or why ASLR matters05 - Bypassing DEP, or why ASLR matters
05 - Bypassing DEP, or why ASLR matters
 
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?
 
Kotlin: forse è la volta buona (Trento)
Kotlin: forse è la volta buona (Trento)Kotlin: forse è la volta buona (Trento)
Kotlin: forse è la volta buona (Trento)
 
CakePHP
CakePHPCakePHP
CakePHP
 
55 new things in Java 7 - Devoxx France
55 new things in Java 7 - Devoxx France55 new things in Java 7 - Devoxx France
55 new things in Java 7 - Devoxx France
 
Serializing EMF models with Xtext
Serializing EMF models with XtextSerializing EMF models with Xtext
Serializing EMF models with Xtext
 
What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)
 

Recently uploaded

+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@
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Recently uploaded (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
+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...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 

Query History of a Software Project

  • 1. Querying the History of a Software Project Reinout Stevens resteven@vub.ac.be @ReinoutStevens 1
  • 3. Context Program Comprehension 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. Context Program Development Process Comprehension Verification 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. Logic Meta-Programming • Querying a single program version. • Describe characteristics of the code. • Ekeko, PQL, CodeQuest, JTL, SOUL, ... 4
  • 6. History Query Tool { Temporal Query Language Repository Representation Program Query Language 5
  • 7. Implementation { Regular Path Expressions Git + Eclipse Model Ekeko 6
  • 8. RPE Core.logic Eclipse Ekeko (defrel parento parent child) (fact parento ‘bob ‘alice) (fact parento ‘kate ‘alice) (fact parento ‘bob ‘chris) (fact parento ‘kate ‘chris) (defn sibling [?x ?y] (fresh [?parent] (parento parent ?x) (parento parent ?y) (!= ?x ?y))) > (run* [?sib] (sibling 'alice ?sib)) (chris chris) https://github.com/clojure/core.logic/ 7
  • 9. RPE Core.logic ctd’ed Eclipse Ekeko (sibling 'alice ?sib) > (run* [?sib] (sibling 'alice ?sib)) (chris chris) (fresh [parent] (parento parent 'alice) (parento parent ?sib) (!= 'alice ?sib))) ;; parent -> 'bob ;; parent -> 'kate (parento 'bob ?sib) (parento 'kate ?sib) (!= 'alice ?sib) (!= 'alice ?sib) ;; parent -> 'bob ;; parent -> 'bob ;; parent -> 'kate ;; parent -> 'kate ;; ?sib -> 'alice ;; ?sib -> 'chris ;; ?sib -> 'alice ;; ?sib -> 'chris (!= 'alice 'alice) (!= 'alice 'chris) (!= 'alice 'alice) (!= 'alice 'chris) 8
  • 10. RPE Ekeko Eclipse Ekeko + (ekeko* [?m ?value] (damp.ekeko.jdt.reification/ast :MethodDeclaration ?m) (damp.ekeko.jdt.reification/has :name ?m ?value)) https://github.com/cderoove/damp.ekeko 9
  • 11. RPE History Model Eclipse Ekeko + https://github.com/ReinoutStevens/damp.scrapperplugin 10
  • 12. RPE QWAL Eclipse Ekeko foo bar baz quux 1 (run* [end] 2 (qwal graph start 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 q=> 0 (qcurrent [curr] (has-info curr :quux))))) Universal regular path queries Oege De Moor and David Lacey and Eric Van Wyk https://github.com/ReinoutStevens/damp.qwal 11
  • 13. RPE QWAL Eclipse Ekeko foo bar baz quux 1 (run* [end] 2 (qwal graph start 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 q=> 0 (qcurrent [curr] (has-info curr :quux))))) Universal regular path queries Oege De Moor and David Lacey and Eric Van Wyk https://github.com/ReinoutStevens/damp.qwal 11
  • 14. RPE QWAL Eclipse Ekeko foo bar baz quux 1 (run* [end] 2 (qwal graph start end 3 [] 4 (q=>* 5 (qcurrent [curr] 6 (fresh [info] 7 (has-info curr info)))) 8 (qcurrent [curr] (has-info curr :quux)))) 12
  • 15. RPE QWAL Eclipse Ekeko (q=>* & goals) (q=>+ & goals) (q? & goals) https://github.com/ReinoutStevens/damp.qwal 13
  • 16. NoName 1 (run* [?name1] 2 (fresh [?end ?method1 ?method2 ?name2] 3 (qwal graph root ?end 4 [] 5 (q=>*) ;;skip arbitrary number of versions 6 (qcurrent [current] ;;in this version do 7 (ast :MethodDeclaration ?method1) ;;find a method 8 (has :name ?method1 ?name1)) ;;with a name 9 (q=>+) ;;skip arbitrary number of versions, >1 0 (qcurrent [current] ;;in this version do 1 (ast :MethodDeclaration ?method2) ;;find a method 2 (has :name ?method2 ?name2) ;;with a name 3 (!= (get-identifier ?name1) ;;that is different from 4 (get-identifier ?name2));;the previous method 5 (has-same-body ?method1 ?method2))))) 14
  • 17. Future Work • Extend History Model • Unification across versions • Detect and precompute refactorings • Large-scale projects • Include other sources of information • Semantic Patches 15

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n