def full_adder(aig, a, b, c_in):
    """
    >>> for a, b, c in itertools.product((0, 1), repeat=3):
    ...     print( (a, b, c), full_adder(AIG(), a, b, c) )
    (0, 0, 0) (0, 0)
    (0, 0, 1) (1, 0)
    (0, 1, 0) (1, 0)
    (0, 1, 1) (0, 1)
    (1, 0, 0) (1, 0)
    (1, 0, 1) (0, 1)
    (1, 1, 0) (0, 1)
    (1, 1, 1) (1, 1)
    """
    s = aig.large_xor((a, b, c_in))
    c = aig.disjunction((aig.create_and(c_in, a), aig.create_and(c_in, b),
        aig.create_and(a, b)))
    return s, c
