Skip to content

Commit

Permalink
#49: minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-biasion committed Jul 18, 2024
1 parent 182b4ad commit 8ba8b1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sxpat/template_manager/template_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ def _use_exact_var(self, node_name: str) -> str:
if node_name in self.exact_constants.values():
succs = list(self._current_graph.graph.successors(node_name))
if len(succs) == 1 and succs[0] in self._current_graph.output_dict.values():
output_i = next(node_i for node_i, node_name in self._current_graph.output_dict.items() if node_name == succs[0])
return f'{sxpat_cfg.CONSTANT_PREFIX}{output_i}'
output_i = mapping_inv(self._current_graph.output_dict, succs[0])
return f'{sxpat_cfg.CONSTANT_PREFIX}{output_i}'
else:
return sxpat_cfg.Z3_GATES_DICTIONARY[self._exact_graph.graph.nodes[node_name][sxpat_cfg.LABEL]]

Expand Down

0 comments on commit 8ba8b1b

Please sign in to comment.