Skip to content

Commit

Permalink
Review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
fruffy committed Apr 14, 2023
1 parent cb0e759 commit 25c9f67
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion backends/p4tools/modules/testgen/lib/concolic.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ namespace P4Tools::P4Testgen {
/// are present, but not expressions. The reason expressions need to be keys is that sometimes
/// entire expressions are mapped to a particular constant.
using ConcolicVariableMap =
std::map<std::variant<const IR::StateVariable, const IR::Expression *>, const IR::Expression *>;
ordered_map<std::variant<const IR::StateVariable, const IR::Expression *>,
const IR::Expression *>;

/// Encapsulates a set of concolic method implementations.
class ConcolicMethodImpls {
Expand Down
1 change: 0 additions & 1 deletion backends/p4tools/modules/testgen/lib/test_backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ const Model *TestBackEnd::computeConcolicVariables(const ExecutionState *executi
const auto *concolicAssignment = resolvedConcolicVariable.second;
const IR::Expression *pathConstraint = nullptr;
// We need to differentiate between state variables and expressions here.
// We need to differentiate between state variables and expressions here.
if (std::holds_alternative<const IR::StateVariable>(concolicVariable)) {
pathConstraint = new IR::Equ(std::get<const IR::StateVariable>(concolicVariable),
concolicAssignment);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ void test(const IR::Expression *expression, const IR::AssignmentStatement *varia

// getting model
Model model = *solver.getModel();
ASSERT_EQ(model.size(), 2u);
ASSERT_EQ(model.size(), 2U);

ASSERT_EQ(model.count(variableValue->left->checkedTo<IR::Member>()), 1u);
ASSERT_EQ(model.count(variableValue->left->checkedTo<IR::Member>()), 1U);

const auto *value = model.at(variableValue->left->checkedTo<IR::Member>());

Expand Down

0 comments on commit 25c9f67

Please sign in to comment.