Skip to content

Research: Doop/Soufflé-style relational points-to and alias analysis (bounded spike) #458

Open

Description

@PhysShell

Classification

Why study Doop?

Doop separates fact extraction from declarative, mutually recursive Datalog inference. Its rules derive VarPointsTo, heap-field relationships and call-graph edges, with multiple precision choices (context-insensitive, call-site/object/type sensitive). P/Taint extends the approach to information flow.

Potential transfer to Own.NET is the architecture and validation discipline, not the Java implementation:

  1. Make a small, explicit set of existing OwnIR object/alias/call facts inspectable and semantically testable.
  2. Evaluate whether relational closure can expose missed interprocedural aliases / dynamic-dispatch edges or provide an independent reference oracle.
  3. Measure whether more precise context separation changes ownership verdicts for the right reason.

Important distinctions: may-points-to is not ownership, escape, Dispose semantics or a path-sensitive lifecycle proof. A sound-looking relational closure can still operate on incomplete or incorrectly lowered inputs. Roslyn and the current Own.NET pipeline remain the authoritative C# frontend/baseline.

Bounded experiment (read-only first)

  1. Inventory current capability, with code references: what alias identity / fields / call facts / summaries / context sensitivity already exist in Roslyn→OwnIR→Rust? Check relevant Roslyn analysis utilities only as a candidate baseline; confirm accessibility and semantics rather than assuming a drop-in API.
  2. Extract 5–8 compact scenarios (positive and negative controls): direct alias; field store/load; parameter/return; virtual/interface dispatch; owning wrapper vs borrowed resource; transfer; duplicate/disjoint resource; opaque/reflection or missing-call edge. Include Dispose and may-alias cases where behavior differs.
  3. Build an isolated relational oracle, if useful, using exported tabular OwnIR facts and a minimal Datalog fragment (plain Soufflé CLI optional). No integration, new production engine or pipeline changes. Note that Doop itself cannot directly analyze C#.
  4. Differentially compare against current Own.NET output, manually established expected may-alias/call relations and ownership diagnostics. Classify TP/FP/FN, missing facts, context merges and unsupported semantics. Do not mistake larger may-points-to sets for better precision.
  5. Cost/complexity: record fact counts, compile/evaluation time, memory, rule complexity and the risk of incomplete closed-world assumptions. Confirm licensing if any code (rather than an idea) is reused.

Deliverables / decision gate

Guardrails

  • No promises of soundness from Doop/Soufflé by name; precisely track incomplete call graphs, reflection/DI/externals and library summaries.
  • Do not conflate reachability, may-alias, ownership, and proof of absence of resource defects.
  • Preserve existing tests, CI, issue priority and production architecture until a separately approved change.

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