Skip to content

Conversation

@tlively
Copy link
Member

@tlively tlively commented Nov 10, 2025

The abstraction lattice is composed of increasingly abstract
sub-lattices. Elements of the abstraction lattice are variants that may
hold the elements of any of its constituent lattices. When elements from
different sub-lattices are compared or joined, the more concrete element
is first abstracted into the lattice of the other element. Unrelated
elements in the same lattice may be abstracted before they are joined.
This choice and the abstraction operation itself are provided by CRTP
subclasses of Abstraction.

This is an important building block for eventually reconstructing
PossibleContents on top of the lattice framework.

@tlively tlively requested a review from kripken November 10, 2025 02:53
@tlively tlively force-pushed the lattice-abstraction branch from 0ed9242 to 82ce454 Compare November 10, 2025 02:54
The abstraction lattice is composed of increasingly abstract
sub-lattices. Elements of the abstraction lattice are variants that may
hold the elements of any of its constituent lattices. When elements from
different sub-lattices are compared or joined, the more concrete element
is first abstracted into the lattice of the other element. Unrelated
elements in the same lattice may be abstracted before they are joined.
This choice and the abstraction operation itself are provided by CRTP
subclasses of Abstraction.

This is an important building block for eventually reconstructing
PossibleContents on top of the lattice framework.
@tlively tlively force-pushed the lattice-abstraction branch from 82ce454 to 7b596ad Compare November 10, 2025 02:59
// template<size_t I, typename E>
// bool shouldAbstract(const E&. const E&) const
//
// shouldAbstract is only queries for unrelated elements. Related elements of
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// shouldAbstract is only queries for unrelated elements. Related elements of
// shouldAbstract is only queried for unrelated elements. Related elements of

}

using OddEvenInt = analysis::Flat<uint32_t>;
using OddEvenBool = analysis::Flat<bool>;
Copy link
Member

Choose a reason for hiding this comment

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

What does "odd even int" mean? Every integer is already even or odd. This seems like just an integer?

"odd even bool" I can see as being interpreted as "a boolean saying whether it is even or odd"- is that right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, this is just an integer. I could use a namespace instead of the OddEven name prefix, perhaps. Yes, the bool is true for even, false for odd, and top when it can be either.

return LESS;
case NO_RELATION:
case GREATER:
return NO_RELATION;
Copy link
Member

Choose a reason for hiding this comment

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

I don't follow this. We abstract a, then compare - but we turn that outcome into either "less" or "no"? Why can't we return "greater"or "equal"?

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