Gave it a quick trial for iOS... doesn't seem great. It doesn't run at all when giving it a whole project (no response, no CPU usage, not even when you feed it BS arguments), it gives a "Starting Analysis" and nothing else for other (simple) files, it doesn't understand the newish 'nullable' keyword, and it will quit with a fatal error if it can't resolve an import (like UIKit), so pretty unusable on single files. I'…
Open-sourcing Facebook Infer: Identify bugs before you ship
41–50 of 121 posts
Re: Open-sourcing Facebook Infer: Identify bugs before you ship
#42What's the difference between this and the Clang analyzer, which comes with Xcode already? I expected that comparison to be on the front page... http://clang-analyzer.llvm.org/ (obviously it supports Java as well, but I assume Android Studio comes with some sort of static analyzer as well, so same question?) It specifically calls out null pointer exceptions but those... aren't a thing... in Objective-C, messages pass…
Yes Android Studio does come with a static checker called 'Lint' and I'm wondering the same. What are infer's advantages over 'Lint' or even 'findbugs'?
Findbugs can be useful too; it is more akin to linters.
Re: Open-sourcing Facebook Infer: Identify bugs before you ship
#43How does this compare to other static code analysis tools like Findbugs, PMD, Checkstyle, etc?
By contrast, Infer performs deeper inter-procedural reasoning that can track the flow of values across long chains of procedure calls to identify subtle bugs that are hard to see with the naked eye. Infer doesn't support as many bug patterns as these existing tools do yet, but it can find some deep bugs that these tools will miss.
Re: Open-sourcing Facebook Infer: Identify bugs before you ship
#44Can someone explain-it-like-I'm-a-90s-programmer (ELi90s?) why so much symbolic evaluation stuff gets done in OCaml? What does OCaml do that makes it so well suited for this problem domain? (I know a very little bit about symbolic evaluation and have done a very very little bit of it).
In addition to what the other commenter said, pattern matching is really nice for this kind of thing. Of all of the functional programming languages, OCaml has probably the most sophisticated pattern matching engine around (and we basically copied it into Rust, incidentally), supporting or-patterns, multiple bindings, guards, and so forth. Pattern matching lets you essentially match on the shape of subtrees of arbitr…
Re: Open-sourcing Facebook Infer: Identify bugs before you ship
#45More OCaml code coming out of FB. Can add this to the list, which includes, Hack, Flow and Pfff [1]. The kinds of bugs it finds are listed at: http://fbinfer.com/docs/infer-bug-types.html It's interesting to see how building tools with languages like OCaml can reduce bugs for teams, without them having to change the language itself. I do wonder what things would be like if such languages we're used directly more wide…
Legend has it there is a small room at FBHQ, containing a quorum of OCaml committers, all of them French for some reason, hacking away at level of abstraction beyond the ken of mortal man.
Re: Open-sourcing Facebook Infer: Identify bugs before you ship
#46What's the difference between this and the Clang analyzer, which comes with Xcode already? I expected that comparison to be on the front page... http://clang-analyzer.llvm.org/ (obviously it supports Java as well, but I assume Android Studio comes with some sort of static analyzer as well, so same question?) It specifically calls out null pointer exceptions but those... aren't a thing... in Objective-C, messages pass…
On iOS there is the Clang Static analyzer. Infer does some things different, in particular reasoning that spans across multiple files. But CSA checks for more kinds of issues and is also more mature than Infer when it comes to iOS: we send big respect to CSA! Infer has only got started there recently. Really, these tools complement one another and it would even make sense to use both. Indeed, that's what we do inside…
Re: Open-sourcing Facebook Infer: Identify bugs before you ship
#47Re: Open-sourcing Facebook Infer: Identify bugs before you ship
#48The types of issues discovered (they mention null pointer access and resource and memory leaks) is much smaller than what a tool like Coverity will find (I use it). And they analyze C and Java, two languages supported by Coverity, a very mature tool... I am not certain of the proposed value, except it's free to other than Facebook - but not to Facebook, who pays engineers to develop this... Is this some kind of NIH s…
Isn't Coverity expensive?
That said, paying a team of expert engineers is also very expensive, not to mention the opportunity cost.
Re: Open-sourcing Facebook Infer: Identify bugs before you ship
#49Earlier quoted context omitted.
In addition to what the other commenter said, pattern matching is really nice for this kind of thing. Of all of the functional programming languages, OCaml has probably the most sophisticated pattern matching engine around (and we basically copied it into Rust, incidentally), supporting or-patterns, multiple bindings, guards, and so forth. Pattern matching lets you essentially match on the shape of subtrees of arbitr…
In what ways is OCaml's pattern matching superior to Haskell's?
See http://stackoverflow.com/questions/24700762/or-patterns-in-h...
Re: Open-sourcing Facebook Infer: Identify bugs before you ship
#50Earlier quoted context omitted.
Isn't Coverity expensive?
I would say a Coverity installation at Facebook is probably a "let's talk" level of expensive. That said, paying a team of expert engineers is also very expensive, not to mention the opportunity cost.
But some reasons not to use Coverity then:
* Doing it in-house gives Facebook near total control over what the system is going to focus on; they can tailor it exactly to their problem set.
* It's a worthwhile open source project, since most values of "expensive" mean "other projects won't ever use it".
* If it gets any traction as an open source project, they can draft off the work other people will put into it.