Skip to content
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

ISLE: Polish reference #9905

Closed
wants to merge 1 commit into from
Closed

Conversation

eagr
Copy link
Contributor

@eagr eagr commented Dec 27, 2024

Basically just typo fixing and more succinct wording, without any intent to change the original meaning.

@eagr eagr requested a review from a team as a code owner December 27, 2024 08:22
@eagr eagr requested review from fitzgen and removed request for a team December 27, 2024 08:22
@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator isle Related to the ISLE domain-specific language labels Dec 27, 2024
Copy link

Subscribe to Label Action

cc @cfallin, @fitzgen

This issue or pull request has been labeled: "cranelift", "isle"

Thus the following users have been cc'd because of the following labels:

  • cfallin: isle
  • fitzgen: isle

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

@eagr
Copy link
Contributor Author

eagr commented Dec 27, 2024

Couldn't seem to find the spec for decl multi in the reference. Is it forgotten or like TBD? Does it mean something like "multifaceted" as in an item is both a constructor and extractor?

Copy link
Member

@cfallin cfallin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @eagr -- some comments below; I stopped reading after the last one, about 15% of the way through. Most of these edits are changing meaning in fairly important ways, and the ones that don't seem to be minor style things / subjective preferences, so I think I'd prefer not to accept an edit pass on this document -- given the magnitude of your changes I don't want to spend the time it would take to iterate back to fully correct wording. Thanks anyway, I'm sure you intended well. I'll go ahead and close this PR.

conditions, can be compiled down into a certain sequence of machine
instruction lowering pattern is a specification describing certain
operators in the IR (CLIF) when combined under certain
conditions, can be compiled down to a certain sequence of machine
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This rewording is incorrect. "A ... pattern is a specification that a combination of operators ... can be compiled" can't be rewritten into "A ... pattern is a specification describing certain operators ... can be compiled". The first (current) form has a subordinate clause describing what the specification does, and the verb indicates that this specification can be compiled. Your rewrite somehow attaches two actions onto "specification" -- it describes, and it can be compiled. These aren't semantically equivalent.

@@ -26,7 +26,7 @@ instructions. For example:
be lowered to an x86 `ADD` instruction with a register and an
immediate.

One could write something like the following in ISLE (simplified from
One can write something like the following in ISLE (simplified from
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This rewrite loses the meaning: the whole stanza is of the form "one could ... [but] ISLE lets you ..." and changing "could" to "can" completely changes the meaning.

@@ -262,19 +262,19 @@ subterms:
* `_` is a wildcard and matches anything, without capturing it.

* Primitive constant values, such as `42` or `$Symbol`, match only if
the term is exactly equal to this constant.
the term is an exact equivalent.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"an exact equivalent" does not read the same as "is exactly equal" to me: the former implies something about an equivalence class, different forms with the same underlying denotation, etc., whereas for primitive values (e.g. integers) we really do want to say "equal". I'm not sure what "equivalent" does better here.

for example, `(A (B x _) z)`. This pattern would match the term `(A (B
1 2) 3)` but not `(A (C 4 5) 6)`.

A pattern can properly be seen as a partial function from input term
to captured (bound) variables: it either matches or it doesn't, and if
A pattern can probably be seen as a partial function from the input term
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One cannot replace "properly" with "probably" -- that completely changes the meaning.

@cfallin cfallin closed this Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift Issues related to the Cranelift code generator isle Related to the ISLE domain-specific language
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants