                       REDUCE - Open Source release



                              March 2009


THis is the REDUCE algebra system, which was originally developed by
Tony Hearn. A bibliography somewhere in this tree reports some of the
large numbers of papers that have been written about or relying on
REDUCE.


                                     Arthur Norman.  March 2009


The BULK of the files in this tree are subject to the (modified) BSD license,
as shown below. There are some components that are subject to more restrictive
terms (notably the FOX GUI Toolkit, used in one version of the code here, is
under LGPL).

===========================================================================

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the relevant copyright
      notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNERS OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.


===========================================================================


Note that the directory csl/fox contains a modified version of the
FOX toolkit (www.fox-toolkit.com) version 1.6 which is subject to
LGPL 2.1. Note explicitly that while an unmodified version of FOX can be
linked into an application and the resulting version may be distributed
without hindrance even the smallest change that has not been accepted by
the FOX central site can only be used under the terms of the LGPL. That
means that each and every person who passes on a copy of anything containing
binaries build from FOX (and eg either a full static binary linking it in,
or a dynamic library of just FOX itself) is required to provide additional
material as explained by the LGPL. A copy of those terms accompanies the
FOX sources in the csl/fox sub-directory here. In order to comply with this
while making things as easy as I can for anybody who just fetches a binary
distribution of this code I have made the build scripts here incorporate
a compressed version of all sources relevant to FOX and to relinking against
it within the binary, and so the executable comes with a command line
option that can cause it to export that material as a separate file.
The effect is obviously that binaries appear larger than would otherwise be
the case, but it should then be fully in line with license terms to
propagate, transfer, re-distribute, convey or generally do the things one
would like to with them. The full FOX distribution from its web-site
contains material in addition to the minimal required sources distributed
in this manner, and can obviously be consulted by anybody who is keen
to do development in that area. So note explicitly for the CSL variant here
that as regards the FOX toolkit

LGPL section 2 statement:
(a) My modified variant of it is a software library.
(b) I have added prominent comments in each changed file indicating that
    it has been changed and including a date, and explaining that the
    comments concerned are there in order to satisfy LGPL obligations.
(c) The whole of the modified library may be used by all third parties
    at no charge under the terms of the Lesser GNU Public License version
    2.1.
(d) The modified library will in places benefit from callbacks into
    the program that uses it, and data provided by same. I am arranging
    that all these have to be registered by passing them as arguments to
    library entrypoints and that if the calls that register them are not
    made that other aspects of library behaviour are not unduly damaged.
    I include a small program "foxdemo.cpp" in my tests that demonstrates
    the FOX library being used with no special provision for the calling
    code to provide any special functions or data, and more elaborate
    ones "fwindemo.cpp" and "showmathdemo.cpp" ditto.

LGPL section 4 statement:
     "4. You may copy and distribute the Library (or a portion or
         derivative of it, under Section 2) in object code or executable
         form under the terms of Sections 1 and 2 above provided that you
         accompany it with the complete corresponding machine-readable
         source code, which must be distributed under the terms of
         Sections 1 and 2 above on a medium customarily used for software
         interchange."
The mechanism I have established to create binaries arranges that they
naturally include all corresponding machine-readable source files for the
library. Running an executable with a command line argument "--help"
sends explanation of this to the standard output, while invoking it
with an option "--dump-source" creates a source archive in a normal
form. Thus all binaries automatically provide that relevant source is
distributed not just with them but as part of them. By adhering to this it
is proper to distribute the compiled/binary form of the modified FOX library.

Now in "A Practical Guide to GPL Compliance" the agents of the FSF note that
(L)GPL 3 "clarifies" the phrase "medium customarily..." into requiring
a fixed physical form of the material or a web-based presence that is
guaranteed to persist for a certain amount of time. LGPL 2 has just the
wording cited here and my scheme ensures that any recipient of the binary
version of the code can from it derive the corresponding sources as a
".tar" file, and that they retain the ability to do so for as long as they
retain the executable binary. I argue that this is well inside the intent of
LGPL 2, but the fact that (L)GPL 3 appears to require something yet harder
is yet another reason to be cautious of (L)GPL 3. Here is what SFLC actually
say:
     "GPLv2 refers to the various storage mechanisms as medi[a] customarily
     used for software interchange. While the Internet has attained primacy
     as a means of software distribution where super-fast Internet connections
     are available, GPLv2 was written at a time when downloading software
     was not practical (and was often impossible). For much of the world,
     this condition has not changed since GPLv2s publication, and the
     Internet still cannot be considered a medium customary for software
     interchange. GPLv3 clarifies this matter, requiring that source be fixed
     on a durable physical medium customarily used for software interchange.
     This language affirms that option (a) requires binary redistributors
     to provide source on a physical medium."
I take the view that whenever a binary distribution is made under my scheme
it is automatically accompanied by itself (!) and that an executable file
that when run can expand to create a source archive is a thoroughly
customary form in whihc software is distributed.

The "Practical Guide" also stresses that the source distribution must exactly
match the binary that it accompanies, and that failing to meet that
requirement has been one to the SFLC's main reasons for filing lawsuits
(they started their agressive programme of anti-infringement in 2007).
The scheme I adopt here can naturally accompany each binary with the source
code it was built for and hence really helps avoid accidental lapses.


LGPL section 6 statement:
I view this document as a prominent place and the commentary here as
notice of the use of the FOX library and the license terms that apply to it.
The accompanying library source files contain a copy of the LGPL. I am
ensuring that the full C/C++ code in this project does not display
copyright notices, so that the requirement for it to display notices relating
to library copyrights and licenses do not apply - although in fact via its
embedded library source all that information is included and readily available
to any user.

To redistribute a binary where a work that uses the library has been linked
against the library I choose to follow 6(a) of LGPL. This requires that any
binary be accompanied with full machine readable source of the library and
sufficient source or object code of the main application to allow relinking.
The "--dump-source" mechanism achieves this, and that neither I nor any third
party who re-distributes unmodified versions of the binaries I create is
bound by any obligation to include additional written offers or the various
alternative mechanisms envisaged by LGPL.


Some people appear to believe that all the above would be unnecessary if the
main code in this package was organised so as to link against the modified
version of FOX using dynamic linking. As regards the main application here
that might be true, but the terms of LGPL would continue to apply to the copy
of the FOX library itself that they needed to have to dynamically (and with a
split infinitive) link against, and so to arrange that they have the simple
right to pass on what they have received something along the lines adopted
here still appear to be necessary.  I apologise for the length of the
commentary here.


Within the FOX directory the "utils" subdirectory contains a program
reswrap.cpp that is used while building FOX. I do not see any cause for
anybody to even want to distribute a binary of that, but to satisfy the
GPL better I have put a copy of the GPL in the directory with it. No part of
reswrap itself ends up in the main programs built here, and its status is
thus rather like that of gcc and other tools.

The FOX test programs were originally held within the FOX directory, but
they are subject to the GPL not the LGPL or any more benign license. I have
moved them to a separate directory to make it unambiguous that there are at
most here as mere aggregation, and the standard build sequences here make
even the presence of that directory optional. I do not intend to provide or
distribute binary copies of any of them ever, and so there should not be any
complications at all on that front.



The above lengthy discussion and mess about LGPL compliance may now be being
replaced by a reading in the csl/reduce.doc directory that is lighter-weight.

At some stage some experiments using Qt 4,5 (under LGPL 2.1) may appear here.


The "gnuplot" package is used with REDUCE and its license indicates that
it may be redistributed freely, but that modified versions may only be
circulated in the form of patch files against the official release. The
version included here is an original un-modified copy. Well actually right now
there is no version included with Reduce. This is because Sourceforge policy
is that if we include any binary then we must also put the corresponding
source into the Sourceforge Release system. Putting a copy of a snapshot
of the gnuplot source there seems both clumsy and asks for confusion as and
when gnuplot gets updated, so this area is under review!

The CSL source directory contains material derived from Adobe font metrics,
and these metrics it works can be found on many sites - they can be
downloaded directly from Adobe's ftp site but also they are included
with many existing software packages in forms that clearly state that
they are available for redistribution and that the authors of those
packages have checked license conditions carefully. The set of files
I use here came with "teTeX 2" where these terms are carefully set
out and where the package is very well established and widely used so
there would have been plenty of opportunity for concerns about rights
to be aired. I have not altered the metric files at all.

There is a copy of the "distorm" x86 disassembler, which originated from
Gil Dabah and licensed under the modified BSD license. See
http://ragestorm.net/distorm.

I use adjusted versions of Computer Modern Fonts derived from the Blue Sky
Research and Y&Y inc versions but which are now freely available for general
use. Their copyright is held by the American Mathematical Society, and the
versions here should yield exactly the same font metrics as the original
versions.

The Truetype-format fonts are from the BaKoMa Computer Modern Font collection
as distributed via "ctan", and the associated permissive license is included
in the directory where they are held.

An implementation of the MD5 message digest is due to Eric Young and
comes from an implementation of SSL, and is subject to what is in essence the
modified BSD license. The original and full version of the license terms
is included where that code is incorporated.

Various other parts within CSL were contributed by NAG Ltd and by various
students and others, including J O'Connell, M O Seymour, but were made
available to me and to Codemist for inclusion within CSL.


The files in the "psl" directory come from ZIB and are some of the ones
that they used with the Reduce Development System. It is hoped that the
main sources of PSL will be available under a suitable Open Source license
soon, but in the meanwhile binaries and probably source are avaliable from
the ZIB web-site and the files and scripts here arrange to fetch them as needed
so that a PSL version of Reduce can be built. But until PSL is fully open
source the Sourceforge terms of use will not permit us to put a full
ready-build PSL Reduce in their release system. I hope we will soon have stubs
there that can be fetched and when run will fetch the system direct from ZIB.

A (very) few REDUCE packages have at present been replaced by stubs while the
original authors confirm that they are happy for their code to appear here.
The vast bulk of the code here is released under powers granted to Tony Hearn
when original authors contributed their code to him for incorporation in an
earlier commercial version of REDUCE.



                                           A C Norman (acn1@cam.ac.uk)

