vscode-tlaplus icon indicating copy to clipboard operation
vscode-tlaplus copied to clipboard

Proof of concept Model Editor web view

Open quaeler opened this issue 4 years ago • 7 comments

  • In the most simple of model checking cases, this works now; PoC finshed to a point to ping mku.
  • Minor clean-up and a few comments before making a PR, per @lemmy

This is an experimental addition (a rough proof of concept) of introducing a Toolbox-esque Model Editor into the VS Code extension.

quaeler avatar Mar 14 '20 02:03 quaeler

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

sonarqubecloud[bot] avatar Mar 14 '20 02:03 sonarqubecloud[bot]

@quaeler, thanks for putting your effort into adding this feature to the extension! And sorry for the late reply, things have been a bit disrupted recently.

As a PoC it looks good. But before moving further, I'd like us to come up with a vision of what features this editor should support. My main concerns are:

  • VS Code is not very friendly to interactive user interfaces. It's more a text editor than an IDE, so reimplementing the UI-related Toolbox features might be quite a challenge.
  • The model editor in the Toolbox mixes things from different areas: the model itself, tla2tools argument, jvm options, other (for instance, I have no idea where it puts the model description). Bringing them all to the extension will require a (presumably) great deal of preparation work.

What features do you think this editor should have when it's ready for publishing?

cc @lemmy

alygin avatar Mar 25 '20 05:03 alygin

The biggest concern about the lack of a model editor is the missing separation between the spec and models, which causes users to write specs that are tailored to TLC model checking. For example, an Init predicate is specified as x \in 1..3 instead of x \in Nat with the model redefining Nat to 1..3. In other words, the "spec-model" separation keeps specs pristine and prevents them from being tainted.

To encourage users to separation the model from the spec, the VSCode extension should thus support definition overrides, state & action constraints, ... somehow; either with an interactive UI or - if it better aligns with the VSCode best practices - a text-based interface.

A low-hanging fruit might be - for the vanilla extension - to generate not only a .cfg file automatically, but also a .tla file (similar to what the Toolbox does).

lemmy avatar Mar 25 '20 16:03 lemmy

(It is generating those files)

quaeler avatar Mar 25 '20 16:03 quaeler

The Twitter thread ending with https://twitter.com/miguelraz_/status/1336892757885865985 shows how the lack of a model editor is a usability impediment (especially for learners).

lemmy avatar Dec 10 '20 17:12 lemmy

FWIW: The model-checking results web-view doesn't work (not shared) when live-sharing with VSCode.

lemmy avatar Aug 13 '21 19:08 lemmy

https://code.visualstudio.com/blogs/2021/10/11/webview-ui-toolkit

lemmy avatar Oct 12 '21 03:10 lemmy