Towards language-parametric semantic editor services based on declarative type system specifications

Conference Paper (2019)
Author(s)

D.A.A. Pelsmaeker (TU Delft - Programming Languages)

Hendrik van Antwerpen (TU Delft - Programming Languages)

Eelco Visser (TU Delft - Programming Languages)

Research Group
Programming Languages
Copyright
© 2019 D.A.A. Pelsmaeker, H. van Antwerpen, Eelco Visser
DOI related publication
https://doi.org/10.4230/LIPIcs.ECOOP.2019.26
More Info
expand_more
Publication Year
2019
Language
English
Copyright
© 2019 D.A.A. Pelsmaeker, H. van Antwerpen, Eelco Visser
Research Group
Programming Languages
Volume number
134
ISBN (electronic)
9783959771115
Reuse Rights

Other than for strictly personal use, it is not permitted to download, forward or distribute the text or part of it, without the consent of the author(s) and/or copyright holder(s), unless the work is under an open content license such as Creative Commons.

Abstract

Editor services assist programmers to more effectively write and comprehend code. Implementing editor services correctly is not trivial. This paper focuses on the specification of semantic editor services, those that use the semantic model of a program. The specification of refactorings is a common subject of study, but many other semantic editor services have received little attention. We propose a language-parametric approach to the definition of semantic editor services, using a declarative specification of the static semantics of the programming language, and constraint solving. Editor services are specified as constraint problems, and language specifications are used to ensure correctness. We describe our approach for the following semantic editor services: reference resolution, find usages, goto subclasses, code completion, and the extract definition refactoring. We do this in the context of Statix, a constraint language for the specification of type systems. We investigate the specification of editor services in terms of Statix constraints, and the requirements these impose on a suitable solver.