Here is an interesting talk on reverse engineering something very similar: <a href="https:&#x2F;&#x2F;realm.io&#x2F;news&#x2F;jp-simard-reverse-engineering-code-completion&#x2F;" rel="nofollow">https:&#x2F;&#x2F;realm.io&#x2F;news&#x2F;jp-simard-reverse-engineering-code-com...</a>