Comparative Analysis of Loop-Free Function Evaluation Using ChatGPT and Copilot with C Bounded Model Checking

Advanced machine learning models and automated coding helpers have significantly transformed software development and verification techniques in recent years. This paper performs a comparative investigation of two prominent AI-driven code generation tools, ChatGPT and Copilot, with a specific emphasis on their ability to evaluate loop-free functions. By employing C Bounded Model Checking (CBMC) as the verification framework, we use model checking (MC) to systematically compare the accuracy and effectiveness of code produced by both tools. Our approach entails creating function implementations that are free of loops by utilizing established requirements with the assistance of ChatGPT and Copilot. These implementations are then subjected to thorough examination using CBMC to evaluate aspects such as functional correctness, safety, and potential vulnerabilities. Performance measurements encompass coding accuracy, verification time, and error identification. Results reveal notable differences in the performance of ChatGPT and Copilot. While both tools show promise in code generation, distinct strengths and weaknesses emerge in handling complex specifications and ensuring code correctness. This work provides useful insights into coding assistants powered by artificial intelligence and emphasizes the significance of incorporating formal verification methods, such as CBMC, to ensure dependable software development. This comparative analysis adds to the expanding research on AI-assisted programming, offering practical guidance for developers and researchers seeking efficient and dependable code generation tools.

Authors

Institutions

Publication Details

Published
2024-11-26
DOI
https://doi.org/10.1109/fllm63129.2024.10852461
Primary Topic
Adversarial Robustness in Machine Learning
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Comparative Analysis of Loop-Free Function Evaluation Using ChatGPT and Copilot with C Bounded Model Checking

Daniel Lemire A, Faten Slama
Adversarial Robustness in Machine Learning
article

Comparative Analysis of Loop-Free Function Evaluation Using ChatGPT and Copilot with C Bounded Model Checking

Daniel Lemire A, Faten Slama
article en

Abstract

Advanced machine learning models and automated coding helpers have significantly transformed software development and verification techniques in recent years. This paper performs a comparative investigation of two prominent AI-driven code generation tools, ChatGPT and Copilot, with a specific emphasis on their ability to evaluate loop-free functions. By employing C Bounded Model Checking (CBMC) as the verification framework, we use model checking (MC) to systematically compare the accuracy and effectiveness of code produced by both tools. Our approach entails creating function implementations that are free of loops by utilizing established requirements with the assistance of ChatGPT and Copilot. These implementations are then subjected to thorough examination using CBMC to evaluate aspects such as functional correctness, safety, and potential vulnerabilities. Performance measurements encompass coding accuracy, verification time, and error identification. Results reveal notable differences in the performance of ChatGPT and Copilot. While both tools show promise in code generation, distinct strengths and weaknesses emerge in handling complex specifications and ensuring code correctness. This work provides useful insights into coding assistants powered by artificial intelligence and emphasizes the significance of incorporating formal verification methods, such as CBMC, to ensure dependable software development. This comparative analysis adds to the expanding research on AI-assisted programming, offering practical guidance for developers and researchers seeking efficient and dependable code generation tools.

Université TÉLUQ (CA)
Openalex Percentile: Top 76%
Adversarial Robustness in Machine Learning
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.