Repository navigation
fix(pstack): avoid reserved TLA action names - #844
Open
rudycelekli wants to merge 1 commit into
Open
rudycelekli wants to merge 1 commit into
rudycelekli wants to merge 1 commit into
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
chart-to-tla.mjsgeneratedUNCHANGED ==when a valid chart usedUNCHANGEDas a transition label.UNCHANGEDis a TLA+ keyword, so the generated module could not be parsed.The converter now reserves
UNCHANGEDwhen it creates action identifiers, producingUNCHANGED2instead. The generated harness tree includes the same fix and regression test.Validation: the regression produces
UNCHANGED ==on base andUNCHANGED2 ==after this change. The focused test passes; the full statechart suite was attempted but exhausted the machine's temporary-disk space after unrelated tests.Note
Low Risk
Small change to identifier reservation in the chart-to-TLA generator plus a focused regression test; no runtime or security impact.
Overview
Fixes invalid TLA+ output when a Mermaid transition label is
UNCHANGED, which is a TLA+ operator and must not be used as a generated action definition name.chart-to-tla.mjsnow treatsUNCHANGEDlike other reserved spec symbols (Init,Next, etc.), so theidentuniquifier emitsUNCHANGED2(or similar) for that label while the spec body can still use the realUNCHANGEDstuttering operator.A regression test runs the converter on a chart whose edge label is
UNCHANGEDand asserts the.tlafile definesUNCHANGED2 ==and notUNCHANGED ==.Reviewed by Cursor Bugbot for commit 6760078. Bugbot is set up for automated code reviews on this repo. Configure here.