Linkage of GPLed GCC to Closed Source via XML or Perl

James Michael DuPont mdupont777@yahoo.com
Sat Mar 2 01:21:00 GMT 2002


Joe, 

> Yes, the tone of my statement was completely 
> inappropriate.  You are not a bad guy, and I 
> apologize for my original statement.

Thank you and I accept your apology. 
I understand your wanting to prevent abuse of the GCC
and respect you for that as well. 

We just have to work together on this, it is not that
clear cut.

> Furthermore this is

> an extremely complex issue and I think that at
some

> point the FSF is going

> to have to modify the policy somehow.

That is why I am bringing this up before someone makes
an misinformed judgment, because no-one will talk to
them about the issue.

For example, take a look at a mail from the GCC_XML
mailling list :
http://public.kitware.com/pipermail/gccxml/2002-February/000033.html


> I'm not sure that that will fly.  I retract my
> accusations against you,
> but I don't retract my statements that XML 
> output will provide new ways
> of attaching proprietary code to GCC (despite 
> your claims that the GPL
> can prevent this).

First I will change the license text on all the
programs that deal with the introspector, even to perl
ones to strict gpl. 

I think some of the perl scripts
were artistic licence.


Secondly, I am going to officially limit the usage of
the introspector for improving the GCC compiler itself
(This can always be taken back when we get more
information about how to move forward).

Can be done via a simple statement like :
BEGIN LEGALEZE
The program is intended to be used internally by the
gcc project. It is not to compile any other source
code other than the GCC compiler and their GPLed code.
All output from it is under the gpl and cannot be used
in any other project without written permission?
END LEGALEZE
And now, I cannot afford a lawyer, I am not making any
money off of this.

Besides, Noone else is really using it as far as I
know, and the only project that I have compiled are
the c,c++ and java compilers. 



I have a postgres database of 2gb with all the asts
from the stage2 bootstrap on my computer and am
writing cool queries to figure out how the tree nodes
are used.



Please feel free to check out this one little example
that I wrote :

http://introspector.sourceforge.net/tree_code_name.html


> On the other hand, it appears

> that various compiler

> vendors are talking about common XML formats to

> represent parsed C++

> code.  If this comes about, any resistance on the

> part of GCC will be

> useless.

Really, can you please tell me where I can read about
this? That I have not encounter yet!

There is the DAGSTUHL Middle model project :



http://scgwiki.iam.unibe.ch:8080/Exchange/2



BEGIN QUOTE 

Model for program entity level information

This page contains information about models and
schemas for modelling source code at the program
entity (or design) level. The effort to come up with a
standard schema is currently dubbed the Dagstuhl
Middle Model (DMM).

Model for program entity level information

END QUOTE 



The cppx project from waterloo is another GCC
modification that outputs a binary dump of all the AST
information and then uses some interesting tree
walking to output into a DMM compatible format 



The cppx homepage is here : 
http://www.swag.uwaterloo.ca/~cppx/
Here is another page describing it :
http://swag.uwaterloo.ca/~dean/cppx/

Here is an interesting overview of the cppx project
:

http://www.csr.uvic.ca/chisel/collab/reports/cppx.html



BEGIN QUOTE

CPPX is a free, open source, general purpose parser
and fact extractor for 


C++. It relies on the preprocessing, parsing, and
semantic analysis of GNU g++, and produces a graph
according to the Datrix fact model, in 


either GXL, TA, or VCG format, suitable for use in
architecture recovery, data flow analysis, pointer
analysis, 


program slicing, query techniques, source code
visualization, object recovery, 


restructuring, refactoring, remodularization, and the
like. When invoked with a 


source file, CPPX first passes the file to g++, which
compiles it with a 


"compile-only" option. There are hooks within the GCC
archicture for extracting 


debugging information, and upon them we have hung code
to dump GCC's internal 


semantic graph to a (binary) format convenient for
CPPX's purposes. The schema 


(rules and regulations) of GCC's graph are suitable
for normal compilation (viz. 


for execution) but not for design recovery. So after
the dump, CPPX applies a 


collection of tiny "systolic" transformation steps to
make the graph conform to 


a schema more suitable for design analysis. The final
result graph is emitted in 


GXL (or TA, if you like). The target schema is that of
Bell Canada's Datrix 


project.

END QUOTE 







I hope you find this interesting.

mike

=====
James Michael DuPont

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - sign up for Fantasy Baseball
http://sports.yahoo.com



More information about the Gcc mailing list