========================================================
(C)1994 Institute for New Generation Computer Technology
(Read COPYRIGHT for detailed information.)
========================================================       

Installation
============  

1. Prepare GMP(the GNU multiple precision arithmetic library).
  The algebraic constraint solver of GDCC system uses the GNU multiple 
 precision arithmetic library. At first, you need to build libgmp.a and libmp.a 
 of GMP.

2. Rebuild your KLIC system.
  By combining the interface program "gbignum.c" to your KLIC system, 
  you will be able to call GMP library.
  (1) Copy GDCC4.0/Bignum/gbignum.c to the runtime directory of KLIC system.
  (2) Modify the Makefile that is in the runtime directory of KLIC system.
    - Search the macro "COMMONOBJS" and add "gbignum.o".
    - Search the macro "GENERIC_SRC" and add "gbignum.c".
  (3) Execute the command "make clean", "make all" and "make install" of
      KLIC system.

3. Build GDCC system.
  (1) Execute the command "make all" of GDCC system.
  (2) Modify the file GDCC4.0/bin/gdcc and copy it to your command directory.
      Set the reference path of libgmp.a and libmp.a to the variable "LIBP".
          set LIBP      = ????
  (3) Add "setenv GDCCPATH GDCC-SRC-DIR" to your .cshrc
      GDCC-SRC-DIR is the directory that GDCC source files are put.
      Example:   setenv GDCCPATH ~/GDCC4.0



Usage of gdcc command
=====================

If you want to know the command "gdcc" in detail, please refer the GDCC 
document. The command "gdcc" converts GDCC programs to KL1 programs with 
the constraint domain name. This command generates the execution file 
of them.  For example, the "tri.gdcc" of sample programs is compiled by 
this command as below.

    gdcc -o tri -dom alg tri.gdcc

The option "-o" specifies the execution file name. The option "-dom" 
specifies the constraint domain name. In this case, as "tri.gdcc" uses 
the algebraic constraint solver, "-dom alg" is specified.

GDCC system has the algebraic constraint solver and the boole constraint 
solver. The domain name of each constraint solver is "alg" and "bool".

The following outputs are the result of "tri".

  $ tri
  S^2 = -1/16*C^4 + 1/8*B^2*C^2 - 1/16*B^4 + 1/8*A^2*C^2 + 1/8*A^2*B^2 - 
  1/16*A^4
  _0_0_0*C = 1/2*C^2 - 1/2*B^2 + 1/2*A^2
  _0_0_1 = -_0_0_0 + C
  _0_0_2*C = 2*S
  _0_0_2*B^2 = _0_0_2*A^2 - 4*_0_0_0*S + 2*S*C
  _0_0_2*S = 1/4*_0_0_0*B^2 - 1/4*_0_0_0*A^2 - 1/8*C^3 + 1/8*B^2*C + 3/8*A^2*C
  _0_0_2^2 = -_0_0_0^2 + A^2                                    

GDCC program file name has the suffix ".gdcc".

