[eclipse-clp-users] Return one result

From: Ismael München <ismaelmunchen_at_bol.com.br>
Date: Wed, 4 Nov 2009 21:48:46 -0300
Hi,

How do I for return an answer in this example:

go(FirstRow) :-
 dim(A, [2,2]),
 A[1..2, 1..2] :: 1..100,
 
 dim(B, [2,2]),
 B[1..2, 1..2] :: 1..100,

 (
  for(I, 1, 2),
  param(A, B)
 do 
  (
   for(J, 1, 2),
   param(A, B, I)
  do
   A[I,J] #=< B[I,J] * 2
  )
 ),
 
 sum(A[1,1..2], FirstRow).


The results are in domain mode but I need one answer for each turn...

Error: instantiation fault in +(0, _504{1 .. 100}, _1367)
Received on Thu Nov 05 2009 - 00:05:56 CET

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