Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2007-11

copyright infringement in FPC code

28 messages · 15 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

For those that don't follow the Lazarus mailing list. It was brought to our attention by a ex-Borland employee (Steve Trefethen), that FPC contains some stolen code from Delphi. Especially Delphi 4 & 5.

The full discussion can be read here...
http://www.stevetrefethen.com/files/ppcomp.htm

And a single code comparison can be seen here... FPC code is on the right. http://www.stevetrefethen.com/files/ppcomp.htm

I have heard that there is software that can do code comparisons to find infringements (I'm thinking of a article between Linux and Minix code). Anybody got such a program available so we can possibly do a automated comparison. I'll try and find out what was used to compare Minix and Linux code.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Graeme Geldenhuys

The software used between the Linux and Minix case was SIM. It seems to be quite cleaver software and hope we can use it too..

<quote>
The software similarity tester SIM version 2.12
[ftp://ftp.cs.vu.nl/pub/dick/similarity_tester] was used for source code comparison.
</quote>

I got that information from this website:
http://www.cs.vu.nl/~ast/brown/codecomparison/alexey.html

Regards,
- Graeme -

Graeme Geldenhuys wrote 5 lines
For those that don't follow the Lazarus mailing list. It was brought to our attention by a ex-Borland employee (Steve Trefethen), that FPC contains some stolen code from Delphi. Especially Delphi 4 & 5.

Reply by email

Daniël Mantione
to Graeme Geldenhuys: For those that don't follow the Lazarus mailing list. It was brought to our attention by…

Op Tue, 13 Nov 2007, schreef Graeme Geldenhuys:

Show quoted text 7 lines
For those that don't follow the Lazarus mailing list. It was brought to our attention by a ex-Borland employee (Steve Trefethen), that FPC contains some stolen code from Delphi. Especially Delphi 4 & 5. The full discussion can be read here... http://www.stevetrefethen.com/files/ppcomp.htm

I don't see a discussion?

Daniël

Reply by email

Luiz Americo Pereira Camara
to Daniël Mantione
Daniël Mantione wrote 15 lines
Op Tue, 13 Nov 2007, schreef Graeme Geldenhuys: > For those that don't follow the Lazarus mailing list. > It was brought to our attention by a ex-Borland employee (Steve > Trefethen), that FPC contains some stolen code from Delphi. Especially > Delphi 4 & 5. > > The full discussion can be read here... > http://www.stevetrefethen.com/files/ppcomp.htm > I don't see a discussion?

Look here:
http://www.stevetrefethen.com/blog/IWishTheDelphiCommandLineCompilerWereFree.aspx

Luiz

Reply by email

Michael Schnell
to Graeme Geldenhuys: For those that don't follow the Lazarus mailing list. It was brought to our attention by…
Show quoted text 5 lines
I have heard that there is software that can do code comparisons to find infringements (I'm thinking of a article between Linux and Minix code). Anybody got such a program available so we can possibly do a automated comparison. I'll try and find out what was used to compare Minix and Linux code.

Using this software to find out and eliminate "stolen" code sequences in a way that the software will not find them sounds more like trying to obfuscate something...

OTOH if two intelligent persons get a not too complex task (e.g. write some lines of code) they are very likely to create a similar solution.

-Michael

Reply by email

Graeme Geldenhuys
to Florian Klaempfl
Florian Klaempfl wrote
I wrote an answer.

The scary thing is, I used the tool mentioned earlier (sim_pasc) and did a few random tests on Lazarus code and Kylix 3 code. My god, there is a lot of similar code and no, I'm not talking about the class interfaces (which are duplicated on purpose).

Even if certain things can only be implemented in similar ways, I still think it might be worth running this tool, to verify some code. It's better than nothing, and the tool works much faster than any human can. Rather safe than sorry I say. At least this way, we tried to get rid of copyrighted copy from our side.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Marco van de Voort
to Michael Schnell: Using this software to find out and eliminate "stolen" code sequences in a way that the…
Show quoted text 11 lines
> I have heard that there is software that can do code comparisons to > find infringements (I'm thinking of a article between Linux and Minix > code). Anybody got such a program available so we can possibly do a > automated comparison. I'll try and find out what was used to compare > Minix and Linux code. Using this software to find out and eliminate "stolen" code sequences in a way that the software will not find them sounds more like trying to obfuscate something... OTOH if two intelligent persons get a not too complex task (e.g. write some lines of code) they are very likely to create a similar solution.

Yes specially for stringroutines, since nearly all are based on pchars for speed, and due to the weird requirements (like the #0..#31 limitation of e.g. tstringlist)

Reply by email

Bee
to Graeme Geldenhuys: The software used between the Linux and Minix case was SIM. It seems to be quite cleaver…
The software used between the Linux and Minix case was SIM. It seems to be quite cleaver software and hope we can use it too..

Maybe we should start some kind of code legality check. Like what had been done by ReactOS a few months ago against Windows' code. This tool might helps us review FPC's and Lazarus' code against Delphi code (or other as well?).

-Bee-

has Bee.ography at:
http://beeography.wordpress.com

Reply by email

Пётр Косаревский
to Bee: You (or other FPC core team members) should write a blog post about this and explain this…
Show quoted text 7 lines
> I wrote an answer. You (or other FPC core team members) should write a blog post about this and explain this situation in more complete description, instead write it as comment on someone's blog. This way, other people would see a better and more comprehensive responses from FPC side. That's the power of blogging and open informations. ;) -Bee-

It's not the best idea: that blog affected some people in september, but provided some base for accusations almost 2 months later. It's too late to enter baseless quarrel.

Before checking most parts of at least FPC at least once against at least several legally accessible source code versions of Delphi (does anybody own CodeGear Delphi 2007 variant with source code?) and posting big letters: "YO! WE REGULARLY USE SPECIAL SOFTWARE TO CHECK OUR CODE FOR COPYRIGHT INFRINGEMENT! WE DO CARE!" --- blogging would be the same as: "You are fool"-"You are fool"-"No, you are fool"-...

And I'm not sure that details should be discussed openly (i.e. accessible via open maillists like this to people like me) before some cure is at least planned (i.e. unresolved problems should be obscured).

Reply by email

Graeme Geldenhuys
to Graeme Geldenhuys: The scary thing is, I used the tool mentioned earlier (sim_pasc) and did a few random…
Graeme Geldenhuys wrote
there is a lot of similar code and no, I'm not talking about the class interfaces (which are duplicated on purpose).

I would like to apologize to the Lazarus developers. I jumped the gun a bit. I should have done a bit of RTFM before running the SIM tool. My bad!

By default the tool compares all text involved, even for duplicate code in the same file. Due to this it found many false positives and I interpreted them incorrectly. In the end the similarities I found in the select few files I tested were for very trivial functions. So far, so good.

Even so, I still believe it a good idea to run this tool against the complete set of code, though due to the extensive use of include files it might take a bit longer than expected.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Neil Graham
to Bee: Maybe we should start some kind of code legality check. Like what had been done by…
Bee wrote
Maybe we should start some kind of code legality check. Like what had been done by ReactOS a few months ago against Windows' code. This tool might helps us review FPC's and Lazarus' code against Delphi code (or other as well?).

Wouldn't it be more efficient to write to Borland (or whatever they call themselves this week).

say something like (but not exactly like, I'm just rambling here);

we have endeavoured to produce code that does not violate any copyrights, but as a collaborative project it is difficult to guarantee the work of all contributors. We would like to arrange a liaison in order that should any copyright violations be discovered we can correct the situation as soon as possible.

It may mean an easy and acceptable solution. They may just say no. Then again it may be like drawing the gaze of the eye of mordor.

Reply by email

peter green
to Graeme Geldenhuys: For those that don't follow the Lazarus mailing list. It was brought to our attention by…
And a single code comparison can be seen here... FPC code is on the right. http://www.stevetrefethen.com/files/ppcomp.htm

Reading the description carefully it seems like he has modified the delphi code to look more like the FPC code.

In many cases two people trying to implement the same relatively simple behaviour will end up with code that differs in little more than variable names and spacing without needing to copy.

Reply by email

Graeme Geldenhuys
to peter green
peter green wrote 5 lines
In many cases two people trying to implement the same relatively simple behaviour will end up with code that differs in little more than variable names and spacing without needing to copy.

What I found in Lazarus code so far was that somebody _was_ peaking at the Delphi code at some stage. Numerous methods have variables declared with the exact same names, type and order or appearance. I don't believe that was a coincidence. Good news is that that's where the similarity ends (well in the units I checked). Importantly, the method bodies seem to be implemented differently, except for the very elementary methods.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

ik
to Graeme Geldenhuys
Graeme Geldenhuys wrote 9 lines
On 13/11/2007, peter green wrote: > > In many cases two people trying to implement the same relatively simple > behaviour will end up with code that differs in little more than > variable names and spacing without needing to copy. > What I found in Lazarus code so far was that somebody _was_ peaking at the Delphi code at some stage.

I can tell you that I used Delphi up until 2003/4 ... I stopped only when I moved completely away from the Windows world... And so does many other people in this list (that used/are using Delphi as the development tool at work etc..).

Numerous methods have variables declared with the exact same names, type and order or appearance. I don't believe that was a coincidence.

I think that some variable names will be the same. For example in socket based HTTP, I saw many implementations that uses the variable name of "payload". Or when you have a variable that stores a name, someone call it "name", or when it is a coordinate based variable, then you will find something such as "coord" or "coordinates" etc.. And it also looks like lack of good imagination, and the wish to make the code more readable :)

Good news is that that's where the similarity ends (well in the units I checked). Importantly, the method bodies seem to be implemented differently, except for the very elementary methods.

What are the elementary methods ?

Show quoted text 6 lines
Regards, - Graeme -

Ido

Reply by email

Daniël Mantione
to Graeme Geldenhuys: What I found in Lazarus code so far was that somebody _was_ peaking at the Delphi code at…

Op Tue, 13 Nov 2007, schreef Graeme Geldenhuys:

Show quoted text 14 lines
On 13/11/2007, peter green wrote: > > In many cases two people trying to implement the same relatively simple > behaviour will end up with code that differs in little more than > variable names and spacing without needing to copy. > What I found in Lazarus code so far was that somebody _was_ peaking at the Delphi code at some stage. Numerous methods have variables declared with the exact same names, type and order or appearance. I don't believe that was a coincidence. Good news is that that's where the similarity ends (well in the units I checked). Importantly, the method bodies seem to be implemented differently, except for the very elementary methods.

Please make a log of what you find, then we can discuss if something needs to be done about it.

Unfortunately similar variable names (that aren't obvious choices) can mean a whole procedure needs rewriting because it is then clear it is not an independend work.

Daniël

Reply by email

Marc Weustink
to ik: I can tell you that I used Delphi up until 2003/4 ... I stopped only when I moved…
ik wrote
On Nov 13, 2007 10:51 PM, Graeme Geldenhuys wrote:

[..]

> Good news is that that's where the similarity ends (well in the units I checked). Importantly, the > method bodies seem to be implemented differently, except for the very elementary methods. What are the elementary methods ?

methods like:

TSomeObject.DoSomeNotify;
begin
   if Assigned(FOnSomeNotify)
   then FOnSomeNotify(Self);
end;

You cannot write this another way.

Marc

Reply by email

Mattias Gaertner
to ik: I can tell you that I used Delphi up until 2003/4 ... I stopped only when I moved…
[...] > What I found in Lazarus code so far was that somebody _was_ peaking > at the Delphi code at some stage.

Yes.

1.
Many pascal programmers have several years Delphi experience and are used to the Delphi coding style and naming scheme. So when they create a new method/class, the variables will usually have Delphi names, Delphi block sizes, etc.

2.
There was a short discussion some years ago when I started the codetools, how the generated code should look like. I feared that when the codetools class completion creates the same code as Delphi, people will eventually come up with copyright. The only strange thing is that it took 6 years. One fourth of the LCL is auto generated code.

[...] And it also looks like lack of good imagination, and the wish to make the code more readable :)

Many keep Delphi compatibility, because they like it, not only OOP and the Delphi features, but the coding style as well.

Show quoted text 5 lines
> Good news is that that's where the similarity ends (well in the > units I checked). Importantly, the method bodies seem to be > implemented differently, except for the very elementary methods. What are the elementary methods ?

Attached is an example.

Mattias

Reply by email

Daniël Mantione
to Marc Weustink: [..] methods like: TSomeObject.DoSomeNotify; begin if Assigned(FOnSomeNotify) then…

Op Tue, 13 Nov 2007, schreef Marc Weustink:

Show quoted text 22 lines
ik wrote: > On Nov 13, 2007 10:51 PM, Graeme Geldenhuys > wrote: [..] > > Good news is that that's where the similarity ends (well in the units > > I checked). Importantly, the > > method bodies seem to be implemented differently, except for the very > > elementary methods. > > What are the elementary methods ? methods like: TSomeObject.DoSomeNotify; begin if Assigned(FOnSomeNotify) then FOnSomeNotify(Self); end; You cannot write this another way.

You can:

Tsomeobject.do_some_notify;
begin
 if Fon_some_notifynil then
   Fon_some_notify(self);
end;

The "algorithm" cannot be implemented in another way. That is okay, you don't have a copyright on your algorithm or ideas, but on the code as you have written it. So it is no problem that our implementation uses the same "algorithm".

The choice of algorithms, your style, your choice of identifier names, order of statements, choice of data types all contribute to the creativity. If a piece you write has sufficient creativity, it is protected by copyright. Copying copyrighted code and modifying it into a different style, changing identifier names doesn't change the copyright status, as there is still creativity of the original author left.

Now, a piece of code this size has little creativity in it, I consider a procedure like this uncopyrightable. Nothing I wrote above means your code is illegal and mine is legal, by the way. However, while the algorithm is the same, you should still carefully watch out for byte-per-byte copies.

Daniël

Reply by email

Mattias Gaertner
to Daniël Mantione
Show quoted text 35 lines
Op Tue, 13 Nov 2007, schreef Marc Weustink: > ik wrote: > > On Nov 13, 2007 10:51 PM, Graeme Geldenhuys > > wrote: > > [..] > > > > Good news is that that's where the similarity ends (well in the > > > units I checked). Importantly, the > > > method bodies seem to be implemented differently, except for > > > the very elementary methods. > > > > What are the elementary methods ? > > methods like: > > TSomeObject.DoSomeNotify; > begin > if Assigned(FOnSomeNotify) > then FOnSomeNotify(Self); > end; > > You cannot write this another way. You can: Tsomeobject.do_some_notify; begin if Fon_some_notifynil then Fon_some_notify(self); end;

That's not the same and will crash since lazarus svn rev 12822. Lazarus now uses the Delphi 'Assigned' trick for design time events as default.
I hope this trick is not copyrighted or patented.

Mattias

Reply by email

Daniël Mantione
to Mattias Gaertner

Op Wed, 14 Nov 2007, schreef Mattias Gaertner:

That's not the same and will crash since lazarus svn rev 12822. Lazarus now uses the Delphi 'Assigned' trick for design time events as default. I hope this trick is not copyrighted or patented.

Tricks cannot be copyrighted, and we live in sw patent unfriendly territory for the time being :)

Daniël

Reply by email

Michael Schnell
to Graeme Geldenhuys: What I found in Lazarus code so far was that somebody _was_ peaking at the Delphi code at…
What I found in Lazarus code so far was that somebody _was_ peaking at the Delphi code at some stage. Numerous methods have variables declared with the exact same names, type and order or appearance.

Changing the said likelihoods might help to obfuscate the potential peeking but does that really help to fight any suspicion ?

-Michael

Reply by email

Alvise Nicoletti
to Michael Schnell
> What I found in Lazarus code so far was that somebody _was_ peaking at > the Delphi code at some stage. Numerous methods have variables > declared with the exact same names, type and order or appearance.

I am noone here, but I think that Borland have always know that (if that is true ;) ).

IMHO, they are complaining now cause Lazarus/FPC is becoming a better product than Delphi.

So the road is not the wrong one, but in reality the right one.

Some code must be very similar, you're doing the same things. And honestly I don't think that the most important sources of FPC/Lazarus are the functions to manipulate the strings...

Always IMHO.

Alvise Nicoletti

Reply by email

mm
to Neil Graham: Wouldn't it be more efficient to write to Borland (or whatever they call themselves this…
Neil Graham wrote 21 lines
On Tue, 2007-11-13 at 18:10 +0700, Bee wrote: > Maybe we should start some kind of code legality check. Like what had > been done by ReactOS a few months ago against Windows' code. This tool > might helps us review FPC's and Lazarus' code against Delphi code (or > other as well?). Wouldn't it be more efficient to write to Borland (or whatever they call themselves this week). say something like (but not exactly like, I'm just rambling here); we have endeavoured to produce code that does not violate any copyrights, but as a collaborative project it is difficult to guarantee the work of all contributors. We would like to arrange a liaison in order that should any copyright violations be discovered we can correct the situation as soon as possible. It may mean an easy and acceptable solution. They may just say no. Then again it may be like drawing the gaze of the eye of mordor.

I don't think it is a good idea. In case of a court sue, it could be used by Borland lawyers, "See, at that time they already acknowledged the possibility to be guilty".

I strongly doubt that Borland/Codegear will sue the FPC team (even in case of copyright infringement). It would be a very bad advertisement campaign. In fact, I think the best for them is to do what they are doing:
* A free Turbo Delphi (so that beginners make use of it instead of using Lazarus/FPC).
* Fuzzy threats like the one reported in this thread (so that companies make use of Delphi instead of Lazarus/FPC). Here, the threat is much more efficient than the attack.

mm
http://www.ellipsa.net

Reply by email

Neil Graham
to mm
mm wrote 9 lines
Neil Graham a écrit : > > It may mean an easy and acceptable solution. They may just say no. > Then again it may be like drawing the gaze of the eye of mordor. I don't think it is a good idea. In case of a court sue, it could be used by Borland lawyers, "See, at that time they already acknowledged the possibility to be guilty".

Yeah, I thought about that. It's just sad to become part of the same world where hospitals refuse to give out medical records to patients in case they are sued.

[sigh] remember when talking about things was a solution.

[fairly off topic now I must say]

Reply by email