Re: [eclipse-clp-users] Program Does not Load

From: Kish Shen <kisshen_at_cisco.com>
Date: Wed, 03 Feb 2010 02:31:04 +0000
Hi Amine,

Amine Marref wrote:
> Dear Marco,
> 
> Thanks for your prompt answer. I noticed some issues using "Version 6.0 #115 (i386_linux)" of Eclipse on my Ubuntu.
> 
> 1) I tried to reproduce the error.
>  a) I used the GUI-mode to load my program (without your option) and it failed to load *silently*. 
>  b) I used the command-prompt mode and run "eclipse file.ecl "goal"" and it failed to load silently.
>  c) I used the top-level-loop mode and I got a similar error [1] to yours. 
 > I wonder why it is explicit about the failure of loading in the loop 
mode and not as explicit in
>other modes?

It seems that the message about stack oerflow is not always printed. I 
suspect this is because of the way the file is compiled, and the error 
message can in some cases be directed away from the normal output, and 
is thus lost.

You have not been very specific about how you are compiling your file. 
For tkeclipse, if you compile the file from the Query Entry window (e.g. 
with [component]), then the error message is displayed. However, if you 
use the "Compile..." option from the File menu, then you indeed do not 
get any error messages. This looks like a bug. I assume this is what you 
did?

I am not quite sure I understand what you are doing exactly by running 
"eclipse file.ecl "goal"". This should not work if you are using the 
standard eclipse command. With the standard command, you need to do 
something like

eclipse -e "file.ecl" -b "goal"

to compile file.ecl and then run the query goal.

If you do this, then again you get no error messages.

However, if you compile the program in your query, rather than with the 
-e option, then you do get the error message:

eclipse -b "[file], goal"

Note that normally if you run ECLiPSe this way, you are probably using 
ECLiPSe in batch mode (e.g. inside a script), so it may not always be 
appropriate to produce extra outputs (like error messages).


> 2) I used the command-prompt mode i.e. "eclipse -g 1000000 file.ecl "goal"" and it 
>failed to load silently again. Can you please confirm we are using the same version of Eclipse?

If you were able to compile your program from the toplevel with -g 
1000000 option, then you should be able to compile the program when you 
run the program in batch mode. How do you know the program fail to load?
If you are using the -e option to run your goal, then there will be no 
toplevel, and you will return to your shell after compiling and running 
your goal. If your goal does not explicitly produce outputs (e.g. using 
write/1 etc), then no output would be produced.


> I noticed that I cannot grow the stack to 3Meg, do you know why my program is not loading? 
>Is it the number of variables which is big? or constraints? or both?
>

By "stack" I assume you mean the global/trail stacks that you set using 
-g. Setting these stacks to 3M is too small for ECLiPSe to even start up
(-g 1000000 is about (slightly less than) 1 gigabytes as the default 
unit is kilobytes. When you specify stack sizes, you should add the 
units yourself to be clear, the options are K, M and G, e.g. -g 
1000000K, -g 1000M, -g 1G).

Your program appears to be generated by a program, your predicate is 
very large and has many variables, and such programs are difficult to 
compile. Unless there is some very good reason to generate the program 
this way, it is much better to write the program in ECLiPSe directly, 
reading your data directly and generating the constraints when you run 
the program (using loops etc.).

> Finally, how do you use the option -g in loop/GUI mode?

You can give the same -g option when you run tkeclipse from your shell.

You can also set the default stack sizes that tkeclipse will start using 
the TkECLiPSe Preference Editor tool (from the Tool menu) -- the 
Global/trail stack size option is what you want. Once you set this, the 
next time you run tkeclipse, it will start up with the stack size you 
specified. [it does not change the stack size for the current tkeclipse, 
though]

Cheers,

Kish

-- 
This e-mail may contain confidential and privileged material for the
sole use of the intended recipient. Any review, use, distribution or
disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact
the sender by reply e-mail and delete all copies of this message.
Cisco Systems Limited (Company Number: 02558939), is registered in
England and Wales with its registered office at 1 Callaghan Square,
Cardiff, South Glamorgan CF10 5BT.
Received on Wed Feb 03 2010 - 02:31:14 CET

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