Abstract:Software configuration is a crucial component of software systems and plays an important role in enhancing the diversity and flexibility of software functionalities. As software systems become increasingly complex, the intricate constraint relationships between configuration options present a significant challenge for system administrators. To address this, researchers have proposed various constraint extraction methods based on different data sources and techniques to identify complex relationships between configurations. However, these methods face several limitations, such as limited applicability across multiple programming languages, constrained analysis scale, and a heavy reliance on high-quality annotated data. To overcome these issues, this study proposes LLM-Extractor, a configuration constraint extraction method based on large language models. This method consists of two main components: the construction of a configuration-function association graph and configuration constraint inference based on multi-configuration association subgraphs. In the graph construction phase, LLM-Extractor leverages the powerful text understanding and analysis capabilities of large language models to identify entities related to configurations and software functionalities from configuration documents and extract various types of relationships. In the constraint inference phase, LLM-Extractor searches for multi-configuration association subgraphs on the existing function graph and guides the large language model to infer configuration constraints based on the information within the subgraphs. By inferring constraints based on multi-configuration association subgraphs, LLM-Extractor can extract configuration constraints transmitted through software function states, filling the gap left by existing methods. It is also characterized by its language-agnostic nature and scalability. The effectiveness of this approach is evaluated on configuration documents from three open-source software systems, analyzing over 1400 configuration options. Experimental results show that LLM-Extractor outperforms existing text analysis methods, with a 43.4% improvement in F1 score. Further ablation studies demonstrate the critical positive impact of multi-configuration association subgraphs on the effectiveness of configuration constraint inference.