Skip to content

Soufflé Datalog Language Server. Add smart features to the Soufflé Datalog Language with the help of LSP in a VS code plugin

Notifications You must be signed in to change notification settings

snf/souffle-lsp-plugin

Repository files navigation

Soufflé Datalog Language Server README

Soufflé is a logic programming language inspired by Datalog. Soufflé was initially designed for static program analysis and since then, there have been many other applications written in the Soufflé language, including applications in reverse engineering, network analysis and data analytics.

This is a plugin adding basic smart features to the Soufflé language, using the Language Server Protocol.

For syntax highlighting refer to: https://marketplace.visualstudio.com/items?itemName=W4RH4WK.souffle-syntax

Features

  • Automatic reparsing when saving the file.

  • Syntax error reporting

Syntax error message

  • Hover (Provide declaration info on hovers) Provide documentation about relations taken from comments (for multiline comments use the /* */ style) Hover example

  • Go to definition

Go to definition example

  • Go to Type Definition

Go to type definition example

  • Autocomplete

Autocomplete example

  • Signature Help

Signature Help example

  • Rename

Rename example

  • Find all references

References example

  • Find all rules for relation

Rule references example

  • Generate .input/.output for relation

Genarate I/O example

  • Reformat documentation comments

Reformat comments example

  • Document symbols

Outline example

Requirements

The user needs to have Java installed on their system.

Build from source

To build the server jar file yourself just run ./gradlew jar on the top level and the resulting jar will be under build/libs.

To run the server run java -cp with the name of the generated jar file.

For the VS Code plugin run npm run package and the resulting .js file will be under dist/extension.js

Known Issues

In libraries with heavy use of the C preprocessor macros, sometimes parsing fails giving a false syntax error.

Release Notes

0.1.6

Added code actions for reformatting documentation comments.

0.1.5

Added code actions for generating .input/.output for relations.

0.1.2

Updated README

0.1.1

  • Changed the grammar to be on par with Souffle.
  • Added icon.

0.1.0

Initial release of Soufflé Datalog Language Server.

About

Soufflé Datalog Language Server. Add smart features to the Soufflé Datalog Language with the help of LSP in a VS code plugin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 96.1%
  • ANTLR 3.1%
  • Other 0.8%