Skip to content
Snippets Groups Projects
Commit 7dabf490 authored by Etienne Kneuss's avatar Etienne Kneuss
Browse files

Get more tests if they are easy to get

parent 39cc4dc9
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,7 @@ case object CEGIS extends CEGISLike[TypeTree]("CEGIS") {
def getParams(sctx: SynthesisContext, p: Problem) = {
import ExpressionGrammars._
CegisParams(
grammar = depthBound(default(sctx, p), 2),
grammar = depthBound(default(sctx, p), 2), // This limits type depth
rootLabel = {(tpe: TypeTree) => tpe }
)
}
......
......@@ -701,11 +701,13 @@ abstract class CEGISLike[T <% Typed](name: String) extends Rule(name) {
/**
* We generate tests for discarding potential programs
*/
val nTests = if (p.pc == BooleanLiteral(true)) 50 else 20
val inputIterator: Iterator[Seq[Expr]] = if (useVanuatoo) {
new VanuatooDataGen(sctx.context, sctx.program).generateFor(p.as, p.pc, 20, 3000)
new VanuatooDataGen(sctx.context, sctx.program).generateFor(p.as, p.pc, nTests, 3000)
} else {
val evaluator = new DualEvaluator(sctx.context, sctx.program, CodeGenParams.default)
new GrammarDataGen(evaluator, ExpressionGrammars.ValueGrammar).generateFor(p.as, p.pc, 20, 1000)
new GrammarDataGen(evaluator, ExpressionGrammars.ValueGrammar).generateFor(p.as, p.pc, nTests, 1000)
}
val cachedInputIterator = new Iterator[Example] {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment