summaryrefslogtreecommitdiff
path: root/src/analysis/lattices/inverted.h
Commit message (Collapse)AuthorAgeFilesLines
* [NFC] Add explicit deduction guides for CTAD (#6094)Thomas Lively2023-11-091-0/+3
| | | | | | | | | | | Class template argument deduction (CTAD) is a C++17 feature that allows variables to be declared with class template types without specifying the template parameters. Deduction guides are a mechanism by which template authors can control how the template parameters are inferred when CTAD is used. The Google style guide prohibits the use of CTAD except where template authors opt in to supporting it by providing explicit deduction guides. For compatibility with users adhering to Google style, set the compiler flag to check this condition and add the necessary deduction guides to make the compiler happy again.
* [analysis] Allow joining a single vector element efficiently (#6071)Thomas Lively2023-11-021-2/+6
| | | | | | | | | Previously, modifying a single vector element of a `Shared<Vector>` element required materializing a full vector to do the join. When there is just a single element to update, materializing all the other elements with bottom value is useless work. Add a `Vector<L>::SingletonElement` utility that represents but does not materialize a vector with a single non-bottom element and allow it to be passed to `Vector<L>::join`. Also update `Shared` and `Inverted` so that `SingletonElement` joins still work on vectors wrapped in those other lattices.
* [analysis][NFC] Rename parameters to join and meet methods (#6056)Thomas Lively2023-10-301-4/+4
| | | | | | Since these methods, which operate on lattice elements, moved to the lattice types, it no longer makes much sense for their parameters to be called `self` and `other`. Rename them to `joinee` and `joiner` for joins and `meetee` and `meeter` for meets.
* [analysis] Improve lattice fuzzer (#6050)Thomas Lively2023-10-271-1/+1
| | | | | | | | | | Implement new `RandomLattice` and `RandomFullLattice` utilities that are lattices randomly created from other lattices. By recursively using themselves as the parameter lattices for lattices like `Inverted` and `Lift`, these random lattices can become arbitrarily nested. Decouple the checking of lattice properties from the checking of transfer function properties by creating a new, standalone `checkLatticeProperties` function.
* [analysis] Implement a Lift lattice (#6040)Thomas Lively2023-10-251-0/+5
| | | | This lattice "lifts" another lattice by inserting a new bottom element underneath it.
* [analysis] Add a FullLattice concept and Inverted lattice (#6038)Thomas Lively2023-10-251-0/+49
The FullLattice concept extends the base Lattice with `getTop` and `meet` operations. The `Inverted` lattice uses these operations to reverse the order of an arbitrary full lattice, for example to create a lattice of integers ordered by `>` rather than by `<`.