...
首页> 外文期刊>The Journal of Systems and Software >Code search with input/output queries: Generalizing, ranking, and assessment
【24h】

Code search with input/output queries: Generalizing, ranking, and assessment

机译:使用输入/输出查询进行代码搜索:泛化,排名和评估

获取原文
获取原文并翻译 | 示例
   

获取外文期刊封面封底 >>

       

摘要

In this work we generalize, improve, and extensively assess our semantic source code search engine through which developers use an input/output query model to specify what behavior they want instead of how it may be implemented. Under this approach a code repository contains programs encoded as constraints and an SMT solver finds encoded programs that match an input/output query. The search engine returns a list of source code snippets that match the specification. The initial instantiation of this approach showed potential but was limited. It only encoded single-path programs, reported just complete matches, did not rank the results, and was only partly assessed. In this work, we explore the use of symbolic execution to address some of these technical shortcomings. We implemented a tool, Satsy, that uses symbolic execution to encode multi-path programs as constraints and a novel ranking algorithm based on the strength of the match between an input/output query and the program paths traversed by symbolic execution. An assessment about the relevance of Satsy's results versus other search engines, Merobase and Google, on eight novice-level programming tasks gathered from StackOverflow, using the opinions of 30 study participants, reveals that Satsy often out-performs the competition in terms of precision, and that matches are found in seconds.
机译:在这项工作中,我们对语义源代码搜索引擎进行了概括,改进和广泛评估,开发人员通过该引擎使用输入/输出查询模型来指定他们想要的行为而不是行为的实现方式。在这种方法下,代码存储库包含编码为约束的程序,SMT求解器查找与输入/输出查询匹配的编码程序。搜索引擎返回与规范匹配的源代码片段列表。这种方法的最初实例化显示了潜力,但受到限制。它仅编码单路径程序,仅报告完全匹配,未对结果进行排名,仅进行了部分评估。在这项工作中,我们探索使用符号执行来解决其中的一些技术缺陷。我们实现了一个名为Satsy的工具,该工具使用符号执行将多路径程序编码为约束,并基于输入/输出查询与符号执行所遍历的程序路径之间的匹配强度,使用了一种新颖的排名算法。根据30位研究参与者的意见,对从Satsy的结果与其他搜索引擎Merobase和Google的相关性进行了评估,这些结果是从StackOverflow收集的八项新手级编程任务中得出的,这些结果表明Satsy的表现通常优于竞争对手,并在几秒钟内找到匹配项。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号