qc(1)

NAME
qc - Qu-Prolog compiler

SYNOPSIS
qc [ -EGScv ] [ -Dmacro ] [ qp size options ] [ ql size options ] [ -ooutput ] file ...

DESCRIPTION

qc is an interface to the Qu-Prolog compilation system. The system consists of a preprocessor, a term expander, a compiler, an assembler, and a linker. qc processes the supplied options and calls each component with the appropriate arguments in the sequence given above.

A common usage of qc is where the user supplies a Qu-Prolog source program. qc compiles the program and generates an executable. The executable is stored in two files. output (e.g. a.out) contains the basic information about the executable and output.qx (e.g. a.out.qx) has the essential data about the program. To run the executable, the user types in output.

qc accepts several types of filename arguments. Files with the .ql suffix are Qu-Prolog source programs. Suffix .qi indicates that the file has been preprocessed. Files ending in .qg are taken to contain clauses after term expansion. Files with the .qs suffix are Qu-Prolog assembly programs. Object files have the suffix .qo. The compiler also accepts byte-encoded files produced by the encoded write of Qu-Prolog. Encoded files must have .qle or .qge extensions and are encoded equivalents of .ql and .qg files.

OPTIONS

The following options alter the default behaviour.

-Dmacro
    Define macro as 1 (one). This is the same as if a

        #define name 1

    line.

-E  Stop after running the preprocessor. The output is placed in the corresponding file suffixed .qi.

-G  Stop after running the term expander. The output is placed in the corresponding file suffixed .qge.

-Rfile
    Supply the term expansion rules to the term expander.

-S  Stop after running the compiler. The output is placed in the corresponding file suffixed .qs.

-c  Stop after running the assembler. The default output file is the corresponding file suffixed .qo. The output file can be modified by -o.

-ooutput
    Name the object file if -c is given. Otherwise, name the executable. The default name for the executable is a.out.

-v  Verbose mode.

The qp options alter the size of different data areas in the compiler.

The ql options alter the size of different data areas in the executable being generated.

STATUS
cpp(1) is used as the preprocessor.

ENVIRONMENT

QPPATH
    Specify where the Qu-Prolog compilation system are held. e.g. /home/qp/qp4.2/bin.

FILES
a.out
    executable output file
file.ql
    Qu-Prolog source file
file.qi
    preprocessed source file
file.qg
    term-expanded source file
file.qs
    assembly file
file.qo
    object file
file.qx
    executable data file
cpp preprocessor
qc1 compiler
qa  assembler
ql  linker
qem emulator

SEE ALSO
cpp(1), qa(1), qecat(1), qem(1), ql(1), qp(1).

BUGS
If -o is specified with -c, then if there is more than one .ql file, then the object code for all .ql files will be written to the same output file.

COPYRIGHT
Software Verification Research Centre, The University of Queensland, Australia 4072.