Extract base class for CompilingEvaluator to reuse it in Kotlin