equal
deleted
inserted
replaced
16 |
16 |
17 import isabelle.proofdocument.{ProofDocument, Text, Token} |
17 import isabelle.proofdocument.{ProofDocument, Text, Token} |
18 import isabelle.IsarDocument |
18 import isabelle.IsarDocument |
19 |
19 |
20 |
20 |
21 class Prover(isabelle_system: IsabelleSystem, isabelle_symbols: Symbol.Interpretation) |
21 class Prover(isabelle_system: IsabelleSystem) |
22 { |
22 { |
23 private var _logic = isabelle_system.getenv_strict("ISABELLE_LOGIC") |
23 private var _logic = isabelle_system.getenv_strict("ISABELLE_LOGIC") |
24 private var process: Isar = null |
24 private var process: Isar = null |
25 |
25 |
26 private val commands = new HashMap[IsarDocument.Command_ID, Command] |
26 private val commands = new HashMap[IsarDocument.Command_ID, Command] |
194 |
194 |
195 private def send(cmd: Command) { |
195 private def send(cmd: Command) { |
196 cmd.status = Command.Status.UNPROCESSED |
196 cmd.status = Command.Status.UNPROCESSED |
197 commands.put(cmd.id, cmd) |
197 commands.put(cmd.id, cmd) |
198 |
198 |
199 val content = isabelle_symbols.encode(document.getContent(cmd)) |
199 val content = isabelle_system.symbols.encode(document.getContent(cmd)) |
200 process.create_command(cmd.id, content) |
200 process.create_command(cmd.id, content) |
201 process.insert_command(if (cmd.prev == null) "" else cmd.prev.id, cmd.id) |
201 process.insert_command(if (cmd.prev == null) "" else cmd.prev.id, cmd.id) |
202 } |
202 } |
203 |
203 |
204 def remove(cmd: Command) { |
204 def remove(cmd: Command) { |