generate auto flowchart from code