Skip to content

Commit

Permalink
fixed slowdown due to constraint retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
wanko committed Jul 11, 2024
1 parent cf40dde commit 264321c
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions fclingo/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,9 +582,6 @@ def _term_id(self, term, backend):
return backend.add_theory_term_symbol(parse_term(term.name))

def _add_clingcon_constraint(self, atom):
for con in self._sum_constraints:
if str(con) == str(atom):
return con.literal
with self._prg.backend() as backend:
if self._config.print_trans:
print()
Expand All @@ -609,9 +606,6 @@ def _add_fsum_constraint(self, atom):
sum_con = ConstraintAtom.copy(atom)
else:
sum_con = atom
for con in self._fsum_constraints:
if str(con) == str(sum_con):
return con.literal
if sum_con.literal is None:
sum_con.literal = self._add_atom()
if self._config.print_trans:
Expand Down

0 comments on commit 264321c

Please sign in to comment.