News for hackers. Stuff that matters.
Re:Astrée Static Analyzer for C and C++ by nextos on Friday February 03, 2023 @12:39AM (#34637541)
Abstract interpreters and static analyzers are really powerful and not that hard to implement, compared to the little competition we have in this space.

I am surprised with the lack of startups in the area. It's just a bit of abstract algebra. With Datalog, the barrier of entry is pretty low: https://arxiv.org/abs/2012.10086

Re:Astrée Static Analyzer for C and C++ by intelVISA on Friday February 03, 2023 @12:43AM (#34637566)
Outside of regulated fields like healthcare and travel is the market even significant for such tooling? Can't say I know any shop that prioritizes code correctness outside of press releases.
Re:Astrée Static Analyzer for C and C++ by ryao on Friday February 03, 2023 @01:10AM (#34637710)
I am interested in using it on OpenZFS. I will probably try the trial in a couple months. Assuming that it does well, it is unfortunate that I will not be able to use it beyond the trial period, since I expect the price to be too expensive.
Re:Astrée Static Analyzer for C and C++ by nextos on Friday February 03, 2023 @01:33AM (#34637849)
That's my point, IMHO this is much more useful than LLM-autocompletion right now.

But there are so few options available, at such a high cost, that nobody uses them.

Abstract interpretation / static analysis can detect lots of defects automatically.

Re:Astrée Static Analyzer for C and C++ by transpute on Friday February 03, 2023 @02:01AM (#34638029)
Attackers can use trial versions to narrow their search for 0-day defects.
Re:Astrée Static Analyzer for C and C++ by edwcross on Friday February 03, 2023 @03:42AM (#34638785)
In practice, it's not that easy; fuzzers tend to be more effective for that.

Usually, the time required to properly setup and understand and refine the analysis will take most of the trial period.

These tools are better thought of in the long term, they may require some changes to coding style, and also some knowledge of the code itself.

While they are good for building defenses, they are not so effective for helping attackers. But in the end, yes, they _could_ be used for that.

Re:Astrée Static Analyzer for C and C++ by jamesfinlayson on Friday February 03, 2023 @01:04AM (#34637666)
If there's a high enough risk, maybe. I've worked in gambling (regulated, but not to the same degree as something that's life and death) and the security team has pushed for the use of tools like this.
Re:Astrée Static Analyzer for C and C++ by eddsh1994 on Friday February 03, 2023 @01:14AM (#34637738)
Networking? Defense? Operating systems? Etc
Re:Astrée Static Analyzer for C and C++ by ryao on Friday February 03, 2023 @01:18AM (#34637763)
Most operating system developers are unlikely to be able to afford it given how it’s pricing is “if you need to ask, it costs too much”. :/
Re:Astrée Static Analyzer for C and C++ by defrost on Friday February 03, 2023 @12:54AM (#34637617)
Geophysical data aquisition, processing, interpretation.

Fire simulation modelling.

Computational GIS tooling (Hexagon et al)

Computational Algebra (eg Cayley|Magma)

Fireball monitoring, Square Kilometre Array processing, . . .

I'm struggling to recall anything I've worked on that didn't emphasis code correctness.

Re:Astrée Static Analyzer for C and C++ by GuB-42 on Friday February 03, 2023 @10:24AM (#34642244)
You can add energy and defense to the list.

And regulated fields are a big market, not just the huge companies that work in this field (you can see a short list on the linked page), but also suppliers of these companies.

Re:Astrée Static Analyzer for C and C++ by ryao on Friday February 03, 2023 @01:12AM (#34637726)
I thought abstraction interpretation on the level that astree claims to implement is supposed to be extremely hard, which is why almost nobody else tries to do it. I only know of two that try:

http://kestreltechnology.com/technology.html

https://github.com/NASA-SW-VnV/ikos

Re:Astrée Static Analyzer for C and C++ by quentinkent1 on Friday February 03, 2023 @01:57AM (#34637995)
Also Mathworks Polyspace Code Prover: https://mathworks.com/products/polyspace-code-prover.html
Re:Astrée Static Analyzer for C and C++ by sam_bristow on Friday February 03, 2023 @02:00AM (#34638024)
I _think_ Perforce's QA-C uses abstract interpretation, but I'm not 100% sure.
Re:Astrée Static Analyzer for C and C++ by edwcross on Friday February 03, 2023 @03:32AM (#34638731)
Re:Astrée Static Analyzer for C and C++ by mdaniel on Friday February 03, 2023 @12:01PM (#34643963)
It took some eagle eye to spot the link, but they have the source in a self-hosted copy of gitlab: https://git.frama-c.com/pub/frama-c and a sibling repo is also interesting where they seem to apply analysis to some open source code as an example: https://git.frama-c.com/pub/open-source-case-studies
Re:Astrée Static Analyzer for C and C++ by mschnell on Friday February 03, 2023 @07:01AM (#34640051)
You can add grammatech‘s codesonar
Re:Astrée Static Analyzer for C and C++ by marmetio on Friday February 03, 2023 @11:08AM (#34642993)
I believe the "level" referred to is soundness. Codesonar is self-admittedly not sound [1], and instead focuses on other valuable aspects of static analysis. It's a different type of tool.

[1] https://blogs.grammatech.com/how-sound-static-analysis-compl...

Re:Astrée Static Analyzer for C and C++ by edwcross on Friday February 03, 2023 @03:44AM (#34638800)
There are probably others, but this is one such startup: https://trust-in-soft.com/
Re:Astrée Static Analyzer for C and C++ by aseipp on Friday February 03, 2023 @12:48PM (#34644902)
It's difficult to fund enough skilled programmers to work on stuff like this full time, and productionize the results in a coherent product. A good example is a sibling comment that says "it would mostly be easy except for the GUI" and that's assuming "no allocations." The things customers pay you for are often the hard parts like that stuff, not the theoretical parts you can enjoy from a PDF. It sucks, but it's true: you're selling a production quality tool to picky-ass programmers. I say this as someone who has a copy of that book you mentioned and has implemented type systems, domain specific analyzers, used datalog (Souffle) a lot, etc.

You also need to know your competition, and the story is even worse there. As I've watched security engineering advance over the years -- and I know you aren't specifically talking about security, but go with me here -- one of the only methods that has actually gone from "nascent infosec curiosity" into full-blown large scale usage by major and minor players has been fuzzing, which most people know as just "throw random shit at it until it breaks". That's because it's often easy to integrate, has few visible thorns in practice, has a surprisingly high signal-to-noise ratio, and can be performed even with duct tape and glue on an existing codebase. It can be done in any language. It often delivers positive results immediately in the short term and continuously over time. That's actually what your userbase considers "easy to implement", not "learn datalog and abstract algebra to understand and integrate domain specific static analyzers into your build system." Is it powerful? Yes, and I like solutions like CodeQL or MIRAI (for Rust). Do they have long term benefits? I think so. Is it easy or at least "not that hard"? I'm not immediately convinced.

Re:Astrée Static Analyzer for C and C++ by HybridCurve on Friday February 03, 2023 @01:23PM (#34645544)
It is not that difficult to implement -some- basic features of static analysis or abstract interpretation. The problem complexity in this area is enormous and it quickly becomes difficult to manage aspects of path exploration and satisfiability effectively. This is why fuzzing has been more popular method since it is not as difficult to implement and produces reasonable results.