//
// Copyright 2019-2020 Fred Dushin <fred@dushin.net>
//
// SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
//
digraph g {

    graph [
        rankdir = "LR"
    ];

    node [
        fontname = "courier"
        fontsize = "16"
        shape = "ellipse"
    ];

    edge [];

    "GlobalContext" [
        label = "<f0> GlobalContext | ... | <mt>modules_table | <mbi>modules_by_index | ... "
        shape = "Mrecord"
    ];

    "AtomsTable" [
        label = "<f0> AtomsHashtable | {{AtomString | \\x2ok | \\x5error| ...}|{atom_id | 0 | 1 | ...}}"
        shape = "Mrecord"
    ];


    "ModulesTable" [
        label = "<f0> AtomsHashtable | {{AtomString | \\x6my_app | \\x7gen_tcp| ...}|{Module * | <m0> | <m1> | ...}}"
        shape = "Mrecord"
    ];

    "ModuleArray" [
        label = "{<f0> 0 | <f1> 1 | ... | m}"
        shape = "record"
    ];

    "Module0" [
        label = "<f0> Module | \n\n\...\n\n\n"
        shape = "Mrecord"
    ];

    "Module1" [
        label = "<f0> Module | \n\n\...\n\n\n"
        shape = "Mrecord"
    ];

    "GlobalContext":at -> "AtomsTable":f0;
    "GlobalContext":mt -> "ModulesTable":f0;
    "GlobalContext":mbi -> "ModuleArray":f0;

    "ModuleArray":f0 -> "Module0":f0;
    "ModuleArray":f1 -> "Module1":f0;

    "ModulesTable":m0 -> "Module1":f0;
    "ModulesTable":m1 -> "Module0":f0;
}
