Package statechum.analysis.Erlang

Examples of statechum.analysis.Erlang.ErlangLabel$ErlangQuotedAtom


    }

  }

  public static ErlangLabel stripOutput(ErlangLabel label) {
    return new ErlangLabel(label.function, label.callName, label.input,
        null);
  }
View Full Code Here


    for (Label lbl : question) {
      if (!(lbl instanceof ErlangLabel))
        throw new IllegalArgumentException("question element " + lbl
            + " is not of Erlang type");

      ErlangLabel erlLabel = (ErlangLabel)lbl;
     
      if (!module.getName().equals(erlLabel.function.getModuleName()))
        throw new IllegalArgumentException("current module is "+module.getName()+" but attempting to call "+erlLabel.function.getModuleName());

      if (!module.behaviour.getAlphabet().contains(lbl))
View Full Code Here

      if (elemAti.arity() < 2 || elemAti.arity() > 3)
        throw new IllegalArgumentException("received tuple " + elemAti
            + " of invalid arity");
      if (elemAti.arity() == 3) {
        if (config.getUseErlangOutputs()) {
          answerDetails[i] = new ErlangLabel(
              questionDetails[i].function,
              questionDetails[i].callName,
              questionDetails[i].input, elemAti.elementAt(2));
        } else {
          answerDetails[i] = new ErlangLabel(
              questionDetails[i].function,
              questionDetails[i].callName,
              questionDetails[i].input);
        }
View Full Code Here

        nextState = ErlangState.newErlangState(state, input, true);
        // System.out.println("OK : "+RPNILearner.questionToString(newTrace));
        break;
      case TRACE_DIFFERENTOUTPUT:
        assert outcome.answerDetails.length == traceLength;
        ErlangLabel nextLabel = outcome.answerDetails[traceLength - 1];
        state.rejects.add(input);// record the reject.
        if (!module.behaviour.getAlphabet().contains(nextLabel)) {
          module.behaviour.getAlphabet().add(nextLabel);
          // extend the alphabet
          // (if the input is already in the alphabet, fine, it would
View Full Code Here

    config = ErlangModule.setupErlangConfiguration(file);config.setErlangCompileIntoBeamDirectory(true);config.setTransitionMatrixImplType(STATETREE.STATETREE_SLOWTREE);
    ErlangModule.loadModule(config);
    final String LBL1 = "{call, read}", LBL2 = "{call, lock}";
    final LearnerGraph gr = buildLearnerGraph("A- "+LBL1+" ->B-"+LBL2+"->B", "testConvertToModuleFailure1", config,null);
    Iterator<Label> lblIter = gr.pathroutines.computeAlphabet().iterator();
    ErlangLabel lbl1 = (ErlangLabel)lblIter.next(),lbl2 = (ErlangLabel)lblIter.next();
    List<Label> trace = Arrays.asList(new Label[]{lbl1,lbl2,lbl2});
    Assert.assertEquals("[{?F(),'call','read'},{?F(),'call','lock'},{?F(),'call','lock'}]",RPNILearner.questionToString(trace));
  }
View Full Code Here

TOP

Related Classes of statechum.analysis.Erlang.ErlangLabel$ErlangQuotedAtom

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.