[ExecutionEngine] Use std::function rather than a function pointer for the