raw code for coverting graph to gfl rules