Visualization of colm's include files

Introduction

Some time ago I investigated how all the header files are related. And I decided to draw a schematic of it.

I manually transferred the output from `gcc -m` to a dot file.

It was more a excersize and excuse for me to work with graphiz than that I got insights from it.

file: c-mm.dot

digraph colmc{
    subgraph cluster_header {
        shape=box
        rank=same

        buffer_h
        colm_h [color=red]
        compiler_h
        config_h
        consinit_h
        cstring_h
        defs_h
        dotgen_h
        fsmcodegen_h
        fsmgraph_h
        global_h
        internal_h
        keyops_h
        loadcolm_h
        loadinit_h
        parser_h
        parsetree_h
        pcheck_h
        pdacodegen_h
        pdagraph_h
        redbuild_h
        redfsm_h
        rtvector_h
        type_h
        version_h
    }
    subgraph cluster_code {
        shape=circle
        rank=same

        codevect_c
        commit_c
        string_c
        iter_c
        list_c

        subgraph cluster_bytecode{ rank=same
            bytecode_h
            bytecode_c
        }
        
        subgraph cluster_debug{ rank=same
            debug_h
            debug_c
        }

        subgraph cluster_input{ rank=same
            input_h
            input_c
        }
        
        subgraph cluster_map{ rank=same
            map_h
            map_c
        }
        
        subgraph cluster_pdarun{ rank=same
            pdarun_h
            pdarun_c
        }
        
        subgraph cluster_pool{ rank=same
            pool_h
            pool_c
        }
        
        subgraph cluster_program{ 
            program_h
            program_c
        }
        
        subgraph cluster_struct{ rank=same
            struct_h
            struct_c
        }
        
        subgraph cluster_tree{ rank=same
            tree_h
            tree_c
        }
    }

    { config_h debug_h colm_h pdarun_h bytecode_h tree_h pool_h internal_h } -> commit_c
    { internal_h colm_h } -> iter_c

    {config_h debug_h pdarun_h bytecode_h tree_h pool_h internal_h } -> commit_c
    {internal_h} -> iter_c
    {pdarun_h config_h debug_h colm_h bytecode_h tree_h pool_h internal_h} -> pdarun_c
    {internal_h colm_h bytecode_h} -> struct_c


    {bytecode_h pool_h debug_h } -> bytecode_c
    {rtvector_h pdarun_h } -> codevect_c
    {debug_h program_h } -> debug_c
    {input_h pdarun_h debug_h program_h tree_h bytecode_h pool_h struct_h } -> input_c
    {tree_h bytecode_h program_h } -> iter_c
    {pdarun_h program_h struct_h bytecode_h } -> list_c
    {map_h pdarun_h pool_h bytecode_h } -> map_c
    {pool_h pdarun_h debug_h } -> pool_c
    {pdarun_h tree_h bytecode_h pool_h debug_h config_h struct_h } -> program_c
    {pool_h pdarun_h bytecode_h program_h struct_h } -> string_c
    {tree_h pool_h bytecode_h debug_h } -> tree_c

    {pdarun_h type_h tree_h} -> bytecode_h
    {global_h keyops_h parsetree_h cstring_h pdagraph_h pdarun_h bytecode_h program_h internal_h} -> compiler_h
    {compiler_h parser_h} -> consinit_h
    {tree_h} -> cstring_h
    {config_h colm_h} -> debug_h
    {keyops_h compiler_h redfsm_h} -> fsmcodegen_h
    {keyops_h} -> fsmgraph_h
    {config_h defs_h keyops_h} -> global_h
    {colm_h} -> internal_h
    {parser_h} -> loadcolm_h
    {compiler_h parser_h} -> loadinit_h
    {program_h struct_h internal_h} -> map_h
    {global_h cstring_h bytecode_h} -> parsetree_h
    {colm_h type_h input_h internal_h} -> tree_h

}

c-mm.svg

c-mm.dot.svg

Next steps

  • [ ] write a colm script with the rules to transform the output of gcc -m to the graphviz format.