[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4. Invoking

Teyjus is composed of four executable files, each of which serves a different purpose.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.1 Invoking tjsim

`tjsim' implements a simulator for the Teyjus abstract machine. It includes support for loading modules and solving queries against them. These queries may be specified at the command line or interactively.

`tjsim' is invoked as follows:

 
tjsim [-v|--version] [-h|--help] [-p|--path PATH]*
      [-s|--solve "QUERY."]* [-e|--expect NUM] [-m|--maximum NUM]
      [-q|--quiet] [-b|--batch] [-k|--heap HEAPSIZE] [module]

The following options are supported:

-v, -version

Return the system version

-h, -help

Print this message

-p, -path

Add PATH to the search path for modules. Several paths may be specified.

-s, -solve

Solve the given query on startup. Several queries may be specified with separate -solve tags.

-e, -expect

Expect at least this many responses from each query; error if fewer. Valid only in batch mode.

-m, -maximum

Halt after this many solutions to the query have been found. Valid only in batch mode.

-q, -quiet

Suppress all non-error output from the system, except variable bindings on query success.

-b, -batch

Suppress system interaction; send all output without stopping.

-k, -heap

Allocate a heap of the given size (K) with malloc; no effect if using mmap.

module

Name of the module against which queries should be solved.

The -expect and -maximum flags are used for testing the system, but may also be useful to users.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2 Invoking tjcc

`tjcc' is the bytecode compiler for Teyjus. As with most compilers, it is not interactive. It compiles a file specified on the command line and displays a record of any errors encountered.

`tjcc' is invoked as follows:

 
tjcc [-v|--version] [-h|--help] [-p|--path PATH]*
     [-o|--output FILENAME]
-v, -version

Return the system version

-h, -help

Print this message

-p, -path

Add PATH to the search path for modules. Several paths may be specified.

-o, -output

Specifies the name of the output bytecode file.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.3 Invoking tjdis

`tjdis' is the bytecode disassembler for Teyjus. It displays, in human-readable format, all of the information contained in an Teyjus bytecode file. No interaction is available.

`tjdis' is invoked as follows:

 
tjdis [-v|--version] [-h|--help] [-t|--tables] [-i|--instr] filename
-v, -version

Return the system version.

-h, -help

Print this message.

-t, -tables

Only print tables.

-i, -instr

Only print instructions.

filename

The full filename of the bytecode to disassemble.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.4 Invoking teyjus

`teyjus' is an integrated Lambda Prolog development environment. It provides support for compiling modules, loading modules, executing queries, and will soon support interactive debugging.

`teyjus' is invoked as follows:

 
teyjus [-v|--version] [-h|--help] [-p|--path PATH]*
       [-k|--heap HEAPSIZE]

The following options are supported:

-v, -version

Return the system version

-h, -help

Print this message

-p, -path

Add PATH to the search path for modules. Several paths may be specified.

-k, -heap

Allocate a heap of the given size (K) with malloc; no effect if using mmap.

When `teyjus' is started, it prompts the user to enter a command:

 
Teyjus>

The following commands are available:

#help.

Print this help message.

#load modname.

Load module MODNAME into core. Several modules may be loaded simultaneously.

#search.

Display the search paths.

#search path.

Add PATH to the search paths.

#query.

Query against the top level module. Enter the query "stop." to return to the `teyjus' command line.

#query modname.

Query against module MODNAME. Enter the query "stop." to return to the `teyjus' command line.

#compile sourcename.

Compile the source code specified by SOURCENAME into Lambda Prolog bytecode. File SOURCENAME will be sought in the directories specified by the search paths (see #search).

#compile sourcename destname.

Compile the source code specified by SOURCENAME into Lambda Prolog bytecode, placing the results into DESTNAME. File SOURCENAME will be sought in the directories specified by the search paths (see #search).

#quit.

Quit `teyjus'.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.5 Environment

`tjcc', `teyjus', and `tjsim' will read the shell environment variable TJPATH at startup. TJPATH is interpreted as a colon-separated list of directories in which to search for files. If the variable TJPATH is not present, the current directory (or the directory containing the .mod file in the case of `tjcc') will be searched by default.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Gopalan Nadathur on October, 20 2007 using texi2html 1.76.