From fc6633345ae445fbc4fda9d24355b8e72722caaf Mon Sep 17 00:00:00 2001 From: Vladimir Still Date: Sun, 7 Jan 2024 23:44:27 -0800 Subject: [PATCH] Add the assertion alos to symbolic_env --- backends/p4tools/common/lib/symbolic_env.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backends/p4tools/common/lib/symbolic_env.cpp b/backends/p4tools/common/lib/symbolic_env.cpp index f605259b8aa..0578338f6e3 100644 --- a/backends/p4tools/common/lib/symbolic_env.cpp +++ b/backends/p4tools/common/lib/symbolic_env.cpp @@ -27,6 +27,8 @@ const IR::Expression *SymbolicEnv::get(const IR::StateVariable &var) const { bool SymbolicEnv::exists(const IR::StateVariable &var) const { return map.find(var) != map.end(); } void SymbolicEnv::set(const IR::StateVariable &var, const IR::Expression *value) { + BUG_CHECK(value->type && !value->type->is(), + "Cannot set value with unspecified type: %1%", value); map[var] = value; }