Abstract syntax tree: Difference between revisions

Content deleted Content added
AST differencing: fixed typo
Tags: Mobile edit Mobile web edit
Line 50:
 
=== AST differencing ===
AST differencing, or for short tree differencing, consists of computing the list of differences between two ASTs.<ref>{{Cite journal |last1=Fluri |first1=Beat |last2=Wursch |first2=Michael |last3=PInzger |first3=Martin |last4=Gall |first4=Harald |date=2007 |title=Change Distilling:Tree Differencing for Fine-Grained Source Code Change Extraction |url=http://dx.doi.org/10.1109/tse.2007.70731 |journal=IEEE Transactions on Software Engineering |volume=33 |issue=11 |pages=725–743 |doi=10.1109/tse.2007.70731 |s2cid=13659557 |issn=0098-5589}}</ref> This list of differences is typically called an edit script. The edit script directly refers to the AST of the code. For instance, an edit action may result in the addition of a new AST node representing a function. The problem of computing good AST edit scripts is hard, with two main challenges: handling move actions, and scaling to fine-grained ASTs with thousands of nodes.<ref>{{Cite journal|last1=Falleri|first1=Jean-Rémy|last2=Morandat|first2=Floréal|last3=Blanc|first3=Xavier|last4=Martinez|first4=Matias|last5=Monperrus|first5=Martin|date=2014-09-15|title=Fine-grained and accurate source code differencing|url=https://dl.acm.org/doi/10.1145/2642937.2642982|journal=Proceedings of the 29th ACM/IEEE International Conference on Automated Software Engineering|language=en|___location=Vasteras Sweden|publisher=ACM|pages=313–324|doi=10.1145/2642937.2642982|isbn=978-1-4503-3013-8|s2cid=218737160 }}</ref>
 
=== Structured merge ===