Skip to content

Introduce DerivationTree.find_subtrees#880

Merged
riesentoaster merged 2 commits intofandango-fuzzer:mainfrom
riesentoaster:feat/tree.find_subtrees
Apr 1, 2026
Merged

Introduce DerivationTree.find_subtrees#880
riesentoaster merged 2 commits intofandango-fuzzer:mainfrom
riesentoaster:feat/tree.find_subtrees

Conversation

@riesentoaster
Copy link
Copy Markdown
Collaborator

Provides a Generator of subtrees with a certain nonterminal of a tree.

Deprecates undocumented, but publicly used DerivationTree.find_all_trees, which internally just calls list on the new function. Generators are much more flexible, if you don't care about all entries, and can fast-cirquit failing constraints.

@github-actions
Copy link
Copy Markdown

🐰 Bencher Report

Branchfeat/tree.find_subtrees
Testbedubuntu-latest
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
tests/test_benchmarks.py::test_generate_with_single_hard_constraint📈 view plot
🚷 view threshold
2,035.68 ms
(+14.33%)Baseline: 1,780.48 ms
2,101.68 ms
(96.86%)
tests/test_benchmarks.py::test_generate_with_single_soft_constraint📈 view plot
🚷 view threshold
30,295.77 ms
(-41.16%)Baseline: 51,490.84 ms
79,369.26 ms
(38.17%)
tests/test_benchmarks.py::test_init_fandango📈 view plot
🚷 view threshold
152.39 ms
(+1.48%)Baseline: 150.17 ms
161.00 ms
(94.65%)
tests/test_benchmarks.py::test_parse_spec📈 view plot
🚷 view threshold
153.82 ms
(+0.75%)Baseline: 152.68 ms
159.90 ms
(96.20%)
🐰 View full continuous benchmarking report in Bencher

@riesentoaster riesentoaster merged commit 01be7a0 into fandango-fuzzer:main Apr 1, 2026
28 checks passed
@riesentoaster riesentoaster deleted the feat/tree.find_subtrees branch April 1, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants