I’m working on a JavaScript port of a red-black tree implementation in Java from the book Algorithms 4th Edition, by Sedgewick and Wayne. I believe that my JavaScript port qualifies as a derivative work. It’s not nearly a line-for-line copy, but the core logic for RBT manipulation is quite similar.
On the book site, it states that the libraries stdlib.jar
and algs4.jar
are licensed under GPLv3. The red-black tree implementation in Java is part of the algs4.jar
library. Ideally I’d like to release the port under a more permissive license, but that doesn’t appear to be possible, for understandable reasons.
However I’m unclear about how users of my port will be bound by the license. Does any software making use of my JavaScript red-black tree port, regardless of the overall size of the project, need to make the entire project’s source available under the same terms, or just the source for the JavaScript port itself?
In other words, would the authors of some larger project be bound to release their entire project under GPLv3 just because it uses a port of an algorithm implementation released under those terms in some part of the project?
Your code needs to be released under the GPLv3 as you believe it is a derivative work of the algs4.jar
implementation.
Other projects utilizing your code will likely need to be released as GPLv3. Most larger applications just incorporate code from smaller projects, and treat the smaller code base as part of the larger. That will trigger the “viral” aspect of GPLv3.
If you provide a way to access your code in one of the accepted “escape mechanisms” then the larger project will not be affected by the viral aspect of GPLv3. This section of the GPL FAQ explains some of the ways that GPL code can be used in proprietary code without triggering the viral aspect of the GPLv3.
However, in many cases you can distribute the GPL-covered software alongside your proprietary system. To do this validly, you must make sure that the free and non-free programs communicate at arms length, that they are not combined in a way that would make them effectively a single program.
You may also be able to license your project as LGPL, which can make it easier for other projects to link to your project without being impacted by the GPL/LGPL license.
6
In order to attach your own license to code, you must own the copyright. Generally speaking, that means that it must be code that you have written.
As an example, there are libraries out there already that provide some capability I want in my program. I have two choices: I can either live with the license that the library provides, or I can write my own library that performs a similar function.
The safest way to write my own clone library is to do it as a clean room implementation: that is, I write my library with no knowledge of the original library’s internals. That way, I can be accused of neither stealing the code nor the algorithms that the code implements, because all of my work is original work.
Things get a little dicier if you’re examining the code of the original library in detail. In order for a transformative work (that is, work that incorporates elements of an already copyrighted work) to qualify for copyright protection of your own, your work must be novel in some way; that is, it must contain original work. It seems to me that a library directly transcribed into another language is not novel enough to meet this criteria.
Further Reading
http://en.wikipedia.org/wiki/Derivative_work