From: Julia Lawall <julia.lawall@inria.fr>
To: Derek M Jones <derek@knosof.co.uk>
Cc: cocci@inria.fr
Subject: Re: [cocci] ChatGPT 4 and Coccinelle
Date: Wed, 15 May 2024 11:13:10 +0200 (CEST) [thread overview]
Message-ID: <91657a8-93cd-6c8d-67dd-146cd2cc4abf@inria.fr> (raw)
In-Reply-To: <043e82d3-7299-4aac-abfe-60bd858dc598@knosof.co.uk>
On Wed, 15 May 2024, Derek M Jones wrote:
> Julia,
>
> > I agree. The whole premise behind Coccinelle is that the intelligence and
> > responsability of the human behind the semantic patch will make up for the
> > added ability to introduce bad code on a large scale.
>
> LLMs can write bad code without needing to use Coccinelle.
>
> Tool integration allows LLMs to offload stuff that is beyond
> their token prediction ability, e.g., how many baseballs fit in
> a Jumbo Jet gets fed into Mathematica, or a Python script on
> the open source LLMs.
>
> The code tool integration focus at the moment is on SQL.
>
> In the following, Coccinelle may have been picked first because of
> my earlier question.
>
> Derek
> What is the best tool to use to replace calls to an old version of an API with
> the equivalent calls in the new API?
>
> ChatGPT 4
> When you need to replace calls to an old version of an API with calls to a new
> version across a large codebase, using an automated refactoring tool can be
> the most efficient way to manage this task. Here are some of the best tools
> and approaches for this purpose:
>
> 1. Coccinelle:
> Coccinelle is a tool designed specifically for performing large-scale
> source code transformations in C programs, though it can be used for other
> languages with some adaptations. It allows you to write semantic patches (in a
> special language called SmPL) that describe both the code to find and the code
> to replace it with. This can be particularly useful for API updates where
> changes are systematic.
Great to have the ChatGPT seal of approval :)
thanks,
julia
>
> Refactoring tools in Integrated Development Environments (IDEs):
> Rector for PHP:
> JSCodeShift for JavaScript:
> Custom Scripts:
>
> --
> Derek M. Jones Evidence-based software engineering
> blog:https://shape-of-code.com
>
next prev parent reply other threads:[~2024-05-15 9:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-15 0:44 [cocci] ChatGPT 4 and Coccinelle Derek M Jones
2024-05-15 6:00 ` Julia Lawall
2024-05-15 9:08 ` Derek M Jones
2024-05-15 9:13 ` Julia Lawall [this message]
2024-05-15 7:30 ` Markus Elfring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=91657a8-93cd-6c8d-67dd-146cd2cc4abf@inria.fr \
--to=julia.lawall@inria.fr \
--cc=cocci@inria.fr \
--cc=derek@knosof.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).