public static void main(String[] args) {
		// Something to start from
		Store store = new Store(); // define FD store
		// define finite domain variables

		vdd = new IntVar(store, "vdd", 1, 1);
		gnd = new IntVar(store, "gnd", 0, 0);

		IntVar a = new IntVar(store, "A", 0, 1);
		IntVar b = new IntVar(store, "B", 0, 1);
		IntVar c = new IntVar(store, "C", 0, 1);
		IntVar coi = new IntVar(store, "Coi", 0, 1);
		IntVar si = new IntVar(store, "Si", 0, 1);
		IntVar co = new IntVar(store, "co", 0, 1);
		IntVar s = new IntVar(store, "si", 0, 1);
		
		IntVar[] v = new IntVar[] { a, b, c,co,s};

		inv(store, coi,co);
		inv(store,si,s);
		carryModule(store, a, b, c, coi);
		sumModule(store, a, b, c, coi, si);

		Search<IntVar> search = new DepthFirstSearch<IntVar>();
		search.setSolutionListener(new PrintOutListener<IntVar>());
		SelectChoicePoint<IntVar> select = new InputOrderSelect<IntVar>(store,
				v, new IndomainMin<IntVar>());
		search.getSolutionListener().searchAll(true);
		search.getSolutionListener().recordSolutions(true);
		boolean result = search.labeling(store, select);

		if (result) {
			System.out.println("A    B    Cin  Cout Sum");
			for (int i = 1; i <= search.getSolutionListener().solutionsNo(); i++) {
				for (int j = 0; j < search.getSolution(i).length; j++)
					System.out.print(search.getSolution(i)[j] + "    ");
				System.out.println();
			}

		} else
			System.out.println("No solution");
	}