Re: [eclipse-clp-users] Events

From: Bogdan Tanasa <g-bogta_at_ida.liu.se>
Date: Fri, 27 Jan 2012 10:07:46 +0100
The problem is that I have been trying to do like this but I cannot "load"
the ecl file in eclipse from C. I posted in C include("file.ecl") and
use_module("file.ecl") without any success. I think it's something related
to the paths but I cannot figure it out.

Thanks,
Bogdan.

-----Original Message-----
From: Kish Shen [mailto:kisshen_at_cisco.com] 
Sent: 27 ianuarie 2012 04:05
To: Bogdan Tanasa
Cc: eclipse-clp-users_at_lists.sourceforge.net
Subject: Re: [eclipse-clp-users] Events

Hi Bogdan,

First, let me repeat what I have said in my answers to some of your 
previous posts about using C and ECLiPSe: ECLiPSe is *not* a C solver 
library  -- this still seem to be what you are trying to do, as (if I 
understood you correctly), you are trying to call bb_min from C, and 
this is almost certainly not the right level at which the C interface 
should be used (i.e. the bb_min should be called by your ECLiPSe code, 
so you write most of your code in ECLiPSe, and only call the top-level 
goal from C).

As for your question, I am not sure I understand you: you call an 
ECLiPSe goal from C by posting it, and then calling ec_resume() to pass 
control to ECLiPSe, which then execute the goal(s) you posted, and when 
it has finished (returned a solution, or otherwise terminated (failed or 
aborted)), control is returned to C, i.e. you return from the call to 
ec_resume(), so you have no need to have any signal from ECLiPSe to C to 
tell you that the goal have finished -- there is only a single thread of 
execution, and control is passed between ECLiPSe and C. Have I 
misunderstood what you wanted?

Note that the C and C++ interfaces are essentially the same in ECLiPSe 
-- the C++ interface is essnetially just a C++ wrapper layer around the 
C interface, so you can read the chapters on the C++ interface in the 
Embedding and Interfacing manual to understand the C interface as well.

Cheers,

Kish

On 26/01/2012 13:36, Bogdan Tanasa wrote:
> Hi,
>
>
>
> I am interested if there is a way to signal events to a C application when
a
> goal posted in eclipse has finished.
>
> For example inside bb_min a search method is called. Every time when the
> search produces a valid solution I would to notify the C application and
do
> some processing.
>
>
>
> Thanks,
>
> Bogdan.
>
>
>
>
>
>
----------------------------------------------------------------------------
--
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
>
>
>
> _______________________________________________
> ECLiPSe-CLP-Users mailing list
> ECLiPSe-CLP-Users_at_lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/eclipse-clp-users


-- 
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 Fri Jan 27 2012 - 09:08:03 CET

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