Re: [eclipse-clp-users] Using Eclipse in Command-Line

From: Joachim Schimpf <joachim.schimpf_at_infotech.monash.edu.au>
Date: Sat, 08 May 2010 11:38:58 +1000
Igor Kondrasovas wrote:
> Hello all,
> 
>  
> 
> I would like to gently ask for some tips about using the Eclipse 
> command-line interface. My idea is to create a small script (maybe a 
> simple .BAT file) that will script my Prolog application, compile it and 
> invoke a query. The resulting query will be streamed to a simple text 
> file where the calling script application will be able to retrieve the 
> results.
> 
>  
> 
> It seems a little cumbersome I know. Iím just trying to accomplish a 
> simple task: Perform a query to Eclipse using a predicate I have already 
> built, passing some custom parameters and getting query results back.

Hi Igor,

You can run eclipse with the -b and -e command line options
http://eclipse-clp.org/doc/userman/umsroot152.html, e.g.

eclipse -b my_code.ecl -e "my_top_predicate(args)"

If you are on Windows, the executable is at
%PROGRAMFILES%\ECLiPSe 6.0\lib\i386_nt\eclipse.exe

Depending on what is more convenient to do from your host program,
the eclipse code could read its input data either from the standard
input stream and write its results to standard output, or use
files, or sockets.

-- Joachim
Received on Sat May 08 2010 - 02:39:03 CEST

This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET