DAInfer+: Neurosymbolic Inference of API Specifications from Documentation via Embedding Models
Maryam Masoudian, Anshunkang Zhou, Chengpeng Wang, Charles Zhang

TL;DR
DAInfer+ is a novel approach that uses NLP and neurosymbolic optimization to infer detailed API specifications from documentation, improving static analysis accuracy for software libraries.
Contribution
It introduces a neurosymbolic optimization method leveraging sentence embeddings and LLMs to accurately derive API data-flow and aliasing specifications from documentation.
Findings
Embedding models outperform LLMs in robustness and semantic detail.
Achieves over 82% recall and 85% precision for data-flow inference.
Provides rapid inference within seconds, demonstrating practical utility.
Abstract
Modern software systems heavily rely on various libraries, which require understanding the API semantics in static analysis. However, summarizing API semantics remains challenging due to complex implementations or unavailable library code. This paper presents DAInfer+, a novel approach for inferring API specifications from library documentation. We employ Natural Language Processing (NLP) to interpret informal semantic information provided by the documentation, which enables us to reduce the specification inference to an optimization problem. Specifically, we investigate the effectiveness of sentence embedding models and Large Language Models (LLMs) in deriving memory operation abstractions from API descriptions. These abstractions are used to retrieve data-flow and aliasing relations to generate comprehensive API specifications. To solve the optimization problem efficiently, we propose…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
