Labels: high-difficulty, ml, heuristics
Difficulty: High
Module: libs/ml-engine/
🧠 Concept
Train a lightweight regression model that analyzes contract AST complexity features (cyclomatic complexity, state reads, memory allocations) to predict gas behavior on unseen code patterns.
⚠️ Problem
Rule-based static analysis only catches explicitly coded patterns; heuristic models can flag unusually complex code blocks that static rules miss.
📁 Implementation Scope
libs/ml-engine/src/feature-extractor.ts
libs/ml-engine/src/predictor.ts
🛠️ Requirements
- Extract structural code features (loop depth, variable count, storage accesses) into feature vectors.
- Evaluate feature vectors against pre-trained regression models to generate a "Gas Complexity Index."
- Highlight functions whose predicted gas usage strays significantly from industry baseline averages.
🎯 Acceptance Criteria
Labels:
high-difficulty,ml,heuristicsDifficulty: High
Module:
libs/ml-engine/🧠 Concept
Train a lightweight regression model that analyzes contract AST complexity features (cyclomatic complexity, state reads, memory allocations) to predict gas behavior on unseen code patterns.
Rule-based static analysis only catches explicitly coded patterns; heuristic models can flag unusually complex code blocks that static rules miss.
📁 Implementation Scope
libs/ml-engine/src/feature-extractor.tslibs/ml-engine/src/predictor.ts🛠️ Requirements
🎯 Acceptance Criteria