public final class RoutineSummaryExtractor extends Object
routine-summary-scc-design.md §2.2, §3): intraprocedural
base-summary extraction — the reachability QUOTIENT of one routine's
analyzed relation graph.
No-inline-callee / binding-independence — how it is actually
enforced (corrected per codex-B2-r1 finding 1): a fresh
DataFlowAnalyzer instance blocks CROSS-FILE leakage only; the
analyzer will still inline a SAME-UNIT callee's body through its
procedure-DDL map. The contract therefore rests on PER-DEFINITION
slicing: extractAll(String) splits a unit into single-definition
texts and each slice is analyzed with no sibling present, so callee
bodies are absent by construction and calls surface as raw call sites
(+ CALLS_UNRESOLVED). extract(String) requires a
single-definition input for the same reason. Oracle package statements
are the documented exception (members share one statement; B4).
Closure semantics (mirrors the inline engine's fdd/fdr duality,
never OR-merging): per boundary pair, an fdd summary edge means at
least one interior path made of fdd hops only; an fdr
summary edge means at least one interior path containing an fdr
hop. Both may coexist. Propagation is an iterative worklist (explicit
Deque; the relation graph is arbitrary — cycles from variable
reassignment converge because the propagated sets are monotone).
The extractor caches per definition text (analysis-scoped: one extractor instance per analysis).
| Constructor and Description |
|---|
RoutineSummaryExtractor(EDbVendor vendor) |
| Modifier and Type | Method and Description |
|---|---|
RoutineSummary |
extract(String routineDefinitionText)
Extract (or return the cached) base summary of ONE routine definition.
|
List<RoutineSummary> |
extractAll(String unitText)
Extract base summaries for EVERY routine defined in a unit, each from a
PER-DEFINITION slice analyzed alone (codex-B2-r1 finding 1: analyzing
the whole unit lets the analyzer inline same-unit callee bodies through
its procedure-DDL map — slicing is what actually enforces
no-inline-callee; a same-unit callee is then simply absent, and the
call surfaces as a raw call site + CALLS_UNRESOLVED).
|
public RoutineSummaryExtractor(EDbVendor vendor)
public List<RoutineSummary> extractAll(String unitText)
Oracle packages: members share one CREATE PACKAGE [BODY] statement and cannot be sliced apart — the package statement is summarized whole, and intra-package sibling composition is deferred to B4 (parity slice).
public RoutineSummary extract(String routineDefinitionText)
extractAll(String) for whole units.