Skip to content

Commit

Permalink
Maybe this time HeavySimplify will work?
Browse files Browse the repository at this point in the history
  • Loading branch information
frabert committed Aug 19, 2022
1 parent 03aa89c commit 1a44bd2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/AST/ReachBasedRefine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#include <gflags/gflags.h>
#include <glog/logging.h>

#include "rellic/AST/Util.h"

namespace rellic {

ReachBasedRefine::ReachBasedRefine(Provenance &provenance, clang::ASTUnit &unit)
Expand Down Expand Up @@ -44,7 +46,7 @@ bool ReachBasedRefine::VisitCompoundStmt(clang::CompoundStmt *compound) {
}

// Is the current `if` statement unreachable from all the others?
bool is_unreachable{Prove(!(cond && z3::mk_or(conds)))};
bool is_unreachable{Prove(HeavySimplify(!(cond && z3::mk_or(conds))))};

if (!is_unreachable) {
ResetChain();
Expand All @@ -54,7 +56,7 @@ bool ReachBasedRefine::VisitCompoundStmt(clang::CompoundStmt *compound) {
conds.push_back(cond);

// Do the collected statements cover all possibilities?
auto is_complete{Prove(z3::mk_or(conds))};
auto is_complete{Prove(HeavySimplify(z3::mk_or(conds)))};

if (ifs.size() <= 2 || !is_complete) {
// We need to collect more statements
Expand Down

0 comments on commit 1a44bd2

Please sign in to comment.