Package statechum.analysis.learning.smt.SmtLabelRepresentation

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


    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

  {
    SmtLabelRepresentation lbls = new SmtLabelRepresentation(config,converter);
    lbls.parseCollection(declsForTestsOfAbstractStates);
    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)),
        lbls.labelMapFinal.get(AbstractLearnerGraph.generateNewLabel("IO1",lbls.config,lbls.converter)).post,number1);
    AbstractState stateAfterB = lbls.new AbstractState(AbstractLearnerGraph.generateNewCmpVertex(VertexID.parseID("AfterB"),config),stateAfterA,
        lbls.labelMapFinal.get(AbstractLearnerGraph.generateNewLabel("B",lbls.config,lbls.converter)),
        lbls.labelMapFinal.get(AbstractLearnerGraph.generateNewLabel("IO2",lbls.config,lbls.converter)).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);
View Full Code Here

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

    lbls.parseCollection(declsForTestsOfAbstractStates);
    lbls.buildVertexToAbstractStateMap(buildLearnerGraph("stA-A->stB-B->stC-A->stD", "testCreateConjunction1", config,converter),null,true);
   
    Helper.checkForCorrectException(new whatToRun() { @SuppressWarnings("unused")
    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

    lbls.parseCollection(declsForTestsOfAbstractStates);
    lbls.buildVertexToAbstractStateMap(buildLearnerGraph("stA-A->stB-B->stC-A->stD", "testCreateConjunction1", config,converter),null,true);
   
    Helper.checkForCorrectException(new whatToRun() { @SuppressWarnings("unused")
    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(AbstractLearnerGraph.generateNewLabel("IO1",lbls.config,lbls.converter)).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

    @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

      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", 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(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

    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", 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(AbstractLearnerGraph.generateNewLabel("A",lbls.config)),null,number1);
    AbstractState stateAfterB = lbls.new AbstractState(AbstractLearnerGraph.generateNewCmpVertex(VertexID.parseID("AfterB"),config),stateAfterA,
        lbls.labelMapFinal.get(AbstractLearnerGraph.generateNewLabel("B",lbls.config)),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

Related Classes of statechum.analysis.learning.smt.SmtLabelRepresentation.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.