3.4 KiB
3.4 KiB
Execution Plan for Extended Analysis
Phase 0: Surgical Refactoring (The Enrichment Hook)
- Create
AnalysisResultandCodebaseMetadatamodels. - Update
ExportService.generateOutputsto acceptAnalysisResult. - Implement
EnrichmentServiceandAnalysisEnricherinterface. - Wrap current parser outputs in
AnalysisResultwithinExportService.
Phase 1: Foundation
- Implement
JdtIntelligenceProvideras the primary semantic analyzer. - Implement
RegexIntelligenceProviderfor fast, lightweight metadata extraction. ...
Phase 2: Direct Trigger Detection
- Implement
GenericEventDetectorusingASTVisitorto findsendEventcalls. - Enhance
CodebaseContextto provide mapping fromMethodDeclarationto its callers (within the same codebase).
Phase 3: Entry Point Mapping
- Implement
SpringMvcDetectorfor REST endpoints. - Implement
MessageListenerDetectorfor Kafka/JMS. - Implement
ConfigurableTriggerDetectorfor user-defined patterns.
Phase 4: Call Graph Integration
- Develop a simple call graph builder to link
Entry PointstoTrigger Pointsvia intermediate service calls. - Support inheritance in call graph resolution (e.g., calling a method defined in an interface/base class).
Phase 5: Correlation and Visualization
- Update
ExportServiceto include trigger information. - Update DOT exporter to show "external" entry points as boxes pointing to transitions.
- Update SCXML exporter to include trigger metadata in
<transition>tags.
Phase 6: Validation
- Create a "Complex Sample Project" with REST controllers, services, and multiple state machines.
- Add unit tests for each detector and the aggregator.
- Verify that inheritance in both state machine config and controllers is correctly handled.
Phase 7: Advanced Value Resolution
- Implement
PropertyResolverto scanapplication.properties/yml. - Add support for
@Valuetracking in fields and constructors. - Implement constant resolution for cross-class references in annotations.
- Integrate value propagation into the call graph analysis (linking injected values to
sendEventarguments).
Phase 8: Advanced String Expression Resolution
- Implement
ValueResolverto handle string concatenations and variable references. - Support cross-class constant lookup using JDT.
- Update all Enrichers (MVC, Rabbit, JMS) to use
ValueResolverfor metadata extraction. - Verify with complex path patterns in the integration test suite.
Phase 9: Instance Identification & Persistence Mapping
- Implement
InstanceIdentifierto track State Machine IDs (via@Qualifier, bean names, or factories). - Detect persistence restoration logic (
persister.restore). - Update all Enrichers to include
stateMachineIdandisRestoredFromPersistencein metadata. - Verify multi-SM identification in the integration test suite.
Phase 10: Incoming Payload Analysis
- Implement payload type extraction for REST and Message entry points.
- Detect usage of payload fields in
sendEventorrestorecalls. - Add
payloadTypetoEntryPointandTriggerPointmodels.
Phase 11: Interceptor & Filter Mapping
- Implement detection of
HandlerInterceptorandFilterimplementations. - Map interceptors to endpoints using
WebMvcConfigureranalysis. - Provide "Interceptor Context" metadata for each mapped endpoint.