Not the hardest, not the thing with the most sophisticated theories behind it, not the thing that helped her academic career the most... but definitely the best and the most useful.
There must be a lot of other academics who could do things that are less theoretical but more useful than what they normally do.
There must be a lot of undervalued academics who in effect are punished for doing things that useful without requiring quite as much deep theory as their fields can muster.
I'm glad she did something that she wasn't really rewarded for and I'm sad that the academic reward functions are so off.
I can only agree. It is great work; I met Julia in several occasions were we other academics tried to push our formal methods stuff for checking properties of the Linux kernel. Also ours worked but in a way more complicated way, very resource intense, and less effective than Julia’s work.
Not the same level of sophistication, but ast-grep allows this for far more languages, since it is based on the tree-sitter parser library. I have used it with some success on C++. Of course it only works on the AST level, and C++ famously need types for correct parsing, so it sometimes fall short (also on macros).
I think Coccinelle is a really cool tool, but I find its documentation totally incomprehensible for some reason. I've read through it multiple times, but I always end up having to find some preexisting script that does what I want, or else to blunder around trying different variations at random until something works, which is frustrating.
It's a bit of a disservice to call it "The Linux kernel's"; it's its own project that just happens to be used on the Linux kernel quite a bit. It doesn't originate there or belong to the kernel or anything like that.
> Nevertheless, detecting the holding of locks requires a careful and occasionally interprocedural analysis of the source code, and the other conditions, such as "in a completion handler", are not formally defined and require study of multiple files.
> Due to the complexity of the conditions governing the choice of new argument for usb_submit_urb, 71 of the 158 calls to this function were initially transformed incorrectly to use GFP_KERNEL instead of GFP_ATOMIC.
Okay, but how does Coccinelle help? Is it able to do this careful and not formally defined analysis? Or does it automate the undifferentiated heavy lifting and so make it easier for humans to do it?
I think semantic patching is an idea whose time has come though. I'm making a more modern set of tools for source-to-source transformation that will work with any desired languages as the input and output.
Those tools exist, but you have to pay by the token. I'm not sure if they scale financially to large code bases such as the Linux kernel. They are far more accessible than Coccinelle or Perl, though.
And i assume any large organisation running a monorepo has some vaguely equivalent tooling for making mass changes. Have any of them published about that?
You can write automated refactoring with clang tools if you need AST-level knowledge across your project (or monorepo).
I’m not sure if there’s other public examples leveraging this, but Chromium has this document [0] which has a few examples. And there’s also the clang-tidy docs [1].
This is a business that I suspect may not survive BABLR.
> Moderne's build plugins allow for LSTs to be serialized to disk. This makes the process of consuming and editing large quantities of them much more efficient. OpenRewrite's build plugins, on the other hand, store everything in memory and need to be reparsed every time there is a change.
So yeah I'm giving away open standards to everyone for free that do the thing they expect people to pay them for...
coccinelle's one of those tools that's stupid powerful once it clicks, but man the learning curve is steep. i used it to migrate like ~200 call sites when we tweaked an internal API signature in a big C codebase - doing that by hand wouldve been a multi-day slog. the semantic patch language feels kinda weird at first, but it catches edge cases regex stuff just misses, like matching through macro expansions and all that
I used to drink this stuff back in the late 1960s, when my Dad was an RAF pilot based in Cyprus and I was about 15. You had to take it with a Sprite mixer if you wanted to retain your teeth.
The best thing Julia Lawall ever did!
Not the hardest, not the thing with the most sophisticated theories behind it, not the thing that helped her academic career the most... but definitely the best and the most useful.
There must be a lot of other academics who could do things that are less theoretical but more useful than what they normally do.
There must be a lot of undervalued academics who in effect are punished for doing things that useful without requiring quite as much deep theory as their fields can muster.
I'm glad she did something that she wasn't really rewarded for and I'm sad that the academic reward functions are so off.
I can only agree. It is great work; I met Julia in several occasions were we other academics tried to push our formal methods stuff for checking properties of the Linux kernel. Also ours worked but in a way more complicated way, very resource intense, and less effective than Julia’s work.
Not the same level of sophistication, but ast-grep allows this for far more languages, since it is based on the tree-sitter parser library. I have used it with some success on C++. Of course it only works on the AST level, and C++ famously need types for correct parsing, so it sometimes fall short (also on macros).
https://ast-grep.github.io/
I am working on AST level revision control and yes, macros make life difficult. On the other hand, merging/diffing on the AST level is fun.
https://replicated.wiki/blog/partI.html
I found that font extremely hard to read for some reason (on my phone). So I gave up. Maybe due to you using a monospace font for non-code?
But I believe smalltalk represented code as functions in a database somehow, so maybe that is worth looking at.
2 replies →
I think Coccinelle is a really cool tool, but I find its documentation totally incomprehensible for some reason. I've read through it multiple times, but I always end up having to find some preexisting script that does what I want, or else to blunder around trying different variations at random until something works, which is frustrating.
It's a bit of a disservice to call it "The Linux kernel's"; it's its own project that just happens to be used on the Linux kernel quite a bit. It doesn't originate there or belong to the kernel or anything like that.
Ok, we've removed the Linux kernel from the title above.
According to https://coccinelle.gitlabpages.inria.fr/website/ce.html :
> Nevertheless, detecting the holding of locks requires a careful and occasionally interprocedural analysis of the source code, and the other conditions, such as "in a completion handler", are not formally defined and require study of multiple files.
> Due to the complexity of the conditions governing the choice of new argument for usb_submit_urb, 71 of the 158 calls to this function were initially transformed incorrectly to use GFP_KERNEL instead of GFP_ATOMIC.
Okay, but how does Coccinelle help? Is it able to do this careful and not formally defined analysis? Or does it automate the undifferentiated heavy lifting and so make it easier for humans to do it?
I forgot about Coccinelle.
I think semantic patching is an idea whose time has come though. I'm making a more modern set of tools for source-to-source transformation that will work with any desired languages as the input and output.
Those tools exist, but you have to pay by the token. I'm not sure if they scale financially to large code bases such as the Linux kernel. They are far more accessible than Coccinelle or Perl, though.
Honestly, I rather use Coccinelle, where I understand exactly what it does, when it does it and why it does it…
1 reply →
See also OpenRewrite:
https://github.com/openrewrite/rewrite
And i assume any large organisation running a monorepo has some vaguely equivalent tooling for making mass changes. Have any of them published about that?
You can write automated refactoring with clang tools if you need AST-level knowledge across your project (or monorepo).
I’m not sure if there’s other public examples leveraging this, but Chromium has this document [0] which has a few examples. And there’s also the clang-tidy docs [1].
[0] https://chromium.googlesource.com/chromium/src/+/80a6fc33dee...
[1] https://releases.llvm.org/21.1.0/tools/clang/tools/extra/doc...
This is a business that I suspect may not survive BABLR.
> Moderne's build plugins allow for LSTs to be serialized to disk. This makes the process of consuming and editing large quantities of them much more efficient. OpenRewrite's build plugins, on the other hand, store everything in memory and need to be reparsed every time there is a change.
So yeah I'm giving away open standards to everyone for free that do the thing they expect people to pay them for...
What's BABLR?
5 replies →
coccinelle's one of those tools that's stupid powerful once it clicks, but man the learning curve is steep. i used it to migrate like ~200 call sites when we tweaked an internal API signature in a big C codebase - doing that by hand wouldve been a multi-day slog. the semantic patch language feels kinda weird at first, but it catches edge cases regex stuff just misses, like matching through macro expansions and all that
I thought this was a misspelled article about Kokinelli, the Greek red wine, fairly accurately described here: https://www.arrse.co.uk/wiki/Kokinelli
I used to drink this stuff back in the late 1960s, when my Dad was an RAF pilot based in Cyprus and I was about 15. You had to take it with a Sprite mixer if you wanted to retain your teeth.
It would be a good name for a project, though.
They are cognate: cochineal is a red dye derived from a red insect a little bit like a ladybug.