Conversation
|
(Regarding the lock files, if you haven't seen it: check the contribution guide in the docs in the repo. It isn't published yet, so the online docs aren't up to date yet. Section 5 and the pre-commit section have the necessary information for updating the lockfiles) |
|
| Branch | greybox |
| Testbed | ubuntu-latest |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result milliseconds (ms) (Result Δ%) | Upper Boundary milliseconds (ms) (Limit %) |
|---|---|---|---|
| tests/test_benchmarks.py::test_generate_with_single_hard_constraint | 📈 view plot 🚷 view threshold | 1,939.76 ms(+9.17%)Baseline: 1,776.79 ms | 2,106.85 ms (92.07%) |
| tests/test_benchmarks.py::test_generate_with_single_soft_constraint | 📈 view plot 🚷 view threshold | 51,926.73 ms(-0.29%)Baseline: 52,076.37 ms | 81,793.96 ms (63.48%) |
| tests/test_benchmarks.py::test_init_fandango | 📈 view plot 🚷 view threshold | 154.34 ms(+2.98%)Baseline: 149.87 ms | 160.43 ms (96.20%) |
| tests/test_benchmarks.py::test_parse_spec | 📈 view plot 🚷 view threshold | 154.29 ms(+1.07%)Baseline: 152.66 ms | 159.95 ms (96.46%) |
riesentoaster
left a comment
There was a problem hiding this comment.
I love how little change is actually needed for this to work. And I love the number/depth of tests you add.
I do have some initial comments, will do a second, more thorough pass once these bigger things are cleared up/we agree not to change them.
6de14c4 to
b82e116
Compare
|
Should I move the |
I think that makes sense, yes. |
591f732 to
d08f4e7
Compare
format test . Update uv.lock type annotations fix tests install llvm debug install llvm debug . debug macos . . no fcc for windows try to improve benchmark Introduce FCC class ran uv sync --locked --all-extras no exception refactor analysis.py
|
I added a bunch of other changes for broken things:
|
There was a problem hiding this comment.
Pull request overview
Adds “greybox” execution-feedback support by integrating FCC-based static/dynamic analysis into Fandango constraints, plus end-to-end tests and build tooling to compile FCC and run the new integration tests.
Changes:
- Introduce FCC-backed
StaticAnalysis/DynamicAnalysisand exposeDynamicAnalysis(...)as a constraint callable when--fccis enabled. - Extend CLI/API plumbing to support
--fccand pass PUT/args into the evolutionary evaluation pipeline. - Add execution-feedback integration tests and C fixtures (reachability, heap allocations, execution-path length).
Reviewed changes
Copilot reviewed 82 out of 85 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_execution_feedback.py | New integration tests for execution feedback objectives via FCC + dynamic analysis traces |
| tests/resources/execution_feedback/.gitignore | Ignore generated bitcode artifacts in execution-feedback fixtures |
| tests/resources/execution_feedback/reachability_1/Makefile | Build fixture with fcc into build/ |
| tests/resources/execution_feedback/reachability_1/specifications/reach_bb_1.fan | Spec minimizing distance to a target basic block |
| tests/resources/execution_feedback/reachability_1/specifications/reach_bb_2.fan | Alternate BB-distance spec with recursive grammar |
| tests/resources/execution_feedback/reachability_1/specifications/reach_function_1.fan | Spec minimizing distance to a target function |
| tests/resources/execution_feedback/reachability_1/src/f.h | Fixture header declaring f1–f9 |
| tests/resources/execution_feedback/reachability_1/src/f1.c | Fixture call-chain function f1 |
| tests/resources/execution_feedback/reachability_1/src/f2.c | Fixture call-chain function f2 |
| tests/resources/execution_feedback/reachability_1/src/f3.c | Fixture call-chain function f3 |
| tests/resources/execution_feedback/reachability_1/src/f4.c | Fixture call-chain function f4 |
| tests/resources/execution_feedback/reachability_1/src/f5.c | Fixture call-chain function f5 |
| tests/resources/execution_feedback/reachability_1/src/f6.c | Fixture call-chain function f6 |
| tests/resources/execution_feedback/reachability_1/src/f7.c | Fixture call-chain function f7 |
| tests/resources/execution_feedback/reachability_1/src/f8.c | Fixture call-chain function f8 |
| tests/resources/execution_feedback/reachability_1/src/f9.c | Fixture target function f9 (“needle”) |
| tests/resources/execution_feedback/reachability_1/src/main.c | Fixture harness reading input from a file and invoking f1 |
| tests/resources/execution_feedback/reachability_2/Makefile | Build fixture with fcc into build/ |
| tests/resources/execution_feedback/reachability_2/specifications/reach_bb_1.fan | Spec minimizing distance to a target basic block |
| tests/resources/execution_feedback/reachability_2/specifications/reach_bb_2.fan | Alternate BB-distance spec with recursive grammar |
| tests/resources/execution_feedback/reachability_2/specifications/reach_function_1.fan | Spec minimizing distance to a target function |
| tests/resources/execution_feedback/reachability_2/src/f.h | Fixture header declaring f1–f9 |
| tests/resources/execution_feedback/reachability_2/src/f1.c | Fixture call-chain function f1 |
| tests/resources/execution_feedback/reachability_2/src/f2.c | Fixture call-chain function f2 |
| tests/resources/execution_feedback/reachability_2/src/f3.c | Fixture call-chain function f3 |
| tests/resources/execution_feedback/reachability_2/src/f4.c | Fixture call-chain function f4 |
| tests/resources/execution_feedback/reachability_2/src/f5.c | Fixture call-chain function f5 |
| tests/resources/execution_feedback/reachability_2/src/f6.c | Fixture call-chain function f6 |
| tests/resources/execution_feedback/reachability_2/src/f7.c | Fixture call-chain function f7 |
| tests/resources/execution_feedback/reachability_2/src/f8.c | Fixture call-chain function f8 |
| tests/resources/execution_feedback/reachability_2/src/f9.c | Fixture target function f9 (“needle”) |
| tests/resources/execution_feedback/reachability_2/src/main.c | Fixture harness reading input from a file and invoking f1 |
| tests/resources/execution_feedback/reachability_3/Makefile | Build fixture with fcc into build/ |
| tests/resources/execution_feedback/reachability_3/specifications/reach_bb_1.fan | Spec minimizing distance to a target basic block |
| tests/resources/execution_feedback/reachability_3/specifications/reach_bb_2.fan | Alternate BB-distance spec with recursive grammar |
| tests/resources/execution_feedback/reachability_3/specifications/reach_function_1.fan | Spec minimizing distance to a target function |
| tests/resources/execution_feedback/reachability_3/src/f.h | Fixture header declaring f1–f9 |
| tests/resources/execution_feedback/reachability_3/src/f1.c | Fixture call-chain function f1 |
| tests/resources/execution_feedback/reachability_3/src/f2.c | Fixture call-chain function f2 |
| tests/resources/execution_feedback/reachability_3/src/f3.c | Fixture call-chain function f3 |
| tests/resources/execution_feedback/reachability_3/src/f4.c | Fixture call-chain function f4 |
| tests/resources/execution_feedback/reachability_3/src/f5.c | Fixture call-chain function f5 |
| tests/resources/execution_feedback/reachability_3/src/f6.c | Fixture call-chain function f6 |
| tests/resources/execution_feedback/reachability_3/src/f7.c | Fixture call-chain function f7 |
| tests/resources/execution_feedback/reachability_3/src/f8.c | Fixture call-chain function f8 |
| tests/resources/execution_feedback/reachability_3/src/f9.c | Fixture target function f9 (“needle”) |
| tests/resources/execution_feedback/reachability_3/src/main.c | Fixture harness reading input from a file and invoking f1 |
| tests/resources/execution_feedback/mem_heap_allocations_1/Makefile | Build heap-allocation fixtures with fcc |
| tests/resources/execution_feedback/mem_heap_allocations_1/specifications/maximize_malloc.fan | Spec maximizing heap-allocated bytes |
| tests/resources/execution_feedback/mem_heap_allocations_1/src/test_input_dependent_malloc.c | Fixture where heap allocation depends on input digits |
| tests/resources/execution_feedback/mem_heap_allocations_1/src/test_malloc_calloc.c | Fixture with malloc/calloc loops for heap allocation tracing |
| tests/resources/execution_feedback/mem_heap_allocations_2/Makefile | Build heap-allocation fixtures with fcc |
| tests/resources/execution_feedback/mem_heap_allocations_2/specifications/maximize_malloc.fan | Spec maximizing heap-allocated bytes |
| tests/resources/execution_feedback/mem_heap_allocations_2/src/test_input_dependent_malloc.c | Fixture where heap allocation depends on input digits |
| tests/resources/execution_feedback/mem_heap_allocations_2/src/test_malloc_calloc.c | Fixture with malloc/calloc loops for heap allocation tracing |
| tests/resources/execution_feedback/execution_path_length_1/Makefile | Build execution-path-length fixtures with fcc |
| tests/resources/execution_feedback/execution_path_length_1/specifications/maximize_execution_path_length.fan | Spec maximizing execution path length |
| tests/resources/execution_feedback/execution_path_length_1/src/test_input_dependent.c | Fixture with input-dependent loop count |
| tests/resources/execution_feedback/execution_path_length_1/src/test_simple.c | Fixture with fixed loop count |
| tests/resources/execution_feedback/execution_path_length_2/Makefile | Build execution-path-length fixtures with fcc |
| tests/resources/execution_feedback/execution_path_length_2/specifications/maximize_execution_path_length.fan | Spec maximizing execution path length |
| tests/resources/execution_feedback/execution_path_length_2/src/test_input_dependent.c | Fixture with input-dependent loop count |
| tests/resources/execution_feedback/execution_path_length_2/src/test_simple.c | Fixture with fixed loop count |
| tests/resources/execution_feedback/execution_path_length_3/Makefile | Build execution-path-length fixtures with fcc |
| tests/resources/execution_feedback/execution_path_length_3/specifications/maximize_execution_path_length.fan | Spec maximizing execution path length |
| tests/resources/execution_feedback/execution_path_length_3/src/test_input_dependent.c | Fixture with input-dependent loop count |
| tests/resources/execution_feedback/execution_path_length_3/src/test_simple.c | Fixture with fixed loop count |
| src/fandango/execution/trace_types.py | New type aliases for CFG/CG and distance maps |
| src/fandango/execution/static_analysis.py | New static analysis loader + distance computations |
| src/fandango/execution/dynamic_analysis.py | New dynamic trace wrapper + objective functions and PUT runner |
| src/fandango/execution/fcc.py | New FCC orchestrator wiring static + dynamic analysis |
| src/fandango/execution/init.py | Package init for execution module |
| src/fandango/evolution/evaluation.py | Inject DynamicAnalysis callable into constraints when --fcc is enabled |
| src/fandango/evolution/algorithm.py | Thread FCC settings (use_fcc/put/put_args) into evaluator |
| src/fandango/constraints/soft.py | Replace unbounded dict cache with LRU cache |
| src/fandango/cli/utils.py | Pass use_fcc and (conditionally) PUT/args into Fandango settings |
| src/fandango/cli/parser.py | Add --fcc CLI flag |
| src/fandango/cli/output.py | Skip running test_command output hook when --fcc is enabled |
| src/fandango/api.py | Adjust runtime-end sanitization for FCC mode in infinite runs |
| pyproject.toml | Add cachetools + typing stubs; update mypy excludes for fcc/ |
| docs/Constraints.md | Update example command output (reduced generations in docs snippet) |
| Makefile | Install/build FCC locally in make test-tools; update docs error checking |
| .gitignore | Ignore fcc/ clone directory |
| .github/workflows/build-docs.yml | Run docs build on Ubuntu + macOS; conditional sudo and artifact upload |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
(I ignored the copilot suggestions/notes that aren't about my code.) (I also haven't taken a close look at Leon's original work. The code generally is not up to the normal standard, but I think I'd be fine merging this mostly as-is, as fcc/coverage feedback is at experimental for now.) |
|
I have moved the FCC logic to an |
Depends on #783