Examples of AbstractState


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

    lbls.parseLabel("remove"+" "+LabelRepresentation.XM_DATA.POST+ " (= m_N (- m_M 1))");
    Smt.loadLibrary();
    Smt.closeStdOut();
    Smt smt = new Smt();

    AbstractState state = null;
    smt.pushContext();
    state = lbls.getConjunctionForPath(Arrays.asList(new String[]{"remove"}));
    smt.loadData(LabelRepresentation.getAssertionFromAbstractState(state));
    Assert.assertFalse(smt.check());
    smt.popContext();
View Full Code Here

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

        Iterator<AbstractState>
          stateA_iter = graph.getVertexToAbstractState().get(pair.firstElem).iterator(),
          stateB_iter = graph.getVertexToAbstractState().get(pair.secondElem).iterator();
        while(stateA_iter.hasNext() && !finished)
        {
          AbstractState stateA = stateA_iter.next();
          while(stateB_iter.hasNext() && !finished)
            if (lbl.abstractStatesCompatible(stateA, stateB_iter.next()))
            {
              finished = true;statesIntersect = true;
            }
View Full Code Here

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

      QSMTool.cmdOperation+" "+"A"+" "+LabelRepresentation.OP_DATA.PRE+ " somePrecondA",
      QSMTool.cmdOperation+" "+"A"+" "+LabelRepresentation.OP_DATA.POST+ " somePostcondA",
      QSMTool.cmdOperation+" "+"B"+" "+LabelRepresentation.OP_DATA.PRE+ " somePrecondB",
      QSMTool.cmdOperation+" "+"B"+" "+LabelRepresentation.OP_DATA.POST+ " somePostcondB"}));
    lbls.buildVertexToAbstractStateMap(new LearnerGraph(FsmParser.buildGraph("stA-A->stB-B->stC-A->stD", "testCreateConjunction1"), Configuration.getDefaultConfiguration()),null,true);
    AbstractState state = lbls.new AbstractState(AbstractLearnerGraph.generateNewCmpVertex(VertexID.parseID("P"),config),0);
    Assert.assertEquals("varDecl"+__P+"0",state.variableDeclarations);
    Assert.assertEquals(LabelRepresentation.commentForInit+ENDL+"initCond"+__P+"0",state.abstractState);
    Assert.assertNull(state.lastLabel);
    Assert.assertNull(state.previousState);
    Assert.assertEquals(0,state.stateNumber);
View Full Code Here

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

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

  {
    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

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

    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

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

    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

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

    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

Examples of statechum.analysis.learning.smt.SmtLabelRepresentation.AbstractState

      QSMTool.cmdOperation+" "+"A"+" "+SmtLabelRepresentation.OP_DATA.PRE+ " somePrecondA",
      QSMTool.cmdOperation+" "+"A"+" "+SmtLabelRepresentation.OP_DATA.POST+ " somePostcondA",
      QSMTool.cmdOperation+" "+"B"+" "+SmtLabelRepresentation.OP_DATA.PRE+ " somePrecondB",
      QSMTool.cmdOperation+" "+"B"+" "+SmtLabelRepresentation.OP_DATA.POST+ " somePostcondB"}));
    lbls.buildVertexToAbstractStateMap(buildLearnerGraph("stA-A->stB-B->stC-A->stD", "testCreateConjunction1", config,converter),null,true);
    AbstractState state = lbls.new AbstractState(AbstractLearnerGraph.generateNewCmpVertex(VertexID.parseID("P"),config),0);
    Assert.assertEquals("varDecl"+__P+"0",state.variableDeclarations);
    Assert.assertEquals(SmtLabelRepresentation.commentForInit+ENDL+"initCond"+__P+"0",state.abstractState);
    Assert.assertNull(state.lastLabel);
    Assert.assertNull(state.previousState);
    Assert.assertEquals(0,state.stateNumber);
View Full Code Here

Examples of statechum.analysis.learning.smt.SmtLabelRepresentation.AbstractState

    List<String> decls = new LinkedList<String>();decls.addAll(declsForTestsOfAbstractStates);
    decls.add(QSMTool.cmdOperation+" "+"A"+" "+SmtLabelRepresentation.OP_DATA.PRE+ " somePrecondA"+_M);
    lbls.parseCollection(decls);
    lbls.buildVertexToAbstractStateMap(buildLearnerGraph("stA-A->stB-B->stC-A->stD", "testCreateConjunction1", config,converter),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(AbstractLearnerGraph.generateNewLabel("A",lbls.config,lbls.converter)),null,number1);
    AbstractState stateAfterB = lbls.new AbstractState(AbstractLearnerGraph.generateNewCmpVertex(VertexID.parseID("AfterB"),config),stateAfterA,
        lbls.labelMapFinal.get(AbstractLearnerGraph.generateNewLabel("B",lbls.config,lbls.converter)),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);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.