Re: [eclipse-clp-users] Propagators with a state

From: Kish Shen <kisshen_at_...5...>
Date: Mon, 16 Feb 2009 14:22:01 +0000
Wit Jakuczun wrote:

> But I would love to have other features:
> - initial call of a propagator (could result in suspending). This would be
>   especially useful for propagators based on demons.

As propagators are normal ECLiPSe goals, you can simply write your 
propagator such that it is executed once before suspension, something like:

propagator(...) :-
	do_propagation(....),
	suspend(do_propagation(....)...).

[This is one of the advantages of using normal ECLiPSe code to code 
suspensions -- it gives you the full flexibility of the whole language 
to write your propagators]

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 Mon Feb 16 2009 - 14:22:09 CET

This archive was generated by hypermail 2.2.0 : Mon Jul 09 2018 - 02:05:29 CEST