Language Agnostic Code Exploration Services

More Info
expand_more

Abstract

Programmers spend significantly more time trying to comprehend existing code than writing new code. They gain an understanding of the code by navigating the code base in an IDE, by reading documentation online, and by browsing code repositories on websites such as GitHub. To create rich experiences for programming languages across those various media is a large effort for developers of programming languages. This effort might be worthwhile for popular languages, but for new or experimental languages the required effort is often too large. Solutions to reduce this effort of implementing an IDE exist,such as LSP, but to reduce the effort in other places outside IDEs, we introduce the Codex metadata format, which separates language-specific generation of code metadata from its language-agnostic presentation. To demonstrate this approach by implementing four language-specific metadata generators (based on LSP, CTAGS, TextMate and Elaine) and two language-agnostic presentations (PDF documents and a code viewer websites) of code and metadata. To demonstrate different kinds of code metadata, we implemented four code exploration services: syntax colouring, code navigation, structure outline, and diagnostic messages. We show that with the Codex metadata format, we can decouple the metadata generators from the presentations.