Package statechum

Examples of statechum.StringLabel


  {
    if (vFrom.length == 0 || tTable.length == 0) throw new IllegalArgumentException("array is zero-sized");
    int alphabetSize = tTable[vFrom[0]].length;
    if (alphabetSize == 0) throw new IllegalArgumentException("alphabet is zero-sized");
    CmpVertex stateName[] = new CmpVertex[tTable.length];for(int i=0;i < tTable.length;++i) stateName[i]=new StringVertex("S"+i);
    Label inputName[] = new Label[alphabetSize];for(int i=0;i < alphabetSize;++i) inputName[i]=new StringLabel("i"+i);
    LearnerGraph fsm = new LearnerGraph(config);fsm.initEmpty();
    fsm.setInit(stateName[vFrom[0]]);
    Set<CmpVertex> statesUsed = new HashSet<CmpVertex>();
    for(int i=0;i<vFrom.length;++i)
    {
View Full Code Here


  {
    Label result = null;
    switch(config.getLabelKind())
    {
    case LABEL_STRING:
      result = new StringLabel(label);
      break;
    case LABEL_ERLANG:
      result = ErlangLabel.erlangObjectToLabel(ErlangLabel.parseText(label),config);
      break;
    default:
View Full Code Here

  {
    Label result = null;
    switch(config.getLabelKind())
    {
    case LABEL_STRING:
      result = new StringLabel(Integer.toString(number));
      break;
    default:
      throw new IllegalArgumentException("No parser available for traces of type "+config.getLabelKind());
    }
    return result;
View Full Code Here

        for(int i=0;i<componentsToPick && i<labelComponents.length;++i)
        {
          if (!first) labelAsBuffer.append(',');else first=false;
          labelAsBuffer.append(labelComponents[i]);
        }
        outcome.add(new StringLabel(labelAsBuffer.toString()));
      }
      return outcome;
    }
View Full Code Here

    {
      rowsProcessed.add(entry.getKey());
      for(Entry<CmpVertex,PAIRCOMPATIBILITY> associations:entry.getValue().entrySet())
        if (!rowsProcessed.contains(associations.getKey()))
        {
          Label label = new StringLabel(associationPrefix+associations.getValue().name());
          if (alphabet.contains(label))
            throw new IllegalArgumentException("cannot use label "+label);

          result.addTransition(result.transitionMatrix.get(entry.getKey()), label, associations.getKey());
          result.addTransition(result.transitionMatrix.get(associations.getKey()), label, entry.getKey());
View Full Code Here

  {
    Label result = null;
    switch(config.getLabelKind())
    {
    case LABEL_STRING:
      result = new StringLabel(label);
      break;
    case LABEL_ERLANG:
      result = ErlangLabel.erlangObjectToLabel(ErlangLabel.parseText(label),config);
      break;
    case LABEL_ABSTRACT:
View Full Code Here

  {
    Label result = null;
    switch(config.getLabelKind())
    {
    case LABEL_STRING:
      result = new StringLabel("L"+Integer.toString(number));// this is necessary if I subsequently choose to use these labels in regular expressions, in which case I would not know whether "1" means "anything" or "label 1".
      break;
    default:
      throw new IllegalArgumentException("No parser available for traces of type "+config.getLabelKind());
    }
    if (conv != null)
View Full Code Here

     
      protected Label copyVertexWithPrefix(String prefix, Label origLabel)
      {
        Label result = null;
        if (origLabel instanceof StringLabel)
          result = new StringLabel(prefix+origLabel);
        else
        if (origLabel instanceof ErlangLabel)
        {
          ErlangLabel oErl = (ErlangLabel)origLabel;
          result = new ErlangLabel(oErl.function,prefix+oErl.callName,
View Full Code Here

          }
         
        }
        if(!found){
          System.out.println("not found: "+methodStack.peek().method().getSignature()+ "->"+ toMethod.method().getSignature());
          from = new StringLabel(methodToString.get(methodStack.peek()));
          return new Pair<Integer,String>(i,null);
        }
      }
      methodStack.push(toMethod);
    }
View Full Code Here

    computeDifference(new PatchGraph() {
      protected Label copyVertexWithPrefix(String prefix, Label origLabel)
      {
        Label result = null;
        if (origLabel instanceof StringLabel)
          result = new StringLabel(prefix+origLabel);
        else
        if (origLabel instanceof ErlangLabel)
        {
          ErlangLabel oErl = (ErlangLabel)origLabel;
          result = new ErlangLabel(oErl.function,prefix+oErl.callName,
View Full Code Here

TOP

Related Classes of statechum.StringLabel

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.