This is code for the paper Testing Distributional Properties of Context-Free Grammars by Alexander Clark which will appear in the proceedings of ICFG 2016.
It should run cleanly on a suitable machine with Python installed. The diagrams can be produced using the scripts provided which start with run.