source: git/factory/README @ f0596e

spielwiese
Last change on this file since f0596e was 790737, checked in by Jens Schmidt <schmidt@…>, 27 years ago
* README: doc fix git-svn-id: file:///usr/local/Singular/svn/trunk@686 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 14.3 KB
Line 
1
2
3       --- This README file corresponds to Factory version 1.3a ---
4
5
6                          README file for Factory
7                          =======================
8
9NOTE: The copyright state of Factory is still unclear.  Sooner or later it
10will be free software, but by now please do *not* distribute the sources.
11
12Overview
13========
141. What is Factory?
152. Comments, questions, bug reports
163. Installation
174. Distribution
185. Prerequisites
196. Memory manager
207. Stream IO
218. Diagnostic messages
229. GF(q) tables
2310. A note on Singular
2411. Configure options, dependencies
2512. Documentation
2613. Examples and Tests
2714. Editing Factory
2815. Files in the distribution
29
30
311. What is Factory?
32===================
33  Factory is a C++ class library that implements a recursive representation
34of multivariate polynomial data.  It is being developed by Ruediger Stobbe
35and Jens Schmidt at the University of Kaiserslautern as an independent and
36self-contained part of the computer algebra system Singular (developed by
37G.-M. Greuel, G. Pfister and H. Schoenemann).
38
39  Factory handles sparse multivariate polynomials over different
40coefficient domains, such as Z, Q and GF(q), as well as algebraic
41extensions over Q and GF(q) in an efficient way.  Factory includes
42algorithms for computing univariate and multivariate gcds, resultants,
43chinese remainders and several algorithms to factorize univariate
44polynomials over the integers and over finite fields.  Factorization of
45multivariate polynomials over the integers is in beta test stage.
46
47  The interface to the polynomial system of Factory is provided by a single
48class CanonicalForm which can deal with elements of the coefficient domain
49as well as polynomials.  Using operator overloading, you can handle
50polynomial data similarly to built-in types such as the machine integers.
51For example, to add together two polynomials one simply uses the '+'
52operator.  Because of this, Factory is easy to use even if you are not
53familiar with C++ programming.
54
55  There are a couple of utility classes provided by Factory such as lists,
56arrays, polynomial maps, etc.  These make the usage more comfortable.
57
58
592. Comments, questions, bug reports
60====================================
61  Factory is a project in evolution.  That means there is no guarantee that
62Factory is bug free.  I am sure that there are bugs or at least features.
63If you find bugs or if you find a strange behavior of the library, please
64let me know (e-mail: Jens Schmidt <schmidt@mathematik.uni-kl.de>).
65Comments and questions are welcome, too.
66  Factory version 1.2c and newer define an external variable
67'factoryVersion' describing the version of the library.  Please include
68this version number in your bug reports.  You may either use the UNIX
69utility 'what' to get this number ('what libcf.a') or compile and run
70something similar to this:
71
72  #include <factory.h>
73  main() { cout << factoryVersion << endl; }
74
753. Installation
76===============
77
78NOTE: If you have received this Factory distribution together with Singular
79you do not have to worry about compilation or installation at all.  The
80installation procedure for Singular should do everything for you.  For more
81information, see the section 'A note on Singular'.
82
83  See the INSTALL file for instructions on how to install Factory.  The
84installation procedure conforms more or less to the GNU standard:
85
86  ./configure; make; make gftables; make install; make installgftables
87
88However, I recommend to read the instructions since there are a lot of
89non-standard options to configure.
90
91
924. Distribution
93===============
94  The newest version of Factory is always available by anonymous ftp from
95
96                www.mathematik.uni-kl.de:/pub/Math/Factory
97
98The Factory distribution consists of three archives:
99
100o the Factory source code (factory-<version>.tgz);
101o some preliminary documentation on Factory (factory-doc-prelim.tgz);
102o Factory GF(q) addition tables (factory-gftables.tgz, see below).
103
104
1055. Prerequisites
106================
107  You need GNU make to build and install Factory.  Furthermore, I strongly
108recommend to build Factory with GNU CC (version 2.7 or newer).  To build
109Factory and to link your programs with Factory you need the GNU Multiple
110Precision Library (GMP, version 2.0 or newer).  The GMP library is
111available at ftp.gnu.ai.mit.edu or its mirrors.  Alternatively, Factory may
112be linked with the so called small GMP library which comes with the full
113version of Singular (not recommended).
114
115Configure options:
116------------------
117  --with-gmp(=<gmp_inc_path>(,<gmp_lib_path>))
118                          specify where to find gmp library.
119  --enable-gmp            together with --with-Singular means: installation
120                          in process, be graceful when there is no gmp.h
121
122  If <gmp_lib_path> is not given, but <gmp_inc_path> is,
123'<gmp_inc_path>/../lib/' is used as <gmp_lib_path>.  If neither
124<gmp_lib_path> nor <gmp_inc_path> is specified, configure looks in the
125standard system locations for GMP.
126
127  Furthermore, you may specify the symbolic directory '$(includedir)' for
128<gmp_inc_path>:
129
130  --with-gmp='$(includedir)'
131
132  This is useful when Factory is delivered as part of a larger package
133which also provides the GMP library.  In this case, at configuration time
134there would not be any gmp.h.  Without this option, Factory's configure
135script would exit with an error message.  If this symbolic directory is
136given, the configure script does not look for gmp.h and libgmp.a.  Rather,
137it adds the option '-I$(includedir)' to its $(CXXFLAGS) and the option
138'-L$(libdir)' to its $(LDFLAGS) assuming that at compilation-time gmp.h and
139libgmp.a will reside in these directories.
140  The option --enable-gmp does the same, but it is a special (and ugly)
141gift to Singular, so it may be used with option --with-Singular only.
142
143
1446. Memory manager
145=================
146  You can use one of the memory management tools provided with Factory.
147There are the 'new' and the 'old' memory manager.  In fact, on some systems
148the 'old' memory management seems to be faster then the new one, but so far
149there have not been systematic timings.  If you configure Factory with
150'--with-memman=no' it will use the standard C++ operators new/delete, which
151is not recommended.
152  You may trace the actions (alloc/free) of the new memory manager by
153enabling memory management debugging.  This produces a *lot* of output.
154
155Configure options:
156------------------
157  --with-memman(=<memman>) specify Factory memory manager.
158                          <memman> is either 'old' (default), 'new', or 'no'.
159  --enable-memdebug=<level> switch on memory management debugging.  Meaningful
160                          with --with-memman=new only.  <level> may be either
161                          'no' (default), 'normal', or 'full'.
162
163
1647. Stream IO
165============
166  For use with other systems which have their own IO routines to print
167polynomials it is possible to switch off Factory's stream IO.  In this
168case, you do not need to link libg++ or libiostream with Factory.
169
170Configure options:
171------------------
172  --disable-streamio      build Factory without stream IO
173
174
1758. Diagnostic messages
176======================
177Factory has three types of diagnostic messages:
178- Assertions (implemented by the ASSERT macros in assert.h) are used to
179  ensure preconditions before running some algorithm.  A typical example is
180  to test f != 0 before dividing by f.
181- Debug output (implemented by the DEBOUT macros in debug.h/debug.cc) is
182  used to trace complex algorithms, e.g. factorization.
183- Timing information may be accumulated and printed using the TIMING macros
184  in timing.h.
185
186  Since all diagnostic messages are implemented using preprocessor macros,
187they will completely cease when disabled, thus avoiding any impact on
188speed.  For more information, see section 'Configuring and building Factory
189for different configurations' in the INSTALL file.  By default, all
190diagnostic messages are disabled.
191
192Configure options:
193------------------
194  --enable-assertions     build Factory with assertions activated
195  --enable-timing         build Factory so it will print timing information
196  --enable-debugoutput    build Factory so it will print debugging information
197
198
1999. GF(q) tables
200===============
201  Factory uses addition tables to calculate in GF(p^n) in an efficient way.
202
203NOTE: Since the format of the GF(q) tables changed from Factory Version
2041.2b to Factory Version 1.3a you should get/create them by new!
205
206There are two possibilities to get these tables:
207o get them from the net (factory-gftables.tgz) where you got Factory
208  from.  The files unpack into a directory gftables/.
209o create them with gengftables which is a part of Factory.  Building
210  the tables takes quite a while!
211See the INSTALL file for more information.
212
213
21410. A note on Singular
215=====================
216  If you have received this Factory distribution together with Singular you
217do not have to worry about compilation or installation at all.  The
218installation procedure for Singular should do everything for you.  If you
219want to configure/build the package on your own instead of letting
220Singular's configure do the work you should:
221
222  ./configure --with-Singular --enable-gmp
223        (or, equivalently: )
224  ./configure --with-Singular --with-gmp='${includedir}'
225
226  Furthermore, you should specify --prefix so 'make install' will install
227the files in the places where Singular looks for them.  By default, this is
228the top directory of the Singular distribution.  In this case you have to
229specify '--prefix=..'.
230
231  The Singular GF(q) tables are the same as the Factory GF(q) tables.
232However, Singular uses a different naming scheme.  Therefore, a Factory
233configured with '--without-Singular' will not find Singular's GF(q) tables
234as well as a Factory configured with '--with-Singular' will not find the
235GF(q) tables created by gengftables.  But this is not a major drawback
236since Singular is distributed with ready-to-use GF(q) tables.
237
238  The newest version of Singular is always available at
239www.mathematik.uni-kl.de:/pub/Math/Singular.
240
241Configure options:
242------------------
243  --with-Singular         build for use with computer algebra system Singular.
244
245  Except from setting the #define SINGULAR, this option only changes the
246defaults to: '--with-memman=no --disable-streamio'.
247
248
24911. Configure options, dependencies
250===================================
251- do not configure '--with-Singular --with-memman'.  In this case
252  both Singular and the library will try to initialize their own memory
253  management.
254
255- do not configure '--disable-streamio --enable-debugoutput'.  The
256  DEBOUT macros need stream IO.
257
258- you may configure '--with-Singular --enable-streamio', but this
259  is not supported by Singular.  You will have to change manually
260  Singular's Makefile.  The same is true for '--with-Singular
261  --enable-streamio --enable-debugoutput'.
262
263- you may configure '--with-Singular --enable-timing', but this
264  will not have any visible effect (except from a slightly slower
265  running time) because Singular will not print the timing
266  results.
267
268- --enable-gmp has an effect only together with --with-Singular
269
270- --with-memdebug has an effect only together with
271  --with-memman=new
272
273
27412. Documentation
275=================
276  So far there are only preliminary versions of a user/reference manual and
277a tutorial ('A quick start into Factory').  Please do not expect them to
278be complete or even error-free.  For this reason, the documentation is not
279included in the source code archive (factory-<version>.tgz).  Instead, the
280sources and compiled dvi files reside in factory-doc-prelim.tgz. They will
281unpack into a directory factory-doc-prelim/.
282
283
28413. Examples and Tests
285======================
286  So far neither examples nor tests, sorry.  You may have a look at
287gengftables.cc which is an application of the most basic Factory features.
288
289
29014. Editing Factory
291===================
292  Parts of Factory are written using Emacs' folding-mode.  You may load
293this mode from Emacs with 'M-x load-file RET
294factory-<version>/bin/folding.el RET'.
295To switch it on, say 'M-x folding-mode RET'.  Alternatively, you may load
296factory-<version>/bin/fold-docu.el which contains some additional functions
297to fold only the documentation.  If you add the following lines to your
298.emacs-file, all this would be done automatically for you:
299
300  (load-file "factory-<version>/bin/folding.el")
301  (load-file "factory-<version>/bin/fold-docu.el")
302  (add-hook 'c-mode-common-hook 'folding-mode)
303  (setq fold-fold-on-startup nil
304        fold-mode-marks-alist '((c++-mode "//{{{" "//}}}")))
305  (set-default 'fold-internal-margins nil)
306
307  For more information, see the respective files.
308
309
31015. Files in the distribution
311=============================
312ChangeLog       - history of changes
313INSTALL         - installation instructions
314README          - this file
315NEWS            - new Factory features
316
317bin/install-sh  - a script version of the BSD install program
318bin/makeheader  - creates headers from header templates (*.template)
319bin/mkinstalldirs - recursive mkdir
320bin/folding.el  - Emacs folding-mode
321bin/fold-docu.el - some extensions to it
322
323GNUmakefile.in  - master makefile and
324config.h.in     - configuration include file.  Run configure to create
325                  GNUmakefile and config.h, resp.
326configure
327configure.in    - configure script generated with Autoconf 2.10
328                  from configure.in
329
330factory.template
331factoryconf.template - header templates for the user interface header
332                  files.  Run makeheader to create factory.h and
333                  factoryconf.h, resp.
334
335ffops.cc
336ffops.h
337gf_tabutil.cc
338gf_tabutil.h
339gfops.cc
340gfops.h
341imm.h
342int_*.cc
343int_*.h         - low level classes and functions
344
345canonicalform.cc
346canonicalform.h
347cf_*.cc
348cf_*.h
349variable.cc
350variable.h      - high level classes and functions.  User interface to
351                  the polynomial (and other) arithmetic.
352
353templates/      - Factory templates
354ftmpl_inst.cc   - template instantiation for Factory templates
355
356fac_*.cc
357fac_*.h         - high level algorithms (factorization, gcd, sqfr
358                  computation, etc.)
359sm_*.c
360sm_*.h          - sparse modular gcd.  Contributed by Marion Bruder
361                  <bruder@math.uni-sb.de>
362
363parseutil.cc
364parseutil.h
365readcf.cc
366readcf.y        - Factory parser to read canonical forms.  readcf.cc
367                  translated with Bison 1.18 from readcf.y.
368
369gmpext.h
370initgmp.cc      - Factories interface to GNU MP
371singext.cc
372singext.h       - Factories interface to Singular
373
374memutil.c
375memutil.h       - 'old' Factory memory manager
376memman.h
377mm*.c
378mm*.h           - 'new' Factory memory manager
379newdelete.cc    - C++ interface to the memory managers
380
381assert.h        - the ASSERT macros
382debug.h
383debug.cc        - the DEBOUT macros
384timing.h        - the TIMING macros
385
386gengftables.cc  - run gengftables to create the GF(q) addition tables
387                  necessary to work with Factory
Note: See TracBrowser for help on using the repository browser.