From b8eb277ae4adc1b6d6d3e68014bb700986f6a98f Mon Sep 17 00:00:00 2001 From: fruffy Date: Thu, 6 Jun 2024 09:35:20 -0400 Subject: [PATCH] Replace boost::container::flat_map with a custom flat_map implementation in P4Tools. Signed-off-by: fruffy --- backends/p4tools/common/lib/model.h | 3 +-- ir/solver.h | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/backends/p4tools/common/lib/model.h b/backends/p4tools/common/lib/model.h index 4059aba8283..ff1cc437594 100644 --- a/backends/p4tools/common/lib/model.h +++ b/backends/p4tools/common/lib/model.h @@ -4,7 +4,6 @@ #include #include -#include "absl/container/btree_map.h" #include "ir/ir.h" #include "ir/solver.h" #include "ir/visitor.h" @@ -12,7 +11,7 @@ namespace P4::P4Tools { /// Symbolic maps map a state variable to a IR::Expression. -using SymbolicMapType = absl::btree_map; +using SymbolicMapType = P4::flat_map; /// Represents a solution found by the solver. A model is a concretized form of a symbolic /// environment. All the expressions in a Model must be of type IR::Literal. diff --git a/ir/solver.h b/ir/solver.h index f29c4b286e8..b61ede7d8b8 100644 --- a/ir/solver.h +++ b/ir/solver.h @@ -4,11 +4,11 @@ #include #include -#include "absl/container/btree_map.h" #include "ir/compare.h" #include "ir/ir.h" #include "lib/castable.h" #include "lib/cstring.h" +#include "lib/flat_map.h" namespace P4 { @@ -18,7 +18,7 @@ using Constraint = IR::Expression; /// This type maps symbolic variables to their value assigned by the solver. using SymbolicMapping = - absl::btree_map; + P4::flat_map; /// Provides a higher-level interface for an SMT solver. class AbstractSolver : public ICastable {