Examples of AbstractState


Examples of com.clearnlp.component.state.AbstractState

      UTArray.shuffle(rand, indices);
      algorithm.updateWeights(s_model, indices);
     
      for (DEPTree tree : devTrees)
      {
        AbstractState state = process(tree, FLAG_DEVELOP, null);
        goldLabels = (String[])state.getGoldLabels();
        eval.countAccuracy(tree, goldLabels);
        tree.setPOSTags((String[])goldLabels);
      }
     
      System.out.printf("%2d: %s\n", iter++, eval.toString());
View Full Code Here

Examples of org.jakstab.analysis.AbstractState

        // If any under-approximate component is not BOT, then we have a witness
        // and this is a MUST edge.
        DualCompositeState dcs = (DualCompositeState)a;
        for (int i = 0; i < dcs.numComponents(); i++) {
          AbstractState componentState = dcs.getComponent(i);
          if (componentState instanceof UnderApproximateState &&
              !componentState.isBot()) {
            edgeKind = Kind.MUST;
            break;
          }
        }
View Full Code Here

Examples of org.jamesii.core.model.AbstractState

  public void instrumentModel(IModel model,
      IComputationTaskConfiguration simConfig) {

    ICoupledModel m = (ICoupledModel) model;

    AbstractState mapState = ((IAtomicModel<?>) m.getModel("Map")).getState();

    mapState.setMediator(new Mediator());

    // System.out.println("Instrumenting the model");

    IObserver<? extends IObservable> obs = null;

    obs = new FFStateModelObs(model);

    if (obs == null) {
      return;
    }

    mapState.registerObserver(obs);
    observers = new ArrayList<>();
    // observers.clear();
    observers.add(obs);
  }
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

    lbls.parseLabel(INITMEM+" "+LabelRepresentation.XM_DATA.PRE+ " decl_N");
    lbls.parseLabel("A"+" "+LabelRepresentation.XM_DATA.PRE+ " somePrecondA");
    lbls.parseLabel("A"+" "+LabelRepresentation.XM_DATA.POST+ " somePostcondA");
    lbls.parseLabel("B"+" "+LabelRepresentation.XM_DATA.PRE+ " somePrecondB");
    lbls.parseLabel("B"+" "+LabelRepresentation.XM_DATA.POST+ " somePostcondB");
    AbstractState state = lbls.getConjunctionForPath(Arrays.asList(new String[]{}));
    Assert.assertEquals("varDecl_0"+ENDL+"decl_0"+ENDL,state.variableDeclarations);
    Assert.assertEquals(LabelRepresentation.commentForNewSeq+"[]"+ENDL+"true"+ENDL, state.abstractState);
    Assert.assertEquals(0,state.stateNumber);
    Assert.assertNull(state.lastLabel);
  }
View Full Code Here

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

    lbls.parseLabel(INITMEM+" "+LabelRepresentation.XM_DATA.POST+ " initCond_N");
    lbls.parseLabel("A"+" "+LabelRepresentation.XM_DATA.PRE+ " somePrecondA");
    lbls.parseLabel("A"+" "+LabelRepresentation.XM_DATA.POST+ " somePostcondA");
    lbls.parseLabel("B"+" "+LabelRepresentation.XM_DATA.PRE+ " somePrecondB");
    lbls.parseLabel("B"+" "+LabelRepresentation.XM_DATA.POST+ " somePostcondB");
    AbstractState state = lbls.getConjunctionForPath(Arrays.asList(new String[]{}));
    Assert.assertEquals("varDecl_0"+ENDL,state.variableDeclarations);
    Assert.assertEquals(LabelRepresentation.commentForNewSeq+"[]"+ENDL+"(and"+ENDL+"initCond_0"+ENDL+')'+ENDL,state.abstractState);
    Assert.assertEquals(0,state.stateNumber);
    Assert.assertNull(state.lastLabel);
  }
View Full Code Here

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

    lbls.parseLabel(INITMEM+" "+LabelRepresentation.XM_DATA.POST+ " initCond_N");
    lbls.parseLabel("A"+" "+LabelRepresentation.XM_DATA.PRE+ " somePrecondA_N");
    lbls.parseLabel("A"+" "+LabelRepresentation.XM_DATA.POST+ " somePostcondA_N");
    lbls.parseLabel("B"+" "+LabelRepresentation.XM_DATA.PRE+ " somePrecondB_N");
    lbls.parseLabel("B"+" "+LabelRepresentation.XM_DATA.POST+ " somePostcondB_N");
    AbstractState state = lbls.getConjunctionForPath(Arrays.asList(new String[]{"A","B"}));
    Assert.assertEquals("varDeclP_0"+ENDL+"varDeclQ_0"+ENDL+
        "varDeclP_1"+ENDL+"varDeclQ_1"+ENDL+
        "varDeclP_2"+ENDL+"varDeclQ_2"+ENDL,state.variableDeclarations);

    Assert.assertEquals(LabelRepresentation.commentForNewSeq+"[A, B]"+ENDL+
View Full Code Here

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

    lbls.parseLabel(INITMEM+" "+LabelRepresentation.XM_DATA.PRE+ " varDeclP_N");
    lbls.parseLabel(INITMEM+" "+LabelRepresentation.XM_DATA.PRE+ " varDeclQ_N");
    lbls.parseLabel("A"+" "+LabelRepresentation.XM_DATA.PRE+ " somePrecondA_N");
    lbls.parseLabel("B"+" "+LabelRepresentation.XM_DATA.PRE+ " somePrecondB_N");
    lbls.parseLabel("B"+" "+LabelRepresentation.XM_DATA.POST+ " somePostcondB_N");
    AbstractState state = lbls.getConjunctionForPath(Arrays.asList(new String[]{"A","B"}));
    Assert.assertEquals("varDeclP_0"+ENDL+"varDeclQ_0"+ENDL+
        "varDeclP_1"+ENDL+"varDeclQ_1"+ENDL+
        "varDeclP_2"+ENDL+"varDeclQ_2"+ENDL, state.variableDeclarations);

    Assert.assertEquals(LabelRepresentation.commentForNewSeq+"[A, B]"+ENDL+
View Full Code Here

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

  /** Tests that creation of successive conjunctions returns the correct numbers for abstract states. */
  @Test
  public void testCreateConjunction3()
  {
    LabelRepresentation lbls = testCreateConjunction2_internal();
    AbstractState state = lbls.getConjunctionForPath(Arrays.asList(new String[]{"A","B"}));
    Assert.assertEquals("varDeclP_3"+ENDL+"varDeclQ_3"+ENDL+
        "varDeclP_4"+ENDL+"varDeclQ_4"+ENDL+
        "varDeclP_5"+ENDL+"varDeclQ_5"+ENDL, state.variableDeclarations);

    Assert.assertEquals(LabelRepresentation.commentForNewSeq+"[A, B]"+ENDL+
View Full Code Here

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

    lbls.parseLabel("b"+" "+LabelRepresentation.XM_DATA.POST+ " somePostcondB_N");

    lbls.AugmentAbstractStates(null,Arrays.asList(new String[]{}), graph,true);// initial state
    Assert.assertEquals(1,lbls.idToState.size());
    Assert.assertTrue(lbls.idToState.containsKey(VertexID.parseID("A")));
    AbstractState stateInit = lbls.idToState.get(VertexID.parseID("A"));
   
    lbls.AugmentAbstractStates(null,Arrays.asList(new String[]{}), graph,true);// and again
    Assert.assertEquals(1,lbls.idToState.size());
    Assert.assertTrue(lbls.idToState.containsKey(VertexID.parseID("A")));
    Assert.assertSame(stateInit,lbls.idToState.get(VertexID.parseID("A")));
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.