4 ms·
> I’m looking forward to Rust being significant enough that tools like PVS-Studio get built around it. I wonder if it would be possible to decouple languages a
by Shish2k 12y ago
> I’m looking forward to Rust being significant enough that tools like PVS-Studio get built around it.
I wonder if it would be possible to decouple languages and analyzers? Would be nice if the PVS people had an option to validate something like an abstract syntax tree or a blob of bytecode...
Looking at the examples of errors that it finds ( http://www.viva64.com/en/examples/ http://www.viva64.com/en/examples/ ), most of them do look like abstract problems ("identical sub-expressions to the left and to the right of the 'foo' operator", for example)
- groovy2shoes 12y ago> I wonder if it would be possible to decouple languages and analyzers? I think it's technically possible, but it's a very hard problem. > Would be nice if the PVS people had an option to validate something like an abstract syntax tree or a blob of bytecode... Different languages demand different AST structures, and even different implementations of the same language might use different ASTs. Another problem with that approach is that languages can have wildly different semantics, and static analyzers are primarily focused on the semantics of program fragments. It is possible to operate on bytecode. Findbugs[1] operates on Java bytecode, but it's intended for use on Java programs and I'm not entirely sure how well it works on Scala programs (I've never tried). Bytecode has similar issues as ASTs: bytecode instruction sets are usually designed specifically for implementing a particular language, and are often ill-suited as targets for other languages. I think this problem is more manageable than the AST problem. Edit: forgot the Findbugs link [1]: http://en.wikipedia.org/wiki/FindBugs http://en.wikipedia.org/wiki/FindBugs