Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proof of concept Model Editor web view #152

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

quaeler
Copy link

@quaeler quaeler commented Mar 14, 2020

  • 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.

- 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 mku request.
@sonarcloud
Copy link

sonarcloud bot commented Mar 14, 2020

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

@@ -25,6 +26,7 @@ const TLAPLUS_CFG_FILE_SELECTOR: vscode.DocumentSelector = { scheme: 'file', lan
const CHANGELOG_URL = vscode.Uri.parse('https://github.com/alygin/vscode-tlaplus/blob/master/CHANGELOG.md#change-log');

const tlaDocInfos = new TlaDocumentInfos();
export const symbolsProvider = new TlaDocumentSymbolsProvider(tlaDocInfos);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this doesn't break anything, it did end up being a change that I no longer needed; this and the change at line 88/93.

@alygin
Copy link
Contributor

alygin commented Mar 25, 2020

@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 alygin added the enhancement New feature or request label Mar 25, 2020
@lemmy
Copy link
Member

lemmy commented Mar 25, 2020

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).

@quaeler
Copy link
Author

quaeler commented Mar 25, 2020

(It is generating those files)

@lemmy
Copy link
Member

lemmy commented Dec 10, 2020

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).

@alygin alygin force-pushed the master branch 17 times, most recently from a7b46cb to 21f4ef7 Compare February 6, 2021 20:00
@lemmy
Copy link
Member

lemmy commented Aug 13, 2021

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

@lemmy
Copy link
Member

lemmy commented Oct 12, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

3 participants