Replies: 8 comments 26 replies
-
My first thoughts about this preliminary analysis, especially the following statement:
Let's not discuss vague possible syntax ideas and define them through concrete examples (The clock example to start with perhaps). If it does break the TLA+ semantics, evaluate to what extend ? and is it problematic?
I think we are not in the stage we want users to extend the syntax. This is another topic that needs another discussion. |
Beta Was this translation helpful? Give feedback.
-
So I don't see the problem of extending the Quint syntax if we are able to map it anyway to TLA+ without breaking the logic. |
Beta Was this translation helpful? Give feedback.
-
I think it's premature to discuss implementation details. A few comments in response to the assumptions in the OP:
I think all of these must be seen relative to other design goals. In fact, they are all phrased in relative terms ("small", "most", ...).
Adding syntax results in more syntax, not necessarily "bloated". I also think this is pure speculation, unless we have user research on the table with concrete syntax suggestions. In fact, the suggestion for supporting outside
Nobody asked to replace a complete set of operators. I don't think there's any evidence for this claim. |
Beta Was this translation helpful? Give feedback.
-
On the technical side, I think layering multiple syntaxes has the downside of less integration:
In that sense, it's a classic cohesion vs coupling exercise :) @konnov You seem to be very much on the side of least coupling here, even if it reduces cohesion. |
Beta Was this translation helpful? Give feedback.
-
True. Extended syntax is not necessarily bloated. I just want to find a way to isolate extended syntax, so we do not have to deal with it at all stages of translation. In this sense the current Quint syntax is self-contained and complete. Also, it follows very simple principles at the moment, in contrast to the syntax of TLA+. It is not minimal in the logic sense, as we have KerA+ in Apalache, which is a much smaller language core. |
Beta Was this translation helpful? Give feedback.
-
I clearly see and agree with the intention to make Quint the basic language layer, on par with internal Apalache representation. And whatever constructs we want to build that provide ease-of-use, more compact syntax, domain-specific constructs, etc., can be done as specialized languages on the next levels. The next language levels would actually a subset of what's expressible in Quint, and the best way to go, as I see it, is probably via:
|
Beta Was this translation helpful? Give feedback.
-
(This is my current opinion on the matter after all conversations at the retreat and reading this discussion. I'm open to further discuss the matter.) It doesn't make sense to me that we were discussing how we can become a standard in verification and, when it comes to Quint, we want everyone to define how they prefer to write it. I don't believe at all that syntax is only a matter of personal taste. My opinion in a very direct statement is: We can find the best possible syntax to define state machines, and then everyone should use this syntax instead of whatever they prefer. We can have libraries for specific contexts and even DSLs if we want to target very specific contexts, but macros for basic language constructs (such as What I think we should have for starters:
In addition: we should not underestimate our team's capacity to determine what's better for Quint. We have some of the most experienced TLA+ users when it comes to real-world applications AND tool builders for the language. We know the problems we are trying to solve, while most users we would be able to interview at this point will not have a sense of the problem at all. I'd rather have user interviews regarding documentation and the VSCode plugin when those are in place. |
Beta Was this translation helpful? Give feedback.
-
To resume, we have to move forward and try to bring the improvements to the pain points (& and | are not sufficient to describe a transition in the action and the behavior of the system in next can also be improved as mentioned in the discussion on Pluscal/TLA+/Quint) I agree that our goal is to have a useful general-purpose specification language not only an improvement of TLA+, only TLA+ people can sense. A lot of good work has been involved, I think we just need to be open in pushing the concept a little further not changing it. Shon is writing the spec for the clock example in Quint (it s the use case mentioned in the discussion). It's a starting point to come up with alternatives to address the pain points. We can see other examples too. From there we discuss the pros and cons and to-dos before jumping into implementation. |
Beta Was this translation helpful? Give feedback.
-
Warning: this is a technical discussion exploring the solution space. If you would like to discuss concrete suggestions on the alternative syntax, it should not be done here.
Motivation
It became apparent in the discussions that the first users (mostly us) would like to have a higher-level syntax. For example:
guess
and<-
: Introducing initializers #183 (comment)when (P) do { A1, A2, A3 }
We knew that this moment would come. The initial idea of Quint was that it could serve as a well-defined base-level syntax for other syntaxes. Among the Design principles of Quint are the follows:
If we start extending the language with all possible syntax ideas, this will become a problem very quickly:
Problem statement
Instead of embedding all potential syntax constructs asked-for by the users, we need a syntax layer that is:
Some points to understand:
Potential solutions
Two approaches immediately come to my mind:
when (P) do { A1, A2, A3 }
suggest that they would require us to extend the lexer and the parser to support these macros. Perhaps, we could limit the tokens to a set of predefined tokens (such as,
,;
,#
, etc.) and limit the syntax rules used to defined macros to the rules from a subset of syntactic rules. To do that, we would have to collect a library of potential macros.Beta Was this translation helpful? Give feedback.
All reactions