This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Meta-Level Compilation project / Introspector/ AST access / Licensing question


On Friday, June 21, 2002, at 03:49  PM, James Michael DuPont wrote:

I should have been more careful when I wrote
"Correct."  Should GCC accept
patches to provide a standard interface that reads
and writes compiler
internals in XML format, with documentation, then it
would be hard to
argue that all readers and writers of the format
would need to use GPL
licensing, because use by external programs would be
*intentional*.
Even without XML, all of the patches that I know of by
others who are accessing the gcc this way are via the
tree-dumper. It provides all that is needed (Exept
maybe a really small patch to dump function bodies).

Even without documentation, the source code is
documentation enough.
No, it's not.
Also if you are using the tree-serializer patch, then
you cannot prevent anyone from accessing the ASTS in a
GDBM file to create non-free tools.
Of course you can.
<Definitely not legal advice, i'm only a law student>
Watch this:
1. They would need to be able to rewrite the trees back when they were done.
2. Such a task would require writing the tree structures.
3. Writing the tree structures requires a header with the structure in it.
4. Any header with the structure of trees in it must, besides variable names and order of structure appearance, be a copy of those structures from tree.h, otherwise, it would be incompatible.
5. It must also include the language specific trees and lang-specific part of the nodes.
6. This is a significant amount of code.
7. This code is under copyright.

Thus, in order to have a defense to stealing the copyrighted code (intentionally or accidently), they'll have to try the "fair-use because it was reverse engineering for interoperability" defense.
So we would look towards Sega and friends, and look what happened there.
The Sega court invoked Altai as a prelude to its fair use analysis, and
listed as unprotected program elements those "dictated by the function to
be performed, by considerations of efficiency, or by external factors such
as compatibility requirements and industry demands."

They then proceeded to find that the 25 bytes of code accolade copied to make their games run, was unprotected because it was dictated by compatibility requirements and industry demands.

But the code in tree.h meets none of these elements.
1. None of the tree structure is dictated by the function to be performed.
Proof: Other compilers perform the same exact functions, on a different tree structure.
Thus, it can't be the case that our compiler's tree structure was dictated by the functions to be performed.
In fact, it's exactly the opposite.
The form and content of the functions that operate on trees are dictated by the tree format.
2. The tree structure code as a whole was not dictated by considerations of efficiency, only by considerations of functionality.
3. The tree structure code is clearly not dictated by industry requirements, or compatibility.

Thus, any dirty room (IE access to tree.h) reverse engineering would likely produce accidental or intentional copyright violations.
Any clean room engineering is going to be very difficult, since we reuse fields all over the place.
Imagine trying to discover the structure of GCC's trees given only untyped memory dumps.

Ignoring copyright, their is a contract issue as well with dirty room engineering, in that they are likely violating the GPL by not distributing source (Likely only because i am assuming it is only likely they are distributing their proprietary program to people).  To boot, they would be probably be doing it in bad faith, if they knew they were going to violate the license when they started.
Fair use is not a defense to breach of the contractual portions of the GPL.
Violating the contract of the GPL (assuming it's valid) gives them no right to have used the source code in dirty room engineering,  and thus, they would be in big trouble, regardless of whether copyright infringement has occurred.
See, for instance Pro-Cd v. Zeidenberg, in which the court ruled that a shrink wrap agreement prohibiting the copying of a database was enforceable, even if the underlying database might not be  protectible by copyright.

They would have to somehow claim they didn't know GCC was GPL'd, or didn't notice the license plastered across the top of the files.
If they didn't notice either, why would they be trying to circumvent it in the first place?

In short, simply writing trees in the way the tree-serializer does is not giving license to   create programs that read and write these trees, and then pass them back to gcc.

No sane business plan would include a product that they could, and likely would, be forced to either stop distributing the product, or to publish the source code.
</definitely not legal advice, i'm only a law student>
If you don't believe me, try it with an already existing serialized IL, and see if you lose in court.

So I am not doing anything new here, and you cannot
say that the gcc does not have these patches, they are
being used to interface to other tools of different
licenses, even if slightly modified.







Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]