-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
P1-highHigh priority - fix this sprintHigh priority - fix this sprintenhancementNew feature or requestNew feature or requesttarantula-verifiedVerified by Tarantula fault localizationVerified by Tarantula fault localization
Description
Problem Statement
Lambda expressions have 0.783 Tarantula suspiciousness and block 29 corpus categories.
Evidence
From Tarantula Fault Localization:
lambda: 0.783 suspiciousness (4th highest)
Affected Categories (29):
- async_queue, callback_pattern, event_bus, event_emitter, event_observable
- event_saga, event_stream, expression_eval, func_curry, func_either
- func_lens, func_maybe, func_pipeline, functools_ops, generic_container
- generic_iterator, generic_result, generic_visitor, graph_traversal
- graph_unionfind, json_basic, log_parser, lru_cache, and more...
From OIP Historical Analysis:
- Part of ASTTransform category (60.2% of bugs)
Root Cause
Python lambdas don't always map cleanly to Rust closures:
- Capture semantics differ (Python captures by reference, Rust needs explicit)
- Type inference for closure parameters
- Higher-order function compatibility
Files to Modify
crates/depyler-core/src/rust_gen/expr_gen.rs- Lambda expression codegencrates/depyler-core/src/hir.rs- Lambda HIR representationcrates/depyler-core/src/borrowing_context.rs- Capture analysis
Acceptance Criteria
- Simple lambdas (
lambda x: x + 1) transpile correctly - Lambdas with captures work (
lambda x: x + captured_var) - Higher-order functions with lambdas (map, filter, sorted key=)
- 20+ of 29 blocked categories now compile
Impact: +8-10% single-shot compile rate
🤖 Generated from OIP/pmat/Tarantula analysis
Metadata
Metadata
Assignees
Labels
P1-highHigh priority - fix this sprintHigh priority - fix this sprintenhancementNew feature or requestNew feature or requesttarantula-verifiedVerified by Tarantula fault localizationVerified by Tarantula fault localization