test-check

alex.ter.weele 2017-06-03T12:33:43.809937Z

@nwjsmith: I’m working on a similar problem. My approach (which doesn’t work yet) will be something like this: Perform a random number of “rounds” On each round, generate an arbitrary number of new nodes, then draw arbitrary edges from the already-existing nodes to new nodes. Recur on the union of new nodes and existing nodes (i.e. add the new nodes to the already existing nodes)

nwjsmith 2017-06-03T15:13:47.300511Z

@alex.ter.weele I managed to figure out how to generate the DAG in the way I described: https://gist.github.com/nwjsmith/0f4288db2f7c0be8b06e5237d6175b3d

nwjsmith 2017-06-03T15:15:28.306479Z

The magic happens in gen-acyclic-edges, where we build up a list of generators of connecting edges, and call gen/tuple on it once we're finished

alex.ter.weele 2017-06-03T15:27:30.347442Z

OK, I get it! It took me a second to realize why gen-acyclic-edges will never create cycles--because edges only go forward in the list.