Skip to content

Parenthesize SUBSET and UNION where precedence is unspecified. - #252

Draft
lemmy wants to merge 1 commit into
masterfrom
mku-gh892
Draft

lemmy wants to merge 1 commit into
masterfrom
mku-gh892

Conversation

@lemmy

@lemmy lemmy commented Nov 4, 2026

Copy link
Copy Markdown
Member

The Summary of TLA+ gives SUBSET, UNION, \cup, and \ precedence 8-8. Equal precedence leaves the binding unspecified, and TLA+ rejects the expression. SANY has given SUBSET and UNION precedence 10-13, under which SUBSET S \ T parses as (SUBSET S) \ T and A \cup UNION B as A \cup (UNION B). tlaplus#1508 restores the documented ranges, so the unparenthesized forms become syntax errors. The parentheses keep the binding SANY has been using.

Related to Github RFC issue #28
tlaplus/rfcs#28

See Github pull request #1508
tlaplus/tlaplus#1508

The Summary of TLA+ gives SUBSET, UNION, \cup, and \ precedence 8-8.
Equal precedence leaves the binding unspecified, and TLA+ rejects the
expression. SANY has given SUBSET and UNION precedence 10-13, under
which SUBSET S \ T parses as (SUBSET S) \ T and A \cup UNION B as
A \cup (UNION B). tlaplus#1508 restores the documented ranges, so the
unparenthesized forms become syntax errors. The parentheses keep the
binding SANY has been using.

Related to Github RFC issue #28
tlaplus/rfcs#28

See Github pull request #1508
tlaplus/tlaplus#1508

Co-authored-by: Grok 4.7 <noreply@x.ai>
Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant