Code Less to Code More: Streamlining Language Server Protocol and Type System Development for Language Families

📅 2025-09-18
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
To address the challenges of insufficient modularity, poor reusability, and low efficiency in type-system generation for multilingual, multi-editor (L×E) editing support development, this paper introduces the Typelang language family and the variant-oriented programming paradigm, establishing a cross-component coordination layer to enable modular language-server generation and fully automated LSP plugin construction. Leveraging domain-specific language modeling, Neverlang-driven modular compilation, and a composable type-system design, the approach reduces language–editor integration complexity from O(L×E) to O(N×1), where N denotes the number of reusable language components. Experimental evaluation demonstrates a 93.48% reduction in type-system implementation code and complete automation of LSP plugin generation; in language-component reuse scenarios, development effort is significantly reduced. The core contribution is the first framework enabling one-click, type-driven, highly reusable, cross-editor language-server generation.

Technology Category

Application Category

📝 Abstract
Developing editing support for $L$ languages in $E$ editors is complex and time-consuming. Some languages do not provide dedicated editors, while others offer a single native editor. The $ extit{language server protocol}$ (LSP) reduces the language-editor combinations $L imes E$ to $L + E$, where a single language server communicates with editors via LSP plugins. However, overlapping implementations of linguistic components remain an issue. Existing language workbenches struggle with modularity, reusability, and leveraging type systems for language server generation. In this work, we propose: (i) Typelang, a family of domain-specific languages for modular, composable, and reusable type system implementation, (ii) a modular language server generation process, producing servers for languages built in a modular workbench, (iii) the variant-oriented programming paradigm and a cross-artifact coordination layer to manage interdependent software variants, and (iv) an LSP plugin generator, reducing $E$ to $1$ by automating plugin creation for multiple editors. To simplify editing support for language families, each language artifact integrates its own Typelang variant, used to generate language servers. This reduces combinations to $T imes 1$, where $T = L$ represents the number of type systems. Further reuse of language artifacts across languages lowers this to $N imes 1$, where $N << T$, representing unique type systems. We implement Typelang in Neverlang, generating language servers for each artifact and LSP plugins for three editors. Empirical evaluation shows a 93.48% reduction in characters needed for type system implementation and 100% automation of LSP plugin generation, significantly lowering effort for editing support in language families, especially when artifacts are reused.
Problem

Research questions and friction points this paper is trying to address.

Reducing LSP and type system development complexity for language families
Addressing modularity and reusability issues in language server generation
Automating editor plugin creation to streamline multilingual editing support
Innovation

Methods, ideas, or system contributions that make the work stand out.

Typelang DSLs for modular type systems
Modular language server generation process
LSP plugin generator for multiple editors
🔎 Similar Papers
No similar papers found.
F
Federico Bruzzone
Università degli Studi di Milano, Computer Science Department, Milan, Italy
Walter Cazzola
Walter Cazzola
Full Professor, Università degli Studi di Milano
programming languagesprogramming techniquesprogramming language design and implementationreflection and aspect-oriented programmingdynamic software evolution
L
Luca Favalli
Università degli Studi di Milano, Computer Science Department, Milan, Italy