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

[analysis] Implement Flat lattice #6039

Merged
merged 2 commits into from
Oct 25, 2023
Merged

[analysis] Implement Flat lattice #6039

merged 2 commits into from
Oct 25, 2023

Conversation

tlively
Copy link
Member

@tlively tlively commented Oct 21, 2023

Given a type T, Flat<T> is the lattice where none of the values of T are
comparable except with themselves, but they are all greater than a common bottom
element not in T and less than a common top element also not in T.

#else
template<typename T>
#endif
struct Flat {
Copy link
Member

Choose a reason for hiding this comment

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

PR description could be a comment in the header.

LatticeComparison compare(const Element& a, const Element& b) const noexcept {
if (a.index() < b.index()) {
return LESS;
} else if (a.index() > b.index()) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

What interface is index() from?

Copy link
Member Author

Choose a reason for hiding this comment

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

@tlively
Copy link
Member Author

tlively commented Oct 25, 2023

Merge activity

  • Oct 25, 1:00 PM: @tlively started a stack merge that includes this pull request via Graphite.
  • Oct 25, 3:30 PM: Graphite rebased this pull request as part of a merge.
  • Oct 25, 4:05 PM: @tlively merged this pull request with Graphite.

Base automatically changed from full-lattice to main October 25, 2023 19:30
Given a type `T`, `Flat<T>` is the lattice where none of the values of `T` are
comparable except with themselves, but they are all greater than a common bottom
element not in `T` and less than a common top element also not in `T`.
@tlively tlively merged commit ea6bcd0 into main Oct 25, 2023
13 of 14 checks passed
@tlively tlively deleted the flat-lattice branch October 25, 2023 20:05
radekdoulik pushed a commit to dotnet/binaryen that referenced this pull request Jul 12, 2024
Given a type `T`, `Flat<T>` is the lattice where none of the values of `T` are
comparable except with themselves, but they are all greater than a common bottom
element not in `T` and less than a common top element also not in `T`.
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.

3 participants