Towards Automatic Composition of ASP Programs from Natural Language
Specifications
- URL: http://arxiv.org/abs/2403.04541v1
- Date: Thu, 7 Mar 2024 14:36:52 GMT
- Title: Towards Automatic Composition of ASP Programs from Natural Language
Specifications
- Authors: Manuel Borroto, Irfan Kareem, Francesco Ricca
- Abstract summary: 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.
- Score: 5.801044612920816
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: This paper moves the first step towards automating the composition of Answer
Set Programming (ASP) specifications. In particular, the following
contributions are provided: (i) A dataset focused on graph-related problem
specifications, designed to develop and assess tools for ASP automatic coding;
(ii) A two-step architecture, implemented in the NL2ASP tool, for generating
ASP programs from natural language specifications. NL2ASP uses neural machine
translation to transform natural language into Controlled Natural Language
(CNL) statements. Subsequently, CNL statements are converted into ASP code
using the CNL2ASP tool. An experiment confirms the viability of the approach.
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) - Unit Testing in ASP Revisited: Language and Test-Driven Development
Environment [8.110978727364397]
We propose a new unit test specification language that allows one to inline tests within ASP programs.
Test-case specifications are transparent to the traditional evaluation, but can be interpreted by a specific testing tool.
arXiv Detail & Related papers (2024-01-04T09:04:54Z) - CNL2ASP: converting controlled natural language sentences into ASP [4.747324197963404]
We propose a novel tool, called CNL2ASP, for translating English sentences expressed in a controlled natural language (CNL) form into ASP.
arXiv Detail & Related papers (2023-11-17T13:10:58Z) - Python Code Generation by Asking Clarification Questions [57.63906360576212]
In this work, we introduce a novel and more realistic setup for this task.
We hypothesize that the under-specification of a natural language description can be resolved by asking clarification questions.
We collect and introduce a new dataset named CodeClarQA containing pairs of natural language descriptions and code with created synthetic clarification questions and answers.
arXiv Detail & Related papers (2022-12-19T22:08:36Z) - An ASP-based Approach to Answering Natural Language Questions for Texts [8.417188296231059]
An approach based on answer set programming (ASP) is proposed in this paper for representing knowledge generated from natural language texts.
ASP can facilitate many natural language tasks such as automated question answering, text summarization, and automated question generation.
In this paper, we describe the CASPR system that we have developed to automate the task of answering natural language questions given English text.
arXiv Detail & Related papers (2021-12-21T14:13:06Z) - 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) - Incorporating External Knowledge through Pre-training for Natural
Language to Code Generation [97.97049697457425]
Open-domain code generation aims to generate code in a general-purpose programming language from natural language (NL) intents.
We explore the effectiveness of incorporating two varieties of external knowledge into NL-to-code generation: automatically mined NL-code pairs from the online programming QA forum StackOverflow and programming language API documentation.
Our evaluations show that combining the two sources with data augmentation and retrieval-based data re-sampling improves the current state-of-the-art by up to 2.2% absolute BLEU score on the code generation testbed CoNaLa.
arXiv Detail & Related papers (2020-04-20T01:45:27Z) - CodeBERT: A Pre-Trained Model for Programming and Natural Languages [117.34242908773061]
CodeBERT is a pre-trained model for programming language (PL) and nat-ural language (NL)
We develop CodeBERT with Transformer-based neural architecture.
We evaluate CodeBERT on two NL-PL applications by fine-tuning model parameters.
arXiv Detail & Related papers (2020-02-19T13:09:07Z)
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.