Skip to content

Conversation

W95Psp
Copy link
Member

@W95Psp W95Psp commented Sep 3, 2025

This PR introduces a new KnownApplications resugaring.

It transforms every ExprKind::App node (representing function applications) into the new variant ResugaredExprKind::FunApp.

FunApp serves as an enum capturing a list of known function and operator names (e.g., addition, dereference, multiplication, etc.), along with an array of arguments. The arity of each function is encoded in the type system.

This resugaring is especially useful for printers.

It also generalizes and replaces the existing BinOp resugaring. As such, this PR removes BinOp and updates its usage in the Lean backend accordingly.

@W95Psp W95Psp force-pushed the rengine-add-known-apps-resugaring branch 4 times, most recently from dfd1e10 to 87cfd73 Compare September 4, 2025 09:52
@W95Psp W95Psp changed the base branch from main to rengine-global-id-names September 4, 2025 09:52
@W95Psp W95Psp force-pushed the rengine-add-known-apps-resugaring branch from 87cfd73 to 594348c Compare September 4, 2025 09:58
@W95Psp W95Psp marked this pull request as ready for review September 4, 2025 10:04
@W95Psp W95Psp force-pushed the rengine-add-known-apps-resugaring branch from 6dad272 to 6ba5f6a Compare September 4, 2025 10:04
@W95Psp W95Psp requested a review from a team as a code owner September 4, 2025 10:04
@W95Psp W95Psp requested review from clementblaudeau, keks and a team and removed request for a team September 4, 2025 10:04
@W95Psp W95Psp force-pushed the rengine-global-id-names branch from a0f860c to 9ddecbe Compare September 4, 2025 12:42
@W95Psp W95Psp force-pushed the rengine-add-known-apps-resugaring branch from e3ea02f to fe7f7a4 Compare September 4, 2025 12:45
Copy link
Member

@keks keks left a comment

Choose a reason for hiding this comment

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

Looks pretty good! Just a few nits and questions.

@W95Psp W95Psp force-pushed the rengine-add-known-apps-resugaring branch from dd13dab to 119cd10 Compare September 8, 2025 13:03
Copy link
Member

@keks keks left a comment

Choose a reason for hiding this comment

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

Thanks, this looks good!

Base automatically changed from rengine-global-id-names to main September 9, 2025 07:45
@W95Psp
Copy link
Member Author

W95Psp commented Sep 9, 2025

Putting this back to draft.
With #1666, it is not clear how useful this phase will be.

@W95Psp W95Psp marked this pull request as draft September 9, 2025 12:19
@W95Psp W95Psp closed this Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants