Ambiguity-adaptive logic