arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2403.10836cs.SE
收藏

IPSynth:用于软件安全实现的跨过程程序合成

IPSynth: Interprocedural Program Synthesis for Software Security Implementation

Ali Shokri, Ibrahim Jameel Mujhid, Mehdi Mirakhorli

AI总结:

IPSynth提出一种跨过程程序合成方法,自动学习安全战术规格并合成相互关联的代码片段,添加到现有代码库中,实验表明其优于ChatGPT。

摘要:

为了实现软件的重要质量属性(如架构安全战术),开发者将软件框架的API作为构建模块纳入其中,以避免重复造轮子并提高生产力。然而,这是一项具有挑战性且容易出错的任务,尤其是对新手程序员而言。尽管基于API的程序合成领域取得了进展,但在架构战术实现任务方面,现有技术存在双重缺陷。首先,所需战术的规格必须被明确表达,而这超出了这类程序员的知识范围。其次,这些方法合成一段代码,并将将其分解为更小片段、将每个片段添加到代码中的适当位置,以及建立每个片段与其周围环境及其他片段之间的正确依赖关系的任务留给了程序员。为了缓解这些挑战,我们引入了IPSynth,一种新颖的跨过程程序合成方法,它自动学习战术的规格,将战术合成为相互关联的代码片段,并将其添加到现有代码库中。我们扩展了在36届IEEE/ACM国际自动化软件工程会议(ASE'21)研究竞赛赛道中获得一等奖的扩展摘要。在本文中,我们提供了该方法的细节,展示了IPSynth实验评估的结果,并对该研究主题的更全面探索进行了分析和见解。此外,我们将我们的方法的结果与最强大的代码生成工具之一ChatGPT进行了比较。我们的结果表明,我们的方法能够准确定位程序中的相应位置,合成所需的代码片段,将其添加到程序中,并在跨过程战术合成任务中优于ChatGPT。

英文摘要:

To implement important quality attributes of software such as architectural security tactics, developers incorporate API of software frameworks, as building blocks, to avoid re-inventing the wheel and improve their productivity. However, this is a challenging and error-prone task, especially for novice programmers. Despite the advances in the field of API-based program synthesis, the state-of-the-art suffers from a twofold shortcoming when it comes to architectural tactic implementation tasks. First, the specification of the desired tactic must be explicitly expressed, which is out of the knowledge of such programmers. Second, these approaches synthesize a block of code and leave the task of breaking it down into smaller pieces, adding each piece to the proper location in the code, and establishing correct dependencies between each piece and its surrounding environment as well as the other pieces, to the programmer. To mitigate these challenges, we introduce IPSynth, a novel inter-procedural program synthesis approach that automatically learns the specification of the tactic, synthesizes the tactic as inter-related code snippets, and adds them to an existing code base. We extend our first-place award-winning extended abstract recognized at the 36th IEEE/ACM International Conference on Automated Software Engineering (ASE'21) research competition track. In this paper, we provide the details of the approach, present the results of the experimental evaluation of IPSynth, and analyses and insights for a more comprehensive exploration of the research topic. Moreover, we compare the results of our approach to one of the most powerful code generator tools, ChatGPT. Our results show that our approach can accurately locate corresponding spots in the program, synthesize needed code snippets, add them to the program, and outperform ChatGPT in inter-procedural tactic synthesis tasks.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑