slobo wrote:Dann Corbit wrote:Osipov Jury wrote:It talks a lot about the RE and its legality, morality, etc.
But nobody talks about the technical possibility of the reverse. This is probably due to poor understanding of the subject matter.
It is mathematically provable that it is impossible to fully reverse any binary back into source code. It has been demonstrated that this is the equivalent of the halting problem.
For an individual binary created by a known compiler, it is possible to do fairly well, but it is still a very difficult and arduous task requiring human intervention.
I guess that only small sections of Rybka were reverse engineered (wild guess of 30%), but they turned out to be the most important sections and so the results proved to be shockingly strong.
There are some tools to automate the process now (IdaPro has a thing called HexRays decompiler
http://www.hex-rays.com/decompiler.shtml)
I guess that even with these tools it is a very difficult task.
There are fundamental questions of right and wrong and many dark corners in these undertakings. I hope that in the long run, the field of computer chess is not harmed. If we can denude the work of the best professional programmers, where is the incentive for new workers to go into that field?
After reading this post I wonder: how was it possible that you blamed reverse engineering before. You always presented it as something immoral.
You admit now that it is an extremly hard enterprise, with unpredictable result. Who manage to get the desired information using such a process, must understand the original code's idea first, and only after this understanding he can start the reconstruction of the code. And more: this reconstruction of the code will always be one's own interpretation of the reversed engineered mess of signs.
Conclusion: reverse engineering is a work of high knowledge and, at the same time, of artistic imagination.
What do you think about the following, *hypothetical* case:
Someone writes just another chess engine, nothing special, around 2200 ELO, with an "ad-hoc" implementation (exaggerated, of course) of eval and a very dumb pure alpha-beta search. Then he buys, or somehow gets access to, a top ELO 3000 program which is commercial and "closed-source" software. He disassembles and decompiles it, learns in detail how its search and eval parts work, and then replaces his own search and eval with those from the top program, slightly adapting board representation and other basic stuff accordingly. He finds out that the new eval gives him about 200 ELO improvement, and adding the new and excellent search on top of that gives another 500 ELO points. Now he has a 2900 ELO program, and after fixing some bugs and adding some improvements he arrives at 3000 ELO, too.
And finally, he puts the "combined" sources on the web without telling about their origin, including
a) his own, original sources of everything else than eval and search, and
b) sources for eval and search coming mostly from decompiling the top program, therefore not a copy but a derivative work matching the original, secret top program's source code very closely.
Would you say that this were a legitimate form of "discovery"?
Here is my opinion.
Everything prior to putting the resulting sources on the net could be tolerable. Publishing the "new" strong engine as binary could be tolerable or not (I would say it were not but that is not my point here). But publishing sources that were derived from essential parts of the top program, and thereby revealing the secrets of the commercial, closed-source program, would not be legitimate for me, it would be on the same level as copyright infringement for me, even if a court would decide that there was no source code *copied*.
Now my key point is: We may discuss for years about the question whether doing so would be *legal* or not. We may discuss whether *reverse engineering itself* is legal or not in the case of software, especially chess programs. But if our community would *accept* the scenario that I described above as a "legitimate form of 'discovery'" then something would be wrong in our minds since we would agree on ignoring each other's personal rights to keep his own discoveries secret as long as *he* wants to.
Note: I am not a "fan" of commercial chess programs. I have never bought one. I like open source software very much. But I would certainly not like someone who puts my decompiled secret algorithms on the net without my permission, and furthermore without mentioning the origins.
So far my *hypothetical* scenario. Note this post is no claim or attempt of a proof about the current IpHoeRobGorritBird case. I only wanted to extend the picture of reverse engineering we have seen here in this thread a little bit, in order to show that RE can be much more than
Slobo wrote:a work of high knowledge and, at the same time, of artistic imagination
, it can also hurt someone else very deeply. And that is beyond what courts and lawyers are dealing with, it is about how we feel what is good or bad.
Sven