For convertion to single expressions: if (A) { B } else { C } === (A and B) or (not A and C) For simplification: X and undef === undef X or undef === X