Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>EZASP 2New to Visual Studio Code? Get it now.
EZASP 2

EZASP 2

Rafael Martins

|
2 installs
| (0) | Free
Making Learning Answer Set Programming Easier
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

EZASP 2 - Making Learning Answer Set Programming Easier

This Visual Studio Code extension enhances your Answer Set Programming (ASP) development experience by introducing a range of features, based on the methodology introduced by Fandinno et al. (https://arxiv.org/abs/2111.06366), that aim to facilitate writing ASP programs in particular for newcomers.

Dependencies

This extension uses two other VS Code extensions:

  • Answer Set Programming Language Support by Florian Frankreiter

  • asp-syntax-highlight by Arnaud Belcour

When installing this VS Code extension, it will also install these automatically. Note that this extension may only be fully functional when these two are installed and active.

For details on these two extensions, we refer to their descriptions.

Features

The following features of this VS Code extension (just like the features of the two extensions on which it builds) only work for files with the .lp extension.

Syntax Checking

When a rule contains any basic syntax issues within the scope of the rules admitted by the methodology employed, it triggers a red underline, accompanied by a hover message.

Screenshot

Capturing Unsafe Variable

When the program contains Unsafe Variable errors, it triggers a red underline, accompanied by a hover message listing the Unsafe Variables.

Screenshot

Order of Rules Warnings

Rules must appear in the following order: Constants, Facts, Choices, Definitions, Constraints, Optimization Statements, Weak Constraints and Show Statements. The extension checks this and highlights any out-of-order rules (yellow underline). Additionally, a hover message explains what the error is.

Screenshot

Stratification Warning and Errors

The extension also highlights with a red underline if a predicate has not been defined beforehand or with a yellow underline if a predicate is used before it is defined (in the same file or optionally in one of the other files of the same project – see below for details). Additionally, it shows a hover message to explain which predicate has triggered this issue.

Screenshot Screenshot

Automatic Code Reordering

Whenever a Order warning is present in the program, a 'Fix Order' button will appear under the Quick-fix menu provided by the VSCode editor. Clicking this button will reorganize the constructs in the program to ensure all order warnings are resolved. Additionally, the final order will also minimize the number of stratification issues in each section.

Screenshot

On-Hover Predicate Information

When you hover over a predicate, the extension reveals a pop-up message displaying the line where the predicate was defined, along with the preceding comment.

Screenshot

Missing Comment Warning

Rules without preceding comments are highlighted (yellow underline), and on hover a message will appear explaining this.

Screenshot

Feature Disablement

If desired, you can disable any of the previous features of this application. In the config.json file generated by running the command "> EZASP - create config.json", you will find a section called "disableFeatures". Within this section you can set the value of "true" or "false" for each of these features, with the default being "false". To disable any of these features, simply change the value to "true". In the same file, you can optionally include several file names with “” within [] in the field “additionalFiles” This also allows to run clingo with all these files simultaneously (see detailed description of Answer Set Programming Language Support).

Screenshot

Screenshot

Issues/Suggestions

You can post your issues/suggestions on the GitHub Page.

Credits

This extension is based on the original work by @Ramiro Henriques, who created the first version of this extension (GitHub Page).

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft