OPTGEN

# The OPTGEN Optimizer Generator

OPTGEN is a tool for writing query optimizers for both relational and object-oriented databases. It is based on a highly declarative language, OPTL, in which you can specify query transformation rules as rules in an attribute grammar. You can find more information in the following manuals:

- Overview of OPTGEN and OPTL
- OPTL Reference Guide
- Optimizer Specification in OPTL
- OPTL Rule Syntax
- An Optimizer for ODMG OQL

Before you install OPTGEN, you need to install the GC garbage collector (directions: after you copy GC in your home directory and extract the files, you need to execute both `make` and `make c++` to create the C++ garbage collector).

The OPTGEN source files (in tar form) can be retrieved from here (latest version on 7/30/97). They have been tested on Linux, Solaris, and Ultrix. After you copy this file in your home directory, you extract the files using:

    tar xvf opt.tar

Then you edit the first lines of the Makefile of each directory to point at your local directories. Finally you execute the following unix commands:

    cd optgen
    make
    cd ../sqlopt
    make
    sql <company.sql

The last command builds the `company` database as it is described in Elmasri-Navathe's book. To test this database, execute the command:

    sql <queries.sql

To install the OQL optimizer, you do the following:

    cd ../oqlopt
    make
    oql <test.oql

The last command tests the OQL optimizer.