-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The upstream version is removed, so we have to vendor the trait in.
- Loading branch information
Showing
4 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Copyright Gary Guo. | ||
// | ||
// SPDX-License-Identifier: MIT OR Apache-2.0 | ||
|
||
/// A [partially ordered set][poset] that has a [greatest lower bound][glb] for any pair of | ||
/// elements in the set. | ||
/// | ||
/// Dataflow analyses only require that their domains implement [`JoinSemiLattice`], not | ||
/// `MeetSemiLattice`. However, types that will be used as dataflow domains should implement both | ||
/// so that they can be used with [`Dual`]. | ||
/// | ||
/// [glb]: https://en.wikipedia.org/wiki/Infimum_and_supremum | ||
/// [poset]: https://en.wikipedia.org/wiki/Partially_ordered_set | ||
pub trait MeetSemiLattice: Eq { | ||
/// Computes the greatest lower bound of two elements, storing the result in `self` and | ||
/// returning `true` if `self` has changed. | ||
/// | ||
/// The lattice meet operator is abbreviated as `∧`. | ||
fn meet(&mut self, other: &Self) -> bool; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters