Victor Cacciari Miraldo, Pierre-Évariste Dagand, Wouter Swierstra
{"title":"Type-directed diffing of structured data","authors":"Victor Cacciari Miraldo, Pierre-Évariste Dagand, Wouter Swierstra","doi":"10.1145/3122975.3122976","DOIUrl":null,"url":null,"abstract":"The Unix diff utility that compares lines of text is used pervasively by version control systems. Yet certain changes to a program may be difficult to describe accurately in terms of modifications to individual lines of code. As a result, observing changes at such a fixed granularity may lead to unnecessary conflicts between different edits. This paper presents a generic representation for describing transformations between algebraic data types and a non-deterministic algorithm for computing such representations. These representations can be used to give a more accurate account of modifications made to algebraic data structures - and the abstract syntax trees of computer programs in particular - as opposed to only considering modifications between their textual representations.","PeriodicalId":166018,"journal":{"name":"Proceedings of the 2nd ACM SIGPLAN International Workshop on Type-Driven Development","volume":"4 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2017-09-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"8","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 2nd ACM SIGPLAN International Workshop on Type-Driven Development","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3122975.3122976","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 8
Abstract
The Unix diff utility that compares lines of text is used pervasively by version control systems. Yet certain changes to a program may be difficult to describe accurately in terms of modifications to individual lines of code. As a result, observing changes at such a fixed granularity may lead to unnecessary conflicts between different edits. This paper presents a generic representation for describing transformations between algebraic data types and a non-deterministic algorithm for computing such representations. These representations can be used to give a more accurate account of modifications made to algebraic data structures - and the abstract syntax trees of computer programs in particular - as opposed to only considering modifications between their textual representations.