Package statechum.analysis.learning.ErlangOracleLearner

Examples of statechum.analysis.learning.ErlangOracleLearner.TraceOutcome


  private static void evaluateLine(ErlangModule module, BufferedWriter out,
      ErlangOracleLearner learner, LinkedList<List<ErlangLabel>> pos,
      LinkedList<List<ErlangLabel>> neg, List<ErlangLabel> line)
      throws IOException {
    TraceOutcome response = learner.askErlang(line);
    // System.out.println("Writing " + response.toTraceFileString());
    out.write(response.toTraceFileString() + "\n");
    switch (response.outcome) {
    case TRACE_FAIL:
      neg.add(Arrays.asList(response.answerDetails));
      break;
    case TRACE_DIFFERENTOUTPUT:
View Full Code Here


      mod.behaviour.getAlphabet().add(labelLock);
      mod.behaviour.getAlphabet().add(labelRead);
      mod.behaviour.getAlphabet().add(labelWrite);
      // Attempting first trace
      List<Label> trace = Arrays.asList(new Label[]{initLabel,labelLock});
      TraceOutcome tr = learner.askErlang(trace);
      Assert.assertEquals(TRACEOUTCOME.TRACE_OK,tr.outcome);
      Assert.assertEquals("[{"+ErlangLabel.missingFunction+",'init','AnyWibble','ok'},{"+ErlangLabel.missingFunction+",'call','lock',{'ok','locked'}}]",RPNILearner.questionToString(Arrays.asList(tr.answerDetails)));
     
      tr = learner.askErlang(Arrays.asList(new Label[]{initLabel,labelLock, labelLock}));
     
View Full Code Here

      mod.behaviour.getAlphabet().add(labelLock);
      mod.behaviour.getAlphabet().add(labelRead);
      mod.behaviour.getAlphabet().add(labelWrite);
      // Attempting first trace
      List<Label> trace = Arrays.asList(new Label[]{initLabel,labelLock});
      TraceOutcome tr = learner.askErlang(trace);
      Assert.assertEquals(TRACEOUTCOME.TRACE_OK,tr.outcome);
      Assert.assertEquals("[{"+ErlangLabel.missingFunction+",'init','AnyWibble','ok'},{"+ErlangLabel.missingFunction+",'call','lock',{'ok','locked'}}]",RPNILearner.questionToString(Arrays.asList(tr.answerDetails)));
     
      tr = learner.askErlang(Arrays.asList(new Label[]{initLabel,labelLock, labelLock}));
     
View Full Code Here

  private static void evaluateLine(ErlangModule moduleArg, BufferedWriter outArg,
      ErlangOracleLearner learnerArg, LinkedList<List<ErlangLabel>> pos,
      LinkedList<List<ErlangLabel>> neg, List<ErlangLabel> line)
      throws IOException {
    TraceOutcome response = learnerArg.askErlang(line);
    // System.out.println("Writing " + response.toTraceFileString());
    outArg.write(response.toTraceFileString() + "\n");
    switch (response.outcome) {
    case TRACE_FAIL:
      neg.add(Arrays.asList(response.answerDetails));
      break;
    case TRACE_DIFFERENTOUTPUT:
View Full Code Here

  private static void evaluateLine(ErlangModule moduleArg, BufferedWriter outArg,
      ErlangOracleLearner learnerArg, LinkedList<List<ErlangLabel>> pos,
      LinkedList<List<ErlangLabel>> neg, List<ErlangLabel> line)
      throws IOException {
    TraceOutcome response = learnerArg.askErlang(line);
    // System.out.println("Writing " + response.toTraceFileString());
    outArg.write(response.toTraceFileString() + "\n");
    switch (response.outcome) {
    case TRACE_FAIL:
      neg.add(Arrays.asList(response.answerDetails));
      break;
    case TRACE_DIFFERENTOUTPUT:
View Full Code Here

      mod.behaviour.getAlphabet().add(labelLock);
      mod.behaviour.getAlphabet().add(labelRead);
      mod.behaviour.getAlphabet().add(labelWrite);
      // Attempting first trace
      List<Label> trace = Arrays.asList(new Label[]{initLabel,labelLock});
      TraceOutcome tr = learner.askErlang(trace);
      Assert.assertEquals(TRACEOUTCOME.TRACE_OK,tr.outcome);
      Assert.assertEquals("[{"+ErlangLabel.missingFunction+",'init','AnyWibble','ok'},{"+ErlangLabel.missingFunction+",'call','lock',{'ok','locked'}}]",RPNILearner.questionToString(Arrays.asList(tr.answerDetails)));
     
      tr = learner.askErlang(Arrays.asList(new Label[]{initLabel,labelLock, labelLock}));
     
View Full Code Here

      mod.behaviour.getAlphabet().add(labelLock);
      mod.behaviour.getAlphabet().add(labelRead);
      mod.behaviour.getAlphabet().add(labelWrite);
      // Attempting first trace
      List<Label> trace = Arrays.asList(new Label[]{initLabel,labelLock});
      TraceOutcome tr = learner.askErlang(trace);
      Assert.assertEquals(TRACEOUTCOME.TRACE_OK,tr.outcome);
      Assert.assertEquals("[{"+ErlangLabel.missingFunction+",'init','AnyWibble','ok'},{"+ErlangLabel.missingFunction+",'call','lock',{'ok','locked'}}]",RPNILearner.questionToString(Arrays.asList(tr.answerDetails)));
     
      tr = learner.askErlang(Arrays.asList(new Label[]{initLabel,labelLock, labelLock}));
     
View Full Code Here

      mod.behaviour.getAlphabet().add(labelLock);
      mod.behaviour.getAlphabet().add(labelRead);
      mod.behaviour.getAlphabet().add(labelWrite);
      // Attempting first trace
      List<Label> trace = Arrays.asList(new Label[]{initLabel,labelLock});
      TraceOutcome tr = learner.askErlang(trace);
      Assert.assertEquals(TRACEOUTCOME.TRACE_OK,tr.outcome);
      Assert.assertEquals("[{"+ErlangLabel.missingFunction+",'init','AnyWibble','ok'},{"+ErlangLabel.missingFunction+",'call','lock',{'ok','locked'}}]",RPNILearner.questionToString(Arrays.asList(tr.answerDetails)));
     
      tr = learner.askErlang(Arrays.asList(new Label[]{initLabel,labelLock, labelLock}));
     
View Full Code Here

TOP

Related Classes of statechum.analysis.learning.ErlangOracleLearner.TraceOutcome

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.