Specifying Optimisation Problems for Declarative Programs in Precise Natural Language

28400

Authors

nan

Abstract

We argue that declarative programs can be writ- ten in precise natural language and back this claim by using a complex optimisation prob- lem. The problem specification is expressed in natural language and automatically translated into an executable answer set program, and an answer set solver is then used to find (optimal) solutions for natural language questions. Our approach enables subject matter experts to ex- press their knowledge in a natural and truly declarative notation without the need to encode this knowledge in a formal way. 1

Keywords

nan

Full Content

Specifying Optimisation Problems for Declarative Programs in Precise Natural Language Rolf Schwitter School of Computing Macquarie University Sydney NSW 2109 Rolf.Schwitter@mq.edu.au Abstract We argue that declarative programs can be writ- ten in precise natural language and back this claim by using a complex optimisation prob- lem. The problem specification is expressed in natural language and automatically translated into an executable answer set program, and an answer set solver is then used to find (optimal) solutions for natural language questions. Our approach enables subject matter experts to ex- press their knowledge in a natural and truly declarative notation without the need to encode this knowledge in a formal way. 1 Introduction Declarative programming involves stating what is to be computed, but not how it is to be computed; it is a programming paradigm that expresses the logic of computation without describing its con- trol flow (Lloyd, 1994). Logic programming lan- guages (K¨orner et al., 2022) and functional pro- gramming languages (Hu et al., 2015) belong to the declarative programming paradigm and result in code that is characterised by a high level of abstraction. One of the main benefits of declar- ative programming languages is their ability to describe problems with less code than imperative programming languages. Furthermore, declarative languages are known to be elaboration-tolerant, precise, and easier to optimise than imperative languages. In the context of logic programming, the development of the stable model semantics for logic programs (Gelfond and Lifschitz, 1988) has led to answer set programming (Janhunen and Nimel¨a, 2016), a powerful model-based language for knowledge representation and non-monotonic reasoning with industrial applications (Falkner et al., 2018). Writing an answer set program in- volves identifying objects and the relations between them and formally encoding this information as facts, rules and constraints. However, the resulting formal notation may be difficult to understand by subject matter experts who have detailed knowl- edge about the application domain but do not have a background in formal logic. Instead of encoding a problem specification in answer set programming notation, we suggested in previous work to express such a specification in a precise subset of natural language (Schwitter, 2018). Such a precise subset of natural language is also known as a controlled natural language (Kuhn, 2014). It has been shown that the writing of a specification in controlled lan- guage can be supported by a predictive authoring tool like the writing of code with the help of a code editor (Schwitter, 2020; Schwitter et al., 2003). That means the authoring tool instructs the user about the language constructs that can be used to construct a textual specification. As in the case of writing code, writing a specification in controlled language is a process that requires careful planning and an understanding of the application domain. In this paper, we focus on an extension of our con- trolled language PENGASP and illustrate how this controlled language can be used to specify a com- plex optimisation problem that goes beyond our previous work but uses similar unification-based techniques …

Content truncated to 500 words

Labeled Text

We argue that declarative programs can be written in precise natural language and back this claim by using a complex optimisation problem. The problem specification is expressed in natural language and automatically translated into an executable answer set program, and an answer set solver is then used to find (optimal) solutions for natural language questions. Our approach enables subject matter experts to express their knowledge in a natural and truly declarative notation without the need to encode this knowledge in a formal way. 1

Publication Details

Paper ID:
28400
Year:
2022
Publication:
TIPSTER
Publication Type:
conf
DOI:
nan