From a380a1b835d30422041dc42d28227c9d395397ba Mon Sep 17 00:00:00 2001 From: Thomas Applencourt Date: Thu, 26 Jan 2017 12:02:45 -0600 Subject: [PATCH] Realy Amazing dots representation --- src/irpf90.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/irpf90.py b/src/irpf90.py index 1fce99b..5f8b755 100644 --- a/src/irpf90.py +++ b/src/irpf90.py @@ -55,12 +55,23 @@ def main(): comm_world = Irpy_comm_world() if command_line.do_graph: + # Create a dot reprenstion of the dependency graph. + # Merge inside a subgraph the Entity provided together comm_world.t_filename_parsed_text # Initialize entity need. Dirty I know. + from util import mangled print 'digraph { ' + + from util import mangled for name,entity in comm_world.d_entity.items(): - if entity.needs: + if entity.is_main: + + if entity.needs: print ' %s -> { %s } ' % (name, ' ; '.join(entity.needs)) + if entity.others_entity_name: + print ' subgraph cluster%s {' % name + print ' %s ' % ' '.join([entity.name] + entity.others_entity_name) + print ' }' print '}' return