ISO/Ansi Standards, Copyright and SQL

July 4, 2009

Imagine the perfect ISO/Ansi standard for a programming language. It would be concise, precise, 100% correct and writen in a formal language. Imagine constructing software that would implement a parser for the programming langauge. You could simply open the standard at page one and mechanically translate it to your favorite programming language. One could even construct a computer program to automate the translation from standard into working parser code. In fact, using a computer program to translate the standard would be best, as it would minimize work and minimize the chance of errors.

Except… except that ISO/Ansi standards are copyrighted and a translation would make your implementation a derivative work, at least as I read the law US Code Title 17:

A “derivative work” is a work based upon one or more preexisting works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which a work may be recast, transformed, or adapted. A work consisting of editorial revisions, annotations, elaborations, or other modifications which, as a whole, represent an original work of authorship, is a “derivative work”. (the bold-font is my own)

So what is the point of having a technology standard, if implementors cannot use it, because it is copyrighted?

Some may argue, that no standard is perfect and large parts of standards are described as English prose, as opposed to formal language. So my assumption is invalid and therefore my argument is invalid too. Well true, no standard is perfect, but parts of many standards are written in a concise, precise and formal language. And the formal part could be translated (automatically) to a working implementation. Except when the formal part is copyrighted…

Others may argue, that standard organizations too have expenses, and thus they need to charge for their standards. Again true, but what is the point of the standard in the first place, if one cannot use the standard directly to construct technology ? Second, everything do not have to be free of charge. The informal English prose could be copyrighted. And the standards organization could include a license explicitly granting the right to translate the English prose into a working implementation and leave the formal part in the public domain. Third, they could look for other streams of revenue, like certifying software and individuals.

I am not a lawyer, and thus I am hopeful, that I misunderstand the law or that I overlooking some crucial detail. Please comment if I am. Other comments are also welcome.

You may wonder, why the rant? I recently considered implementing a SQL parser and considered translating the formal (BNF) part of the ISO/Ansi SQL standard automatically, but this let me to consider copyright, which let me to this post.


3 Responses to “ISO/Ansi Standards, Copyright and SQL”

  1. Cetin Sert Says:

    I am currently writing a grammar for Fortran. And instead of basing it strictly on the standards, I decided to go with a clean room design approach. Although it means enormous amount of rewriting and testing against large code bases at the initial stages, I really like the results I have been getting so far. I deem it very important for my grammar to parse things only as deep as I need them for further semantic analysis. Following the standards or translating open-source implementations of them is may look like an enticing solution but doing things on your own is way more fun. I plan to publish a set of simple tools that currently help me play with changing the grammar and changing the source files to parse interactively while displaying useful (albeit a bit raw) visualizations of parse trees.

    My say on the issue of the standards though, is that they are to be made free use of. They also cost so much, so I believe legal access to a standard is enough to not fear any copyright infringement issues. I mean why do people bother to write them if no one can use them anyway? Just pay the price for access or cover the costs via your company university and you’re more than ready to go your own way with the spec in your hands.

    • Dan Hirsch Says:

      @Cetin: There are various tools built around the Sytax Definition Formalism (SDF2), such as the “Meta Environment” and Stratego/XT that are useful for building grammars and then doing transformations on the parse tree; you may want to look into them.

      Also, IANAL, but the language about translations is probably intended to cover translations to human languages (for which it is reasonable to charge for usage), rather than to machine languages, which is what you’re concerned about. Personally, I sidestep the entire issue, and follow “when in doubt, clean room reverse engineer”.

  2. Mads Lindstrøm Says:

    This post also triggered some discussion over at

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: