Dafny Language Server Redesign

Hess, Marcel and Kistler, Thomas (2019) Dafny Language Server Redesign. Student Research Project thesis, HSR Hochschule für Technik Rapperswil.

[thumbnail of HS 2019 2020-SA-EP-Kistler-Hess-Dafny VSCode Server Redesign.pdf]
Preview
Text
HS 2019 2020-SA-EP-Kistler-Hess-Dafny VSCode Server Redesign.pdf - Supplemental Material

Download (2MB) | Preview

Abstract

Dafny is a formal programming language to proof a program's correctness with preconditions, postconditions, loop invariants and loop variants. In a previous bachelor thesis, a plugin for Visual Studio Code was created to support Dafny. Developers can profit by several features from this plugin. For example, if Dafny cannot prove a postcondition, the code will be highlighted and a counter example can be shown. Other features include code compilation, auto completion suggestions and various refactoring tools. The plugin communicates with a language server. This interface was realized with the language server protocol. This protocol is a specification which allows an easy communication between an IDE and a language server. The language server itself was using an additional JSON-interface to request information from the actual Dafny library.

The goal of this thesis was to rewrite the language server and directly integrate it into the Dafny library to save one of the communication paths. In order to simplify the development of further features, the tighter integration was inevitable. Instead of making complex adjustments to the server API, one can just use the language server protocol standard to increase functionality. For this, the new language server had to be rewritten from TypeScript to C#.

The old language server could be completely superseded by our new, rewritten server in C#. Since we are using the same project solution as the Dafny library, Dafny's methods and classes are directly accessible. That means, that the interface from the old language server to the Dafny library is now obsolete. Most features of the previous bachelor thesis are supported with the new language server. These include code verification, error highlighting, making suggestions for auto completion, code lens, go to definition, compilation, as well as syntax highlighting. Since the language server is integrated with the Dafny library, new features can be added in a convenient way.

Item Type: Thesis (Student Research Project)
Subjects: Topics > Software > Refactoring
Topics > Software > Testing and Simulation
Area of Application > Development Tools
Technologies > Programming Languages
Technologies > Programming Languages > C#
Technologies > Programming Languages > Java Script
Divisions: Bachelor of Science FHO in Informatik > Student Research Project
Depositing User: OST Deposit User
Contributors:
Contribution
Name
Email
Thesis advisor
Corbat, Thomas
UNSPECIFIED
Date Deposited: 09 Apr 2020 12:43
Last Modified: 09 Apr 2020 12:43
URI: https://eprints.ost.ch/id/eprint/842

Actions (login required)

View Item
View Item