Well, ideally Arbitrary would be one of the F's we can derive instances of! The guts of my problem is a finite tree/graph generation problem. The tricky bit is mapping those into types which can feed into derivation infrastructure.
-
-
Replying to @milessabin @larsr_h and
Presumably the actual combinatorics of this are well-understood, and it's the technicalities of performing the mapping in Scala that are the issue?
1 reply 0 retweets 0 likes -
Replying to @DrEigenbastard @larsr_h and
Exactly. We need to generate types which can feed into downstream compilation. It's doable with current mechanisms, but clunky and very time consuming.
1 reply 0 retweets 0 likes -
Replying to @milessabin @DrEigenbastard and
So, I have an idea but it’s really horrible and you’re all going to question my sanity. And it’s probably wrong too. This is for tests, so generate source prior to compilation that will be compiled with the tests. Your generator can pick from the randomly generated types.
1 reply 0 retweets 1 like -
Replying to @channingwalton @milessabin and
Code generation always works, but why would we do that when we could also crack this nut with a sledgehammer
1 reply 0 retweets 3 likes -
Replying to @larsr_h @channingwalton and
Well, we need something fancier if we want to be able to shrink counterexamples.
4 replies 0 retweets 1 like -
Replying to @milessabin @larsr_h and
If I understood
@channingwalton's suggestion correctly, he's proposing to codegen a large variety of types in a single compilation, then have ScalaCheck from amongst them, which would be much faster than generating them on demand, running the compiler once for each.2 replies 0 retweets 2 likes -
Replying to @propensive @milessabin and
At the very least, you could generate them in batches of, say 100.
1 reply 0 retweets 0 likes -
Replying to @propensive @larsr_h and
Right, but the stretch goal is to shrink counterexamples ... that doesn't fit so comfortably into a batch mode.
1 reply 0 retweets 1 like -
Replying to @milessabin @propensive and
Could a tree of increasingly complex examples be generated, that could be walked back - huge space though I would have throught.
2 replies 0 retweets 0 likes
So you could find the first failure in O(log n) time?
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.