Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

VSCode extension ideas#254

bugarela started this conversation inIdeas
Sep 29, 2022· 9 comments· 6 replies
Discussion options

I'm creating this discussion to keep track of all our ideas for the VSCode extension. Let's try to keep one idea per top-level comment to keep things organized.

You must be logged in to vote

Replies: 9 comments 6 replies

Comment options

bugarela
Sep 29, 2022
Maintainer Author

Highlight actions

We could usesemantic highlighting to have different fontfaces for actions by consulting the effects. I'm not sure how to make that not look completely messy, we should be careful, but I thin that might be very useful if we get it right.

You must be logged in to vote
0 replies
Comment options

bugarela
Sep 29, 2022
Maintainer Author

Tasks

It is possible to read arbitrary files and detect tasks, and these tasks can be run from the VSCode command pallete. Imagine we have some mdx-like (or some other configuration format like .toml files as atomkraft is using), detect tasks from that and have commands likeCheck liveness property,Simulate malicious example, etc. Those can be completely spec-specific since they are defined by a configuration file, as the example is specific to Quint typescript project.

image

You must be logged in to vote
0 replies
Comment options

bugarela
Sep 29, 2022
Maintainer Author

Notebooks

For protocol specification, we can have a markdown renderer that parses and processes Quint code blocks. The original.md file should be readable by itself so people don't depend on the plugin to read the file.

image

You must be logged in to vote
1 reply
@konnov
Comment options

How about the opposite: The users could write markdown in Quint comments. We could also render that in nice HTML. This would look like literate programming.

Comment options

bugarela
Sep 29, 2022
Maintainer Author

Code completion

Using type information + dot call format, we can offercode completion like any OOP language. That is, given a setS, typingS. shows operators that take sets as their first argument.

Example from vscode docs:
image

You must be logged in to vote
0 replies
Comment options

bugarela
Sep 29, 2022
Maintainer Author

Type hints

After opening parenthesis, we can show an operator's type (and maybe effect?) signature to help users remember which arguments are needed. PS: Currently, our built-in operators don't have names for their arguments, but it's much helpful to show signatures with named arguments (index: int as opposed to onlyint)

Image fromvscode docs
image

You must be logged in to vote
1 reply
@bugarela
Comment options

bugarelaSep 30, 2022
Maintainer Author

Instead of showing effects on hover, we can actually show the mode, as typescript showsconst before the name in this example:
image

Actions can show the variables they update with theaction<...> syntax

Comment options

bugarela
Sep 29, 2022
Maintainer Author

Type annotation inference

We can infer types for the operators, but as in many programming languages, it's nice if the user explicitly annotates top-level operators so they can be sure their intentions are met. We can automate that task by providing a button for annotating an operator with it's inferred type, so the user only has to check for it's correction and then benefit from a established type contract.

Peek 2022-09-29 18-44

PS: idk why my gif recorder is so dark, sorry

You must be logged in to vote
1 reply
@konnov
Comment options

This would be a really cool feature!

Comment options

bugarela
Sep 29, 2022
Maintainer Author

Code Navigation

Easily find where a symbol is defined or all references to a symbol.

Example fromvscode docs:
image

You must be logged in to vote
1 reply
@bugarela
Comment options

bugarelaJan 19, 2023
Maintainer Author

Done in#546

Comment options

bugarela
Dec 13, 2022
Maintainer Author

Maybe we can render diagrams for individual actions, similar to what the ANTLR extension does

image

You must be logged in to vote
2 replies
@konnov
Comment options

This should be relatively easy to implement now, since we have the call graph. Though it may be that people would find "Find all references" more useful than the graph (they are hard to render and hard to navigate).

@bugarela
Comment options

bugarelaJul 24, 2023
Maintainer Author

I was not thinking about this in terms of the call graph, but in terms of state machine transitions. I'm not sure if it is feasible, just raising the idea. For the call graph, I agree that "Go to References" is more useful.

Comment options

Under the heading of support for literate programming.

@konnov noted that there are some standard practices spec authors (in particular
protocol designers) can adopt that would improve the quality usefulness of
specs. E.g.,

  • Examples (usingrun, so these also amount to tests of the spec)
  • Invariants
  • Formalization in quint (as opposed to only describing something in a paragraph)

Support for literate formal specs could include templates and linting to
automate encouragement of enforcement of these practices.

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Ideas
Labels
vscodeVScode plugin
3 participants
@bugarela@konnov@shonfeder

[8]ページ先頭

©2009-2025 Movatter.jp