[eclipse-clp-users] External procedure constraints

From: Mick Hallward <mick1792_at_...75...>
Date: Sat, 26 Mar 2011 18:58:57 -0700 (PDT)
Hi all,

I have a question about external procedures 
(my apologies if the information can already
be found in the manual or in the tutorial;
I've searched both a good deal but couldn't
get anywhere). The question is this: is it
possible for a constraint to be an external
procedure call? For instance, can I have 
something like this: 

foo(X,Y) :- [X]:: 0 .. 100, X #>=20, X #\= 26, g(X,Y), indomain(X).

Suppose here that g(X,Y) is an arbitrary external 
function (e.g. a function written in C or whatever)
that relates X and Y. When I call foo, will an appropriate 
value for X will be selected, according to the "normal" 
constraints  X #>=20, X #\= 26 AND also according
to the "external" relation g? 

Any information will be greatly appreciated.
Thanks in advance! 
Received on Sun Mar 27 2011 - 01:59:04 CET

This archive was generated by hypermail 2.3.0 : Fri Aug 16 2019 - 15:13:39 CEST