Query History of a Software Project

403 views

Published on

Presentation given at Satose2012.

Published in: Technology, Sports
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
403
On SlideShare
0
From Embeds
0
Number of Embeds
69
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Query History of a Software Project

    1. 1. Querying the Historyof a Software Project Reinout Stevens resteven@vub.ac.be @ReinoutStevens 1
    2. 2. ContextMining Software Repositories 2
    3. 3. Context Program ComprehensionUsing Information Fragments to Answer the Questions Developers AskThomas Fritz and Gail C. MurphyInternational Conference on Software Engineering (ICSE), p.175--184, 2010 3
    4. 4. Context Program Development Process Comprehension VerificationUsing Information Fragments to Answer the Questions Developers AskThomas Fritz and Gail C. MurphyInternational Conference on Software Engineering (ICSE), p.175--184, 2010 3
    5. 5. Logic Meta-Programming• Querying a single program version.• Describe characteristics of the code.• Ekeko, PQL, CodeQuest, JTL, SOUL, ... 4
    6. 6. History Query Tool { Temporal Query Language Repository Representation Program Query Language 5
    7. 7. Implementation { Regular Path Expressions Git + Eclipse Model Ekeko 6
    8. 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. 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. 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. 11. RPE History Model Eclipse Ekeko +https://github.com/ReinoutStevens/damp.scrapperplugin 10
    12. 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 Wykhttps://github.com/ReinoutStevens/damp.qwal 11
    13. 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 Wykhttps://github.com/ReinoutStevens/damp.qwal 11
    14. 14. RPE QWAL Eclipse Ekeko foo bar baz quux1 (run* [end]2 (qwal graph start end3 []4 (q=>*5 (qcurrent [curr]6 (fresh [info]7 (has-info curr info))))8 (qcurrent [curr] (has-info curr :quux)))) 12
    15. 15. RPE QWAL Eclipse Ekeko (q=>* & goals) (q=>+ & goals) (q? & goals)https://github.com/ReinoutStevens/damp.qwal 13
    16. 16. NoName1 (run* [?name1]2 (fresh [?end ?method1 ?method2 ?name2]3 (qwal graph root ?end4 []5 (q=>*) ;;skip arbitrary number of versions6 (qcurrent [current] ;;in this version do7 (ast :MethodDeclaration ?method1) ;;find a method8 (has :name ?method1 ?name1)) ;;with a name9 (q=>+) ;;skip arbitrary number of versions, >10 (qcurrent [current] ;;in this version do1 (ast :MethodDeclaration ?method2) ;;find a method2 (has :name ?method2 ?name2) ;;with a name3 (!= (get-identifier ?name1) ;;that is different from4 (get-identifier ?name2));;the previous method5 (has-same-body ?method1 ?method2))))) 14
    17. 17. Future Work• Extend History Model • Unification across versions • Detect and precompute refactorings• Large-scale projects• Include other sources of information• Semantic Patches 15

    ×