Пример #1
0
 public DirectedGraph<KRunState, Transition> step_all(int steps, KRunState v)
     throws KRunExecutionException {
   if (steps < 1) steps = 1;
   debugger.setCurrentState(v.getStateId());
   debugger.stepAll(steps);
   return debugger.getGraph();
 }
Пример #2
0
 public DirectedGraph<KRunState, Transition> step(KRunState v, int steps)
     throws KRunExecutionException {
   if (steps > 0) {
     debugger.setCurrentState(v.getStateId());
     debugger.step(steps);
   }
   return debugger.getGraph();
 }
Пример #3
0
 public RunKRunCommand(KRunState state, KRun krun, Context context) {
   super();
   this.context = context;
   this.initialConfiguration = state.getRawResult();
   this.krun = krun;
   DirectedGraph<KRunState, Transition> dg = new KRunGraph();
   dg.addVertex(state);
   debugger = krun.debug(dg);
 }
Пример #4
0
  public static String transformTerm(Term term, Context context) {
    term = KRunState.concretize(term, context);
    if (term.getClass() == Cell.class) {
      Cell generatedTop = (Cell) term;
      if (generatedTop.getLabel().equals("generatedTop")) {
        term = generatedTop.getContents();
      }
    }

    UnparserFilter unparser = new UnparserFilter(true, false, context);
    unparser.visitNode(term);
    return unparser.getResult();
  }