This document introduces QwalKeko, a tool for querying version control system histories. It allows users to specify code characteristics and changes using a graph query language and logic programming rules. Querying the history involves traversing the version graph and checking if Ekeko logic rules are satisfied in each version. This allows formulating complex refactoring queries, such as finding methods that were pulled up to a parent class, in a declarative way.
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
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
software repositories are a large source of information regarding the history / evolution of a software project\nprogrammers have questions\n
\n
\n
\n
Explain their method -> 2 eclipse projects, create factbase, use prologlike language\nGoal: reimplement these kind of rules, generalize them\nNeed source of information\n