News for hackers. Stuff that matters.
Re:Google’s copying of the Java SE API was fair use [pdf] by thesuperbigfrog on Monday April 05, 2021 @10:52AM (#26699809)
I am not a lawyer, but I don't see why not.

Have you ever used code generation as part of software you have built?

Is there any reason why generated code could not be copyrighted as part of a larger system?

For example, suppose I define a data model for a public-facing API and then generate SDKs in various popular programming languages to interact with the public-facing API.

If I were a major corporation that owned such a public-facing API, then I would expect that the generated SDKs would carry the major corporation's copyright.

edit: Another example of generated code would be the code generated by lexer analyzer generator and parser generator tools such as lex (https://en.wikipedia.org/wiki/Lex_(software)), flex (https://en.wikipedia.org/wiki/Flex_(lexical_analyser_generat...), YACC (https://en.wikipedia.org/wiki/Berkeley_Yacc), and bison (https://en.wikipedia.org/wiki/GNU_Bison).

If you create commercial software that includes YACC-generated code, wouldn't the generated code be copyrightable?

Re:Google’s copying of the Java SE API was fair use [pdf] by CydeWeys on Monday April 05, 2021 @10:54AM (#26699838)
> I am not a lawyer, but I don't see why not.

The involvement of actual human creativity is required for a work to be copyrightable.

Re:Google’s copying of the Java SE API was fair use [pdf] by thesuperbigfrog on Monday April 05, 2021 @11:05AM (#26699977)
In my code generated-SDK example, a human defined the data model and a human created the code generation algorithm, but an algorithm generated the SDK code itself.

So human creativity is involved, but is not the direct creator of the SDKs. Does that count? I am not really sure.

I bring up the generated SDK example because I have used just such a system when I worked at a major corporation: I created a data model in Web Services Description Language (https://en.wikipedia.org/wiki/Web_Services_Description_Langu...) and used a company-owned tool to generate SDKs in various programming languages. All of the generated SDKs had the company's copyright notice in the generated code.

Re:Google’s copying of the Java SE API was fair use [pdf] by eqvinox on Monday April 05, 2021 @11:14AM (#26700105)
IANAL, but:

The code generated SDK is a derivative work of the human-defined data model - just like the binary for any piece of software is derivative of the source code. (Otherwise where'd the copyright for the binary come from?)

The generator's copyright (or the compiler's) doesn't directly flow in. (But if the generator/compiler incorporates pieces of itself, like a support library, that does. Also, the generator/compiler might have terms of use...)

If you write a generator that just generates random APIs, those are basically machine generated garbage and wouldn't be copyrightable. The human input to the generator is missing.

[FWIW, I had to research this due to an "ill-behaved" community member on an open source project a few years back; I'm not completely making this up out of thin air. That still doesn't make me a lawyer though ;)]

Re:Google’s copying of the Java SE API was fair use [pdf] by ghaff on Monday April 05, 2021 @11:25AM (#26700260)
My understanding is that the copyrightability of binaries was something of a gray area for a time even after the copyrightability of source code was established. Apple v. Franklin is probably the most relevant court case.
Re:Google’s copying of the Java SE API was fair use [pdf] by coldtea on Monday April 05, 2021 @12:37PM (#26701223)
The generator has been run by someone.
Re:Google’s copying of the Java SE API was fair use [pdf] by hctaw on Monday April 05, 2021 @11:35AM (#26700388)
We already do this, binary is generated and copyrighted.
Re:Google’s copying of the Java SE API was fair use [pdf] by ghaff on Monday April 05, 2021 @10:56AM (#26699876)
A more obvious example is that, if you write a program that generates music based on some algorithm, that work is presumably copyrightable.
Re:Google’s copying of the Java SE API was fair use [pdf] by pvorb on Monday April 05, 2021 @12:14PM (#26700850)
> as part of a larger system

I think this is the key statement that will make a difference. If you want to copyright a larger system, generated code is not a problem. If you want to copyright an individual, generated piece of code, I doubt you'll get copyright for that. But IANAL either.