src/Pure/PIDE/batch_session.scala
changeset 65226 3b27169fd9da
parent 65216 060a8a1f2dec
child 65251 4b0a43afc3fb
equal deleted inserted replaced
65225:ec9ec04546fc 65226:3b27169fd9da
    36     val prover_session = new Session(resources)
    36     val prover_session = new Session(resources)
    37     val batch_session = new Batch_Session(prover_session)
    37     val batch_session = new Batch_Session(prover_session)
    38 
    38 
    39     val handler = new Build.Handler(progress, session)
    39     val handler = new Build.Handler(progress, session)
    40 
    40 
    41     prover_session.phase_changed +=
    41     Isabelle_Process.start(prover_session, options, logic = parent_session,
    42       Session.Consumer[Session.Phase](getClass.getName) {
    42       phase_changed =
       
    43       {
    43         case Session.Ready =>
    44         case Session.Ready =>
    44           prover_session.add_protocol_handler(handler)
    45           prover_session.add_protocol_handler(handler)
    45           val master_dir = session_info.dir
    46           val master_dir = session_info.dir
    46           val theories = session_info.theories.map({ case (_, opts, thys) => (opts, thys) })
    47           val theories = session_info.theories.map({ case (_, opts, thys) => (opts, thys) })
    47           batch_session.build_theories_result =
    48           batch_session.build_theories_result =
    49         case Session.Terminated(_) =>
    50         case Session.Terminated(_) =>
    50           batch_session.session_result.fulfill_result(Exn.Exn(ERROR("Prover process terminated")))
    51           batch_session.session_result.fulfill_result(Exn.Exn(ERROR("Prover process terminated")))
    51         case Session.Shutdown =>
    52         case Session.Shutdown =>
    52           batch_session.session_result.fulfill(())
    53           batch_session.session_result.fulfill(())
    53         case _ =>
    54         case _ =>
    54       }
    55       })
    55 
       
    56     Isabelle_Process.start(prover_session, options, logic = parent_session)
       
    57 
    56 
    58     batch_session
    57     batch_session
    59   }
    58   }
    60 }
    59 }
    61 
    60