nl2spec: Interactively Translating Unstructured Natural Language to Temporal Logics with Large Language Models

03/08/2023
by   Matthias Cosler, et al.
0

A rigorous formalization of desired system requirements is indispensable when performing any verification task. This often limits the application of verification techniques, as writing formal specifications is an error-prone and time-consuming manual task. To facilitate this, we present nl2spec, a framework for applying Large Language Models (LLMs) to derive formal specifications (in temporal logics) from unstructured natural language. In particular, we introduce a new methodology to detect and resolve the inherent ambiguity of system requirements in natural language: we utilize LLMs to map subformulas of the formalization back to the corresponding natural language fragments of the input. Users iteratively add, delete, and edit these sub-translations to amend erroneous formalizations, which is easier than manually redrafting the entire formalization. The framework is agnostic to specific application domains and can be extended to similar specification languages and new neural models. We perform a user study to obtain a challenging dataset, which we use to run experiments on the quality of translations. We provide an open-source implementation, including a web-based frontend.

READ FULL TEXT

page 20

page 21

page 22

page 23

research
06/04/2022

Formal Specifications from Natural Language

We study the generalization abilities of language models when translatin...
research
01/10/2022

A Compositional Proof Framework for FRETish Requirements

Structured natural languages provide a trade space between ambiguous nat...
research
03/06/2018

Precise but Natural Specification for Robot Tasks

We present Flipper, a natural language interface for describing high lev...
research
05/25/2022

Autoformalization with Large Language Models

Autoformalization is the process of automatically translating from natur...
research
09/18/2023

From RTL to SVA: LLM-assisted generation of Formal Verification Testbenches

Formal property verification (FPV) has existed for decades and has been ...
research
05/16/2022

Natural Language Specifications in Proof Assistants

Interactive proof assistants are computer programs carefully constructed...
research
10/20/2022

ObSynth: An Interactive Synthesis System for Generating Object Models from Natural Language Specifications

We introduce ObSynth, an interactive system leveraging the domain knowle...

Please sign up or login with your details

Forgot password? Click here to reset