Formal Specifications from Natural Language

06/04/2022
by   Christopher Hahn, et al.
0

We study the generalization abilities of language models when translating natural language into formal specifications with complex semantics. In particular, we fine-tune language models on three datasets consisting of English sentences and their corresponding formal representation: 1) regular expressions (regex), frequently used in programming and search; 2) First-order logic (FOL), commonly used in software verification and theorem proving; and 3) linear-time temporal logic (LTL), which forms the basis for industrial hardware specification languages. Our experiments show that, in these diverse domains, the language models maintain their generalization capabilities from pre-trained knowledge of natural language to generalize, e.g., to new variable names or operator descriptions. Additionally, they achieve competitive performance, and even outperform the state-of-the-art for translating into regular expressions, with the benefits of being easy to access, efficient to fine-tune, and without a particular need for domain-specific reasoning.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/04/2021

Natural Hoare Logic: Towards formal verification of programs from logical forms of natural language specifications

Formal verification provides strong guarantees of correctness of softwar...
research
03/08/2023

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

A rigorous formalization of desired system requirements is indispensable...
research
09/18/2023

Specification-Driven Video Search via Foundation Models and Formal Verification

The increasing abundance of video data enables users to search for event...
research
05/20/2023

Experimental results from applying GPT-4 to an unpublished formal language

Can large language models be used to complete mathematical tasks that ar...
research
05/23/2023

ChipGPT: How far are we from natural language hardware design

As large language models (LLMs) like ChatGPT exhibited unprecedented mac...
research
06/20/2023

Blackbird language matrices (BLM), a new task for rule-like generalization in neural networks: Motivations and Formal Specifications

We motivate and formally define a new task for fine-tuning rule-like gen...
research
03/09/2023

Data-Efficient Learning of Natural Language to Linear Temporal Logic Translators for Robot Task Specification

To make robots accessible to a broad audience, it is critical to endow t...

Please sign up or login with your details

Forgot password? Click here to reset