SWI-Prolog License Conditions
SWI-Prolog licensing aims at a large audience, combining ideas from the Free Software Foundation and the less principal Open Source Initiative. The license aims at:
To achieve this, different parts of the system have different licenses. SWI-Prolog programs consists of a mixture of `native' code (source compiled to machine instructions) and `virtual machine' code (Prolog source compiled to SWI-Prolog virtual machine instructions, covering both compiled SWI-Prolog libraries and your compiled application).
The SWI-Prolog kernel and our foreign libraries are distributed under the Lesser GNU Public License, also called the LGPL. A Prolog executable consists of the combination of these `native' code components and Prolog virtual machine code. The SWI-Prolog swipl-rc utility allows for disassembling and re-assembling these parts, a process satisfying article 6b of the LGPL.
Under the LGPL SWI-Prolog can be linked to code distributed under arbitrary licenses, provided a number of requirements are fullfilled. The most important requirement is that, if an application relies on a modified version of SWI-Prolog, the modified sources must be made available.
Foreign libraries contributed to the SWI-Prolog project must have license conditions that are compatible to the LGPL or the GPL. Applications using SWI-Prolog must satisfy the license restrictions of all modules.
Lacking a satisfactory technical solution to handle article 6 of the
LGPL, this license cannot be used for the Prolog source code that is part
of the SWI-Prolog system (both libraries and kernel code). This situation
is comparable to libgcc
, the runtime library used with the
GNU C-compiler. Therefore, we use the same proven license terms as this
library. The libgcc license is the GPL, accompanied with a
special exception. Below we rephrased this exception adjusted to our needs:
As a special exception, if you link this library with other files, compiled with a Free Software compiler, to produce an executable, this library does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License.
The above sounds a bit complicated. To facilitate this heterogeneous license system we have added some machinery to SWI-Prolog:
swipl
,
referring to the GPL plus the SWI-Prolog Prolog code exception.
Please check the SWI-Prolog manual for details on accepted license identifiers.
... PL_license("libreadline", LICENSE_GPL); ... |
To achieve maximal coherence using SWI-Prolog for Free and Non-Free software we advice the use of the LGPL for contributed foreign code and the use of the GPL with SWI-Prolog exception for Prolog code for contributed modules.
As a rule of thumb it is advised to use the above licenses whenever possible and only use a strict GPL compliant license only if the module contains other code under strict GPL compliant licenses.
This page is maintained using the chpp macro language |