Newsgroups: comp.lang.prolog
From: Michael Moeller <m...@t-online.de>
Date: Sun, 19 Feb 2012 14:43:54 +0000
Local: Sun, Feb 19 2012 9:43 am
Subject: Re: CHR(FD) syntax standard
On Wed, 8 Feb 2012, A. K. wrote:
Syntax varies depending on the Prolog you use. The example is clp(FD).
> Dear all > I wonder what would be the standard (or at least most widely used) syntax for > I installed BProlog, Yap and ECLiPSe on Win7. All claim to have CHR solvers. > sendmore(Digits) :-
> but it runs only with BProlog. Why?
> I am not familiar with modern Prolog dialects (having only programmed in > Thanks to all who provide their great works and ideas in logic programming GNU-Prolog, BProlog and ECLiPSe used to implement CLP(FD), Yap CHR and CLP(R) and XSB CHR. SWI has CHR, CLP(FD) and CLP(R, Q). In gprolog the example will be something like this (taken from the gprolog
sendmoremoney(Vars) :-
send :- Vars=[S,E,N,D,M,O,R,Y], sendmoremoney(Vars), fd_labeling(Vars), q :- statistics(runtime,_), send,
:- initialization(q).
CHR in Yap is like this (just to give you an impression)
:- use_module(library(chr)).
primes(1) <=> true.
absorb(J) @ prime(I) \ prime(J) <=> J mod I =:= 0 | true.
Most Prologs come with some examples. In addition lots of Regards,
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||