AI Bridges the Gap Between Natural Language and Logical Reasoning with ASP
Published on November 13, 2025 at 05:00 AM
Researchers have unveiled a new method for translating natural language into Answer Set Programming (ASP) code, a declarative programming paradigm based on logic programming. The hybrid approach leverages the strengths of both Large Language Models (LLMs) and Abstract Meaning Representation (AMR) parsing.
ASP is a powerful tool for describing and solving combinatorial problems, but its syntax can be challenging for those unfamiliar with programming languages. This research addresses the need for easier interaction with code, particularly in the field of Knowledge Representation and Reasoning (KRR).
The proposed system minimizes the role of LLMs, using them for tasks like simplifying sentences, identifying keywords, and generating simple facts. AMR graphs are then parsed from the simplified language to generate ASP constraints systematically. This contrasts with existing methods that rely heavily on LLMs, which can suffer from issues like hallucination and lack of explainability.
The system successfully creates complete ASP programs that can solve combinatorial logic problems. By minimizing the LLM’s role to straightforward tasks and leveraging AMR graphs, the approach aims to create a lighter-weight and more explainable system for converting natural language to solve complex logic problems. Example logic puzzles were used to demonstrate the system's capabilities. According to the authors, this is a significant first step in creating a more accessible way to leverage the power of ASP.