[eclipse-clp-users] ECLiPSe puzzle problem doesn't work for me.

From: Paul Cannongeyser <paul_dice_2_at_...75...>
Date: Mon, 30 Sep 2013 07:14:18 -0700 (PDT)
I coded the Who with whom puzzle problem shown in section 3.6 entitled Who with whom? - propagation, page 120, of AN_CLP.pdf (i.e., the book entitled "A Quick and Gentle Guide to Constraint Logic Programming via ECLiPSe" by Antoni Niederlinski) from http://www.anclp.pl/.

:- lib(ic).

top:-
[Andy,Ben,Carl,Dusty]::[1,4],
[Olive,Eva,Paula,Sabina]::[1,4],
% concert=1, cinema=2, theater=3, exhibition=4
% it means: if e.g. Ben=Olive=4, then
% Ben and Olive went to an exhibition.

% Andy enjoyed a concert:
Andy#=1,

% Ben accompanied Olive:
Ben#=Olive,

% Carl has not seen Eva:
Carl#\=Eva,

% Paula went to a cinema:
Paula#=2,

% Eva was in a theater:

Eva#=3,

% All persons are different:
Andy#\=Ben,
Andy#\=Carl,

Andy#\=Dusty,
Ben#\=Carl,
Ben#\=Dusty,
Carl#\=Dusty,

Olive#\=Eva,
Olive#\=Paula,
Olive#\=Sabina,
Eva#\=Paula,
Eva#\=Sabina,
Paula#\=Sabina,

write(Andy),write(" "),write(Ben),write(" "),
write(Carl),write(" "),write(Dusty),nl,

write(Olive),write(" "),write(Eva),write(" "),
write(Paula),write(" "),write(Sabina).

I type "top" into the Query Entry text field, hit Enter, and observe the following in the Results section.

?- top.
No (0.00s cpu)

I am new to ECLiPSe.  I don't understand why at least the write statements at the end of the program don't print anything.
Received on Mon Sep 30 2013 - 14:17:22 CEST

This archive was generated by hypermail 2.3.0 : Tue Apr 16 2024 - 09:13:20 CEST