Package org.ggp.base.util.propnet.architecture.components

Examples of org.ggp.base.util.propnet.architecture.components.Transition


  {
    if ( sentence.getName().getValue().equals("next") )
    {
      Proposition head = getProposition(GdlPool.getRelation(GdlPool.getConstant("true"),
                                                            sentence.getBody()));
      Transition transition = new Transition();
      Proposition preTransition = new Proposition(GdlPool.getProposition(GdlPool.getConstant("anon")));

      link(preTransition, transition);
      link(transition, head);
View Full Code Here


  private void convertStatic(GdlSentence sentence)
  {
    if ( sentence.getName().getValue().equals("init") )
    {
      Proposition init = getProposition(GdlPool.getProposition(GdlPool.getConstant("INIT")));
      Transition transition = new Transition();
      Proposition proposition = getProposition(GdlPool.getRelation(GdlPool.getConstant("true"),
                                                                   sentence.getBody()));

      link(init, transition);
      link(transition, proposition);
View Full Code Here

        //told us so). If that's the case, don't have a transition.
        if(trueComponent == null) {
            // Skipping transition to supposedly impossible 'trueSentence'
            continue;
        }
        Transition transition = new Transition();
        transition.addInput(nextComponent);
        nextComponent.addOutput(transition);
        transition.addOutput(trueComponent);
        trueComponent.addInput(transition);
      }
    }
  }
View Full Code Here

          //System.out.println("True sentence from init: " + trueSentence);
          Component trueSentenceComponent = components.get(trueSentence);
          if(trueSentenceComponent.getInputs().isEmpty()) {
            //Case where there is no transition input
            //Add the transition input, connect to init, continue loop
            Transition transition = new Transition();
            //init goes into transition
            transition.addInput(initProposition);
            initProposition.addOutput(transition);
            //transition goes into component
            trueSentenceComponent.addInput(transition);
            transition.addOutput(trueSentenceComponent);
          } else {
            //The transition already exists
            Component transition = trueSentenceComponent.getSingleInput();

            //We want to add init as a thing that precedes the transition
            //Disconnect existing input
            Component input = transition.getSingleInput();
            //input and init go into or, or goes into transition
            input.removeOutput(transition);
            transition.removeInput(input);
            List<Component> orInputs = new ArrayList<Component>(2);
            orInputs.add(input);
            orInputs.add(initProposition);
            orify(orInputs, transition, falseComponent);
          }
View Full Code Here

TOP

Related Classes of org.ggp.base.util.propnet.architecture.components.Transition

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.