Nested existential quantification can causes TLC to create superfluous sub-actions
Open
Nobody has claimed this yet.
enhancement
Tools
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 264
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 16
Description
In tlc2.tool.impl.Tool.getActionsAppl(OpApplNode, Context, OpDefNode, CostModel)
----- MODULE Github672 -----
VARIABLES v
Init ==
v = TRUE
Next ==
\E b \in BOOLEAN :
\* Substituting BOOLEAN for {TRUE} below makes the behavior disappear.
\E c \in {e \in {TRUE} : e = b} :
v' = ~c
============================
----- CONFIG Github672 -----
INIT Init
NEXT Next
============================
Actions with identical names and locations appear twice in (new) coverage results:
The coverage statistics at 2021-10-06 08:53:22
<Init line 4, col 1 to line 4, col 4 of module Github672>: 1:1
line 5, col 5 to line 5, col 12 of module Github672: 1
<Next line 7, col 1 to line 7, col 4 of module Github672 (10 9 11 23)>: 0:0
line 11, col 13 to line 11, col 23 of module Github672: 0
line 10, col 18 to line 10, col 39 of module Github672: 1:1
|line 10, col 34 to line 10, col 38 of module Github672: 1
|line 10, col 25 to line 10, col 30 of module Github672: 1:2
||line 10, col 26 to line 10, col 29 of module Github672: 1
<Next line 7, col 1 to line 7, col 4 of module Github672 (11 13 11 23)>: 0:1
line 11, col 13 to line 11, col 23 of module Github672: 1
End of statistics.
Originally discovered by @xxyzzn while writing a spec for EWD687a.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in tlc2.tool.impl.Tool.getActionsAppl(OpApplNode, Context, OpDefNode, CostModel) and reproduce the issue with the supplied Github672 TLA+ specification. Inspect how nested existential quantification produces coverage actions, then verify that the resulting coverage statistics no longer contain duplicate actions with identical names and locations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100