Package org.eclipse.imp.pdb.facts

Examples of org.eclipse.imp.pdb.facts.IListWriter.done()


    if (obj instanceof List) {
      IListWriter w = vf.listWriter();
      for (Object k: (List)obj) {
        w.append(convertToIValue(k))
      }
      return vf.constructor(JSON_array, w.done());
    }
    if (obj instanceof Double) {
      return vf.constructor(JSON_null);
     
    }
View Full Code Here


          else {
            for (Type field : type.getFieldTypes()) {
              w.append(field.accept(this));
            }
          }
          result = vf.constructor(Factory.Symbol_Cons, vf.constructor(Factory.Symbol_Label, vf.string(type.getName()), adt), w.done());
          cache.put(type, result);
        }
       
        return result;
      }
View Full Code Here

            for (Type param : params) {
              w.append(param.accept(this));
            }
          }
         
          sym = vf.constructor(Factory.Symbol_Adt, vf.string(type.getName()), w.done());
          cache.put(type, sym);     

          // make sure to find the type by the uninstantiated adt
          Type adt = typeStore.lookupAbstractDataType(type.getName());
          for (Type cons : typeStore.lookupAlternatives(adt)) {
View Full Code Here

          for (Type f : type) {
            w.append(f.accept(this));
          }
        }

        return vf.constructor(Factory.Symbol_Tuple, w.done());
      }

      @Override
      public IValue visitValue(Type type) {
        return vf.constructor(Factory.Symbol_Value);
View Full Code Here

        IListWriter w = vf.listWriter();
        for (Type arg : externalType.getArgumentTypes()) {
          w.append(arg.accept(this));
        }
       
        return vf.constructor(Factory.Symbol_Func, externalType.getReturnType().accept(this), w.done());
      }

      private IValue visitReifiedType(ReifiedType externalType) {
        return vf.constructor(Factory.Symbol_ReifiedType, externalType.getTypeParameters().getFieldType(0).accept(this));
      }
View Full Code Here

    IListWriter w = values.listWriter(listType.getElementType());
    int n = m.getColumnDimension();
    for(int i = 0; i < n; i++){
      w.append(values.real(m.getEntry(i,0)));
    }
    return w.done();
  }
 
  public IValue PearsonsCorrelationStandardErrors(IList dataValues){
    make(dataValues);
    RealMatrix errors = new org.apache.commons.math.stat.correlation.PearsonsCorrelation(xyvalues).getCorrelationStandardErrors();
View Full Code Here

    IListWriter parameters = values.listWriter();
    for (ITypeBinding parameterType: bindings) {
      IConstructor arg = resolveType(parameterType, isDeclaration);
        parameters.append(arg);
    }
    return parameters.done();
  }

  private org.eclipse.imp.pdb.facts.type.Type getTypeSymbol() {
    if (typeSymbol == null) {
      typeSymbol = store.lookupAbstractDataType("TypeSymbol");
View Full Code Here

      lub = lub.lub(actuals[j].getType());
    }
   
    IListWriter list = vf.listWriter();
    list.insertAt(0, actuals, i, actuals.length - arity + 1);
    newActuals[i] = list.done();
    return newActuals;
  }
 
  protected Type computeVarArgsActualTypes(Type actualTypes, Type formals) {
    if (actualTypes.isSubtypeOf(formals)) {
View Full Code Here

    ISourceLocation location = getLocation();
   
    if (location != null) {
      java.util.Map<String,IValue> annos = new HashMap<String,IValue>();
      annos.put("loc", location);
      return makeResult(type, eval.getValueFactory().constructor(Factory.Tree_Appl, annos, production, w.done()), eval);
    }
    else {
      return makeResult(type, eval.getValueFactory().constructor(Factory.Tree_Appl, production, w.done()), eval);
    }
  }
View Full Code Here

      java.util.Map<String,IValue> annos = new HashMap<String,IValue>();
      annos.put("loc", location);
      return makeResult(type, eval.getValueFactory().constructor(Factory.Tree_Appl, annos, production, w.done()), eval);
    }
    else {
      return makeResult(type, eval.getValueFactory().constructor(Factory.Tree_Appl, production, w.done()), eval);
    }
  }
 
  @Override
  public IBooleanResult buildBacktracker(IEvaluatorContext eval) {
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.