Why Decompilers cant produce original code theoretically -



Why Decompilers cant produce original code theoretically -

i searched net did not find concrete reply why decompilers unable produce original source code. dint satisfactory answer. somewhere written similar halting problem dint tell how. theoretical , technical limitation of creating decompiler perfect.

it is, quite simply, many-to-one problem. example, in c:

b++;

and

b+=1;

and

b = b + 1;

may compiled same set of operations 1 time compiler , optimizer done. reorders things, drops in-effective operations, , rewrites entire sections of code. time done, has no thought wrote, pretty thought intended happen, @ raw-cpu (or vcpu) level.

it smart plenty remove variables aren't needed:

{ a=5; b=func(); c=a+b; d=func2(c); } ## gets rewritten as: registera=func() registera+=5 return(func2(registera))

decompiler

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -