1 package gov.nasa.jpf.search; 20 21 import gov.nasa.jpf.Config; 22 import gov.nasa.jpf.VM; 23 24 25 31 public class PathSearch extends AbstractSearch { 32 33 public PathSearch (Config config, VM vm) { 34 super(config,vm); 35 } 36 37 public boolean requestBacktrack () { 38 doBacktrack = true; 39 40 return true; 41 } 42 43 public void search () { 44 depth++; 45 46 if (hasPropertyTermination()) { 47 return; 48 } 49 50 notifySearchStarted(); 51 52 while (true) { 53 while (doBacktrack) { 55 if (depth > 0) { 56 vm.backtrack(); 57 depth--; 58 59 notifyStateBacktracked(); 60 } 61 62 doBacktrack = false; 63 } 64 65 forward(); 66 notifyStateAdvanced(); 68 69 if (hasPropertyTermination()) { 70 break; 71 } 72 73 if (isEndState) { 74 break; 75 } 76 77 depth++; 78 } 79 80 notifySearchFinished(); 81 } 82 83 public boolean supportsBacktrack () { 84 return true; 85 } 86 } 87 | Popular Tags |