Is there a working Semantic Diff tool for C ++?

I found only abandoned projects, theories, and feature lists. But I could not find a tool that can compare two C ++ source files and show semantic differences.

Of course, I would not compare two unrelated files or changes accumulated over 10 years of development and maintenance. But the changes that are usually discussed when reviewing the code will be clearer if they are presented with the correct value, instead of text changes at the char / word / line level

+7
c ++ diff semantics
source share
4 answers

True "semantic scatter" is impossible. There will be a closer tool comparing two source files to see how one of them was obtained from the other by abstract editing operations (deleting, copying, moving, renaming) in program structures (variables, expressions, statements, methods). See Our Smart Differencer for a tool that does this for multiple languages, and C ++ is coming soon.

March 2013: C ++ 11 GCC / MS dialects supported.

+3
source share

There is one for C used by Linux kernel developers. Not for C ++, though

http://coccinelle.lip6.fr

+1
source share

Yes, it's called writing comments for commits and tracking issues. Consider metadata for semantic analysis.

0
source share

This is not possible, in general. One program cannot even tell whether another will stop (a known problem with stopping ). For more limited programs (of course limited loops and possibly other restrictions) you can do more, but this is heavy material, and the language should be, not C ++, but something less complex, a limited subset or a simpler language in general . This is probably why you did not find anything, which was more than it began.

-one
source share

All Articles