united-states copyright licensing
Algorithm (pseudo)code in academic papers -- what is the copyright/license status?
<p>When you see an algorithm described in pseudocode in an academic paper, what are you legally allowed to do with it, from a copyright and/or licensing standpoint?<br>
Could you legally just copy-paste this into your own program and then fix the minor differences without anyone's permission?  </p>

<p>Assume:</p>

<ul>
<li><p>The "pseudocode" is very close to being real code... e.g. it might say <code>x := x^2</code> when the equivalent real code in your language might be something like <code>x = x**2</code>.  </p></li>
<li><p>The publication is (obviously) copyrighted as usual, but nothing is specifically said about the code.</p></li>
<li><p>There are no patents on the code. I'm not asking about patents here.</p></li>
</ul>

<p>Pseudo-code written down somewhere is protected by copyright, even if the article containing it doesn't say anything about the pseudo-code contained in it (i.e. doesn't mention "this too is copyrighted"). For example, let us assume that the following isn't actual compileable / executable code in some extant programming language:</p>

<pre><code>procedure bubbleSort( A : list of sortable items )
    n = length(A)
    repeat 
        swapped = false
        for i = 1 to n-1 inclusive do
            /* if this pair is out of order */
            if A[i-1] &gt; A[i] then
                /* swap them and remember something changed */
                swap( A[i-1], A[i] )
                swapped = true
            end if
        end for
    until not swapped
end procedure
</code></pre>

<p>It does nevertheless constitute an expression of an abstract algorithm. If it can be copied and pasted, it is an expression. If you run this through a filter to create executable code in some language, you will have created a derivative work (and possibly one with no copyright protection, if the conversion is totally automatic). If you read the lines and say "Ah, I know what that would be in Pascal", that has the modicum of creativity required to make your conversion protected, but you've still infringed the underlying work.</p>

<p>On the other hand, a logical flow chart, which is a picture of the abstract idea of what to do, is copyright-protected only as a graphic object. If you look at it and it inspires you to write pseudo-code or actual code, you are not copying the flow chart. </p>
