5

I have written some code in Mathematica, and want to make these codes available in GitHub when my paper would be published.

Can I release Mathematica notebooks under GPL3? Mathematica itself is a proprietary software.

If GPL is not an appropriate license (because Mathematica is not a free software), what would be an appropriate license to release Mathematica code?

I would be happy if fellow researchers modify and redistribute my code, but I don't want someone to distribute a binary executable which might produce the same graphs, where the users not be able to see the code anymore.

1
  • I don't know if I understood the first part of your question correctly: If these files don't contain any code or data that was distributed with Mathematica (such as code generated from a template file), you have the copyright of that file. So you can decide to publish it under ANY license you like. It is not possible to create a license that says: "You are only allowed to publish your software under this license if ..." Jul 18, 2022 at 5:37

2 Answers 2

4

As I understand it.

You can release source code under the GPL and people can modify and redistribute that source code under the GPL and use it to build binaries for their own use.

However if your users distribute binaries they will likely be in violation. To distribute binaries built from GPL code users must also provide the "corresponding source code", which the GPLv3 defines as.

The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.

I'm no lawyer but I don't think Mathematica fits any of the exceptions and clearly wolfram won't allow distribution of Mathematica's source code under the GPL. So I would consider binaries built with Mathematica from GPL code to be un-distributable.

2
  • 1
    I'm not absolutely sure, but as far as I understand correctly, this kind of file format cannot be compiled but it can only be redistributed as "source code" (as far as you can call it like this). Jul 18, 2022 at 5:40
  • I think that phrase was intended to exclude things like compilers and in this context, Mathematica is acting as a compiler. Jul 26, 2022 at 0:10
0

In general, Open Source licenses do not require that the runtime environment required for your Open Source work is also Open Source. The most common example is Open Source software for Microsoft Windows. This is widely accepted, and Windows obviously isn't Open Source.

The practical reason is that the Windows libraries are considered "System Libraries". By the same logic, the Mathematica libraries used by your workbook should also be considered "System Libraries".

Supporting this argument is the fact that you do not modify Mathematica, nor was Mathematica specifically designed or adapted to run your code.

3
  • The problem with that argument is that both GPLv2 and GPLv3 define the exemption; GPLv2 says that System Libraries are "anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs", which patently doesn't include Mathematica. GPLv3 has slightly more complex language but it seems to me to say the same thing.
    – MadHatter
    Jul 21, 2022 at 16:26
  • @MadHatter But if a software were clearly intended to run on the proprietary Mathematica engine, that would probably imply an Additional Permission in the section 7 GPL-3.0 sense. Mathematica is really difficult to classify as any particular kind of software, but to some degree it is just an interpreter/runtime which arguably falls under the System Libraries exception. Similarly, I would not necessarily see a problem with running a GPL program on a proprietary Java virtual machine or on a proprietary FaaS cloud service.
    – amon
    Jul 22, 2022 at 10:59
  • @amon it definitely doesn't fall under the System Libraries exemption, because that exemption is carefully limited to OS components, and I know of no OS that ships with Mathematica as an integral (no pun intended) part. An implicit s7 exemption is an interesting idea, but a different one. Feel free to write up an answer expounding it in more detail!
    – MadHatter
    Jul 22, 2022 at 16:12

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.