public final class DynamicSqlEdgeProof extends Object
docs/designs/sp/dynamic-sql-fragment-provenance-design.md, Layer 3 /
R4 step 4).
This class is not a publication authority. It checks three useful evidence
conditions, but its P2 approximation is known to accept a JOIN/ON-tail
counterexample. A true publication proof additionally requires the LR
commitment check and staged model construction described in
dynamic-sql-commitment-check-design.md.
The historical conditions are:
SqlFragment.Kind.LITERAL fragments (step 1's fragment IR).
A hole never contributes identifier text, so a fabricated object cannot
be published by construction.DynamicSqlProofHarness.checkLexBoundary(java.lang.String, gudusoft.gsqlparser.EDbVendor), step 2), and the
whole materialized text is proof-grade parseable
(DynamicSqlProofHarness.proofParse(java.lang.String, gudusoft.gsqlparser.EDbVendor)) — no recovery, no syntax
errors.BindingTrace (step 3). A missing or incomplete trace
refuses: an omitted binder never looks complete.Phase status: built, unwired. No analysis path calls this yet; staged publication and a sound LR commitment check are prerequisites for any filtered publication mode. Its historical P2 token-adjacency check has a pinned counterexample and must be treated as SHADOW evidence only.
| Modifier and Type | Class and Description |
|---|---|
static class |
DynamicSqlEdgeProof.EdgeEvidence
The evidence set of one candidate edge: the AST nodes whose tokens spell
the source object, the target object, and the column references binding
them.
|
static class |
DynamicSqlEdgeProof.Verdict
Outcome of proving one candidate edge.
|
| Modifier and Type | Method and Description |
|---|---|
static List<SqlFragment> |
holesOf(DynamicSqlLineageResolver.MaterializedSite site)
Hole diagnostics for a site, for the "which variable blocked what" report.
|
static List<int[]> |
holeSpansOf(DynamicSqlLineageResolver.MaterializedSite site)
Character spans
[start, end) of every non-literal fragment of site,
in fragment order — index-aligned with holesOf(gudusoft.gsqlparser.dlineage.dynamicsql.DynamicSqlLineageResolver.MaterializedSite). |
static DynamicSqlEdgeProof.Verdict |
prove(DynamicSqlLineageResolver.MaterializedSite site,
TCustomSqlStatement statement,
DynamicSqlEdgeProof.EdgeEvidence evidence,
BindingTraceRegistry traces,
EDbVendor vendor)
Prove one candidate edge against a materialized site.
|
public static DynamicSqlEdgeProof.Verdict prove(DynamicSqlLineageResolver.MaterializedSite site, TCustomSqlStatement statement, DynamicSqlEdgeProof.EdgeEvidence evidence, BindingTraceRegistry traces, EDbVendor vendor)
site - the materialized dynamic SQL, carrying fragment provenanceevidence - the edge's evidence set, from the parse of site.sqlTexttraces - binding traces from the resolver run over that parse;
null means no trace information ⇒ refusevendor - dialect, for the lexical boundary checkspublic static List<int[]> holeSpansOf(DynamicSqlLineageResolver.MaterializedSite site)
[start, end) of every non-literal fragment of site,
in fragment order — index-aligned with holesOf(gudusoft.gsqlparser.dlineage.dynamicsql.DynamicSqlLineageResolver.MaterializedSite). Empty when the site carries
no provenance, or when its fragments do not render its text (in which case the spans
would describe a DIFFERENT string and must not be used to locate anything).
A zero-length hole still yields a span: arbitrary text can be spliced at that point, so it bounds the stable region exactly like a non-empty one.
public static List<SqlFragment> holesOf(DynamicSqlLineageResolver.MaterializedSite site)