Package org.rascalmpl.library.cobra

Examples of org.rascalmpl.library.cobra.RandomType


    return vf.tuple(elems);
  }

  @Override
  public IValue visitValue(Type type) {
    RandomType rt = new RandomType();
    return this.generate(rt.getType(maxDepth));
  }
View Full Code Here


 
  @Test
  public void testLubAndGlb() {
    Set<Type> types = new HashSet<Type>();
   
    RandomType rg = new RandomType();
    rg.plusRascalTypes(true);
   
    for(int i = 0; i <= 1000; i++) {
      types.add(rg.getFunctionType(2));
      types.add(rg.getReifiedType(5));
      types.add(rg.getOverloadedFunctionType(2));
    }
   
    for (Type t : types) {
      if (t.lub(t) != t) {
        fail("lub should be idempotent: " + t + " != " + t.lub(t));
View Full Code Here

TOP

Related Classes of org.rascalmpl.library.cobra.RandomType

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.