Examples of Smt


Examples of statechum.analysis.learning.Smt

  @Test
  public final void testAugmentFailure3()
  {
    final LabelRepresentation lbls = simpleLabel();
    final LearnerGraph graph = new LearnerGraph(config);
    Smt.loadLibrary();Smt.closeStdOut();final Smt smt = new Smt();

    final List<String> sequence = Arrays.asList(new String[]{"remove"});
    graph.paths.augmentPTA(sequence,false, false, null);
   
    lbls.AugmentAbstractStates(smt,sequence, graph,false);
View Full Code Here

Examples of statechum.analysis.learning.Smt

  @Test
  public final void testAugmentFailure4()
  {
    final LabelRepresentation lbls = simpleLabel();
    final LearnerGraph graph = new LearnerGraph(config);
    Smt.loadLibrary();Smt.closeStdOut();final Smt smt = new Smt();

    final List<String> sequence = Arrays.asList(new String[]{"remove"});
   
    graph.paths.augmentPTA(sequence,true, false, null);
    Helper.checkForCorrectException(new whatToRun() { public void run() {
View Full Code Here

Examples of statechum.analysis.learning.Smt

  @Test
  public final void testAugmentFailure5()
  {
    final LabelRepresentation lbls = simpleLabel();
    final LearnerGraph graph = new LearnerGraph(config);
    Smt.loadLibrary();Smt.closeStdOut();final Smt smt = new Smt();

    final List<String> sequence = Arrays.asList(new String[]{"add","remove","remove"});
   
    graph.paths.augmentPTA(sequence,false, false, null);
    lbls.AugmentAbstractStates(smt,sequence, graph,false);
View Full Code Here

Examples of statechum.analysis.learning.Smt

  @Test
  public final void testAugmentFailure6()
  {
    final LabelRepresentation lbls = simpleLabel();
    final LearnerGraph graph = new LearnerGraph(config);
    Smt.loadLibrary();Smt.closeStdOut();final Smt smt = new Smt();

    final List<String> sequence = Arrays.asList(new String[]{"add","remove","remove"});
   
    graph.paths.augmentPTA(sequence,true, false, null);
    Helper.checkForCorrectException(new whatToRun() { public void run() {
View Full Code Here

Examples of statechum.analysis.learning.Smt

  @Test
  public final void testAugment7()
  {
    final LabelRepresentation lbls = simpleLabel();
    final LearnerGraph graph = new LearnerGraph(config);
    Smt.loadLibrary();Smt.closeStdOut();final Smt smt = new Smt();

    final List<String> sequence = Arrays.asList(new String[]{"add","remove","add"});
   
    graph.paths.augmentPTA(sequence,true, false, null);
    lbls.AugmentAbstractStates(smt,sequence, graph,true);
View Full Code Here

Examples of statechum.analysis.learning.Smt

    lbls.parseLabel("add"+" "+LabelRepresentation.XM_DATA.POST+ " (= m_N (+ m_M 1))");
    lbls.parseLabel("remove"+" "+LabelRepresentation.XM_DATA.PRE+ " (> m_N 0)");
    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();

    smt.pushContext();
    state = lbls.getConjunctionForPath(Arrays.asList(new String[]{}));
    smt.loadData(LabelRepresentation.getAssertionFromAbstractState(state));
    Assert.assertTrue(smt.check());
    smt.popContext();

    smt.pushContext();
    state = lbls.getConjunctionForPath(Arrays.asList(new String[]{"add","remove"}));
    smt.loadData(LabelRepresentation.getAssertionFromAbstractState(state));
    Assert.assertTrue(smt.check());
    smt.popContext();


    smt.pushContext();
    state = lbls.getConjunctionForPath(Arrays.asList(new String[]{"add","remove","remove"}));
    smt.loadData(LabelRepresentation.getAssertionFromAbstractState(state));
    Assert.assertFalse(smt.check());
    smt.popContext();

    Smt.reopenStdOut();
  }
View Full Code Here

Examples of statechum.analysis.learning.Smt

    LearnerGraph graph = new LearnerGraph(TestFSMAlgo.buildGraph("A-add->B-add->C-add->D\nB-remove->E-add->F","testUpdateScore"), config);
    lbls.mapVerticesToAbstractStates(graph);
   
    Smt.loadLibrary();
    Smt.closeStdOut();
    Smt smt = new Smt();
    lbls.checkAllStatesExist(smt);
  }
View Full Code Here

Examples of statechum.analysis.learning.Smt

    LearnerGraph graph = new LearnerGraph(TestFSMAlgo.buildGraph("A-add->B\nA-remove->S","testAbstractStateSatisfiability2"), config);
    lbls.mapVerticesToAbstractStates(graph);
   
    Smt.loadLibrary();
    Smt.closeStdOut();
    final Smt smt = new Smt();
    Helper.checkForCorrectException(new whatToRun() { public void run() {
      lbls.checkAllStatesExist(smt);
    }},IllegalArgumentException.class,"has an unsatisfiable abstract state");
  }
View Full Code Here

Examples of statechum.analysis.learning.Smt

    LearnerGraph graph = new LearnerGraph(TestFSMAlgo.buildGraph("A-add->B-add->C-add->D\nB-remove->E-add->F","testUpdateScore"), config);
    lbls.mapVerticesToAbstractStates(graph);
   
    Smt.loadLibrary();
    Smt.closeStdOut();
    Smt smt = new Smt();
   
    lbls.checkAllStatesExist(smt);
    Assert.assertTrue(lbls.abstractStatesCompatible(smt, VertexID.parseID("A"), VertexID.parseID("A")));
    Assert.assertFalse(lbls.abstractStatesCompatible(smt, VertexID.parseID("A"), VertexID.parseID("B")));
    Assert.assertFalse(lbls.abstractStatesCompatible(smt, VertexID.parseID("B"), VertexID.parseID("A")));
View Full Code Here

Examples of statechum.analysis.learning.Smt

    LearnerGraph graph = new LearnerGraph(TestFSMAlgo.buildGraph("A-add->B","testUpdateScore"), config);
    lbls.mapVerticesToAbstractStates(graph);
   
    Smt.loadLibrary();
    Smt.closeStdOut();
    Smt smt = new Smt();
   
    Assert.assertEquals(AbstractOracle.USER_ACCEPTED,lbls.CheckWithEndUser(smt, graph, Arrays.asList(new String[]{})));
    Assert.assertEquals(0,lbls.CheckWithEndUser(smt, graph, Arrays.asList(new String[]{"remove"})));
    Assert.assertEquals(AbstractOracle.USER_ACCEPTED,lbls.CheckWithEndUser(smt, graph, Arrays.asList(new String[]{"add"})));
    Assert.assertEquals(AbstractOracle.USER_ACCEPTED,lbls.CheckWithEndUser(smt, graph, Arrays.asList(new String[]{"add","remove"})));
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.