-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
Better parameterized instantiation support #441
base: master
Are you sure you want to change the base?
Conversation
- Supporting parameterized instantiation used in specification definition in which temporal actions are involved. [Bug][Tools]
This commit does not break any of the existing unit tests, which lessens slightly my trepidation in this change. A review of the investigationUsing this module and inner-module as reference, i'll discuss what was originally working and what was not. What was working
What was failing
Why was this failingIn SpecProcessor#processConfigSpec(ExprNode, Context, List) we encountered the logic problem that the predicate embodying the The remediationThe changes embodied in this PR augment the logic in At this point, we need to hand curate the current Also discussed in those comments, we are ensuring in this |
tlatools/org.lamport.tlatools/test-model/ParameterizedInstantiation/ParamInstance.tla
Outdated
Show resolved
Hide resolved
tlatools/org.lamport.tlatools/test/tlc2/model/ParameterizedInstantiation.java
Outdated
Show resolved
Hide resolved
tlatools/org.lamport.tlatools/test/tlc2/tool/liveness/ModelCheckerTestCase.java
Show resolved
Hide resolved
|
||
Z7(cardinality) == INSTANCE Ring | ||
|
||
SpecA == Z7(7)!Spec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you also look into operator instantiation (see section 5 of TLA+2 guide) or do you expect no special handling is required in TLC?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not, will verify and address if kaput.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Section 2.1 of current-tools.pdf suggests a simple workaround. To what extent does is this related?
Please add test cases if operator instantiation is different.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what you mean by related, but since the suggested workaround has a zero-length argument list, its functioning will not be affected by these code changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has not affected the handling of infix operator definitions; e.g
ModSanityCheck == Z7(7)!$$(5,9) < 7
where the inner module has this definition
x $$ y == (x + y) % cardinality
evaluates correctly. I'm unable to create a correctly parsed prefix or postfix operator definition even in older builds of the Toolbox/TLATools, though TLA documentation implies this is supposed to work.
Non-exhaustive set of background information/context: |
- Unit tests making sure instantiated parameterized infix operators still work as expected - Improving error message for a pre-existing metadata directory to hint at setting the millisecond naming on directory creation - Removing the 1 second pause in the unit tests covering this new functionality [Bug][Tools]
- De-conjunct-ing SpecA so that the originally intended test case is hit. - Comments and pedantry [Bug][Tools]
- Temporal properties always-eventually using parameterized instances (both failing and succeeding) unit tests - Refactoring the original unit test as my janky implementation of a config-file-per-test-in-the-same-class was falling apart in parallel runners - Comments about future refactorings outside the scope of these changes [Bug][Tools]
- Expanding inner module actions to allow for a clearer specification feature strong fairness; adding unit test featuring strong fairness declared on a parameterized instance's action - Renaming recently added unit test classes to conform to the 'Test' class name suffix - Excluding the abstract test class which creates config files from the ant junit task [Bug][Tools]
- Excluding the abstract test class which creates config files from a missed ant junit task - thanks Markus [Bug][Tools]
bd71c07
to
0a543cc
Compare
[Bug][Tools]