A tool for determining similarities in logic between a C and C ++ function

Is there a tool in Linux / Windows that allows us to determine if the logic of a specific function in C is the same as for a specific function in C ++?

+3
source share
4 answers

In general, the equivalence of Turing machines is undecidable , so no.

+11
source

, if/else, , swtich/case, while, for .. "gettign ", 100% - , , -.

, ( , . , - . , - ... alt text http://www.ezprog.com/wp-content/uploads/flowchart.gif

, ? C, ++, .

, , ? ? .

+1

, AST , .

, ,

  • (.. )
  • (.. )

. , vgrep.

But it gets even worse because you are asking for a cross-language implementation and that will make it harder. However, gcc uses the same abstract representation for everything, so it should not be imagined.

However, I do not know such a tool.

+1
source

I think there is such a tool called assembly.

-1
source

Source: https://habr.com/ru/post/1751894/


All Articles