🤖 AI Summary
This work addresses the challenge of enabling natural language (NL) users—without expertise in logic programming—to solve combinatorial logic puzzles using Answer Set Programming (ASP). We propose a lightweight, interpretable NL-to-ASP translation framework that decomposes the mapping into atomic subtasks—sentence simplification, keyword identification, and fact extraction—performed by a large language model (LLM) under strict task constraints. Crucially, we introduce Abstract Meaning Representation (AMR) graphs as an intermediate semantic representation: AMR parsing yields structured semantic graphs, from which ASP rules, facts, and integrity constraints are systematically derived via graph pattern matching. This AMR-based mediation significantly improves both the precision and traceability of formalization. Experiments across diverse logic puzzle categories demonstrate that our method consistently generates complete, syntactically correct, and executable ASP programs with high accuracy. It substantially lowers the barrier to entry for non-expert users engaging in symbolic reasoning, establishing a novel paradigm for natural language–driven automated deduction.
📝 Abstract
Answer Set Programming (ASP) is a declarative programming paradigm based on logic programming and non-monotonic reasoning. It is a tremendously powerful tool for describing and solving combinatorial problems. Like any other language, ASP requires users to learn how it works and the syntax involved. It is becoming increasingly required for those unfamiliar with programming languages to interact with code. This paper proposes a novel method of translating unconstrained English into ASP programs for logic puzzles using an LLM and Abstract Meaning Representation (AMR) graphs. Everything from ASP rules, facts, and constraints is generated to fully represent and solve the desired problem. Example logic puzzles are used to demonstrate the capabilities of the system. While most current methods rely entirely on an LLM, our system minimizes the role of the LLM only to complete straightforward tasks. The LLM is used to simplify natural language sentences, identify keywords, and generate simple facts. The AMR graphs are then parsed from simplified language and used to generate ASP constraints systematically. The system successfully creates an entire ASP program that solves a combinatorial logic problem. This approach is a significant first step in creating a lighter-weight, explainable system that converts natural language to solve complex logic problems.