2

Can Transpiled Output Source-Code Have Different License And Different Copyright Holder Than Input Source-Code ?

Prj-A──>─┬─>Prj-TP──>────┬─>Prj-┐ 
(Apache) │(Python-to-C++)│  TP  │
         │               │      │
my code─>┘   my code─>───┘      │
                                │
Prj-G──>─┬─>Prj-TG──>─┬─>Prj──>─┤
(GPLv2)  │ (Go-to-C++)│  TG     ┝━>Prj
         │            │         │   D
my code─>┘  my code─>─┘         │
                                │
Prj-B──>─┬─>Prj-TC──>──┬─>Prj─>─┤
(BSD)    │  (C#-to-C++)│  TC    │
         │             │        │
my code─>┘   my code─>─┘        │
                                │
my code─>────────>────────>─────┘
          Diagram - A

I have applied pre-processors on source-code of (1) Python based Project-A (Prj-A) with Apache1 License, (2) Go based Project-G (Prj-G) with GPLv21 License, (3) C# based Project-B (Prj-B) with BSD1 License, etc and prepared them for Transpiler, and then applied transpiler on source-code of those software projects as input source-code, and Transpiled/translated/converted (aka: Source-to-Source conversion) those input source-code into C++ based output source-code, and then i have added even more C++ codes in each, and created completely C++-language based (1) Prj-TP (2) Prj-TG (3) Prj-TC respectively, And then i have taken & used different portions of Prj-TP, Prj-TG & Prj-TC's code/files, and incorporated into my another project, Project-D (Prj-D), Can i use my own name to Copyright C++ based new source-code of Prj-D ? and Can i use different license for the Prj-D ?

DETAILS:

Prj-A uses Python language, & has Apache License.
Prj-G uses Go language, & has GPLv2 License.
Prj-B uses C# language, & has BSD License, etc.
in each of this "upstream" project i have made small contributions.

Prj-A──>─┬─>Prj-TP──>────┬─>Prj-┐ 
(Apache) │(Python-to-C++)│  TP  │
         │               │      │
my code─>┘   my code─>───┘      │
                                │
Prj-G──>─┬─>Prj-TG──>─┬─>Prj──>─┤
(GPLv2)  │ (Go-to-C++)│  TG     ┝━>Prj
         │            │         │   D
my code─>┘  my code─>─┘         │
                                │
Prj-B──>─┬─>Prj-TC──>──┬─>Prj─>─┤
(BSD)    │  (C#-to-C++)│  TC    │
         │             │        │
my code─>┘   my code─>─┘        │
                                │
my code─>────────>────────>─────┘
          Diagram - A

I'm not very-familiar with or expert on Python, Go, C# computer programming language.
I have learned C, C++, Assembly, etc so i'm confident with those.
Compiled C++ program runs much much faster than Python, Go, C#, etc.
I needed to add new feature into those software, but their dev(s) has denied to add, with different excuses, etc.

Lic = License.
TP = Transpiled-Python-to-C++ : Prj-A(Python)(Lic:Apache)⮕Prj-TP(C++).
TG = Transpiled-Go-to-C++ : Prj-G(Go)(Lic:GPL)⮕Prj-TG(C++).
TC = Transpiled-C#-to-C++ : Prj-B(C#)(Lic:BSD)⮕Prj-TC(C++).

So i have transpiled source-code of Prj-A, Prj-G & Prj-B , into C++ based source-code for new projects Prj-TP, Prj-TG, Prj-TC respectively:

  • First i had to change & prepare certain code-lines in each source-code file of Python, Go, C# based project, to make it transpiler-friendly. I had to use many different techniques & scripts at this stage.
  • Then i have applied different transpiler software on those Python, Go, C# source-code files, one by one.
  • Transpiler software mostly transpiled only subset of Python, Go, C# language, which are very SIMPLE & EASY & BASIC code, correctly. Transpiler software cannot & did-not convert all types of Python, Go, C# source-code, especially COMPLEX CODE STRUCTURES.
  • Transpiler skipped many advanced & COMPLEX Python, Go, C# source-code lines & sections, and also incorrectly converted many lines & sections.
  • Then I have spent long long time, to manually COMPARE & CHECK each line of INPUT & OUTPUT SOURCE-CODE, and i have converted those skipped Python, Go, C# source-code lines & sections, into my own C++ based code line or section, as much as i could. I have also transpiled "incorrectly" converted C++ into correct C++, etc. There is no trace of Python, Go, C# left anymore in the final C++ source-code.
  • So finally transpilation process was done.
  • So finally i have new source-code based new projects: Prj-TP, Prj-TG, Prj-TC, etc.

Then, i have taken necessary C++ source-code lines, sections or files from Prj-TP (transpiled from Prj-A w/Lic:Apache) , Prj-TG (transpiled from Prj-G w/Lic:GPLv2) or Prj-TC (transpiled from Prj-B w/Lic:BSD), and used into my own new Project-D (Prj-D). ( D = Final-Destination )

Prj-A──>─┬─>Prj-TP──>────┬─>Prj-┐ 
(Apache) │(Python-to-C++)│  TP  │
         │               │      │
my code─>┘   my code─>───┘      │
                                │
Prj-G──>─┬─>Prj-TG──>─┬─>Prj──>─┤
(GPLv2)  │ (Go-to-C++)│  TG     ┝━>Prj
         │            │         │   D
my code─>┘  my code─>─┘         │
                                │
Prj-B──>─┬─>Prj-TC──>──┬─>Prj─>─┤
(BSD)    │  (C#-to-C++)│  TC    │
         │             │        │
my code─>┘   my code─>─┘        │
                                │
my code─>────────>────────>─────┘
          Diagram - A

Transpiled codes usually need lots of re-writing & testing & modifications, to functionally perform same-way as "upstream" software.
So at this point, these projects: Prj-TP, Prj-TG, Prj-TC & Prj-D, still have too much bugs and incompleteness, and still needs lots of fixing.

So I want to publish my C++ based Prj-D source-code as new project, and share source-code with other devs/users, so that others can collaborate+contribute to fix & improve it further, if they want to.
Can i publish Prj-D with a different License ? (different than what is used in Prj-A/Prj-G/Prj-B).
Can i use my name to Copyright Prj-D ?

Can i also release Prj-TP, Prj-TG, Prj-TC, each under different License ?
Can i use my name to Copyright Prj-TP, Prj-TG, Prj-TC ?
Do i need to notify Prj-A/Prj-G/Prj-B ?

END OF DETAILS.


EDIT / UPDATE :
i have added this/below section(s) after User: Bart van Ingen Schenau posted his initial answer in below.
Please check "EDIT"/"UPDATE" section in his answer.

As GPLv2 license is grabbing downward/derivative works/projects/source-codes , in my case I definitely want to avoid usage of GPL license , and my reason of creating this SE Question was to find out if I can use a different license or not, in above mentioned final project Prj-D.
So i have re-searched again & found a replacement for GPLv2 based Prj-G, let us call this new project, Prj-M, as it is under MIT license.
This Prj-M is using same "Go" language, like previous Prj-G . I will have to do similar work like before, to transpile Prj-M into Prj-TG2.

Prj-A──>─┬─>Prj-TP──>────┬─>Prj-┐ 
(Apache) │(Python-to-C++)│  TP  │
         │               │      │
my code─>┘   my code─>───┘      │
                                │
Prj-M──>─┬─>Prj-TG2──>─┬─>Prj─>─┤
(MIT)    │ (Go-to-C++) │  TG2   ┝━>Prj
         │             │        │  D2
my code─>┘   my code─>─┘        │
                                │
Prj-B──>─┬─>Prj-TC──>──┬─>Prj─>─┤
(BSD)    │  (C#-to-C++)│  TC    │
         │             │        │
my code─>┘   my code─>─┘        │
                                │
my code─>────────>────────>─────┘
            Diagram - B

I will transpile simple basic small portion of Go code into C++ by using software trnspiler, rest of the advanced code sections, complex code sections, etc all will be manually transformed by me from Go into C++.

Based on above code conversion diagram and related info , Can i publish Prj-D2 source-code with a different License ? a different license than what is used in Prj-A/Prj-M/Prj-B.

  • ( i think i can, for above case )

Can i use my name to Copyright Prj-D2 ?

  • i think i can add my-name under previous copyright-holder, as explained by User:"Bart van Ingen Schenau" in his answer . I have to use previous copyright-holders too, because i have used software transpiler on some portion of the Python/Go/C# source-code conversion.

Can i also release Prj-TP(Apache), Prj-TG2(MIT) & Prj-TC(BSD) source-code, each under a different License ?

  • i think i can, for above license cases.

Can i use my name to Copyright Prj-TP, Prj-TG2, Prj-TC ?

  • i think i can add my-name under previous copyright-holder(s), as explained by User:"Bart van Ingen Schenau" in his answer, because i have used machine to convert some portion of the input source code . If i convert Python/Go/C# into C++ without using any machine or transpiler software, with my own hand, eye, brain manually, then i do not need to add previous copyright-holder(s).

Do i need to notify Prj-A/Prj-M/Prj-B ?

  • i think i don't have to, as explained by User:"Bart van Ingen Schenau" in his answer, and its courteous to do so anyway . I will ofcourse inform upstream original authors/devs . and their name is also in copyright notice.

I have forgotten to mention & ask this earlier : I have added new features in new project Prj-D and also added new features in transpiled project Prj-TG, which did not exist in "upstream" project Prj-G or in transpiled project Prj-TG . And i will add those same new features again for the planned new project Prj-D2, and in Prj-TG2 . These new features are using new source-code files created by me . Can i use only my-name as copyright-holder in those specific new source-code files ?

  • i think i can, as i alone created those source-code files.

And, by the way, i also want to inform you, that, projects Prj-TP, Prj-TG, Prj-TC, Prj-D, & planned new projects Prj-TG2, Prj-D2, etc, EACH has (and will have) completely different & new software name.

8
  • Please stop editing this question. We have a term for questions that the OP continues to edit as answers reveal further issues, which is chameleon question, and they are not favoured. You've had an answer, which you have accepted; further changes to the question at that point make the answer look like a bad fit. Edits which summarise what the questioner has learned are even less desirable, as they're essentially answers, not questions. If you have further issues, please ask a new question - preferably a short one - referencing this question and anything else you feel is relevant.
    – MadHatter
    Commented Nov 2, 2020 at 10:07
  • why did you revert my new changes ? ! i added NUMBER for QUESTIONS.
    – atErik
    Commented Nov 2, 2020 at 10:12
  • I think I gave a nice, clear explanation of why I rolled back your latest edit. This question is already almost unmanageably long, and making significant changes after accepting an answer is a very bad idea. Please do not edit this question any further. If, in the light of discussions and answers to date, you have follow-on questions, ask a new question - preferably one with one or two actual questions in it, at most; 11 is too many.
    – MadHatter
    Commented Nov 2, 2020 at 10:14
  • my EDITs are IMPROVEMENTS , they do not create conflict in my answer or any one's answer.
    – atErik
    Commented Nov 2, 2020 at 10:16
  • i understand what you're saying/suggesting , but this has been already edited , and i need to do one last edit, its very important.
    – atErik
    Commented Nov 2, 2020 at 10:24

1 Answer 1

3

The basis of copyright protection is that the result of human creativity gets protected from being appropriated by others. This means that if you apply a purely mechanical transformation on some source code, then you are not creating a new work as far as copyrights are concerned and thus you can't claim any rights on the transformation.

Any modifications you made, either before or after transpiling, where you had to think about how to make the change (however short or long), resulted in a new work for copyright purposes where you can claim the copyrights on the modification. But the act of transpiling itself did not change who owns the copyrights to the work.

Can i also release Prj-TP, Prj-TG, Prj-TC [and Prj-M], each under different License ?

Prj-TP, Prj-TG, Prj-TC and Prj-TM are respectively derived works of Prj-P, Prj-G, Prj-C and PRJ-M. If you can use a different license for the transpiled projects depends on if the license of the original project allows the use of a different license for a derived work.

The Apache, MIT and BSD licenses allow that, but the GPL license doesn't, meaning that Prj-TG must remain under the GPL license.

Can i publish Prj-D with a different License ? (different than what is used in Prj-A/Prj-G [or Prj-M]/Prj-B).

As you actually included code from Prj-TP, Prj-TG and Prj-TC in Prj-D, Prj-D is a derived work of all three of those projects and by extension also of Prj-P, Prj-G and Prj-C.
As Prj-G uses the GPL license, Prj-D must also be licensed under the GPL license. And there you hit a problem, because the GPLv2 license is incompatible with the Apache license, which means that a project that includes code under both licenses cannot be distributed.

There are two ways out of that problem, one of which I am sure resolves the issue, the other I am less sure about.

  1. If Prj-G is actually licensed under "GPLv2 or any later version", you can use GPLv3 for Prj-D and optionally for Prj-TG. The GPLv3 license is compatible with the Apache license.
  2. The Apache license allows you to distribute a derived work under a different license. You could distribute Prj-TP under a GPLv2-compatible license, but I am not 100% sure that that resolves the compatibility problem between the Apache and GPLv2 licenses. If you choose to go this route, I strongly urge you to take professional advice from a lawyer if you can actually do it.

As you actually included code from Prj-TP, Prj-TM and Prj-TC in Prj-D2, Prj-D2 is a derived work of all three of those projects and by extension also of Prj-P, Prj-M and Prj-C.

As all of those projects have a permissive license that allow derived works to be licensed differently, you are allowed to choose a different license for Prj-D2.

Can i use my name to Copyright Prj-TP, Prj-TG, Prj-TC ? Can i use my name to Copyright Prj-D ?

As you did some manual work to create Prj-TP, Prj-TG, Prj-TC and Prj-D, you are justified to add your own copyright line, next to the copyright lines that existed in the original. The involved licenses (Apache, GPLv2 and BSD) do not allow you to remove those original copyright lines.

Do i need to notify Prj-TP/Prj-TG/Prj-TC ?

No, you are not required to notify them, but you could do so as a courtesy.

3
  • Bart THANK YOU for (very) valuable points . I have done massive amount of code conversion work with my own hand . Everything fine, except i don't want to use GPL in final Prj-D . So I have searched & found MIT based alternative project Prj-M to replace the earlier Prj-G (GPLv2) , performs (almost) same function , i will use this Prj-M as base to re-create/re-write Prj-D again & give it a new name Prj-D2 . So i have added an "EDIT" section in my Question with these new info/data , Would you Please also add an "EDIT" section, to answer the questions inside EDIT section ? Thanks in advance.
    – atErik
    Commented Oct 8, 2020 at 19:24
  • @atErik, I have extended my answer for your new Prj-D2 project. Commented Oct 9, 2020 at 6:47
  • Thank You again Bart . I made few mistakes in EDIT section info/data earlier, which are now corrected.
    – atErik
    Commented Oct 13, 2020 at 2:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.