Re: [eclipse-clp-users] Problem using probe_sched

From: Riyadh Jemal <riyadh_at_...191...>
Date: Wed, 14 Oct 2009 18:53:21 +0300
Hi Kish,

On Wed, 2009-10-14 at 12:05 +0100, Kish Shen wrote:
> Riyadh Jemal wrote:
> 
> > My problem was similar to that faced by Simone Pascucci on the mailing
> > list and it led me to suggest that some information including examples
> > on the use of dynamic clauses be included in the tutorial.
> >
> Hi Riyadh,
> 
> The tutorial and examples do not include examples using dynamic 
> predicates (i.e. clauses you can assert/retract) because there aren't 
> many uses for them that are not better done with other features in 
> ECLiPSe/Prolog. Support for dynamic predicates in ECLiPSe is mainly 
> meant for backwards compatibility with Prolog (and also for the few 
> cases where it is a good idea).
> 
> As you mentioned in your email to me, you assert the data you want to 
> use as facts, and then use them. If the data is available before you run 
> the program, then it is much better to generate a program with the facts 
> in them, and compile this.
> 
> I assume you are using facts for your data because the examples I 
> suggested you look at uses facts to store the data. This was mainly done 
> this way because it is convenient to show everything in one file in the 
> examples. A better approach if you want your code to work with different 
> data set is to read in the data directly (using the I/O facilities of 
> ECLiPSe), and create your data constraints from them, rather than having 
> them as facts, and creating the constraints from the facts. Having the 
> facts means you are duplicating the information, and makes it difficult 
> if you want to run the program again with a different set of data.
> 
I get what you mean and I am working towards that in my application. I
still feel that the tutorial should include something about the methods
used in real applications like you have suggested above.

My particular problem was in trying to code like in the examples shown
in the tutorial and in the documentation for the Probing for Scheduling
library. Maybe someone with Prolog  experience will not face this kind
of problem.

I came across ECLiPSe when searching the Internet for something I could
use to solve a scheduling problem and have no prior experience with
Prolog. I feel that in general the documentation is excellent but
additions to the tutorial in line with the above will go some way to
getting the newbie up an running.


Thanks
Riyadh






> Cheers,
> 
> Kish
> 
Received on Wed Oct 14 2009 - 15:59:35 CEST

This archive was generated by hypermail 2.3.0 : Tue Apr 16 2024 - 09:13:20 CEST