Studying the DMD front-end and contributing to similar projects?
newshound1 at digitalmars.com
Sun May 2 11:22:41 PDT 2010
Aziz K. wrote:
> The specs are not always helpful when you need to know how to write a
> compiler for D programs.
> Is it okay to study the code of the front-end of DMD, and also
> contribute to similar projects under a different license?
> What are the restrictions in this regard?
It is under GPL and the Artistic License. If you wish to use it under the GPL,
the usual GPL conventions apply. If you wish to use it for commercial non-GPL
purposes, ask me and I will do my best to make it work for you.
I use the compiler source in my Compiler Construction Seminar
(http://www.astoriseminar.com). So yes, you are free to study the code, learn
from it, apply the techniques in your own projects, and contribute to other
projects under a different license.
As far as I know, none of the algorithms used in the compiler are encumbered by
any patents, certainly I hold no patents on it, nor do I intend to patent any
part of it. Furthermore, the algorithms used in it are pretty conventional
compiler algorithms that have been around a long time.
All I ask is that you do not copy the actual source code code without a license
from Digital Mars or unless the copy is under the GPL.
In particular, I am not requiring anyone to do a clean room implementation. My
often stated ideas about 'taint' are simply an easy way to protect myself (and
Digital Mars) against frivolous lawsuits, I have no intention of applying them
For an example of what doesn't work for me, many years ago, a company came out
with a product suspiciously similar to mine. I contacted them, and they said
that while they were familiar with my code, they had rewritten it from scratch.
Ok, so I ran an "nm" over their executable and a "strings". Of the hundreds
internal function names (not interface related), about 95% were identical
matches to my source code, and about 90% of the text strings, such as error
messages, were identical. This was as obvious and egregious as it gets. They
were full of BS, and they caved.
More information about the Digitalmars-d