Review implementation of boolean triple
if I quite understand your problem, to do a proper incr() method I would do so :

public class BooleanTriple {
    private boolean a,b,c;
    private int i;
    public BooleanTriple(boolean a, boolean b, boolean c){
        this.a =a; this.b=b; this.c=c;
        this.i = (a ? 1 : 0)*4+(b ? 1 : 0)*2+(c ? 1 : 0)*1;  // not sure if this compile, but the idea is here
    }

    public void incr(){
        i = (i + 1) % 8;
        a = (i &amp; 0x4) != 0;
        b = (i &amp; 0x2) != 0;
        c = (i &amp; 0x1) != 0;
    }
    public boolean logProduct(){ return a &amp;&amp; b &amp;&amp; c;}
}


With i going from 0 (000 binary) to 7 (111 binary) you have all the possible values for a, b and c