AI 中文总结
研究问题为检测Python系统中特定平台API的使用情况。核心方法是使用PSASpotter工具。主要贡献是能识别API是否用于防御性代码,支持相关实证研究,其检测出的防御性代码含替代方案,为跨平台开发和测试提供见解。
AI 中文摘要
特定平台API是为特定平台(如操作系统)实现的,在目标平台之外可能无法工作。检测此类API的使用对于软件维护很重要,它能让维护人员警惕可能带来潜在风险的API。本文提出了PSASpotter工具,用于检测Python系统中特定平台API的使用情况,还能识别其是否在防御性代码(如try/except块或检查当前平台的if块)中使用。该工具可支持有关Python生态系统中特定平台API使用情况的新实证研究,检测出的防御性代码可能包含不可用API的替代解决方案,为跨平台软件开发和测试提供见解。PSASpotter的相关链接:this https URL。工具视频:this https URL。
英文摘要
A platform-specific API is implemented for a particular platform (e.g., operating system), thus, it may not work on other platforms than the target one. Detecting the usage of such APIs is important for supporting software maintenance, as it allows maintainers to be alerted about APIs that could pose potential risks. This paper proposes PSASpotter, a tool to detect the usage of platform-specific APIs in Python systems. PSASpotter also identifies whether the platform-specific APIs are used within a defensive code, such as try/except blocks or if blocks that check the current platform. PSASpotter can support the development of novel empirical studies about the usage of platform-specific APIs in the Python ecosystem. Moreover, the defensive code detected by PSASpotter may contain alternative solutions for unavailable APIs, which can provide insights for software development and testing across multiple platforms. PSASpotter is available at: https://github.com/ricardojob/PSASpotter. Tool video: https://youtu.be/d3WyozTAKS8.
CommentsPaper accepted to ICSME