Semiautomatisk generering av LSP-servrar för domänspecifika språk : Stärkande av domänspecifika språk genom generering av språkservrar

Domain-Specific Languages (DSLs) are programming or modeling languages designed to facilitate the creation of models or programs within a specific domain. For domain experts, DSLs offer alternative advantages over General-Purpose Languages (GPLs), primarily by enabling problem modeling at a much higher level of abstraction. A DSL is sometimes accompanied by a language workbench that provides essential code editing support, typically within an Integrated Development Environment (IDE). Features such as syntax highlighting, code completion, and definition lookups enhance the usability of a DSL but are costly to develop. With the introduction of the Language Server Protocol (LSP), DSL developers can target a single protocol to expose language support, making language tooling more accessible and maintainable. Many solutions exist to ease the creation of language server support for one’s DSL. Langium, an open-source language engineering tool, leverages the DSL’s semantics, defined through services, to provide language support alongside compilation. This is also the case of the popular language workbench Eclipse Xtext™ (Xtext). However, a DSL with an existing compiler implemented in an arbitrary framework must typically reimplement its semantics within such workbenches to enable language server functionality. This Master’s thesis proposes a method of extracting semantics from a compiled backend, effectively reusing already defined semantics. We do this by attaching metadata during the compilation process and reusing it to provide language server functionality through the LSP protocol, such as go-to definition or hover information. By building on existing compilation artifacts, the approach minimizes duplication of effort and ensures consistency between runtime behavior and developer tooling. The approach is demonstrated using the Meta vIKING (Miking) language workbench and evaluated on two DSLs: MLang and ProbTime. The results show that language support can be semi- automatically derived with minimal manual intervention.

Publication Details

Journal
KTH Publication Database DiVA (KTH Royal Institute of Technology)
Published
2025-01-01
Primary Topic
Model-Driven Software Engineering Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Semiautomatisk generering av LSP-servrar för domänspecifika språk : Stärkande av domänspecifika språk genom generering av språkservrar

KTH Publication Database DiVA (KTH Royal Institute of Technology)
Model-Driven Software Engineering Techniques
article

Semiautomatisk generering av LSP-servrar för domänspecifika språk : Stärkande av domänspecifika språk genom generering av språkservrar

article en

Abstract

Domain-Specific Languages (DSLs) are programming or modeling languages designed to facilitate the creation of models or programs within a specific domain. For domain experts, DSLs offer alternative advantages over General-Purpose Languages (GPLs), primarily by enabling problem modeling at a much higher level of abstraction. A DSL is sometimes accompanied by a language workbench that provides essential code editing support, typically within an Integrated Development Environment (IDE). Features such as syntax highlighting, code completion, and definition lookups enhance the usability of a DSL but are costly to develop. With the introduction of the Language Server Protocol (LSP), DSL developers can target a single protocol to expose language support, making language tooling more accessible and maintainable. Many solutions exist to ease the creation of language server support for one’s DSL. Langium, an open-source language engineering tool, leverages the DSL’s semantics, defined through services, to provide language support alongside compilation. This is also the case of the popular language workbench Eclipse Xtext™ (Xtext). However, a DSL with an existing compiler implemented in an arbitrary framework must typically reimplement its semantics within such workbenches to enable language server functionality. This Master’s thesis proposes a method of extracting semantics from a compiled backend, effectively reusing already defined semantics. We do this by attaching metadata during the compilation process and reusing it to provide language server functionality through the LSP protocol, such as go-to definition or hover information. By building on existing compilation artifacts, the approach minimizes duplication of effort and ensures consistency between runtime behavior and developer tooling. The approach is demonstrated using the Meta vIKING (Miking) language workbench and evaluated on two DSLs: MLang and ProbTime. The results show that language support can be semi- automatically derived with minimal manual intervention.

KTH Publication Database DiVA (KTH Royal Institute of Technology)
Openalex Percentile: Top 46%
Model-Driven Software Engineering Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Semiautomatisk generering av LSP-servrar för domänspecifika språk : Stärkande av domänspecifika språk genom generering av språkservrar · KTH Publication Database DiVA (KTH Royal Institute of Technology) (2025) | TGRS Research Map | TGRS