CNL2ASP: converting controlled natural language sentences into ASP
- URL: http://arxiv.org/abs/2311.10505v1
- Date: Fri, 17 Nov 2023 13:10:58 GMT
- Title: CNL2ASP: converting controlled natural language sentences into ASP
- Authors: Simone Caruso, Carmine Dodaro, Marco Maratea, Marco Mochi, Francesco
Riccio
- Abstract summary: We propose a novel tool, called CNL2ASP, for translating English sentences expressed in a controlled natural language (CNL) form into ASP.
- Score: 4.747324197963404
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Answer Set Programming (ASP) is a popular declarative programming language
for solving hard combinatorial problems. Although ASP has gained widespread
acceptance in academic and industrial contexts, there are certain user groups
who may find it more advantageous to employ a higher-level language that
closely resembles natural language when specifying ASP programs. In this paper,
we propose a novel tool, called CNL2ASP, for translating English sentences
expressed in a controlled natural language (CNL) form into ASP. In particular,
we first provide a definition of the type of sentences allowed by our CNL and
their translation as ASP rules, and then exemplify the usage of the CNL for the
specification of both synthetic and real-world combinatorial problems. Finally,
we report the results of an experimental analysis conducted on the real-world
problems to compare the performance of automatically generated encodings with
the ones written by ASP practitioners, showing that our tool can obtain
satisfactory performance on these benchmarks. Under consideration in Theory and
Practice of Logic Programming (TPLP).
Related papers
- LLASP: Fine-tuning Large Language Models for Answer Set Programming [6.261151680007598]
Large Language Models (LLMs) have showcased their potential in various natural language processing tasks, including code generation.
We propose LLASP, a fine-tuned lightweight model specifically trained to encode fundamental ASP program patterns.
Our experiments demonstrate that the quality of ASP programs generated by LLASP is remarkable.
arXiv Detail & Related papers (2024-07-26T13:18:42Z) - NoviCode: Generating Programs from Natural Language Utterances by Novices [59.71218039095155]
We present NoviCode, a novel NL Programming task which takes as input an API and a natural language description by a novice non-programmer.
We show that NoviCode is indeed a challenging task in the code synthesis domain, and that generating complex code from non-technical instructions goes beyond the current Text-to-Code paradigm.
arXiv Detail & Related papers (2024-07-15T11:26:03Z) - Large Language Models are Interpretable Learners [53.56735770834617]
In this paper, we show a combination of Large Language Models (LLMs) and symbolic programs can bridge the gap between expressiveness and interpretability.
The pretrained LLM with natural language prompts provides a massive set of interpretable modules that can transform raw input into natural language concepts.
As the knowledge learned by LSP is a combination of natural language descriptions and symbolic rules, it is easily transferable to humans (interpretable) and other LLMs.
arXiv Detail & Related papers (2024-06-25T02:18:15Z) - Towards Automatic Composition of ASP Programs from Natural Language
Specifications [5.801044612920816]
This paper moves the first step towards automating the composition of Answer Set Programming (ASP) specifications.
NL2ASP uses neural machine translation to transform natural language into Controlled Natural Language (CNL) statements.
An experiment confirms the viability of the approach.
arXiv Detail & Related papers (2024-03-07T14:36:52Z) - LEVER: Learning to Verify Language-to-Code Generation with Execution [64.36459105535]
We propose LEVER, a simple approach to improve language-to-code generation by learning to verify the generated programs with their execution results.
Specifically, we train verifiers to determine whether a program sampled from the LLMs is correct or not based on the natural language input, the program itself and its execution results.
LEVER consistently improves over the base code LLMs(4.6% to 10.9% with code-davinci) and achieves new state-of-the-art results on all of them.
arXiv Detail & Related papers (2023-02-16T18:23:22Z) - Tools and Methodologies for Verifying Answer Set Programs [0.0]
ASP is a powerful declarative programming paradigm commonly used for solving challenging search and optimization problems.
As an approach to Knowledge Representation and Reasoning, ASP benefits from its simplicity, conciseness and rigorously defined semantics.
My research is concerned with extending the theory and tools supporting the verification of ASP progams.
arXiv Detail & Related papers (2022-08-05T10:50:21Z) - A Preliminary Data-driven Analysis of Common Errors Encountered by
Novice SPARC Programmers [0.0]
This study focuses on the types and difficulty of programming errors encountered by K-12 students using ASP.
From error messages in this dataset, we identify a collection of error classes, and measure how frequently each class occurs and how difficult it is to resolve.
arXiv Detail & Related papers (2022-08-05T10:48:25Z) - Leveraging Language to Learn Program Abstractions and Search Heuristics [66.28391181268645]
We introduce LAPS (Language for Abstraction and Program Search), a technique for using natural language annotations to guide joint learning of libraries and neurally-guided search models for synthesis.
When integrated into a state-of-the-art library learning system (DreamCoder), LAPS produces higher-quality libraries and improves search efficiency and generalization.
arXiv Detail & Related papers (2021-06-18T15:08:47Z) - Evaluating Multilingual Text Encoders for Unsupervised Cross-Lingual
Retrieval [51.60862829942932]
We present a systematic empirical study focused on the suitability of the state-of-the-art multilingual encoders for cross-lingual document and sentence retrieval tasks.
For sentence-level CLIR, we demonstrate that state-of-the-art performance can be achieved.
However, the peak performance is not met using the general-purpose multilingual text encoders off-the-shelf', but rather relying on their variants that have been further specialized for sentence understanding tasks.
arXiv Detail & Related papers (2021-01-21T00:15:38Z) - A Machine Learning guided Rewriting Approach for ASP Logic Programs [0.0]
We describe an approach based on Machine Learning (ML) to automatically decide whether to rewrite.
In particular, given an ASP program and a set of input facts, our approach chooses whether and how to rewrite input rules based on a set of features measuring their structural properties and domain information.
arXiv Detail & Related papers (2020-09-22T00:51:13Z) - The ILASP system for Inductive Learning of Answer Set Programs [79.41112438865386]
Our system learns Answer Set Programs, including normal rules, choice rules and hard and weak constraints.
We first give a general overview of ILASP's learning framework and its capabilities.
This is followed by a comprehensive summary of the evolution of the ILASP system.
arXiv Detail & Related papers (2020-05-02T19:04:12Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.