added logic.sml for if/bool ops