Eli   Documents Get Eli: Translator Construction Made Easy at SourceForge.net.
    Fast, secure and Free Open Source software downloads

General Information

 o Eli: Translator Construction Made Easy
 o Global Index
 o Frequently Asked Questions
 o Typical Eli Usage Errors

Tutorials

 o Quick Reference Card
 o Guide For new Eli Users
 o Release Notes of Eli
 o Tutorial on Name Analysis
 o Tutorial on Type Analysis
 o Typical Eli Usage Errors

Reference Manuals

 o User Interface
 o Eli products and parameters
 o LIDO Reference Manual
 o Typical Eli Usage Errors

Libraries

 o Eli library routines
 o Specification Module Library

Translation Tasks

 o Lexical analysis specification
 o Syntactic Analysis Manual
 o Computation in Trees

Tools

 o LIGA Control Language
 o Debugging Information for LIDO
 o Graphical ORder TOol

 o FunnelWeb User's Manual

 o Pattern-based Text Generator
 o Property Definition Language
 o Operator Identification Language
 o Tree Grammar Specification Language
 o Command Line Processing
 o COLA Options Reference Manual

 o Generating Unparsing Code

 o Monitoring a Processor's Execution

Administration

 o System Administration Guide

Mail Home

Guide for New Eli Users

Previous Chapter Next Chapter Table of Contents


Customizing Eli's Behavior

All derived objects are stored in a directory called the derived object cache, or simply the cache. The cache also contains a database that stores the depends relationship between the output and input files of a tool run, and the contains relationship between a list and its elements. Many of the ways of customizing Eli involve various aspects of the derived object cache.

Eli can also be used non-interactively, and can be customized by defining shortcuts for frequently-used derivations.

Hints on Cache Management

The default location for the cache is a directory named .ODIN in the user's home directory. A non-default cache location can be specified by the $ODIN environment variable, or with an option on the command line. The main reasons for specifying a non-default location for the cache are to share a common cache with other users, or to locate the cache on a local disk for more efficient access to derived files.

An Eli session is begun by giving the following command:

eli [ -c cache ] [ -r | -R ]

All of the command line arguments are optional, and all affect the cache:

-c cache
Use the directory cache as the cache.

-r
Reset the cache. This deletes all derived objects currently stored in the cache.

-R
Reset the cache and upgrade all tools. This deletes all derived objects currently stored in the cache, and also installs the most recent versions of all tools.

Cache directories may also be deleted using normal Unix commands whenever they are not being used by active Eli sessions. If the specified cache does not exist when the eli command is given, then it will be created and the most recent versions of all tools installed.

There is no limit to the number of cache directories that may exist at one time. You might choose to have a separate cache for each project you are working on, or you might choose to have a single cache to hold information for all of your projects. If you choose multiple caches, each can be smaller than the cache you would use for all projects. When a project is complete, you can delete all the intermediate objects relating to it by deleting the cache directory for that project.

Cache contents are architecture dependent, so it is not possible to create a cache on one architecture and then use that same cache on a different architecture. In order to avoid this error, Eli creates a separate subdirectory of the cache directory for each host (not architecture) on which it is invoked. This behavior is unpleasant in a setting where there is a pool of hosts, all of which have the same architecture, running with a common file server. If the environment variable ODINVIEW is set, Eli uses the subdirectory name specified by that variable. (The subdirectory names can be anything; using the host name is simply convenient.)

The default inter-process communication mechanism for the odin cache manager process is TCP/IP. If TCP/IP is not available, set the environment variable $ODIN_LOCALIPC and Unix domain sockets will be used instead.

Hints on Session Management

There are two kinds of Eli sessions -- interactive and non-interactive. Interactive sessions are used when the requests being made are ones that Eli can satisfy quickly, and actions by the user are necessary between requests. During initial development of a specification, when specification errors prevent Eli from completely satisfying the request, interactive sessions are very fruitful: The user makes a request, errors are reported, the user corrects the errors and makes the request again.

One important decision that must be made for either kind of session is the amount of information that should be provided to the user during that session. (Of course if the session is interactive, this decision can be changed during the session itself by making appropriate requests.) Eli is capable of describing at great length what it is doing at any given moment. Since the purpose of Eli is to suppress the details of the process needed to satisfy your request, you will probably not want Eli to report those details to you. The Eli variable LogLevel controls the level at which Eli describes the actions that it is taking. The default is LogLevel=2. For more information about the effect of different LogLevel values, give the Eli request LogLevel=?. (This is an example of an Eli help request, described in The Help Facility of User Interface.)

The value of the environment variable EDITOR at the time the Eli session starts is the command that is invoked when the character < ends an input line. (If EDITOR is not defined when the Eli session starts then vi is assumed.) That value can be changed at any time during the session by assigning to the environment variable EDITOR:

-> EDITOR=!emacsclient

(Note the use of ! to indicate that the assignment is to an environment variable rather than to an Eli variable.)

You may wish to make your selection of an editor dependent on some property of the environment. A typical situation is to use one editor when seated at a workstation and another when logged in remotely. In this case, create a script `my_editor' that tests the appropriate environment variables, decides what editor to use, and invokes it. Then set the value of the environment variable EDITOR to `my_editor'.

Users of Gnu Emacs who invoke Emacs only once per login session (i.e. in a window that is always present) can use the server capability of Emacs. To do this, execute the command M-x server-start in your Emacs session and use emacsclient as the value of the environment variable EDITOR. (You will also need to make sure that the etc directory in your Emacs distribution is on your PATH.) Once this is done, Eli editor invocations will use buffers in your Emacs session. A common way of utilizing this capability is to invoke Eli from a sub-shell of your Emacs (created using M-x shell).

Eli consults file `Odinfile' in the current directory for information about the task at hand. `Odinfile' is used to define one or more targets. Each target defines some product that can be requested, using the notation target == odin-expression. Here are examples of the three common kinds of target:

mkhdr == sets.specs :exe
mkhdr is a file target. This line specifies that mkhdr should always be equal to the derived file object sets.specs :exe. If the command eli mkhdr is given in a directory with a file `Odinfile' containing this line, it will result in a non-interactive Eli session guaranteeing that file mkhdr in this directory is up to date. (The same effect can be obtained in an interactive session by responding to the -> prompt with mkhdr.)
%results == input +cmd=(mkhdr) :stdout
%results is a virtual target. A virtual target is simply a name for an odin-expression, and can be used wherever and odin-expression is required. If the command eli '%results>' is given in a directory with a file `Odinfile' containing this line, it will result in a non-interactive Eli session guaranteeing that the derived object input +cmd=(mkhdr) :stdout is up to date, and writing the content to the standard output. (The same effect can be obtained in an interactive session by responding to the -> prompt with %results>.)

%test ! == . +cmd=diff (%results) (result) :run
%test is an executable target. An executable target is a target that is executable. If the command eli %test is given in a directory with a file `Odinfile' containing this line, it will result in a non-interactive Eli session guaranteeing that the derived object input +cmd=(mkhdr) :stdout (named %results) is up to date, and executing the diff command with this object and the file `result' from the current directory as arguments. Execution will take place in the current directory. (The same effect can be obtained in an interactive session by responding to the -> prompt with %test.)


Previous Chapter Next Chapter Table of Contents