Logic evaluator