# HG changeset patch # User wenzelm # Date 1197737613 -3600 # Node ID 569cdf7c1c7c272fe62feeb17a2b2395c2cd55bb # Parent b2ed983a5e807ddb7281f9f81abf7af04455b33c class Result: replaced FAILURE by SYSTEM (internal notification); tuned isabelle command line -- explicit bash makes it work on cygwin also; diff -r b2ed983a5e80 -r 569cdf7c1c7c lib/classes/isabelle/IsabelleProcess.java --- a/lib/classes/isabelle/IsabelleProcess.java Sat Dec 15 17:53:32 2007 +0100 +++ b/lib/classes/isabelle/IsabelleProcess.java Sat Dec 15 17:53:33 2007 +0100 @@ -48,7 +48,7 @@ public enum Kind { STDIN, STDOUT, STDERR, SIGNAL, EXIT, // Posix channels/events WRITELN, PRIORITY, TRACING, WARNING, ERROR, DEBUG, // Isabelle messages - FAILURE // process wrapper problem + SYSTEM // internal system notification }; public Kind kind; public String result; @@ -153,12 +153,12 @@ outputWriter.flush(); } } catch (InterruptedException exn) { - putResult(Result.Kind.FAILURE, "Cannot output: aborted"); + putResult(Result.Kind.SYSTEM, "Output thread interrupted"); } catch (IOException exn) { - putResult(Result.Kind.FAILURE, exn.getMessage()); + putResult(Result.Kind.SYSTEM, exn.getMessage()); } } - System.err.println("Output thread terminated"); + putResult(Result.Kind.SYSTEM, "Output thread terminated"); } } private OutputThread outputThread; @@ -284,9 +284,9 @@ } } } catch (IOException exn) { - putResult(Result.Kind.FAILURE, exn.getMessage()); + putResult(Result.Kind.SYSTEM, exn.getMessage()); } - System.err.println("Input thread terminated"); + putResult(Result.Kind.SYSTEM, "Input thread terminated"); } } private InputThread inputThread; @@ -312,9 +312,9 @@ } } } catch (IOException exn) { - putResult(Result.Kind.FAILURE, exn.getMessage()); + putResult(Result.Kind.SYSTEM, exn.getMessage()); } - System.err.println("Error thread terminated"); + putResult(Result.Kind.SYSTEM, "Error thread terminated"); } } private ErrorThread errorThread; @@ -331,9 +331,9 @@ putResult(Result.Kind.EXIT, Integer.toString(rc)); proc = null; } catch (InterruptedException exn) { - putResult(Result.Kind.FAILURE, "Exit thread: interrupted"); + putResult(Result.Kind.SYSTEM, "Exit thread interrupted"); } - System.err.println("Exit thread terminated"); + putResult(Result.Kind.SYSTEM, "Exit thread terminated"); } } private ExitThread exitThread; @@ -351,10 +351,10 @@ result = results.take(); System.err.println(result.toString()); } catch (InterruptedException ex) { - putResult(Result.Kind.FAILURE, "Cannot get result: aborted"); + putResult(Result.Kind.SYSTEM, "Console thread interrupted"); } } - System.err.println("Console thread terminated"); + putResult(Result.Kind.SYSTEM, "Console thread terminated"); } } private ConsoleThread consoleThread; @@ -364,7 +364,7 @@ public IsabelleProcess(String logic) throws IsabelleProcessException { - String [] cmdline = {"isabelle", "-W", logic}; + String [] cmdline = {"bash", "isabelle-process", "-W", logic}; String charset = "UTF-8"; try { proc = Runtime.getRuntime().exec(cmdline);