Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove unnecesary logs #313

Merged
merged 1 commit into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions evaluation/experiments/faker/faker_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ def evaluate_faker():
file = open("evaluation/experiments/faker/faker.fan", "r")
grammar, constraints = parse(file, use_stdlib=False)

print(grammar)
for constraint in constraints:
print(constraint)

fandango = Fandango(grammar, constraints)
fandango.evolve()

Expand Down
4 changes: 0 additions & 4 deletions evaluation/experiments/hash/hash_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ def evaluate_hash():
file = open("evaluation/experiments/hash/hash.fan", "r")
grammar, constraints = parse(file, use_stdlib=False)

print(grammar)
for constraint in constraints:
print(constraint)

fandango = Fandango(grammar, constraints)
fandango.evolve()

Expand Down
4 changes: 0 additions & 4 deletions evaluation/experiments/pixels/pixels_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ def evaluate_pixels():
file = open("evaluation/experiments/pixels/pixels.fan", "r")
grammar, constraints = parse(file, use_stdlib=False)

print(grammar)
for constraint in constraints:
print(constraint)

fandango = Fandango(grammar, constraints, max_generations=100)
fandango.evolve()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ def evaluate_transactions():
file = open("evaluation/experiments/transactions/transactions.fan", "r")
grammar, constraints = parse(file, use_stdlib=False)

print(grammar)
for constraint in constraints:
print(constraint)

fandango = Fandango(grammar, constraints)
fandango.evolve()

Expand Down
4 changes: 0 additions & 4 deletions evaluation/experiments/voltage/voltage_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ def evaluate_voltage():
fandango = Fandango(grammar, constraints)
fandango.evolve()

print(grammar)
for constraint in constraints:
print(constraint)

for solution in fandango.solution:
print(solution)

Expand Down
7 changes: 2 additions & 5 deletions src/fandango/evolution/algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,9 @@ def fix_individual(self, individual: DerivationTree) -> DerivationTree:

if operator == Comparison.EQUAL and side == ComparisonSide.LEFT:
suggested_tree = self.grammar.parse(
str(value), start=failing_tree.tree.symbol.symbol
)
str(value), start=failing_tree.tree.symbol.symbol
)
if suggested_tree is None:
LOGGER.warning(
f"Could not parse {failing_tree.tree.symbol} ::= {str(value)!r}"
)
continue
individual = individual.replace(failing_tree.tree, suggested_tree)
self.fixes_made += 1
Expand Down