Skip to content

Commit

Permalink
some minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ebehner committed Apr 5, 2024
1 parent 665bb7c commit aff4979
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def _remove_formulas(self, removing_formulas: Set[Formula]):
symbols_of_formulas: Set[Symbol] = set()
for formula in removing_formulas:
self._logic_graph.remove_nodes_from(list(self._formula_graph.successors(formula)))
symbols_of_formulas.add(self._auxiliary_graph.successors(formula))
symbols_of_formulas.update(self._auxiliary_graph.successors(formula))
self._remove_formula_node(formula)
self._remove_symbols(set(symbol for symbol in symbols_of_formulas if self._symbol_only_in_one_formula(symbol)))

Expand Down Expand Up @@ -191,7 +191,7 @@ def _remove_symbols(self, removing_symbols: Set[Symbol]):
self._logic_graph.remove_nodes_from(removing_symbols)
new_single_formula_nodes = set()
for clause in clauses_containing_any_symbol:
symbols_of_clause = list(self._logic_graph.successors(clause))
symbols_of_clause = list(self._formula_graph.successors(clause))
self._logic_graph.remove_node(clause)
for clause_symbol in (s for s in symbols_of_clause if not has_path(self._formula_graph, clause.formula, s)):
self._logic_graph.remove_edge(clause.formula, clause_symbol)
Expand Down
2 changes: 1 addition & 1 deletion tests/structures/graphs/test_graph_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,4 +474,4 @@ def test_contains(self):
assert nodes[0] in graph
assert not BasicNode(6) in graph
assert edges[2] in graph
assert not BasicEdge(nodes[2], nodes[0]) in graph
assert not BasicEdge(nodes[2], nodes[0]) in graph

0 comments on commit aff4979

Please sign in to comment.