论文标题
代码复杂:从代码建议到逻辑建议
Code Sophistication: From Code Recommendation to Logic Recommendation
论文作者
论文摘要
编程的典型方法是首先对主要执行方案进行编码,然后专注于填写替代行为和角落案例。但是,几乎总是存在触发非典型行为的异常条件,这些行为很难在程序规范中预测,因此通常不编码。在本文中,我们考虑了检测和推荐此类丢失行为的问题,这是我们称为代码复杂的任务。先前关于编码助手的研究通常专注于根据预期行为的规格推荐代码片段。相比之下,代码复杂性发生在没有规范的情况下,旨在帮助开发人员以缺失和未指定的行为来完成其程序的逻辑。我们概述了该问题的研究挑战,并提出了早期结果,以表明如何通过利用代码结构和有关输入参数使用的信息来完成程序逻辑。
A typical approach to programming is to first code the main execution scenario, and then focus on filling out alternative behaviors and corner cases. But, almost always, there exist unusual conditions that trigger atypical behaviors, which are hard to predict in program specifications, and are thus often not coded. In this paper, we consider the problem of detecting and recommending such missing behaviors, a task that we call code sophistication. Previous research on coding assistants usually focuses on recommending code fragments based on specifications of the intended behavior. In contrast, code sophistication happens in the absence of a specification, aiming to help developers complete the logic of their programs with missing and unspecified behaviors. We outline the research challenges to this problem and present early results showing how program logic can be completed by leveraging code structure and information about the usage of input parameters.