File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -46,15 +46,16 @@ concept Lattice = requires(const L& lattice,
46
46
// Lattices must have elements.
47
47
typename L::Element;
48
48
requires std::copyable<typename L::Element>;
49
- // We need to be able to get the bottom element.
49
+ // Get the bottom element of this lattice .
50
50
{ lattice.getBottom () } noexcept -> std::same_as<typename L::Element>;
51
- // Elements should be comparable . TODO: use <=> and std::three_way_comparable
52
- // once we support C++20 everywhere.
51
+ // Compare two elements of this lattice . TODO: use <=> and
52
+ // std::three_way_comparable once we support C++20 everywhere.
53
53
{
54
54
lattice.compare (constElem, constElem)
55
55
} noexcept -> std::same_as<LatticeComparison>;
56
- // We need to be able to get the least upper bound of two elements and know
57
- // whether any change was made.
56
+ // Modify `elem` in-place to be the join (aka least upper bound) of `elem` and
57
+ // `constElem`, returning true iff `elem` was modified, i.e. if it was not
58
+ // already an upper bound of `constElem`.
58
59
{ lattice.join (elem, constElem) } noexcept -> std::same_as<bool >;
59
60
};
60
61
Original file line number Diff line number Diff line change @@ -85,9 +85,9 @@ class FiniteIntPowersetLattice {
85
85
// Returns an instance of the bottom lattice element.
86
86
Element getBottom () const noexcept ;
87
87
88
- // Calculates the LUB of this element with some other element and sets
89
- // this element to the LUB in place. Returns true if this element before
90
- // this method call was different than the LUB .
88
+ // Modifies `self` to be the join (aka least upper bound) of `self` and
89
+ // `other`. Returns true if `self` was modified, i.e. if it was not already an
90
+ // upper bound of `other` .
91
91
bool join (Element& self, const Element& other) const noexcept ;
92
92
};
93
93
You can’t perform that action at this time.
0 commit comments