Add acyclicness check

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>
Implements gen-rand-dag.py

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>