用作用域图验证重构的良好类型保存

L. Miljak, Casper Bach Poulsen, Flip van Spaendonck
{"title":"用作用域图验证重构的良好类型保存","authors":"L. Miljak, Casper Bach Poulsen, Flip van Spaendonck","doi":"10.1145/3605156.3606455","DOIUrl":null,"url":null,"abstract":"The goal of automated refactoring is to reduce maintenance effort. To realize this, programmers need to be able to trust or manually check that refactorings actually preserve behavior. To allow programmers to focus on such checks, automated refactorings should preserve program well-typedness. However, historically automated refactorings in popular IDEs could break well-typedness. The reason is that modern languages have complex name binding semantics which makes it hard to guarantee well-typedness in general. In recent work, scope graphs have been proposed as a uniform model for name binding. The model supports complex name binding patterns, and its uniformity makes it attractive to consider for verifying that refactorings preserve well-typedness. This paper explores how to prove that refactorings preserve well-typedness, using scope graphs. We consider a simple refactoring for merging modules in a toy module language, and prove that this refactoring preserves well-typedness. We give a generic template for proving well-typedness preservation using scope graphs, and discuss how this template relates to refactorings more generally.","PeriodicalId":254071,"journal":{"name":"Proceedings of the 25th ACM International Workshop on Formal Techniques for Java-like Programs","volume":"510 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2023-07-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Verifying Well-Typedness Preservation of Refactorings using Scope Graphs\",\"authors\":\"L. Miljak, Casper Bach Poulsen, Flip van Spaendonck\",\"doi\":\"10.1145/3605156.3606455\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"The goal of automated refactoring is to reduce maintenance effort. To realize this, programmers need to be able to trust or manually check that refactorings actually preserve behavior. To allow programmers to focus on such checks, automated refactorings should preserve program well-typedness. However, historically automated refactorings in popular IDEs could break well-typedness. The reason is that modern languages have complex name binding semantics which makes it hard to guarantee well-typedness in general. In recent work, scope graphs have been proposed as a uniform model for name binding. The model supports complex name binding patterns, and its uniformity makes it attractive to consider for verifying that refactorings preserve well-typedness. This paper explores how to prove that refactorings preserve well-typedness, using scope graphs. We consider a simple refactoring for merging modules in a toy module language, and prove that this refactoring preserves well-typedness. We give a generic template for proving well-typedness preservation using scope graphs, and discuss how this template relates to refactorings more generally.\",\"PeriodicalId\":254071,\"journal\":{\"name\":\"Proceedings of the 25th ACM International Workshop on Formal Techniques for Java-like Programs\",\"volume\":\"510 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2023-07-18\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 25th ACM International Workshop on Formal Techniques for Java-like Programs\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3605156.3606455\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 25th ACM International Workshop on Formal Techniques for Java-like Programs","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3605156.3606455","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

自动化重构的目标是减少维护工作。要实现这一点,程序员需要能够信任或手动检查重构实际上保留了行为。为了让程序员专注于这样的检查,自动化重构应该保持程序的良好类型。然而,历史上流行的ide中的自动化重构可能会破坏良好类型。原因是现代语言具有复杂的名称绑定语义,这使得很难保证一般的良好类型。在最近的工作中,范围图被提议作为名称绑定的统一模型。该模型支持复杂的名称绑定模式,它的一致性使得考虑验证重构是否保留了良好的类型性非常有吸引力。本文探讨了如何使用作用域图来证明重构保持良好类型。我们考虑了一个简单的重构,用于在一个玩具模块语言中合并模块,并证明了这种重构保留了良好的类型。我们给出了一个通用模板,用于使用作用域图证明良好类型保存,并讨论了该模板如何与更一般的重构相关联。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Verifying Well-Typedness Preservation of Refactorings using Scope Graphs
The goal of automated refactoring is to reduce maintenance effort. To realize this, programmers need to be able to trust or manually check that refactorings actually preserve behavior. To allow programmers to focus on such checks, automated refactorings should preserve program well-typedness. However, historically automated refactorings in popular IDEs could break well-typedness. The reason is that modern languages have complex name binding semantics which makes it hard to guarantee well-typedness in general. In recent work, scope graphs have been proposed as a uniform model for name binding. The model supports complex name binding patterns, and its uniformity makes it attractive to consider for verifying that refactorings preserve well-typedness. This paper explores how to prove that refactorings preserve well-typedness, using scope graphs. We consider a simple refactoring for merging modules in a toy module language, and prove that this refactoring preserves well-typedness. We give a generic template for proving well-typedness preservation using scope graphs, and discuss how this template relates to refactorings more generally.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信