Skip to content

Commit cc6f9cd

Browse files
committed
skip irrelevant states in ColoringSmt::areChoicesConsistent
1 parent 866d5b5 commit cc6f9cd

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

payntbind/src/synthesis/quotient/ColoringSmt.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,9 @@ std::pair<bool,std::vector<std::vector<uint64_t>>> ColoringSmt<ValueType>::areCh
537537
solver.push();
538538
for(uint64_t choice: choices) {
539539
uint64_t state = choice_to_state[choice];
540+
if(not state_is_relevant[state]) {
541+
continue;
542+
}
540543
for(uint64_t path: state_path_enabled[state]) {
541544
const char *label = choice_path_label[choice][path].c_str();
542545
solver.add(choice_path_expresssion[choice][path], label);
@@ -577,13 +580,12 @@ std::pair<bool,std::vector<std::vector<uint64_t>>> ColoringSmt<ValueType>::areCh
577580
if(not choices[choice]) {
578581
continue;
579582
}
580-
for(uint64_t path: state_path_enabled[state]) {
581-
const char *label = choice_path_label[choice][path].c_str();
582-
solver.add(choice_path_expresssion[choice][path], label);
583-
}
584-
consistent = check();
585-
if(not consistent) {
586-
break;
583+
if(state_is_relevant[state]) {
584+
for(uint64_t path: state_path_enabled[state]) {
585+
const char *label = choice_path_label[choice][path].c_str();
586+
solver.add(choice_path_expresssion[choice][path], label);
587+
}
588+
consistent = check();
587589
}
588590
visitChoice(choice,state_reached,unexplored_states);
589591
break;

0 commit comments

Comments
 (0)