Marr, Stefan, Burchell, Humphrey, Niephaus, Fabio (2022) Execution vs. Parse-Based Language Servers: Tradeoffs and Opportunities for Language-Agnostic Tooling for Dynamic Languages. In: Proceedings of the 18th ACM SIGPLAN International Symposium on Dynamic Languages. . ACM (doi:10.1145/3563834.3567537) (KAR id:97486)
PDF
Author's Accepted Manuscript
Language: English |
|
Download this file (PDF/771kB) |
Preview |
Request a format suitable for use with assistive technology e.g. a screenreader | |
Official URL: https://doi.org/10.1145/3563834.3567537 |
Abstract
With the wide adoption of the language server protocol, the desire to have IDE-style tooling even for niche and research languages has exploded. The Truffle language framework facilitates this desire by offering an almost zero-effort approach to language implementers to providing IDE features. However, this existing approach needs to execute the code being worked on to capture much of the information needed for an IDE, ideally with full unit-test coverage.
To capture information more reliably and avoid the need to execute the code being worked on, we propose a new parse-based design for language servers. Our solution provides a language-agnostic interface for structural information, with which we can support most common IDE features for dynamic languages.
Comparing the two approaches, we find that our new parse-based approach requires only a modest development effort for each language and has only minor tradeoffs for precision, for instance for code completion, compared to Truffle's execution-based approach.
Further, we show that less than 1,000 lines of code capture enough details to provide much of the typical IDE functionality, with an order of magnitude less code than ad hoc language servers. We tested our approach for the custom parsers of Newspeak and SOM, as well as SimpleLanguage's ANTLR grammar without any changes to it. Combining both parse and execution-based approaches has the potential to provide good and precise IDE tooling for a wide range of languages with only small development effort. By itself, our approach would be a good addition to the many libraries implementing the language server protocol to enable low-effort implementations of IDE features.
Item Type: | Conference or workshop item (Paper) |
---|---|
DOI/Identification number: | 10.1145/3563834.3567537 |
Uncontrolled keywords: | Comparison ExecutionTime LanguageServerProtocol ParseTime |
Subjects: | Q Science > QA Mathematics (inc Computing science) |
Divisions: | Divisions > Division of Computing, Engineering and Mathematical Sciences > School of Computing |
Funders: |
Engineering and Physical Sciences Research Council (https://ror.org/0439y7842)
Royal Society (https://ror.org/03wnrjx87) |
Depositing User: | Stefan Marr |
Date Deposited: | 27 Oct 2022 00:07 UTC |
Last Modified: | 05 Nov 2024 13:02 UTC |
Resource URI: | https://kar.kent.ac.uk/id/eprint/97486 (The current URI for this page, for reference purposes) |
- Link to SensusAccess
- Export to:
- RefWorks
- EPrints3 XML
- BibTeX
- CSV
- Depositors only (login required):