@startuml

[*] --> Starting : moka:start(Module)

Starting --> Unloaded : moka_mod_utils:get_abs_code(Module)

Unloaded --> Unloaded : moka:replace()

Unloaded --> Loaded : moka:load()

Loaded --> Unloading : moka:stop()

Unloading --> [*] : code unloaded
Unloaded --> [*] : moka:stop()

Loaded --> Unloaded : moka:unload()
note top of Loaded : The unload transition\nis probably not needed


@enduml