Page created: 23 September 2005.
Last updated: 14 March 2006.
The purpose of this document is to document the background, installation and usage of my Maple packages, collectively called HilbertSagbiSg:
- HilbertBase
- The HilbertBase package is used for finding the Hilbert basis of a system of linear diophantine equations, i.e. the minimal set of generators for the monoid of nonnegative solutions. The package is just a Maple frontend for (a patched version of) the c-program hb by Dmitrii V. Pasechnik, homepage. hb is included in HilbertSagbiSg.
- SAGBI
- The SAGBI package contains implementations of the subduction and SAGBI basis construction algorithms. Depends on HilbertBase.
- SAGBI-Groebner
- The SAGBI-Groebner package contains implementations of the SI-reduction and SAGBI-Gröbner basis construction algorithms. Depends on HilbertBase.
Legend:
OS/Architecture: Linux/x86 Solaris 8/Sparc OSF1/Alpha Windows/x86 MacOs X/PPC Maple 8 WS WS WS WB NT Maple 9 WS NT NT WB WB Maple 9.5 WS NT NT WB WB Maple 10 WS NT NT WB NT
WB The packages Work and a Binary (pre compiled) version of hb for this OS/Architecture/Mapleversion is included in HilbertSagbiSg. Thus no c-compiler is needed to install HilbertSagbiSg for this OS/Architecture/Mapleversion. WS The packages Work but no binary version of hb for this OS/Architecture/Mapleversion is included in HilbertSagbiSg. Thus a c-compiler is needed to compile hb from Source to install HilbertSagbiSg for this OS/Architecture/Mapleversion. NT Not Tested
Linux/UNIX installation instructions
1. Verify the compiler
Make sure you have the “vendor supplied c-compiler” installed, for Linux this is gcc, for Solaris this is Sun Workshop C/C++ compiler, etc. If the commandwhich ccoutputs some path, then the compiler will probably work.2. Download the source
Download the tarball:
- HilbertSagbiSg-20060313.tgz, Size: 224 kB, Last modified: 13 March 2006 .
3. Unpack the source
Open a terminal window and cd to the directory containing the tarball HilbertSagbiSg-20060313.tgz then issue the command:gunzip -c HilbertSagbiSg-20060313.tgz | tar xvf -Or if you have GNU tar you can type a few characters less:tar zxvf HilbertSagbiSg-20060313.tgz4. Review the installation location
A complete HilbertSagbiSg installation consists of four files:HilbertSagbiSg.lib HilbertSagbiSg.ind libhb.so .mapleinitThe first three of these can be installed anywhere, but .mapleinit has to be installed someplace where Maple looks for initialization files when starting up, e.g. in the users home directory, $HOME, this is the default installation location for .mapleinit. By default the other three files are installed into the directory $HOME/system/mapleX.Y, where X.Y is the integer and first decimal part of the Maple version used at the installation. If you want the three files to be installed elsewhere, then uncomment and edit the definition of MY_MAPLE_ADD_ON_DIR in the file defs.mpl.5. Call the installation script
In a terminal window cd to the HilbertSagbiSg-20060313 directory. Then issue the command:maple -s -q install.mplThe command above will install HilbertSagbiSg just for the Maple version used for the installation, so if you want to be able to use HilbertSagbiSg from more than one Maple version you have to install it once for each version of Maple. If you have set the MY_MAPLE_ADD_ON_DIR variable then you need to change it before installing HilbertSagbiSg for another Maple version, otherwise the previous installation will be overwritten.6. Installation complete
You are now ready to use HilbertSagbiSg, see Usage.
MacOS X installation instructions
1. Verify the compiler
For Maple 9 and 9.5 on PPC there exists a pre-compiled version of the c-backend. If you are installing HilbertSagbiSg for Maple 9 or 9.5 on a PPC system you can probably use the pre- compiled c-backend, then you will not need a compiler, so you can skip to point 2. If you are installing on some other processor architecture, version of Maple or the pre-compiled c-backend doesn't work, then you need to install at least the following components of Apple's Xcode Tools:Developer Tools Software Mac OS X SDK BSD SDK2. Download the source
Download the tarball:
- HilbertSagbiSg-20060313.tgz, Size: 224 kB, Last modified: 13 March 2006 .
3. Unpack the source
Open a terminal window and cd to the directory containing the tarball HilbertSagbiSg-20060313.tgz, then issue the command:tar zxvf HilbertSagbiSg-20060313.tgz4. Review the installation location
A complete HilbertSagbiSg installation consists of four files:HilbertSagbiSg.lib HilbertSagbiSg.ind libhb.so .mapleinitThe first three of these can be installed anywhere, but .mapleinit has to be installed someplace where Maple looks for initialization files when starting up, e.g. in the users home directory, $HOME, this is the default installation location for .mapleinit. By default the other three files are installed into the directory $HOME/system/mapleX.Y, where X.Y is the integer and first decimal part of the Maple version used at the installation. If you want the three files to be installed elsewhere, then uncomment and edit the definition of MY_MAPLE_ADD_ON_DIR in the file defs.mpl.5. Call the installation script
Check where the maple binary is installed, for Maple 9.5 this can be something like:/Applications/Maple\ 9.5/Maple\ 9.5.app/Contents/MacOS/bin/mapleNow call the main installation script in the HilbertSagbiSg-20060313 directory:/Applications/Maple\ 9.5/Maple\ 9.5.app/Contents/MacOS/bin/maple -s -q install.mplThe command above will install HilbertSagbiSg just for the Maple version used for the installation, so if you want to be able to use HilbertSagbiSg from more than one Maple version you have to install it once for each version of Maple.6. Installation complete
You are now ready to use HilbertSagbiSg, see Usage.
Windows installation instructions
1. Verify the compiler
For Maple 8, 9, 9.5 and 10 there exists pre-compiled versions of the c-backend. If you are installing HilbertSagbiSg for one of these versions of Maple you can use the pre- compiled c-backend, then you will not need a compiler, so you can skip to point 2. If you are installing on some other version of Maple or the pre-compiled c-backend doesn't work, then you need to install a command line version of Microsoft's Visual C/C++ compiler. The following versions are tested and known to work:Microsoft Visual C++ 2005 Express Edition Microsoft Visual C++ Toolkit 2003With these compilers a command prompt is supplied, in this command prompt the necessary environment variables for compilation are automatically set. Thus if you want to compile the c-backend you have to use this command prompt instead of an ordinary DOS window when issuing the installation/compilation command in point 5 below.2. Download the source
Download the zipfile:
- HilbertSagbiSg-20060313.zip, Size: 251 kB, Last modified: 13 March 2006 .
3. Unpack the source
Unpack the zipfile HilbertSagbiSg-20060313.zip into some directory.4. Review the installation location
A complete HilbertSagbiSg installation consists of four files:HilbertSagbiSg.lib HilbertSagbiSg.ind libhb.dll maple.iniThe first three of these can be installed anywhere, but maple.ini has to be installed someplace where Maple looks for initialization files when starting up. Let MAPLEDIR denote the main directory of the Maple installation, e.g. C:\Program Files\Maple 9\bin.win\maplesys.ini. The four files are typically installed in the following locations:MAPLEDIR\Users\system\mapleX.Y\HilbertSagbiSg.lib MAPLEDIR\Users\system\mapleX.Y\HilbertSagbiSg.ind MAPLEDIR\Users\system\mapleX.Y\libhb.dll MAPLEDIR\Users\maple.inior if Maple was installed in Multiple User Mode:MAPLEDIR\Users\USERNAME\system\mapleX.Y\HilbertSagbiSg.lib MAPLEDIR\Users\USERNAME\system\mapleX.Y\HilbertSagbiSg.ind MAPLEDIR\Users\USERNAME\system\mapleX.Y\libhb.dll MAPLEDIR\Users\USERNAME\maple.iniwhere X.Y is the integer and first decimal part of the Maple version used at the installation, and USERNAME is the user name of the user performing the installation, issue the command: set USERNAME in a DOS window to see its current value.
If you want the three files HilbertSagbiSg.lib, HilbertSagbiSg.ind and libhb.dll to be installed somewhere else than MAPLEDIR\Users\system\mapleX.Y or MAPLEDIR\Users\USERNAME\system\mapleX.Y then uncomment and edit the definition of MY_MAPLE_ADD_ON_DIR in the file defs.mpl.5. Call the installation script
Check where the cmaple*.exe binary is installed, for Maple 9 this can be something like:C:\Program Files\Maple 9\bin.win\cmaple9.exeOpen a DOS window and cd to the directory where you unpacked HilbertSagbiSg-20060313.zip:cd C:\path\to\HilbertSagbiSg-20060313Now call the main installation script by issuing the command:"C:\Program Files\Maple 9\bin.win\cmaple9.exe" -s -q install.mplNote: if the path contains spaces (as above) then include the quotes " when typing the command above.
The command above will install HilbertSagbiSg just for the Maple version used for the installation, so if you want to be able to use HilbertSagbiSg from more than one Maple version you have to install it once for each version of Maple.6. Installation complete
You are now ready to use HilbertSagbiSg, see Usage.
To uninstall HilbertSagbiSg:
# HilbertSagbiSg definitions for Maple X.Y begin.
# HilbertSagbiSg definitions for Maple X.Y end.
Where X.Y is the integer part and first decimal of
the Maple version.
If there is nothing outside these lines, then .mapleinit or
maple.ini can be removed.
At the moment no proper Maple help pages are written, so for the moment the only documentation are the examples in the files Examples.mws (or Examples.maple10.mws if you are using Maple 10) and c-src/Test.mws. The brave may also want to check out the source files in the directory mpl-src.
- The hb package only contains a routine to calculate the full Hilbert basis of a homogeneous linear diophantine system of equations. For finding a solution of an inhomogeneous system of equations:
A*x=vthe packages find the full Hilbert basis of the homogeneous system:B*y=0where B=[A,-v] and y has length length(x)+1. Then these solutions are searched for one having 1 as the last entry, and this solution, with the last entry removed, is returned. This procedure is obviously very inefficient, and I would really like to investigate the alternatives to remedy this.- During large computations the capacity limits of the Maple data structures used by the packages are sometimes exceeded giving errors such as:
Error, assigning to a long list, please use arraysI have tried to polish the packages “weak spots” so that this doesn't happen too often. To completely fix this it would be necessary to re-implement parts of the packages to avoid the use of e.g. Maple list's.- Documentation should be written.
The three packages, collectively called HilbertSagbiSg, are Copyright © 2005,2006 by Hans Öfverbeck.License
HilbertSagbiSg is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. For details, see the file COPYING in the directory HilbertSagbiSg or see The FSF's own site.
Copyright © 2005,2006 Hans Öfverbeck
Last modified: 14 March 2006.