

{"id":162,"date":"2012-12-12T10:11:30","date_gmt":"2012-12-12T09:11:30","guid":{"rendered":"https:\/\/project.inria.fr\/se-seminars\/?p=162"},"modified":"2013-03-28T12:47:23","modified_gmt":"2013-03-28T11:47:23","slug":"understanding-code-changes-with-ast-differencing","status":"publish","type":"post","link":"https:\/\/project.inria.fr\/se-seminars\/understanding-code-changes-with-ast-differencing\/","title":{"rendered":"Understanding Code Changes With AST Differencing"},"content":{"rendered":"<p><\/p>\n<div>On Wednesday 12 December 2012, 9:00-9:30 <a href=\"http:\/\/goo.gl\/maps\/32z7m\">INRIA Lille room B31 (new building)<\/a>, Jean-R\u00e9my Falleri (Associate Professor @ ENSEIRB-MATMECA) will give a talk on &#8220;Understanding Code Changes With AST Differencing&#8221;<\/div>\n<p>&nbsp;<\/p>\n<div><em>Abstract:<\/em><br \/>\nFinding the differences between two versions of a source code file is<br \/>\na very common operation in software development. It is used in various<br \/>\ntasks such as performing a code review or understanding a bug fix.<br \/>\nMany automated tools have been introduced over the years to assist the<br \/>\ndevelopers in this tedious task. For instance, \\texttt{diff} is very<br \/>\nfamous among the developers. This tool consider source code files as a<br \/>\nsequence of text lines and find a minimal cost edition sequence that<br \/>\ntransform a sequence into another. The actions are: insert a line,<br \/>\ndelete a line and update a line.<\/p>\n<p>diff is very useful: it works without any adaptation on any<br \/>\ntextual programming language. Nevertheless, its limitation is very<br \/>\nobvious: a source code is not really a sequence of lines, it always<br \/>\nhas a tree structure, usually called abstract syntax tree (AST). Many<br \/>\napproaches have adapted the idea of textual differencing to trees.<br \/>\nThese approaches find an minimal cost edition sequence between two<br \/>\ntrees. The editing actions on a tree are: insert a node, delete a node<br \/>\nand update the label of a node.<\/p>\n<p>Unfortunately, the best known algorithms to find such a sequence have<br \/>\na $O(n^3)$ time complexity (n beeing the number of nodes), which is<br \/>\nexpensive for real world ASTs that contain more than tens of thousands<br \/>\nnodes. More importantly, these approaches do not take into account a<br \/>\nvery frequent edit action used in software development: moving a node.<br \/>\nIf this action is taken into account, the problem of finding an<br \/>\nminimal cost edition sequence is NP-hard. AST differencing including<br \/>\nmoves requires therefore good heuristics to be used in practice.<\/p>\n<p>AST differencing including move actions has not been investigated a<br \/>\nlot. The main approaches in the literature are either language<br \/>\nspecifics and\/or does not work on raw ASTs and\/or have not been<br \/>\nempirically validated. We propose a novel algorithm that computes an<br \/>\nedition sequence between two ASTs including move actions. This<br \/>\nalgorithm is very fast  and works on raw ASTs with almost no<br \/>\nconfiguration.<\/p><\/div>\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>On Wednesday 12 December 2012, 9:00-9:30 INRIA Lille room B31 (new building), Jean-R\u00e9my Falleri (Associate Professor @ ENSEIRB-MATMECA) will give a talk on &#8220;Understanding Code Changes With AST Differencing&#8221; &nbsp; Abstract: Finding the differences between two versions of a source code file is a very common operation in software development. It is used in various &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"https:\/\/project.inria.fr\/se-seminars\/understanding-code-changes-with-ast-differencing\/\">Continue reading<\/a><\/p>\n","protected":false},"author":65,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-162","post","type-post","status-publish","format-standard","hentry","category-talk","nodate","item-wrap"],"_links":{"self":[{"href":"https:\/\/project.inria.fr\/se-seminars\/wp-json\/wp\/v2\/posts\/162","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/project.inria.fr\/se-seminars\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/project.inria.fr\/se-seminars\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/project.inria.fr\/se-seminars\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/project.inria.fr\/se-seminars\/wp-json\/wp\/v2\/comments?post=162"}],"version-history":[{"count":9,"href":"https:\/\/project.inria.fr\/se-seminars\/wp-json\/wp\/v2\/posts\/162\/revisions"}],"predecessor-version":[{"id":225,"href":"https:\/\/project.inria.fr\/se-seminars\/wp-json\/wp\/v2\/posts\/162\/revisions\/225"}],"wp:attachment":[{"href":"https:\/\/project.inria.fr\/se-seminars\/wp-json\/wp\/v2\/media?parent=162"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/project.inria.fr\/se-seminars\/wp-json\/wp\/v2\/categories?post=162"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/project.inria.fr\/se-seminars\/wp-json\/wp\/v2\/tags?post=162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}