[gecode-users] Gecode/J: bool_and()

Malcolm Ryan malcolmr at cse.unsw.edu.au
Tue Nov 20 03:16:21 CET 2007


The function Gecode.bool_and(JavaSpace, VarArray<BoolVar>, BoolVar)  
acts in a way that I find counter-intuitive. If the VarArray is  
empty, this constraint will cause propagation to fail:

         VarArray<BoolVar> bools = new VarArray<BoolVar>();
         BoolVar bool = new BoolVar(space);
         Gecode.bool_and(space, bools, bool);
	System.out.println(space.status());

to my mind, the natural result would be to set 'bool' to true, i.e.  
the conjunction is true iff all the members are true. When there are  
no members, that statement is trivially satisfied.

Is there any rationale for the current operation?

Malcolm

--
Many clever men like you have trusted to civilisation.
Many clever Babylonians, many clever Egyptians,
Many clever men at the end of Rome.
                               - G.K.Chesterton, The Napoleon of  
Notting Hill







More information about the gecode-users mailing list