views:

80

answers:

2

I am currently working on a project where we using an Open Source library (GPL) for some specific algorithms and computations. This will be later replaced by our own implementation.

What I was wondering now is how much can you let yourself "help" or "inspire" by the Open Source implementation when implementing your own library which should be used by a closed source application later. It is not legal to copy some code segments or procedures directly from the Open Source into your implementation. But how much can you follow the Open Source implementation without actually violating the GPL conditions? If you study and understand the source code it is legal to do your own implementation based on this?

+2  A: 

Copyright only protects specific implementations and descriptions (such as academic papers) of an algorithm, not the algorithm itself. Copy-paste is clearly a violation, as is copy-paste and then obfuscate or extend. Understanding the algorithm and then creating your own, substantially different, implementation should be fine.

However, there may also rest a patent on the algorithm, which is a different story.

tdammers
+1  A: 

It's much the same as applies when reimplementing a commercial product.

This is usually done in a clean room style - one team will thoroughly analyse the product, producing a specification for what it does, then another team (whose members do not come from the original team) implement a replacement just using the specification document.

As tdammers said, understanding the algorithm and doing a new implementation is generally fine (excluding patent issues).

You really should avoid referring to the actual GPL code at all once you start coding your own implementation - if you refer to it, you'll very likely end up being unable to think of your own function names and ending up using the same/similar function names as in the GPL code. Whilst this is probably not technically an issue, you'll open yourself up to all sorts of accusations if someone spots it, so it is best to completely avoid the issue.

JosephH