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

From: Amine Marref <cyborgamine_at_...32...>
Date: Wed, 3 Feb 2010 10:03:58 +0000
Thanks everyone,

I can now compile the program and run it.

This program is just about a tenth of the size of my target problems in future. It seems that I will sooner or later not be able to compile programs like this.

The size of the current program can be reduced by using loops to specify domains and constraints on sublists of variables. This however, only applies to this case. Eventually, each single variable will have a domain and a set of constraints which are potentially different from all other variables, so I guess this flat modeling is necessary.

I did not quite get the idea about the data file which should contain only "numbers". How can I get around the problem of needing to declare variables individually (and their distinctive set of constraints) by using a data file?

Thanks,

A.

P.S. How do I reply to this topic without generating new threads in the user-list archive? 


> Date: Wed, 3 Feb 2010 15:03:43 +1100
> From: joachim.schimpf_at_...44...
> To: eclipse-clp-users_at_lists.sourceforge.net
> Subject: Re: [eclipse-clp-users] Program Does not Load
> 
> 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?
> 
> The code invoking the compiler from the tkeclipse menu and from the -b option
> incorrectly assumes that error messages have already been printed.
> I have registered this as a bug.
> 
> 
> > 
> > 2) I used the command-prompt mode i.e. "eclipse -g 1000000 file.ecl
> > "goal"" and it failed to load silently again.
> 
> The correct syntax is eclipse -g 1000000 -b file.ecl
> 
> > Finally, how do you use the option -g in loop/GUI mode?
> 
> You give a -g option when starting eclipse or tkeclipse from a commmand line.
> Or, in tkeclipse, open the Preference Editor, set Global/trail stack size,
> save Preferences, and restart.
> 
> 
> > I noticed that I cannot grow the stack to 3Meg,
> 
> You mean 3GiB.  The limit depends on the operating system, see
> http://sourceforge.net/mailarchive/message.php?msg_id=484429FF.8040308%40cisco.com
> 
> 
> > do you know why my
> > program is not loading? Is it the number of variables which is big? or
> > constraints? or both?
> 
> The compiler isn't ideally suited for large generated source code.
> But you should not generate source code anyway, see recommendations in
> http://sourceforge.net/mailarchive/message.php?msg_id=4B42DDF7.8010002%40infotech.monash.edu.au
> 
> If you currently generate the source code using an ECLiPSe program, consider
> modifying it and calling the constraints directly (instead of writing them to
> a file, reading them back, compiling them and then executing).
> 
> If you generate the source code from a non-ECLiPSe program, consider writing
> a data file (only numbers) and having a fixed ECLiPSe program to read that
> data and set up the constraints dynamically, as in
> http://www.eclipse-clp.org/examples/apc_lp.ecl.txt
> 
> Or: write a single setup clause (in your case, solve/2) to a file "model",
> then interpret this clause as follows:
> 
>     execute_clause_from_file(File, Head) :-
>         open(File, read, S),
>         read(S, (Head :- Goals)),
>         close(S),
>         execute(1, Goals).
> 
>     execute(I, Goals) :-
>         ( Goals = (G,Gs) ->
>             writeln(I:G),
>             call(G),
>             I1 is I+1,
>             execute(I1, Gs)
>         ;
>             writeln(I:Goals),
>             call(Goals)
>         ).
> 
> When called with execute_clause_from_file("model", solve(X,Y)), it
> will read the model, execute the constraints one-by-one (printing
> goal number and constraint first, so you can pinpoint failures more
> easily), and deliver a result or fail.
> 
> 
> -- Joachim
> 
> 
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> ECLiPSe-CLP-Users mailing list
> ECLiPSe-CLP-Users_at_lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/eclipse-clp-users
 		 	   		  
Received on Wed Feb 03 2010 - 10:04:04 CET

This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST