1

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?
Could you legally just copy-paste this into your own program and then fix the minor differences without anyone's permission?

Assume:

  • The "pseudocode" is very close to being real code... e.g. it might say x := x^2 when the equivalent real code in your language might be something like x = x**2.

  • The publication is (obviously) copyrighted as usual, but nothing is specifically said about the code.

  • There are no patents on the code. I'm not asking about patents here.

  • If you copy the entire pseudocode then that is problematic. Re-implement the algorithm in your language of choice with your own style, naming conventions, etc. If you're really worried about x = x**2 you could try to express it in another way if you want, but I don't see why that would be necessary. – Brandin Nov 7 '17 at 13:20
  • @Brandin: "Problematic" in what legal sense, exactly? There really aren't meaningful ways to change the algorithm; I could of course rename things but that would seem silly and not legally of any value (or is it?). Bear in mind that this is Law.SE, not Academia.SE (not asking about plagiarism) or Workplace.SE (not asking about ethics) or SoftwareEngineering.SE (not asking about code quality/practices), etc. – Mehrdad Nov 7 '17 at 13:26
  • See the linked question for the detatils. The algorithm is not protected, but the expression of it as pseudocode is. What you are describing (copy paste the pseudocode expression) sounds like an infringement. Reimplementing the algorithm using your own original expression is not. Common expressions and idioms like "x = x**2" by themselves are generally not original and aren't eligible for copyright. Reusing all the names of variables might or might not be a problem; search the site for details and cases mentioned. – Brandin Nov 7 '17 at 13:59
4

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:

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] > 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

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.

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.

  • 3
    I'm not convinced that an actual code implementation of the pseudocode would constitute an infringing derivative work in light of the abstract algorithm/idea exception to copyright protection. The flow chart to code protection really shouldn't be any different that the pseudo-code to code protection. If one directly copied the actual code, that might be another matter. Also, I think that under the circumstances an implied license to use works derivative of the pseudo-code would probably exist. – ohwilleke Nov 7 '17 at 20:23
  • 1
    I don't know if this is the same question or a related question, but would the "license" (in the sense of BSD/MIT/GPL/etc.) be a separate issue from a "copyright"? I'm not sure what legal umbrella they would fall under... the license for using something to create a derivative work seems different both from patents as well as from copyright, but I'm not sure. If they are different, could you also include a mention of that as well? It's not clear to me because right now you say the conversion to Pascal would be protected but at the same time still infringing... – Mehrdad Nov 7 '17 at 21:14
  • Also, I suspect some kind of court case addressing this would go a long way... if any exists. – Mehrdad Nov 7 '17 at 21:24
  • The steps (algorithm) are not copyrightable no matter what form they take. If I say "here's a way to sort a list of numbers: ..." then the expression I use (the ...) is copyrightable, the steps themselves (the algorithm) is not. It does not matter whether the "..." is a poem, a flow-chart, a computer program in Pascal or pseudocode. If you use those same steps to sort your own list of numbers without copying my ..., then you didn't infringe my copyright. And no, you don't need a license from me to use those same steps if you didn't copy my .... – Brandin Nov 7 '17 at 22:38
  • @Mehrdad as I understand it, the software license is a condition that the copyright holder places on the recipient of a copy of the software, since the recipient must place a copy of the software on the computer in order to use it. Thus, the license depends entirely on copyright. – phoog Nov 8 '17 at 18:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.