Does anyone know of a good tutorial for implementing a control flow graph?
I did a “I think this is how it should work” implementation here: GitHub - matozoid/java_flow_analyser: Builds control flow graphs from source code parsed with JavaParser</ and someone sent this: Lecture 18 - Control Flow and Data Flow
No tutorial (yet) but one of our team is working on a generalized diagramming DSL and one of the uses cases is control flow diagrams. The goal is to make higher level DSLs for specific diagram types, where this general DSL is easy to generate from them. The work is private for now, but here’s a little writeup he did about it: Diagram dialect · toomasv/diagrams Wiki · GitHub
If understood correctly, you are looking for a graph that can express looping, choices etc. MetaEdit+ is used to create such languages usually for a specific domain, e.g. ‘Proxy’ node may have three edges out and at least one must be defined. For creating such languages see MetaEdit+ - User's Guides for step-by-step definition of languages, and Call Processing Language listed is perhaps a close candidate, but also many others are defined, e.g. in Batch processing, Clinical tasks or Document engineering.