Replies: 2 comments
-
|
Hi! Thank you for the feedback, specially on the docs! For "Type aliases", good point, we should document that better. As for more intermediate level examples, I'd look into Tic-Tac-Toe (it's not as simple as it may appear) and this Bank example which helps you find a vulnerability in the code with MBT. More on the distributed systems side, there's Two-Phase Commit. Unfortunately, we don't have blogposts/tutorials around these examples, so I see your point about we lacking intermediate-level material that it's not assuming you already now basics of distributed systems as well. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the response and the additional examples. Another question I have is how to model certain data structures. Say I want to model something like a tagged-union (what Rust's enums are e.g. you have a finite set of options where each one can carry variant-specific data). Say I want to model a collection of events, where each event kind can carry different data. I can think of a few different ways to model this, but I'm not sure which is idiomatic. These examples are for process lifecycle events because I'm working on a profiler that records these events and want to model the algorithm for ingesting, buffering, and post-processing the events. This way I call the "generic event" approach. The downside is that you have to guard against the The next approach is what I would typically reach for (because it looks like Rust), but I'm not sure if it's even possible in Quint: In general I think you could do with a "records" tutorial so it's clear when and where you can use the record syntax. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
These are just a few issues I've run into while getting started.
Type aliases
When you define a type alias, it's not clear from the docs whether literals need to be wrapped in the alias or not. For instance:
(I've gathered that it's the former, e.g. the bare literal, but that's not spelled out in the docs as far as I can tell).
Imports
For some reason, my import doesn't work at all. I have the following two files in the same directory:
and my
resolver.qntfile looks like this:(where
basicSpells.qntis copied frommain),but when I run
quint typecheck resolver.qntfrom insidedirI getI've checked that the file permissions are as they should be (i.e. the same as
resolver.qnt).Program name in help
The program name is reported as
cli.jsinstead ofquint.This is 0.25.1 installed via Flox (which draws from nixpkgs).
Documentation gaps
I suspect for many people Quint is their first formal specification language, and therefore don't have much experience writing specifications. I also suspect most people don't have much experience developing distributed protocols, which makes the existing examples kind of hard to understand as a new user.
For instance, as a learning exercise I'm trying to write out the package resolution algorithm used by Flox to determine which packages to install for a user based on the requirements/constraints in their "environment"'s config file. I've pieced together some ideas for how to do that based on the lessons and the Secret Santa example, but having more "general purpose" examples to draw inspiration from would be helpful. Essentially I'm looking for "you understand the language and how to write 'hello world', now let's do something between 'hello world' and a blockchain protocol."
Beta Was this translation helpful? Give feedback.
All reactions