Skip to content

Research: Fraunhofer CPG-inspired precision escalation and summary-aware soundness gates (bounded spike) #436

Open

Description

@PhysShell

Classification

Motivation

S5 ended at STOP-SOUNDNESS without demonstrated incremental yield over C01 on evaluated real projects. Adding a richer graph or stronger solver is not automatically progress. Fraunhofer CPG is worth inspecting for a different question: can Own.NET expose analysis precision and incompleteness as explicit, testable stages, while reusing existing OwnIR/MOS rather than building a CPG?

Relevant CPG prior art to inspect and reproduce precisely (do not assume it maps directly to resource semantics):

  1. Alternative DFG construction strategies: baseline DFGPass, ControlFlowSensitiveDFGPass, and PointsToPass. Examine their tradeoffs, contracts, and how a pass advertises actual precision/completeness. In CPG the more precise passes are alternatives, not a mandatory three-pass pipeline.
  2. External function DFG summaries: argument/receiver/return flows for opaque calls. Own.NET already has effects and summary work: the question is whether CPG reveals a missing boundary or invariant, not whether to invent another YAML model.
  3. MAY/MUST graph traversals, call-context/field sensitivity, bounded traversal: separate a possible graph path from a realizable execution, and a found witness from an exhaustive absence proof.
  4. Semantic overlays: separate original source/IR facts from interpreted resource events (Acquire, Borrow, Transfer, Escape, Release) if a minimal read-only projection actually adds value.
  5. Correctness cases to inspect: CPG PR #2850 (interprocedural path traversal/recursion), CPG PR #2934 (points-to state copy-on-write and fixed-point concerns), CPG issue #2926 (unknown array indices). Treat these as candidate test ideas, not evidence of Own.NET defects.

Boundary: CPG's DFG is not a .NET ownership/disposal proof, CPG's reported C# support must be qualified against actual buildable frontend coverage, and Neo4j/CPG storage is not needed for this research.

Research question / distinct scope

Can one concrete ownership case currently classified incorrectly or opaquely be improved by budgeted, explicit precision escalation (e.g. baseline fact propagation → targeted call/alias refinement), such that:

The spike should first inventory existing Own.NET representations and gates. If these properties are already covered, record evidence and close NO-GAP instead of proposing a second implementation.

Bounded experiment

  1. Select one adjudicated real Own.NET false positive/false negative, or if unavailable one targeted, independently reviewed adversarial fixture; preserve current baseline output and first divergence.
  2. Map one case through existing Roslyn/OwnIR, CFG/ICFG, resource identity, MOS/effect summaries, evidence and diagnostic verdict. Record unknown callees, alias ambiguities, truncation and chosen pass/budget.
  3. Inspect the CPG implementation/docs for the five mechanisms above and document exactly which invariant (if any) Own.NET lacks. Do not base the decision on a conceptual diagram alone.
  4. Prototype at most one narrow analysis-gate/provenance check or testing-only oracle on current infrastructure. Prefer tests to a new production analysis pass.
  5. Adversarial cases: aliasing, using/Dispose, transfer through wrapper, unknown external call, exception edge, recursive/interprocedural traversal, joined branches, and exhausted budget. Source-level semantic mutants (Research: semantic mutation testing harness for Own.NET analyzer coverage (bounded pilot) #405) and state/fixpoint checks (Research: IKOS-inspired abstract-state soundness oracle and operator audit (bounded spike) #433) should challenge any claim of safety.
  6. Compare baseline vs experiment on correctness (with adjudicated oracle), false-safe promotions, completeness reporting, diagnostic utility, runtime/memory and first divergence. Do not count more graph edges or warnings as a success.

Acceptance / terminal decisions

Non-goals

No CPG/Kotlin/JVM dependency in production, no C# frontend port, no Neo4j rollout, no generic graph/query engine, no replacement of OwnIR or Rust/Python core, no wholesale points-to/IFDS rewrite, no unvalidated safe promotions and no expanded detector scope by default.

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions