Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/extend_milp_impossible_trail_sea…
Browse files Browse the repository at this point in the history
…rch_to_unspecificed_component_level' into extend_milp_impossible_trail_search_to_unspecificed_component_level
  • Loading branch information
p-huynh committed Jan 10, 2024
2 parents a91bd3e + af3b157 commit 2aec261
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ def generate_incompatiblity_constraints_for_component(model, model_type, x, x_cl
if model_type == MILP_BITWISE_IMPOSSIBLE_AUTO:
output_size = backward_component.output_bit_size
input_ids, output_ids = backward_component._get_input_output_variables()

forward_vars = [x_class["_".join(id.split("_")[:-2] + [id.split("_")[-1]])] for id in output_ids]
else:
output_size = backward_component.output_bit_size // model.word_size
input_ids, output_ids = backward_component._get_wordwise_input_output_linked_class(model)

forward_vars = [x_class["_".join(id.split("_")[:-4] + id.split("_")[-3:])] for id in output_ids]

if include_all_components:
# for multiple input components such as the XOR, ensures compatibility occurs on the correct branch
Expand All @@ -29,11 +29,6 @@ def generate_incompatiblity_constraints_for_component(model, model_type, x, x_cl
else:
backward_vars = [x_class[id] for id in output_ids]

if model_type == MILP_BITWISE_IMPOSSIBLE_AUTO:
forward_vars = [x_class["_".join(id.split("_")[:-2] + [id.split("_")[-1]])] for id in output_ids]
else:
forward_vars = [x_class["_".join(id.split("_")[:-4] + id.split("_")[-3:])] for id in output_ids]

inconsistent_vars = [x[f"{backward_component.id}_inconsistent_{_}"] for _ in range(output_size)]

for inconsistent_index in range(output_size):
Expand Down

0 comments on commit 2aec261

Please sign in to comment.