Language Model Agents Enable Semi-Formal Programming

The Live Programming Workshop at SPLASH, 2023


Abstract

In the pursuit of malleable programming environments, researchers and practitioners have explored different ways to capture semantic information before a user has fully specified their program. To date, however, these efforts have required system designers to build their formalisms from parts that are either fully formal or else fully opaque to the system. In this paper, we sketch how large language models (LLMs) can enable semi-formal programming. In a semi-formal program, some pieces of information are fully formalized in the host language’s data structure, but other pieces are left informal. Semi-formal information that is semantically meaningful can be executed directly by a language model agent (LMA), be used to guide the user in fully formalizing their program, or serve as a specification for generating a program that captures the user’s intent.