-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUG: correct fingerprinting of variables
Variables were fingerprinted as `VAR(i)` where `i` an index, and bound identifiers also with `VAR(j)` where `j` an index produced using a different counter. The counter for variables is `counthyp`, and the counter for bound constants and bound variables is `countvar`. When the two counters are both equal to 1, `VAR(1)` results for both the occurrence of a variable, and the occurrence of a constant bound by a rigid quantifier. This commit adds a test file that catches this error.
- Loading branch information
Showing
2 changed files
with
27 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
test/fast/fingerprint/FingerprintVariablesParameters_test.tla
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
---- MODULE FingerprintVariablesParameters_test ---- | ||
(* Test to ensure there is no coincidence between | ||
how variables and bound constants are fingerprinted. | ||
When this was a bug, the first run of TLAPM | ||
did not prove the second theorem below, | ||
but the assertions of the two theorems had identical | ||
fingerprints, so the second run of TLAPM proved | ||
both theorems. The commands for the test harness | ||
check this, by running TLAPM twice. | ||
*) | ||
|
||
VARIABLE x | ||
|
||
THEOREM \E y: y # x | ||
OBVIOUS | ||
|
||
THEOREM \E y: y # y | ||
OBVIOUS | ||
|
||
==================================== | ||
command: ${TLAPM} --toolbox 0 0 ${FILE} | ||
stderr: 1/2 obligations failed | ||
command: ${TLAPM} --toolbox 0 0 ${FILE} | ||
stderr: 1/2 obligations failed |