in reactor/Core/src/jetbrains/mps/logic/reactor/core/internal/EvaluationSessionImpl.kt [105:119]
override fun start(supervisor: Supervisor): EvaluationResult {
var session = Backend.ourBackend.ourSession.get()
if (session != null) throw IllegalStateException("session already active")
session = EvaluationSessionImpl(program, supervisor, evaluationTrace, profiler, parameters)
Backend.ourBackend.ourSession.set(session)
try {
val main = parameters[ParameterKey.of("main", Constraint::class.java)] as Constraint
return session.launch(main)
}
finally {
Backend.ourBackend.ourSession.set(null)
}
}