אחיה אליסף

אקדמי בכיר

Boosting LLM-Based Software Generation by Aligning Code with Requirements

Emerging LLM-based code generation tools enable programmers to specify desired functionality and automatically generate code. However, these tools fall short in comparison to human ability when it comes to creating complete system models from requirements. This is because humans typically formulate a software design before implementing a system. In this paper, we propose to use the behavioral programming (BP) model-based paradigm as a general design approach that allows for the direct translation of requirements of any reactive systems into code. We demonstrate that each requirement can be automatically transformed into a dedicated code module without the need for a global view of the system. The key lies in BP's capability to enable modules to implement both scenarios and anti-scenarios separately. This means that each module can independently define behaviors that may happen, must happen, and must not happen. Subsequently, an application-agnostic execution engine interprets and interweaves these modules at runtime to generate cohesive system behavior consistent with system requirements. The fact that each requirement is translated into a small module also facilitates the verification of its implementation, thereby helping to reduce errors in LLM code generation. We present an initial evaluation of our approach and demonstrate how the characteristics of BP aid in generating aligned and correct implementations.

שפת פרסום אנגלית
דפים 301-305
סטטוס פרסום פורסם - 01.01.2024

Keywords

behavioral programming
large language models
requirement engineering

ASJC Scopus subject areas

Artificial Intelligence
Software
Safety, Risk, Reliability and Quality
Modeling and Simulation
גישה למסמך
10.1109/REW61692.2024.00045
קבצים וקישורים אחרים
Link to publication in Scopus