-
Notifications
You must be signed in to change notification settings - Fork 0
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
Proposal: standardize allowing multiple sequential modules in a file #17
Comments
What was the motivation for introducing |
It was introduced in 505e073f as part of a series of changes that allow command-line users to explore error traces outside of the toolbox. It was not designed as a user-facing feature, but users can easily discover that it exists by examining TLC's autogenerated outputs. From time to time I have found it useful:
That said, I am still on the fence about whether this feature is something we want to support, and I'm interested to hear what others think. |
I can't find a statement in Specifying Systems that mandates a strict 1:1 mapping between a (non-nested) module and a file. At any rate, the
There is the SLC and this RFC repository, but I'm not aware of a "standardization process". Moreover, it is up for debate if TLC's config file, Apalache's configuration and annotations, the number of modules TLC reads from a single file, ... should be covered by the TLA+ specification language. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Let’s continue this discussion in #1 to avoid expanding the scope of this issue? Could you please recreate your last comment over there? |
I've been thinking further about this and one big question is whether to only resolve modules from multi-module specs in the root spec; options:
|
tlaplus/tlaplus#1104 made me realize that this hasn't gone through the standardization process, although it should. This would expand the TLA+ file standard to allow sequential module definitions, like:
The tree-sitter-tlaplus parser already supports this, as you can see from the highlighting in the above snippet. SANY currently supports this by splitting the file using regexes in
MonolithSpecExtractor
. This could instead be formalized and moved into the syntax parser, to avoid the general nightmare of long-tail regex context issues. So the new root node of the SANY parse tree would be a list of modules interspersed with extramodular text, instead of a single module node.This is useful when writing tests for TLA+ tooling and also when whipping up a quick spec where you want an encapsulated utility module without making it a nested module for some reason.
The text was updated successfully, but these errors were encountered: