Logic compiler