Skip to content

Commit

Permalink
Implement abstract environments on top of abstract maps
Browse files Browse the repository at this point in the history
Summary:
See D50019979 for context.
We now implement `AbstractEnvironment` based on a given `Map` type implementing `AbstractMap`.
This avoids a lot of code duplication while allowing users to implement their own map data structure.

Reviewed By: arnaudvenet

Differential Revision: D50080942

fbshipit-source-id: 6df6e44ead51f34be81f904a684ba6e48edeabc9
  • Loading branch information
arthaud authored and facebook-github-bot committed Oct 11, 2023
1 parent fb9d458 commit 5b7341a
Show file tree
Hide file tree
Showing 6 changed files with 447 additions and 949 deletions.
6 changes: 1 addition & 5 deletions service/constant-propagation/ConstantArrayDomain.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,7 @@ class ConstantArrayDomain final
}

// NOTE: This will throw if array_values() is Top.
const typename sparta::PatriciaTreeMapAbstractEnvironment<uint32_t,
Domain>::MapType&
bindings() const {
return array_values().bindings();
}
const auto& bindings() const { return array_values().bindings(); }

Domain get(uint32_t idx) const {
if (this->is_top()) {
Expand Down
Loading

0 comments on commit 5b7341a

Please sign in to comment.