Translate and assemble boolean comparisons