From ff457ffcd3dc8d753913176268e04a16eeb52e17 Mon Sep 17 00:00:00 2001 From: Etienne Kneuss <ekneuss@gmail.com> Date: Thu, 13 Dec 2012 16:49:57 +0100 Subject: [PATCH] Fix web-interface to use timeouts as specified --- web/app/models/LeonConsole.scala | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/web/app/models/LeonConsole.scala b/web/app/models/LeonConsole.scala index 21712d5e0..32ba4207e 100644 --- a/web/app/models/LeonConsole.scala +++ b/web/app/models/LeonConsole.scala @@ -97,20 +97,12 @@ class ConsoleSession extends Actor { event("started") isStarted = true - val ctx = LeonContext( - settings = Settings( - synthesis = false, - xlang = false, - verify = true, - classPath = classPath - ), - files = Nil, - reporter = new WSReporter(channel) - ) + var ctx = leon.Main.processOptions(reporter, "--timeout=2" :: Nil) + ctx = ctx.copy(settings = ctx.settings.copy(classPath = classPath)) val pipeline = TemporaryInputPhase andThen ExtractionPhase andThen AnalysisPhase - pipeline.run(ctx)((code, "--timeout=2" :: Nil)) + pipeline.run(ctx)((code, Nil)) event("stopped") @@ -118,20 +110,12 @@ class ConsoleSession extends Actor { event("started") isStarted = true - val ctx = LeonContext( - settings = Settings( - synthesis = true, - xlang = false, - verify = false, - classPath = classPath - ), - files = Nil, - reporter = new WSReporter(channel) - ) + var ctx = leon.Main.processOptions(reporter, "--synthesis" :: "--parallel" :: "--timeout=10" :: Nil) + ctx = ctx.copy(settings = ctx.settings.copy(classPath = classPath)) val pipeline = TemporaryInputPhase andThen ExtractionPhase andThen SynthesisPhase - pipeline.run(ctx)((code, "--parallel" :: "--timeout=10" :: Nil)) + pipeline.run(ctx)((code, Nil)) event("stopped") -- GitLab