Flexible semi-automatic support for type migration of primitives for C/C plus plus programs

2022 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION AND REENGINEERING (SANER 2022)(2022)

引用 1|浏览6
暂无评分
摘要
Type systems are crucial tools in the hands of developers to ensure an increased level of soundness to their programs, make them safer, and guard against bugs. However, in practice, the type system is not always used to its full capability, and trade-offs are made. The effects range from hindered code comprehension and wasted development effort to financial damages and even the risk of loss of life. Various widely used programming languages, such as C++, Java, Python, and Rust, are yet to implement constrained types as a language feature. While the usage of user-defined types is common in modern languages that support such elements, developers often resort to having their variables use the most common, fundamental, built-in or library types, such as int or string, and not encode invariants into the type system. In this paper, we describe a flexible, incremental, semi-automated type migration approach that allows transitioning from the use of fundamental coarse types to strong types. Previously, well-scaling type migration methods were restricted and required the existence of an already welldefined destination type. In our case, the new strong type to be created is not yet defined, but the required interface is discovered via static analysis. As refactoring tools would cease to function if the code is changed textually to a version that refers undefined symbols, a more granular approach was needed. In addition, our proposed method allows us to discover the mixing of conceptually distinct types during development while the original program continues to function.
更多
查看译文
关键词
strong types, C plus plus programming language, software refactoring, static analysis, type safety
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要