Systems and methods for generative artificial intelligence behavior driven development

Through generative artificial intelligence and behavior-driven development, the problems of code errors and biases in the traditional AI code generation process are solved, and fast and accurate code generation is achieved, reducing the time for human review and testing, and improving the efficiency of software development.

CN119127661APending Publication Date: 2024-12-13LNRS DATA SERVICES INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410752899.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-04-17
Filing Date
2024-06-12
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

There are code errors and bias problems in the traditional AI code generation process, which leads to the generated code that requires human review and testing, which takes a long time and fails to fully utilize the acceleration effect of generative AI.

Method used

Using generative artificial intelligence and behavior-driven development (BDD) methods, the expected behavior described in natural language is used to convert it into test scenarios using domain-specific languages, and generate test code and data sets, and generate implementation source code based on these scenarios and verify Its correctness.

Benefits of technology

It greatly accelerates the software development process, improves the accuracy and reliability of code generation, reduces the time investment of human intervention, and realizes code generation with almost zero manual inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127661A_ABST
    Figure CN119127661A_ABST
Patent Text Reader

Abstract

A system and method for generative artificial intelligence behavior driven development is disclosed. Behavior-driven development (BDD) is used to define a test scenario, and is used to compile the test scenario with code before application code is compiled. An expected behavior of a new function in a natural language is defined and converted into test code driven by a Domain Specific Language (DSL) that encapsulates a description of the expected behavior, after which code of the function can begin to be written. In some implementations, artificial intelligence (AI) may be used to first generate test scenarios and related test data, and then generate code through all tests (or iterated until all tests are passed), such that the code requires zero or nearly zero manual inspection. If the generated code passes the test scenario, it satisfies the expected behavior. This saves a large amount of time investment and reduces the number of steps to be completed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The disclosed technology generally relates to using generative artificial intelligence (AI) to accelerate the software development process. Background Art

[0002] Artificial intelligence and / or machine language (AI / ML) services offer tremendous opportunities for businesses to streamline internal operations, develop new products, and / or provide efficient services to customers. AI capabilities in services such as Github Copilot and / or ChatGPT can be used to generate source code to implement certain functions based on natural language input describing the desired functionality.

[0003] While useful and certainly an acceleration of the development lifecycle, traditional uses of the traditional AI code generation process have flaws that can hinder its effectiveness. For example, traditional AI models are trained on code written by humans, which will have code errors and can cause the code output generated by the AI ​​to have similar errors. This problem is similar to the concept of bias, as the inherent unfairness / inaccuracies in the source training material will be incorporated into the AI ​​model. Therefore, this code (like any human-written code) cannot be trusted and must be reviewed and tested by humans. However, testing of such code often takes as long or longer than writing the code itself, which means that much of the work of creating the code does not fully utilize generative AI because testing still must be implemented.

[0004] In a data-driven business, many tests will revolve around data-driven use cases. That is, when a given data set is input, the expected data set is output, thereby describing the expected behavior of the module or system under test (through sufficient input / output test cases). This is a time-consuming task for humans to perform, because making good input and output data sets requires careful exploration and comprehensive processing of the data to drive the expected code behavior.

[0005] Figure 1 The following general traditional process is described: implement source code using generative AI, review source code, iterate to meet expectations, create curated data-driven test scenarios, manually implement test source code based on scenarios, and modify source code to meet expectations. In this traditional process, only the first or second step is accelerated by using AI.

[0006] What is needed is a process and system that allows AI / ML models to be created and / or fine-tuned using generative AI to accelerate code generation. Summary of the invention

[0007] Some or all of the above requirements can be addressed by certain embodiments of the disclosed technology. Certain embodiments of the disclosed technology may include pre-defining test scenarios and / or expectations in the code before writing application code to pass the test scenarios. Certain exemplary implementations may maximize the use of generative AI capabilities to accelerate certain functions associated with model generation, training, and / or validation.

[0008] In certain implementations, a method for accelerating the software development process using generative artificial intelligence (AI) and behavior-driven development (BDD) is provided. The method may include: receiving a natural language description of an expected behavior of a machine-readable code function, converting the natural language description into a test scenario using a domain-specific language (DSL), submitting the test scenario to a generative AI to generate test code for executing the scenario, generating a data set for the test scenario using the generative AI based on the natural language description of the expected behavior, merging the generated data set into the test scenario description, generating implementation source code based on the generated test scenario, and verifying the generated implementation source code.

[0009] In certain implementations, a system for accelerating the software development process using generative AI is disclosed. The system may include a user interface, a converter module, a generative AI module, an implementation code generation module, and a verification module, wherein the user interface is used to receive a natural language description of the expected behavior of a machine-readable code function, the converter module is configured to convert the natural language description into a test scenario using a domain-specific language (DSL), the generative AI module is configured to generate test code based on the test scenario and generate a data set based on the expected behavior description, the implementation code generation module is configured to generate implementation source code based on the generated test scenario, and the verification module is used to test the generated implementation source code against the generated test scenario.

[0010] In certain implementations, a computer-readable storage medium is provided for storing instructions that, when executed by a processor, cause the processor to perform the following method: receiving a natural language description of an expected behavior of a machine-readable code function, converting the natural language description into a test scenario using a domain-specific language (DSL), submitting the test scenario to a generative AI to generate test code for executing the scenario, generating a data set for the test scenario using the generative AI based on the natural language description of the expected behavior, merging the generated data set into the test scenario description, generating implementation source code based on the generated test scenario, and verifying the generated implementation source code.

[0011] Other embodiments, features, and aspects of the disclosed technology are described in detail herein and are considered a part of the disclosed technology claimed for protection. Other embodiments, features, and aspects may be understood with reference to the following detailed description, drawings, and claims.

[0012] This application claims priority to U.S. Provisional Patent Application No. 63 / 507,652, filed on June 12, 2023, entitled “Systems and Methods for Generative AI Behaviour-Driven Development,” the entire contents of which are incorporated herein by reference as if fully set forth herein. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Reference will now be made to the accompanying drawings and flow charts, which are not necessarily drawn to scale, in which:

[0014] Figure 1 is a block diagram of a standard generative AI process for generating source code.

[0015] Figure 2 is an illustrative example of a Behavior Driven Development (BDD) test scenario.

[0016] Figure 3 Example procedures are described according to certain example implementations of the disclosed technology.

[0017] Figure 4 is a block diagram of an illustrative computing system in accordance with an exemplary embodiment of the disclosed technology.

[0018] Figure 5 is a flow chart of a method according to an exemplary embodiment of the disclosed technology. DETAILED DESCRIPTION

[0019] Embodiments of the disclosed technology will be described more fully below with reference to the accompanying drawings, in which certain example embodiments are shown. However, the disclosed technology can be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; on the contrary, these embodiments are provided so that the present invention will be thorough and complete and will fully convey the scope of the disclosed technology to those skilled in the art.

[0020] The disclosed technology may provide an alternative to the traditional time-consuming process of implementing source code using generative AI, such as Figure 1As shown. In the first step 102 of the traditional process, generative AI can be used to create source code. In the second step 104, and in some cases, AI can be used to review and / or iterate the generated source code to determine whether the generated source code meets expectations. However, in the traditional process, the third step 106 (creating a curated data-driven test scenario), the fourth step 108 (manually implementing the test source code based on the scenario), and / or the fifth step 110 (modifying the source code to meet the test expectations) are performed manually without using AI to accelerate the process.

[0021] Certain implementations of the disclosed technology can improve the development speed, accuracy, and reliability of the above-mentioned traditional processes to enable AI to be used to create test scenarios, write test code, and write feature code to pass tests, as will be discussed below. Certain implementations of the disclosed technology can be used to fine-tune AI / ML models using generative AI to accelerate code generation.

[0022] Certain implementations of the disclosed technology can utilize behavior-driven development (BDD), which can be viewed as an extension of test-driven development, an approach that focuses on defining test scenarios and writing them into code before writing application code to pass the test scenarios. The disclosed technology can provide an efficient process that can maximize the use of generative AI capabilities.

[0023] In contrast to general-purpose computer languages, a domain-specific language (DSL) is a computer language that is typically targeted at a specific type of problem. For example, Hyper Text Markup Language (HTML) is a typical DSL for web activities; Structured Query Language (SQL) is a DSL for data management; Verilog is a DSL for hardware, and so on. In BDD, the product owner (or other customer-facing role) typically works with the engineering team to define the expected behavior of a new feature in natural language. The expected behavior is then converted into test code by the developer, perhaps driven by a DSL that encapsulates the product owner's description, after which the functional code can be written to pass the tests.

[0024] Figure 2 Provides an example of a defined expected behavior written as a given, when, then statement. For example:

[0025] -The given flight departs from Los Angeles International Airport at 15.05 local time and arrives at London Heathrow Airport (LHR) at 16.05

[0026] -When the flight is delayed by 17 minutes at the departure airport

[0027] - Its estimated arrival time should also be delayed by 17 minutes

[0028] Writing test scenarios with expected behavior in natural language is a good candidate for submission to generative AI to create the necessary test code and then execute the scenarios described in the DSL. Humans may still need to review the code and iterate with the AI ​​(as is the case with any generative AI code output), but the disclosed techniques can still greatly speed up this step of the process.

[0029] Furthermore, in data-driven businesses, the data inputs and outputs of behavioral test scenarios may be much more complex, and certain implementations of the disclosed technology may utilize generative AI to create the data sets required for testing. These data sets can then be added to the test scenario / expected behavior set. In certain implementations, the AI's scenario descriptions can be incorporated into the test implementations it creates, which can greatly speed up this step of the process.

[0030] Figure 3 Describes an example process according to certain exemplary implementations of the disclosed technology, where each step can be accelerated using AI. Figure 1 Compared with the traditional method shown in the flowchart, Figure 3 The process of the disclosed technology shown can utilize AI to generate implementation source code based on (validated) AI-generated test scenario data, and the feature code can also be AI-generated so that the source code will pass all tests.

[0031] exist Figure 3 In a first step 302 of the disclosed method, generative AI may be used to generate complete test scenarios. In a second step 304, generative AI may be used to write test code for testing the generated test scenarios. In this step, data and natural language descriptions may be used as inputs to the AI ​​for the generation of test code. In a third step 306, the AI ​​may be utilized to write feature implementation code that will pass all tests. Thus, in contrast to conventional methods of writing code based on inaccurate human statements, the disclosed technique enables AI to write code without exposing the process to human statements that have room for inaccuracy.

[0032] Certain implementations can model expected behavior in test scenarios, and as long as the AI ​​generates code that passes all tests (or iterates until all tests are passed, which can be automated), the code may require zero or almost zero human review. If the generated code passes the tests, then it meets the expected behavior. Therefore, implementations of the disclosed technology can save a lot of time investment and can reduce the number of steps to complete error-free source code generation.

[0033] Example use case:

[0034] In an example use case, developers can use the disclosed techniques and can follow the principles of behavior-driven development to generate test scenarios and verified code, such as Figure 3 As shown. In the first step 302, generative AI can be used to create test scenario data. For example, a developer can use the disclosed technology to write a function in Java that will take the International Air Transport Association (IATA) and / or the International Civil Aviation Organization (ICAO) short code as input and return the name of the relevant airline to display in the user interface. For example, a dataset containing relevant data can be input to the AI ​​model. In this case, the input data can be a mapping between IATA codes, ICAO codes, and airline names. For this example use case, Table 1 shows a simple data input that can be used to illustrate this step:

[0035] Table 1

[0036]

[0037] The AI ​​could then be instructed: “Create some test scenarios, including positive and negative data, for a Java function that takes an ICAO and / or IATA code and returns an airline name, and output a table of the inputs and expected outputs of such a function.”

[0038] In this example, the AI ​​can return scenario and tabular test data that can be used for automated testing, as shown below:

[0039] Positive test scenario:

[0040] 1. Input: "BAB". Expected output: "British Airways".

[0041] 2. Input: "LSE". Expected output: "Jet2.com".

[0042] 3. Input: "LHD". Expected output: "Lufthansa".

[0043] Negative test scenario:

[0044] 1. Input: "XYZ". Expected output: null (no matching airline).

[0045] 2. Input: "". Expected output: null (empty input).

[0046] 3. Input: "MHMASVSVIR". Expected output: null (multiple matching airlines).

[0047] Table of input and expected output:

[0048] |Code|Airline name|

[0049] |-----------|------------------------|

[0050] |BAB|British Airways|

[0051] |LSE|Jet2.com|

[0052] |LHD|Lufthansa|

[0053] |XYZ|-|

[0054] |-|-|

[0055] |MHMASVSVIR|-|

[0056] Notes:

[0057] - In the table, "-" means no matching airline or empty input.

[0058] - The provided context does not specify if there are any constraints or rules on the input or expected behavior in case of errors, so the above assumptions are made based on common practice in similar scenarios.

[0059] - If further details or requirements are provided, the test scenarios and tables may be adjusted accordingly.

[0060] The AI ​​can then be instructed to restate these scenarios as given…, when…, then… behavioral scenarios via the instruction: “Restate earlier test scenarios as given…, when…, then… statements”. The AI ​​can output the following as a response:

[0061] Here is the test scenario provided earlier restated in a Given-When-Then format:

[0062] Positive scenario:

[0063] 1. Given the IATA / ICAO code "BAB", when the function "getAirlineName" is called with this code, it should return "British Airways".

[0064] 2. Given the IATA / ICAO code of "LSE", when the function "getAirlineName" is called with this code, it should return "Jet2.com".

[0065] 3. Given the IATA / ICAO code "LHD", when the function "getAirlineName" is called with this code, it should return "Lufthansa".

[0066] Negative scenario:

[0067] 1. Given an IATA / ICAO code of "XYZ", when the function "getAirlineName" is called with that code, then it should return null as there is no matching airline for that code.

[0068] 2. Given that the IATA / ICAO code is an empty string, when the function "getAirlineName" is called with that code, then it should return null as this is an invalid input.

[0069] 3. Given the IATA / ICAO code of "MHMASVSVIR", when the function "getAirlineName" is called with that code, then it should return null as the code does not match a single airline.

[0070] The result so far in the example use case is that a scenario definition and input data with expected outputs have been generated, which completes Figure 3 The first step 302.

[0071] exist Figure 3 In the second step 304, the generative AI can be used to write test code using the data and the natural language description. Continuing with the example use case, the AI ​​can be instructed to implement a data-driven test case that uses the previously generated data to test the previously described function using the following input: "In Java code and using the Junit framework, write a unit test for the above scenario, provide input to the function, and verify that the return string is the expected string." In response, the AI ​​can return a source code implementation of the previously described test case from the source data set and the natural language description of the function. An example based on the scenario used here is shown below.

[0072] import org.junit.Test;

[0073] import static org.junit.Assert.assertEquals;

[0074] public class AirlineTests

[0075] {

[0076] @test

[0077] public void testBritishAirwayslATACode()

[0078] {

[0079] String iataCode = "BA";

[0080] String expectedName="British Airways";

[0081] String actualName=getAirlineName(iataCode);

[0082] assertEquals(expectedName,actualName);

[0083] }

[0084] / / Add more similar methods for other scenarios...

[0085] }

[0086] Human validation of the generated scenarios can be applied here and iterated with the AI, but almost all the work is done by the AI ​​itself. Figure 3 The second step 304.

[0087] exist Figure 3 In the third step 306 of , generative AI can be used to write feature code to pass the test. In the example scenario, the AI ​​can now be instructed to generate code to pass the test using the following instructions: "From the test scenarios described above, write implementation code for the Java function being tested that will pass all of these tests."

[0088] The AI ​​can then write code that passes all tests based on previous test scenarios. For example, shown below is a very simplified implementation - a real implementation could read data from a database, etc., all of which could be driven by descriptions of test scenario behavior in previous steps before implementing this implementation:

[0089] import java.util.HashMap;

[0090] import java.util.Map;

[0091] public class AirlineUtils

[0092] {

[0093] private static Map<String,String>airlineNames;

[0094] static

[0095] {

[0096] / / Initialize and populate the list of airlines

[0097] airlineNames=new HashMap<>();

[0098] airlineNames.put("BAB","British Airways");

[0099] airlineNames.put("LSE","let2.com");

[0100] airlineNames.put("LHD","Lufthansa");

[0101] / / Add more airline IATA / ICAO and respective names here

[0102] }

[0103] / **

[0104] *This method accepts IATA / ICAO airline code as input and returns theairline name.

[0105] *@param_ataIcaoCode IATA or ICAO code for an airline

[0106] *@return the name of airline or null if airline code doesn't exist

[0107] * /

[0108] public static String getAirlineName(String iataIcaoCode)

[0109] {

[0110] return airlineNames.get(iataIcaoCode);

[0111] }

[0112] }

[0113] The generated code in the above example completes Figure 3 The third step 306, and the developer follows the principles of behavior-driven development (BDD) and has a full set of test scenarios and verified code.

[0114] As shown in the example use cases above, certain implementations of the disclosed technology can be used to generate test data via natural language queries to an AI connected to a test or production data repository. The AI ​​can be used to generate test input and output data sets in a test-friendly structured format to drive behavior rather than directly answer questions.

[0115] Furthermore, as shown in the example use case, certain implementations of the disclosed technology can be utilized to generate test scenario code from test input data sets and output data sets and functional behavior descriptions in natural language to generate BDD-style test code from given data and descriptions.

[0116] As shown in the example use case, some implementations of the disclosed technology can utilize test data and scenario code to generate final implementation code. In some implementations, assuming that the final implementation code passes the test scenario, such generation can be performed without human intervention.

[0117] Certain implementations of the disclosed technology may provide improvements over conventional systems. According to certain implementations, generative AI may be used in an end-to-end BDD process, which may provide technical advantages that reduce man-hours and / or time and effort in code generation. For example, by generating test data and code and using that output to generate functionally accurate code as the next stage, the code generation process is greatly accelerated.

[0118] Various implementations of the communication systems and methods herein may be embodied in a non-transitory computer-readable medium executed by a processor. Example implementations may be used in applications on mobile computing devices (e.g., smartphones or tablet computers), but other computing devices may also be used, such as portable computers, tablet PCs, Internet tablets, personal digital assistants (PDAs), ultramobile PCs (UMPCs), etc.

[0119] Figure 4 A block diagram of an illustrative computing device 400 that can be used to implement certain aspects of the disclosed technology is described. Various implementations and methods herein can be embodied in a non-transitory computer-readable medium executed by a processor. It will be understood that the computing device 400 is provided for example purposes only and does not limit the scope of various implementations of the communication systems and methods.

[0120] Figure 4 The computing device 400 includes one or more processors that process computer instructions. The computing device 400 may include a processor 402, or may be connected to a processor 402. Figure 4 In some instances, a computing device may be a processor, a controller, or a central processing unit (CPU). In other instances, a computing device may be a set of hardware components.

[0121] The computing device 400 may include a display interface 404, which serves as a communication interface and provides the functionality of presenting video, graphics, images, and text on a display. In some example implementations of the disclosed technology, the display interface 404 may be directly connected to a local display. In another example implementation, the display interface 404 may be configured to provide data, images, and other information to an external / remote display. In some example implementations, the display interface 404 may, for example, communicate wirelessly with an external / remote display via a Wi-Fi channel or other available network connection interface 412.

[0122] In an example implementation, the network connection interface 412 can be configured as a communication interface and can provide a function for presenting video, graphics, images, text, other information or any combination thereof on a display. In one example, the communication interface can include a serial port, a parallel port, a general-purpose input and output (GPIO) port, a game port, a universal serial bus (USB), a micro USB port, a high-definition multimedia (HDMI) port, a video port, an audio port, a Bluetooth port, a near-field communication (NFC) port, other similar communication interfaces or any combination thereof. In one example, the display interface 404 can be operably coupled to a local display. In another example, the display interface 404 can communicate wirelessly with an external / remote display, for example, via a network connection interface 412 such as a Wi-Fi transceiver.

[0123] Computing device 400 may include keyboard interface 406 that provides a communication interface to a keyboard. According to certain example implementations of the disclosed technology, presence-sensitive display interface 408 may provide a communication interface to various devices such as a pointing device, a touch screen, and the like.

[0124] The computing device 400 may be configured to use input devices via one or more input / output interfaces (e.g., keyboard interface 406, display interface 404, presence-sensitive display interface 408, network connection interface 412, camera interface 414, sound interface 416, etc.) to allow a user to capture information into the computing device 400. Input devices may include a mouse, a trackball, a directional pad, a trackpad, a touch-authentication trackpad, a presence-sensitive trackpad, a presence-sensitive display, a scroll wheel, a digital camera, a digital video camera, a webcam, a microphone, a sensor, a smart card, etc. In addition, the input device may be integrated with the computing device 400, or may be a separate device. For example, the input device may be an accelerometer, a magnetometer, a digital camera, a microphone, and an optical sensor.

[0125] An example implementation of computing device 400 may include an antenna interface 410 that provides a communication interface to an antenna; a network connection interface 412 that provides a communication interface to a network. According to some example implementations, antenna interface 410 may be used to communicate with a Bluetooth transceiver.

[0126] In some implementations, a camera interface 414 may be provided that acts as a communication interface and provides functionality for capturing digital images from a camera. In some implementations, a sound interface 416 is provided as a communication interface for converting sound into electrical signals using a microphone and for converting electrical signals into sound using a speaker. According to an example implementation, a random-access memory (RAM) 418 is provided, where computer instructions and data can be stored in a volatile memory device for processing by the CPU 402.

[0127] According to an example implementation, the computing device 400 includes a read-only memory (ROM) 420, where unchanging low-level system code or data for basic system functions (such as basic input and output (I / O), booting, or receiving keystrokes from a keyboard) is stored in a non-volatile memory device. According to an example implementation, the computing device 400 includes a storage medium 422 or other suitable type of memory (e.g., RAM, ROM, programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic disk, optical disk, floppy disk, hard disk, removable cartridge, flash drive), where storage files include an operating system 424, application programs 426 (e.g., including a web browser application, a widget or gadget engine and / or other necessary applications) and data files 428. According to an example implementation, the computing device 400 includes a power supply 430 that provides appropriate alternating current (AC) or direct current (DC) to the power components. According to an example implementation, the computing device 400 includes a telephone subsystem 432 that allows the device 400 to send and receive voice over a telephone network. The component devices and the CPU 402 communicate with each other via a bus 434.

[0128] According to an example implementation, CPU 402 has a suitable structure as a computer processor. In one arrangement, computer CPU 402 may include more than one processing unit. RAM 418 is coupled to computer bus 434 to provide fast RAM storage to CPU 402 during execution of software programs such as operating system applications and device drivers. More specifically, CPU 402 loads computer executable processing steps from storage medium 422 or other media into fields of RAM 418 to execute software programs. Data may be stored in RAM 418, where the data may be accessed by computer CPU 402 during execution. In an example configuration, device 400 includes at least 128MB of RAM and 256MB of flash memory.

[0129] The storage medium 422 itself may include multiple physical drive units, such as a redundant array of independent disks (RAID), a floppy disk drive, a flash memory, a USB flash drive, an external hard drive, a thumb drive, a pen drive, a key drive, a High-Density Digital Versatile Disc (HD-DVD) optical drive, an internal hard drive, a Blu-ray optical drive or a Holographic Digital Data Storage (HDDS) optical drive, an external small dual in-line memory module (DIMM) synchronous dynamic random access memory (SDRAM) or an external micro DIMM SDRAM. Such computer-readable storage media allow the device 400 to access computer-executable process steps, applications, etc. stored on removable and non-removable storage media to download data from the device 400 or upload data to the device 400. A computer program product (e.g., a computer program product utilizing a communication system) may be tangibly embodied in the storage medium 422, which may include a machine-readable storage medium.

[0130] According to an example implementation, the term computing device as used herein may be a CPU, or may be conceptualized as a CPU (e.g., Figure 4 In this example implementation, the computing device (CPU) may be coupled, connected and / or communicate with one or more peripheral devices.

[0131] Now refer to Figure 5Flowchart of the present invention describes an exemplary method 500 for accelerating the software development process using generative artificial intelligence (AI) and behavior-driven development (BDD). The method 500 begins at box 502, and according to an exemplary embodiment of the disclosed technology, the method 500 includes receiving a natural language description of the expected behavior of a machine-readable code function. In box 504, the method 500 includes converting the natural language description into a test scenario using a domain-specific language (DSL). In box 506, the method 500 includes submitting the test scenario to the generative AI to generate test code for executing the scenario. In box 508, the method 500 includes generating a data set for the test scenario using the generative AI based on the natural language description of the expected behavior. In box 510, the method 500 includes merging the generated data set into the test scenario description. In box 512, the method 500 includes generating implementation source code based on the generated test scenario. In box 514, the method 500 includes verifying the generated implementation source code.

[0132] In some implementations, generative AI can be trained to generate test code and datasets based on expected behavior described in natural language descriptions.

[0133] In certain implementations, generative AI can leverage machine learning techniques to improve the quality and accuracy of generated test code and datasets over time.

[0134] In some implementations, the natural language description of the expected behavior description can be based on product information.

[0135] In some implementations, the natural language description of the expected behavior description can be based on customer information.

[0136] Some implementations may include reviewing the generated test code to ensure compliance with requirements.

[0137] According to some implementations, source code may be generated without human intervention.

[0138] In some implementations, validating the generated implementation source code may include utilizing one or more tests to determine the accuracy of the source code output.

[0139] In some implementations, the generated code can be validated for security, privacy, and performance before being executed.

[0140] In some implementations, the generated code can be validated to ensure that it meets acceptable standards.

[0141] Some embodiments of the disclosed technology may include any number of hardware and / or software applications, and hardware and / or software applications are executed to promote any operation. In an exemplary embodiment, one or more I / O interfaces can promote the communication between the input / output device. For example, a universal serial bus port, a serial port, a disk drive, a compact disk read-only memory (Compact Disk Read Only Memory, CD-ROM) driver and / or one or more user interface devices (such as display, keyboard, keypad, mouse, control panel, touch screen display, microphone, etc.) can promote user interaction. One or more I / O interfaces can be used to receive or collect data and / or user instructions from various input devices. In various embodiments of the disclosed technology, the received data can be processed and / or stored in one or more memory devices by one or more computer processors as needed.

[0142] The one or more network interfaces can facilitate connection to one or more suitable networks and / or connections for input and output; for example, connections to facilitate communication with any number of sensors associated with the system. The one or more network interfaces can further facilitate connection to one or more suitable networks; for example, a local area network, a wide area network, the Internet, a cellular network, a radio frequency network, a Bluetooth-enabled TM (owned by Telefonaktiebolaget LMEricsson) network, supports Wi-Fi TM (owned by the Wi-Fi Alliance), satellite-based network, any wired network, any wireless network, etc., for communicating with external devices and / or systems.

[0143] As desired, embodiments of the disclosed technology may include Figure 4 More or less of the components shown in .

[0144] Some embodiments of the disclosed technology are described above with reference to the block diagrams and flow charts of the systems and methods and / or computer program products according to the exemplary embodiments of the disclosed technology. It should be understood that one or more blocks in the block diagrams and flow charts and the combination of blocks in the block diagrams and flow charts can be implemented by computer executable program instructions, respectively. Similarly, according to some embodiments of the disclosed technology, some blocks of the block diagrams and flow charts may not necessarily need to be executed in the order presented, or may not necessarily need to be executed at all.

[0145] These computer executable program instructions can be loaded onto a general-purpose computer, a special-purpose computer, a processor, or other programmable data processing device to produce a specific machine, so that the instructions executed on the computer, processor, or other programmable data processing device create a tool for realizing one or more functions specific in one or more flowchart boxes. These computer program instructions can also be stored in a computer-readable memory, which can instruct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product of an instruction tool including one or more functions specific in one or more flowchart boxes. For example, an embodiment of the disclosed technology can provide a computer program product, which includes a computer-usable medium, and the computer-usable medium has a computer-readable program code or program instruction contained therein, and the computer-readable program code is suitable for being executed to realize one or more functions specific in one or more flowchart boxes. Computer program instructions can also be loaded onto a computer or other programmable data processing device to enable a series of operating elements or steps to be executed on a computer or other programmable device to generate a computer-implemented process, so that the instructions executed on a computer or other programmable device provide elements or steps for realizing a function specific in one or more flowchart boxes.

[0146] Therefore, the blocks of the block diagrams and flow charts support a combination of tools for performing specific functions, a combination of elements or steps for performing specific functions, and program instruction tools for performing specific functions. It will also be understood that each block of the block diagrams and flow charts, and combinations of blocks in the block diagrams and flow charts, can be implemented by a special-purpose, hardware-based computer system that performs the specific functions, elements or steps, or a combination of special-purpose hardware and computer instructions.

[0147] Although certain embodiments of the disclosed technology have been described in conjunction with what are currently considered to be the most practical and various embodiments, it should be understood that the disclosed technology is not limited to the disclosed embodiments, but on the contrary is intended to cover various modifications and equivalent arrangements included within the scope of the appended claims. Although specific terms are employed herein, they are used in a generic and descriptive sense only and not for purposes of limitation.

[0148] In the previous description, many specific details are set forth. However, it should be understood that embodiments can be practiced without these specific details. In other instances, in order not to obscure the understanding of this specification, well-known methods, structures, and techniques are not shown in detail. The term "exemplary" herein is synonymous with the term "example" and does not mean excellent or best. References to "one embodiment," "embodiment," "exemplary embodiments," and "various embodiments," etc. indicate that the embodiments of the disclosed technology described in this manner may include specific features, structures, or characteristics, but not every embodiment must include specific features, structures, or characteristics. In addition, the repeated use of the phrase "in one embodiment" does not necessarily refer to the same embodiment, although it may refer to the same embodiment.

[0149] As used herein, unless otherwise specified, the use of ordinal adjectives "first," "second," "third," etc., to describe common objects merely indicates that different instances of similar objects are referenced and is not meant to imply that the objects so described must be in a given sequence, whether in time, space, ranking, or in any other manner.

[0150] This written description uses examples to disclose certain embodiments of the disclosed technology, including the best mode, and to enable any person skilled in the art to practice certain embodiments of the disclosed technology, including making and using any devices or systems and performing any incorporated methods. The patentable scope of certain embodiments of the disclosed technology is defined in the claims, and may include other examples that occur to those skilled in the art. Such other examples are intended to be within the scope of the claims if they have structural elements that do not differ from the literal language of the claims, or if they include equivalent structural elements that do not differ substantially from the literal language of the claims.

Claims

1. A method for accelerating the software development process using generative artificial intelligence (AI) and behavior-driven development (BDD), the method include: receiving a natural language description of the intended behavior of the machine-readable code function; Using a domain specific language DSL to convert the natural language description into a test scenario; Submitting the test scenario to a generative AI to generate test code for executing the test scenario; Based on the natural language description of the expected behavior, using generative AI to generate a dataset for the test scenario; Incorporating the generated dataset into the description of the test scenario; Generate implementation source code based on the test scenario; as well as Verify the generated implementation source code.

2. The method according to claim 1, in, The generative AI is trained to generate the test code and the dataset based on the expected behavior described in the natural language description.

3. The method according to claim 1, in, The generative AI utilizes machine learning techniques to improve the quality and accuracy of the generated implementation source code and the dataset over time.

4. The method according to claim 1, in, The natural language description of the expected behavior description is based on product information.

5. The method according to claim 1, in, The natural language description of the expected behavior description is based on customer information.

6. The method of claim 1, further comprising reviewing the generated implementation source code to ensure compliance with requirements.

7. The method according to claim 1, in, The implementation source code is generated without human intervention.

8. The method according to claim 1, in, Verifying the generated implementation source code includes utilizing one or more tests to determine the accuracy of the source code output.

9. A system for accelerating the software development process using generative AI, the system include: a user interface for receiving a natural language description of the intended behavior of a machine-readable code function; A converter module, configured to convert the natural language description into a test scenario using a domain specific language DSL; a generative AI module configured to generate test code based on the test scenario and generate a data set based on a description of expected behavior; An implementation code generation module, configured to generate implementation source code based on the test scenario; as well as The verification module is used to test the generated implementation source code for the test scenario.

10. The system according to claim 9, in, The generative AI module includes a data set described in natural language and corresponding test code, and a machine learning model trained on the data set.

11. The system according to claim 9, in, The implementation code generation module generates the implementation source code using the test scenario as a functional specification.

12. The system according to claim 9, in, The verification module automatically tests the generated implementation source code according to the test scenario.

13. The system according to claim 9, further comprising a feedback module for providing feedback to the generative AI module based on the results output by the verification module to improve the quality and accuracy of the generated implementation source code and the data set.

14. The system according to claim 9 further comprises a review module for reviewing and iterating the generated implementation source code and the data set using the generative AI.

15. The system according to claim 9, further comprising a repeating module for repeating the review, iteration and verification until the generated implementation source code passes all tests according to a predetermined metric.

16. The system of claim 9, further comprising a code review module for determining a need for additional review based on an output of the verification module.

17. The system of claim 9, further comprising a completion module for indicating completion when the generated implementation source code requires zero or almost zero manual review and passes all tests according to a predetermined metric.

18. A computer-readable storage medium storing instructions which, when executed by a processor, cause the processor to perform the following method: receiving a natural language description of the intended behavior of the machine-readable code function; Using a domain specific language DSL to convert the natural language description into a test scenario; Submitting the test scenario to a generative AI to generate test code for executing the test scenario; Based on the natural language description of the expected behavior, using generative AI to generate a dataset for the test scenario; Incorporate the generated dataset into the description of the test scenario; Generate implementation source code based on the test scenario; as well as Verify the generated implementation source code.

19. The computer-readable storage medium according to claim 18, in, The implementation source code is generated without human intervention.

20. The computer-readable storage medium of claim 18, in, Verifying the generated implementation source code includes utilizing one or more tests to determine the accuracy of the implementation source code.