Guardado en:
Detalles Bibliográficos
Autores principales: Levin, Kyla H., Gwilt, Kyle, Berger, Emery D., Freund, Stephen N.
Formato: Preprint
Publicado: 2025
Materias:
Acceso en línea:https://arxiv.org/abs/2501.02138
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866912176747315200
author Levin, Kyla H.
Gwilt, Kyle
Berger, Emery D.
Freund, Stephen N.
author_facet Levin, Kyla H.
Gwilt, Kyle
Berger, Emery D.
Freund, Stephen N.
contents The advent of large language models (LLMs) has paved the way for a new era of programming tools with both significant capabilities and risks, as the generated code lacks guarantees of correctness and reliability. Developers using LLMs currently face the difficult task of optimizing, integrating, and maintaining code generated by AI. We propose an embedded domain-specific language (DSL), Pythoness, to address those challenges. In Pythoness, developers program with LLMs at a higher level of abstraction. Rather than interacting directly with generated code, developers using Pythoness operate at the level of behavioral specifications when writing functions, classes, or an entire program. These specifications can take the form of unit tests and property-based tests, which may be expressed formally or in natural language. Guided by these specifications, Pythoness generates code that both passes the tests and can be continuously checked during execution. We posit that the Pythoness approach lets developers harness the full potential of LLMs for code generation while substantially mitigating their inherent risks. We describe our current prototype implementation of Pythoness and demonstrate that it can successfully leverage a combination of tests and code generation to yield higher quality code than specifications alone.
format Preprint
id arxiv_https___arxiv_org_abs_2501_02138
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Effective LLM-Driven Code Generation with Pythoness
Levin, Kyla H.
Gwilt, Kyle
Berger, Emery D.
Freund, Stephen N.
Programming Languages
Artificial Intelligence
Software Engineering
The advent of large language models (LLMs) has paved the way for a new era of programming tools with both significant capabilities and risks, as the generated code lacks guarantees of correctness and reliability. Developers using LLMs currently face the difficult task of optimizing, integrating, and maintaining code generated by AI. We propose an embedded domain-specific language (DSL), Pythoness, to address those challenges. In Pythoness, developers program with LLMs at a higher level of abstraction. Rather than interacting directly with generated code, developers using Pythoness operate at the level of behavioral specifications when writing functions, classes, or an entire program. These specifications can take the form of unit tests and property-based tests, which may be expressed formally or in natural language. Guided by these specifications, Pythoness generates code that both passes the tests and can be continuously checked during execution. We posit that the Pythoness approach lets developers harness the full potential of LLMs for code generation while substantially mitigating their inherent risks. We describe our current prototype implementation of Pythoness and demonstrate that it can successfully leverage a combination of tests and code generation to yield higher quality code than specifications alone.
title Effective LLM-Driven Code Generation with Pythoness
topic Programming Languages
Artificial Intelligence
Software Engineering
url https://arxiv.org/abs/2501.02138