Re: [eclipse-users] how to get eclipse and help yourself

From: J. Manuel Velasco <jvelasco_at_...4...>
Date: Thu, 9 Nov 2006 13:21:31 +0100
Hello William,

I can tell you the way to compile a CHR code in eclipse.

1) run eclipse
2) load the CHR library
    [eclipse] lib(chr).
3) convert the CHR file into a prolog file with the command chr2pl
    [eclipse] chr2pl(chrfile).
(*) chrfile must have chr extension
4) compile the prolog file you'll get after previous conversion
    [eclipse] [chrfile].


Since I am not an expert yet on CHRs it will get me time that I don't have to 
provide you a basic example but with the guide I gave you in previous emails 
(see below) I think you'll be able to make your own example. 

More effort you do, best you learn.

I suggest you post the question into the list and not only for me since in the 
list there are experience people who can give you a hand (if your emails are 
not bounced).

Good luck!

Take care,
-_· manou

El Miércoles, 8 de Noviembre de 2006 20:24, escribió:
> I already have ecipse and I can run the job shop example.  I just trying to
> get a simple chr program to run, can you just give me a small complete
> example of a chr program I can run in eclipse?  I even have it running on
> both windows and linux.
>
> On 11/8/06, J. Manuel Velasco <jvelasco_at_...4...> wrote:
> > Hi William,
> >
> > I would like to redirect to a site that maybe can be good for you to take
> > a
> > look:
> >
> > http://catb.org/esr/faqs/smart-questions.html
> >
> > Don't let you carry on by the tittle, I think is not the best, but I
> > suggest
> > you have a look.
> >
> > At http://eclipse.crosscoreop.com/ the same URL where it's the
> > documentation
> > there is another link called Download where you can download the eclipse
> > environment and install it.
> >
> > Good look,
> >
> > Regards,
> > -_· manou
> >
> > El Martes, 7 de Noviembre de 2006 19:25, William Heath escribió:
> > > Thanks!!! Can you give me the full eclipse program to do this example?
> > >
> > > On 11/7/06, J. Manuel Velasco <jvelasco_at_...4...> wrote:
> > > > Hello William,
> > > >
> > > > I am glad to guide you to the eclipse CHR tutorial, but I am a newbie
> >
> > so
> >
> > > > I don't think I will be able to help you a lot.
> > > >
> > > > Somebody explain me  how CHRs work, the right syntax you'll find at
> >
> > the
> >
> > > > eclipse tutorial that you will find in the following URL:
> > > >
> > > > http://www.eclipse-clp.org/
> > > >
> > > > Go to the link Documentation, then Eclipse Tutorial Documentation and
> > > > finally
> > > > you will see the chapter: Propia and CHR.
> > > >
> > > > What a kind man explained to me from swi-prlog list (I don't put his
> > > > address
> > > > to respect him) about CHRs and Prolog was that:
> > > >
> > > > The thing for you to be aware of is that this code combines basic
> >
> > prolog
> >
> > > > code
> > > > with CHR code.
> > > > Basic prolog code is
> > > >
> > > >    s(B,C,D) :- s1, s2, s3.
> > > >
> > > > The logical interpretation is that s is true when s1, s2 and s3 are
> >
> > true.
> >
> > > > The execution is to evaluate the parameters in order.
> > > >
> > > > CHR code looks like this:
> > > >
> > > > constraint1, constraint2 <=> test | prolog_code, constraint3.
> > > > constraint1, constraint2 ==> test | prolog_code.
> > > >
> > > > The first line says, if constraint1 and constraint2 exist, and test
> > > > is true,
> > > > then drop
> > > > constraint1 and constraint2, evaluate prolog_code, and add
> > > > constraint3.  The
> > > > second line
> > > > says, if constraint1 and constraint2 exist, and test is true, then
> > > > evaluate
> > > > prolog_code (and
> > > > drop nothing).
> > > >
> > > > Take care,
> > > > -_· manou
Received on Thu Nov 09 2006 - 12:21:02 CET

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