This directory contains glue code to tie two SICStus processes
together with a pipe in order to parse and generate with different
grammars.  The directions below assume that ale.pl, the parsing
grammar code, the generation grammar code, and the glue code files
ale_gen.pl and ale_parse.pl are all in the same directory.  These are
known to work for SICStus 3.0.5 and 3.0.6.

Preparing the generator
----------------------------------------------------------------------

- Run SICStus Prolog and compile ale.pl
- Compile the generation grammar for generation.
- Compile ale_gen.pl
- Enter the comand:

  ?- go_server.

This will create a file called 'server.state' and terminate the Prolog
process.  This state will be executed as a child process by the
parser, and will process requests for generation from the parser.

Preparing the parser
----------------------------------------------------------------------

- Run SICStus Prolog and compile ale.pl
- Compile the parsing grammar for parsing.
- Compile ale_parse.pl
- Enter the command:

  ?- start_server.

This executes the file server.state created above as a child process.

Translating
----------------------------------------------------------------------

- You may now enter translation requests using:

  ?- translate([john,calls,mary,up]).

  translate/1 will parse the first argument with the parsing grammar,
  send the resulting feature structure to the generation server, and
  wait for an answer.  If the generator replies with a string, it
  displays it.  On backtracking, the generator is first asked to
  backtrack.   Once it reports no more answers, then the parser
  backtracks.  Once the parser reports no more answers, then the
  predicate fails. 

  There is also a translate/2 that will bind the answer to a second
  argument. 

- When you are finished translating, enter the command:

  ?- halt_server.

  to kill the generator process.  Then exit the current Prolog process
  with CTRL-D or halt/0.

