paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Path-based function embedding and its application to error-handling specification mining

基于路径的函数嵌入及其在错误处理规约挖掘中的应用
FSE Proceedings of the 2018 26th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering2018匹配度 3/10 · 该论文属于机器学习辅助程序分析与规约挖掘,与“AI→PL”有弱关联,但方法基于随机游走与函数嵌入,不涉及 LLM/Agent、浮点程序分析或贝叶斯程序分析,也未聚焦 ML 系统/Agentic 程序的静态分析。引用 61 inbox
Daniel DeFreez, Aditya V. Thakur, Cindy Rubio-González
crossref: 2026-09-12

AI 速览

一句话:提出 Func2vec,基于过程间控制流图随机游走训练函数嵌入,识别函数同义并挖掘错误处理规约。

识别程序元素之间的关系有助于程序理解、调试和分析,其中一类关系是函数同义:函数在代码中扮演相似角色,但不一定语义等价,语法也可能不同,因此代码克隆或功能等价方法难以识别。本文提出 Func2vec,通过训练神经网络学习函数嵌入,将每个函数映射到连续向量空间,使同义函数的向量彼此接近。其训练数据来自在过程间控制流图上随机游走生成的句子。作者在 Linux 内核上评估了函数同义识别效果,并将 Func2vec 应用于 Linux 文件系统与驱动中的错误处理规约挖掘,结果表明所识别的函数同义能够产生高支持度的错误处理规约。

问题
问题是如何识别程序中的函数同义关系:这些函数扮演相似角色但不一定语义等价或语法相似,传统代码克隆或功能等价识别方法不适用;并进一步用于挖掘错误处理规约。
方法
提出 Func2vec,在过程间控制流图上进行随机游走生成句子,训练神经网络学习函数向量嵌入,使同义函数在向量空间中接近。
评估
在 Linux 内核上评估函数同义识别效果,并应用于 Linux 文件系统与驱动的错误处理规约挖掘,验证了所识别的同义函数可产生高支持度规约。
原文摘要(Abstract)

Identifying relationships among program elements is useful for program understanding, debugging, and analysis. One such kind of relationship is synonymy. Function synonyms are functions that play a similar role in code; examples include functions that perform initialization for different device drivers, and functions that implement different symmetric-key encryption schemes. Function synonyms are not necessarily semantically equivalent and can be syntactically dissimilar; consequently, approaches for identifying code clones or functional equivalence cannot be used to identify them. This paper presents Func2 vec , a technique that learns an embedding mapping each function to a vector in a continuous vector space such that vectors for function synonyms are in close proximity. We compute the function embedding by training a neural network on sentences generated using random walks over the interprocedural control-flow graph. We show the effectiveness of Func2 vec at identifying function synonyms in the Linux kernel. Finally, we apply Func2 vec to the problem of mining error-handling specifications in Linux file systems and drivers. We show that the function synonyms identified by Func2 vec result in error-handling specifications with high support.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot4605,
  title = {Path-based function embedding and its application to error-handling specification mining},
  author = {Daniel DeFreez and Aditya V. Thakur and Cindy Rubio-González},
  booktitle = {FSE},
  year = {2018},
  doi = {10.1145/3236024.3236059}
}