ConfInLog:利用软件可编程逻辑推理配置约束
ConfInLog: Leveraging Software Logs to Infer Configuration Constraints
摘要:
近年来,错误配置已成为软件故障的主要原因,其日益普遍和严重性引起了人们的极大关注。配置约束可以通过定义配置选项应满足的条件来预先避免错误配置。文档是配置约束的主要来源,但它可能不完整或与源代码不一致。在这方面,先前的研究集中在通过静态分析从软件源代码获得配置约束。然而,指针分析和上下文理解的困难阻碍了他们收集准确和全面的约束。在本文中,我们观察到,软件日志往往包含配置约束。我们进行了实证研究,并总结了配置相关的日志消息的模式。在此基础上,设计并实现了一个静态的配置约束推理工具ConfInLog。ConfInLog首先利用总结的模式从源代码中选择与配置相关的日志消息,然后根据总结的自然语言模式从日志消息中推断出约束。为了评估ConfInLog的有效性,我们将我们的工具应用于七个流行的开源软件系统。ConfInLog成功地推断出22到163个约束,其中59.5%到61.6%是最先进的工作无法推断的。最后,我们提交了67个关于ConfInLog推断的约束的文档补丁。29个补丁中的约束已被开发商确认,其中10个补丁已被接受。
英文摘要:
Misconfigurations have become the dominant causes of software failures in recent years, drawing tremendous attention for their increasing prevalence and severity. Configuration constraints can preemptively avoid misconfiguration by defining the conditions that configuration options should satisfy. Documentation is the main source of configuration constraints, but it might be incomplete or inconsistent with the source code. In this regard, prior researches have focused on obtaining configuration constraints from software source code through static analysis. However, the difficulty in pointer analysis and context comprehension prevents them from collecting accurate and comprehensive constraints. In this paper, we observed that software logs often contain configuration constraints. We conducted an empirical study and summarized patterns of configuration-related log messages. Guided by the study, we designed and implemented ConfInLog, a static tool to infer configuration constraints from log messages. ConfInLog first selects configuration-related log messages from source code by using the summarized patterns, then infers constraints from log messages based on the summarized natural language patterns. To evaluate the effectiveness of ConfInLog, we applied our tool on seven popular open-source software systems. ConfInLog successfully inferred 22 to 163 constraints, in which 59.5% to 61.6% could not be inferred by the state-of-the-art work. Finally, we submitted 67 documentation patches regarding the constraints inferred by ConfInLog. The constraints in 29 patches have been confirmed by the developers, among which 10 patches have been accepted.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。