From: John P. <joh...@us...> - 2005-06-09 06:46:53
|
Update of /cvsroot/javapathfinder//javapathfinder/src/gov/nasa/jpf/jvm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18132/src/gov/nasa/jpf/jvm Modified Files: JVM.java Log Message: added an option to indent printlns by the number of non-deterministic choices that have been made on a path to make the application output more sensible under backtracking. option enabled by vm.indent_output = true. Index: JVM.java =================================================================== RCS file: /cvsroot/javapathfinder//javapathfinder/src/gov/nasa/jpf/jvm/JVM.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- JVM.java 7 May 2005 00:40:01 -0000 1.4 +++ JVM.java 9 Jun 2005 06:46:44 -0000 1.5 @@ -154,6 +154,7 @@ boolean atomicLines; boolean treeOutput; boolean pathOutput; + boolean indentOutput; /** * VM instances are another example of evil throw-up ctors, but this is @@ -174,6 +175,7 @@ atomicLines = config.getBoolean("vm.por.atomic_lines", true); treeOutput = config.getBoolean("vm.tree_output", true); pathOutput = config.getBoolean("vm.path_output", false); + indentOutput = config.getBoolean("vm.indent_output",false); initSubsystems(config); initFields(config); @@ -709,7 +711,17 @@ public void println (String s) { if (treeOutput) { - System.out.println(s); + if (indentOutput){ + StringBuffer indent = new StringBuffer(); + int i; + for (i = 0;i<=path.length();i++) { + indent.append("|" + i); + } + System.out.println(indent + "|" +s); + } + else { + System.out.println(s); + } } if (pathOutput) { |