Package org.ggp.base.util.gdl.grammar

Examples of org.ggp.base.util.gdl.grammar.GdlTerm


      throw new IllegalStateException ("Something is very wrong, probably fixable by the GdlCleaner; name: " + name + "; arity: " + arity + "; tupleSize: " + tupleSize);
    }
    List<GdlTerm> sentenceBody = Lists.newArrayList();
    int curIndex = 0;
    for (int i = 0; i < arity; i++) {
      GdlTerm term = tuple.get(curIndex);
      Preconditions.checkArgument(!(term instanceof GdlFunction));
      if (functions.containsKey(i)) {
        SimpleSentenceForm functionForm = functions.get(i);
        sentenceBody.add(functionForm.getFunctionFromTuple(tuple, curIndex));
        curIndex += functionForm.getTupleSize();
View Full Code Here


  private GdlFunction getFunctionFromTuple(List<? extends GdlTerm> tuple,
      int curIndex) {
    List<GdlTerm> functionBody = Lists.newArrayList();
    for (int i = 0; i < arity; i++) {
      GdlTerm term = tuple.get(curIndex);
      Preconditions.checkArgument(!(term instanceof GdlFunction));
      if (functions.containsKey(i)) {
        SimpleSentenceForm functionForm = functions.get(i);
        functionBody.add(functionForm.getFunctionFromTuple(tuple, curIndex));
        curIndex += functionForm.getTupleSize();
View Full Code Here

    {
      return distinct;
    }
    else
    {
      GdlTerm arg1 = renameTerm(distinct.getArg1(), renamings);
      GdlTerm arg2 = renameTerm(distinct.getArg2(), renamings);

      return GdlPool.getDistinct(arg1, arg2);
    }
  }
View Full Code Here

TOP

Related Classes of org.ggp.base.util.gdl.grammar.GdlTerm

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.