Next Article in Journal
On the Modeling and Analysis of Brittle Failure in Existing R/C Structures Due to Seismic Loads
Previous Article in Journal
Heat Transfer Analysis and Effects of (Silver and Gold) Nanoparticles on Blood Flow Inside Arterial Stenosis
Previous Article in Special Issue
Towards a Vectorial Approach to Predict Beef Farm Performance
Article

From Requirements to Source Code: Evolution of Behavioral Programs

1
Department of Software and Information Systems Engineering, Ben-Gurion University, Beer-Sheva 8410501, Israel
2
Department of Computer Science, Ben-Gurion University, Beer-Sheva 8410501, Israel
*
Author to whom correspondence should be addressed.
Academic Editor: Mauro Castelli
Appl. Sci. 2022, 12(3), 1587; https://doi.org/10.3390/app12031587
Received: 18 December 2021 / Revised: 27 January 2022 / Accepted: 29 January 2022 / Published: 2 February 2022
Automatically generating executable code has a long history of arguably modest success, mostly limited to the generation of small programs of up to 200 lines of code, and genetic improvement of existing code. We present the use of genetic programming (GP) in conjunction with context-oriented behavioral programming (COBP), the latter being a programming paradigm with unique characteristics that facilitate automatic coding. COBP models a program as a set of behavioral threads (b-threads), each aligned to a single behavior or requirement of the system. To evolve behavioral programs we design viable and effective genetic operators, a genetic representation, and evaluation methods. The simplicity of the COBP paradigm, its straightforward syntax, the ability to use verification and formal-method techniques to validate program correctness, and a program comprising small independent chunks all allow us to effectively generate behavioral programs using GP. To demonstrate our approach we evolve complete programs from scratch of a highly competent O player for the game of tic-tac-toe. The evolved programs are well structured, consisting of multiple, explainable modules that specify the different behavioral aspects of the program and are similar to our handcrafted program. To validate the correctness of our individuals, we utilize the mathematical characteristics of COBP to analyze program behavior under all possible execution paths. Our analysis of an evolved program proved that it plays as expected more than 99% of the times. View Full-Text
Keywords: genetic programming; behavioral programming; code generation genetic programming; behavioral programming; code generation
Show Figures

Figure 1

MDPI and ACS Style

Poliansky, R.; Sipper, M.; Elyasaf, A. From Requirements to Source Code: Evolution of Behavioral Programs. Appl. Sci. 2022, 12, 1587. https://doi.org/10.3390/app12031587

AMA Style

Poliansky R, Sipper M, Elyasaf A. From Requirements to Source Code: Evolution of Behavioral Programs. Applied Sciences. 2022; 12(3):1587. https://doi.org/10.3390/app12031587

Chicago/Turabian Style

Poliansky, Roy, Moshe Sipper, and Achiya Elyasaf. 2022. "From Requirements to Source Code: Evolution of Behavioral Programs" Applied Sciences 12, no. 3: 1587. https://doi.org/10.3390/app12031587

Find Other Styles
Note that from the first issue of 2016, MDPI journals use article numbers instead of page numbers. See further details here.

Article Access Map by Country/Region

1
Back to TopTop