Package statechum.analysis.learning.rpnicore.LabelRepresentation

Examples of statechum.analysis.learning.rpnicore.LabelRepresentation.AbstractState


    List<String> decls = new LinkedList<String>();decls.addAll(declsForTestsOfAbstractStates);
    decls.add(QSMTool.cmdOperation+" "+"A"+" "+LabelRepresentation.OP_DATA.PRE+ " somePrecondA"+_M);
    lbls.parseCollection(decls);
    lbls.buildVertexToAbstractStateMap(new LearnerGraph(FsmParser.buildGraph("stA-A->stB-B->stC-A->stD", "testCreateConjunction1"), Configuration.getDefaultConfiguration()),null,true);
    int number0 = 10,number1=15,number2=20;
    AbstractState stateInit = lbls.new AbstractState(AbstractLearnerGraph.generateNewCmpVertex(VertexID.parseID("Init"),config),number0);
    AbstractState stateAfterA = lbls.new AbstractState(AbstractLearnerGraph.generateNewCmpVertex(VertexID.parseID("AfterA"),config),stateInit,lbls.labelMapFinal.get("A"),null,number1);
    AbstractState stateAfterB = lbls.new AbstractState(AbstractLearnerGraph.generateNewCmpVertex(VertexID.parseID("AfterB"),config),stateAfterA,lbls.labelMapFinal.get("B"),null,number2);
    Assert.assertEquals("varDeclP"+__P+number0+" varDeclQ"+__P+number0+ENDL+
        "varDeclP"+__P+number1+" varDeclQ"+__P+number1+ENDL+
        "varDeclP"+__P+number2+" varDeclQ"+__P+number2,stateAfterB.variableDeclarations);

    Assert.assertEquals(LabelRepresentation.commentForInit+ENDL+
View Full Code Here


  {
    LabelRepresentation lbls = new LabelRepresentation();
    lbls.parseCollection(declsForTestsOfAbstractStates);
    lbls.buildVertexToAbstractStateMap(new LearnerGraph(FsmParser.buildGraph("stA-A->stB-B->stC-A->stD", "testCreateConjunction1"), Configuration.getDefaultConfiguration()),null,true);
    int number0 = 10,number1=15,number2=20;
    AbstractState stateInit = lbls.new AbstractState(AbstractLearnerGraph.generateNewCmpVertex(VertexID.parseID("Init"),config),number0);
    AbstractState stateAfterA = lbls.new AbstractState(AbstractLearnerGraph.generateNewCmpVertex(VertexID.parseID("AfterA"),config),stateInit,lbls.labelMapFinal.get("A"),lbls.labelMapFinal.get("IO1").post,number1);
    AbstractState stateAfterB = lbls.new AbstractState(AbstractLearnerGraph.generateNewCmpVertex(VertexID.parseID("AfterB"),config),stateAfterA,lbls.labelMapFinal.get("B"),lbls.labelMapFinal.get("IO2").post,number2);
    Assert.assertEquals("varDeclP"+__P+number0+" varDeclQ"+__P+number0+ENDL+
        "varDeclP"+__P+number1+" varDeclQ"+__P+number1+ENDL+
        "varDeclP"+__P+number2+" varDeclQ"+__P+number2,stateAfterB.variableDeclarations);

    Assert.assertEquals(LabelRepresentation.commentForInit+ENDL+
View Full Code Here

    final LabelRepresentation lbls = new LabelRepresentation();
    lbls.parseCollection(declsForTestsOfAbstractStates);
    lbls.buildVertexToAbstractStateMap(new LearnerGraph(FsmParser.buildGraph("stA-A->stB-B->stC-A->stD", "testCreateConjunction1"), Configuration.getDefaultConfiguration()),null,true);
   
    Helper.checkForCorrectException(new whatToRun() { public @Override void run() {
      lbls.new AbstractState(AbstractLearnerGraph.generateNewCmpVertex(VertexID.parseID("AfterA"),config),null,lbls.labelMapFinal.get("A"),lbls.labelMapFinal.get("IO1").post,7);
    }},IllegalArgumentException.class, "previous state");
  }
View Full Code Here

    final LabelRepresentation lbls = new LabelRepresentation();
    lbls.parseCollection(declsForTestsOfAbstractStates);
    lbls.buildVertexToAbstractStateMap(new LearnerGraph(FsmParser.buildGraph("stA-A->stB-B->stC-A->stD", "testCreateConjunction1"), Configuration.getDefaultConfiguration()),null,true);
   
    Helper.checkForCorrectException(new whatToRun() { public @Override void run() {
      AbstractState stateInit = lbls.new AbstractState(AbstractLearnerGraph.generateNewCmpVertex(VertexID.parseID("Init"),config),6);
      lbls.new AbstractState(AbstractLearnerGraph.generateNewCmpVertex(VertexID.parseID("AfterA"),config),stateInit,null,null,7);
    }},IllegalArgumentException.class, "previous state");
  }
View Full Code Here

    final LabelRepresentation lbls = new LabelRepresentation();
    lbls.parseCollection(declsForTestsOfAbstractStates);
    lbls.buildVertexToAbstractStateMap(new LearnerGraph(FsmParser.buildGraph("stA-A->stB-B->stC-A->stD", "testCreateConjunction1"), Configuration.getDefaultConfiguration()),null,true);
   
    Helper.checkForCorrectException(new whatToRun() { public @Override void run() {
      AbstractState stateInit = lbls.new AbstractState(AbstractLearnerGraph.generateNewCmpVertex(VertexID.parseID("Init"),config),6);
      lbls.new AbstractState(AbstractLearnerGraph.generateNewCmpVertex(VertexID.parseID("AfterA"),config),stateInit,null,lbls.labelMapFinal.get("IO1").post,7);
    }},IllegalArgumentException.class, "previous state");
  }
View Full Code Here

    @Test
    public final void testBuildVertexToAbstractStateMapConsistency_fail2()
    {
      CmpVertex newState = AbstractLearnerGraph.generateNewCmpVertex(graph.nextID(false), graph.config);
      // now add an abstract state to it.
      Collection<AbstractState> newAbstractStates = new LinkedList<AbstractState>();newAbstractStates.add(lbls.new AbstractState(newState,99));
      graph.getVertexToAbstractState().put(newState,newAbstractStates);
     
      Helper.checkForCorrectException(new whatToRun() { public @Override void run() {
        lbls.buildVertexToAbstractStateMap(graph, null,true);
      }},IllegalArgumentException.class,"do not feature");
View Full Code Here

TOP

Related Classes of statechum.analysis.learning.rpnicore.LabelRepresentation.AbstractState

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.