
    CUSTOMISATION BY WRITING OR MODIFYING PROCEDURES.
    ================================================

 Bergman is an open system, and you may change any or all parts
of it in order to get something more suitable for your purposes.
However, in order to do this in a very general setting, you may
probably have to learn much more than you want about the precise
interactions of different parts of the programme. Changing one
procedure is only safe if you are sure exactly what it calls, and
for what purposes it may be called. There is some documentation
of this, in the manual and in the file protocol.txt in the doc
area; but it is not complete, and does not cover most of the
`internal' procedures.

 However, there are a number of ways to influence the behaviour
of bergman at well defined critical points, by writing your own
procedures, and by activating a corresponding customisation
minor mode. These possibilities exist in such points where we
suspect that the user may be most interested in intervening. If
you think we missed some important points, please let us know!


 Here is a brief overview over the specific procedures intended
for customisation. We first write the name of the submode to be
activated, then the function name, and last a very brief description
of what it does. In most cases, the intervention demands both that
the submode is activated, and that the procedure is actually defined;
sometimes, else some kind of default action is taken.

Many of the procedures perform actions related to "the current degree".
This may be accessed as the value of (GETCURRENTDEGREE). (If you
programme in the "raise off" case sensitive mode, you often may access
the current degree directly as the value of the fluid variable cDeg.)

As you see, most of the procedures below take no argument.

---------------------------------------------------------------

DISPLAY: (CUSTDISPLAYINIT)

Called (if it is defined) at initialising Groebner basis calculations.
Then, supplants the default action, which initialises two counters
(NOOFSPOLCALC and NOOFNILREDUCTIONS) to NIL. Intended for similar
purposes.


DISPLAY: (DEGREEENDDISPLAY)

Called (if it is defined) whenever calculations of the new Groebner basis
elements of a certain degree are finished. Will supplant both other
degree-wise output, and optional pb series calculation. An example
DEGREEENDDISPLAY is given in the file auxil/topproc.sl.


DISPLAY: (CUSTCLEARCDEGDISPLAY)

Called (if it is defined), if the `Hilbert series limitation' is active,
and for a particular degree returns the verdict that both the input
and the obstruction monomials of this degree shall be discarded,
without any calculations.

It is called before this abandoning, but does not supplant any action.
May be used e.g. for printing information on how many input polynomials
or obstruction monomials are to be discarded at this degree.


DISPLAY: (CUSTCLEARCDEGOBSTRDISPLAY)

Called (if it is defined), if the `Hilbert series limitation' is active,
and for a particular degree returns the verdict that only input
polynomials should be processed (and thus all current degree
obstruction monomials should be discarded). Apart from this, as the
preceeding procedure.


DISPLAY: (HSERIESMINCRITDISPLAY)

Called (if it is defined), if the `Hilbert series limitation' is active,
and causes the rest of the input polynomials and obstruction monomials
of a certain degree to be discarded. since the prescribed number of new
Groebner basis elements (now) have been found. Apart from this, as the
preceeding procedures.


STRATEGY: (CUSTNEWCDEGFIX binno)

If it is defined, it is called and supplants the ordinary action of
the procedure FixNcDeg (defined in two variants in the file strategy.sl).
The result of the procedure decides whether or not to continue
calculations, when a new current degree was found.

Returning NIL signifies "stop"; all other return values signify
"continue".

The input "binno" is one of the integers 1, 2, and 3, which should
be considered as binary strings of length 2 (i.e., as 01, 10, and 11,
respectively). The left bit (right bit) is 1 if and only if there are
input polynomials (obstruction monomials, respectively) of the proposed
new current degree.

The proposed new currect degree may be accessed as the value of
(GETCURRENTDEGREE) (or of the variable cDeg, infra).


STRATEGY: (CUSTNEWINPUTGBEFIND)

If it is defined, calls and supplants other action, whenever ordinarily
the next input polynomial would be reduced, and the resulting polynomial
in normal form, if non-zero, would be returned as a new Groebner basis
element. The value of the call to CUSTNEWINPUTGBEFIND ought to be either
NIL (signifying "this was a reduction to zero"), or a new Groebner basis
element, in Reductand form.

The supplanted action of the procedure FindInputNGbe (defined in monom.sl)
would have included removing an investigated polynomial from the list of
current input polynomials (cInPols).


STRATEGY: (CUSTCRITPAIRTONEWGBE)

If it is defined, calls and supplants other action, whenever ordinarily
an S-polynomial would have been formed from the next critical pair, then
would be reduced, and the resulting polynomial in normal form, if non-zero,
would be returned as a new Groebner basis element. The value of the call
to CUSTCRITPAIRTONEWGBE ought to be either NIL (signifying "this was a
reduction to zero") or a new Groebner basis element, in Reductand form.

The supplanted action of the procedure FindCritPairNGbe (defined in monom.sl)
would have included removing an investigated critical pair from the list of
currently investigated critical pairs (SP2r).


STRATEGY: (CUSTENDDEGREECRITPAIRFIND)

If it is defined, calls and supplants other action, whenever ordinarily
new critical pairs would have been calculated and saved, since all new
Groebner elements of the current degree just were found. If you plan to
employ this, you are recommended to view the definition of the procedure
whose action it supplants, DEnSPairs (defined in monom.sl).

Note, that the return value is without interest; only the side effects
of this procedure matters.

-------------------------------------------------------------

Also, note that it may be useful to modify one or several of

CALCREDUCTORPRIORITY from strategy.sl ...

-------------------------

Pre-defined variants include

NODISPLAY

