Analyze and persist producer-to-consumer value lineage #11

Closed
opened 2026-09-03 14:22:17 +00:00 by JayKobe6k · 0 comments
Owner

Goal

Construct ClariTree-owned semantic lineage from typed IR facts and persist it using explicit producer-to-consumer graph relationships.

Scope

  • Build and validate value-definition and value-use aggregates separately from symbols.
  • Compute intraprocedural reaching definitions across real control flow, including overwrites, branches, loops, merges, and uncertain/uninitialized cases.
  • Derive new definitions from operation input uses.
  • Add direct argument-to-parameter and return-to-call-result bindings.
  • Define conservative certainty and effects for aliases, address-taking/dereference, fields/arrays, external calls, variadics, and indirect calls.
  • Preserve enough source context and durable handles for every queryable definition/use.
  • Map each lineage node and relationship to explicit LadybugDB types; do not collapse relationships behind a string-valued kind.
  • Direct every lineage relationship from the producing value toward the consuming or derived value.

Acceptance criteria

  • Backend-independent unit fixtures cover initialization, assignment, reassignment, branch merge, loop-carried flow, calls, returns, pointers/aliases, fields, arrays, globals, and uncertain external effects.
  • Certainty is a closed enum and every variant is handled explicitly.
  • The lineage aggregate rejects missing endpoints, reversed relationships, cross-revision references, and invalid source anchors.
  • LadybugDB schema documentation, migration, adapter mapping, and round-trip tests ship in the same change as persisted lineage types.
  • A multi-TU integration fixture demonstrates interprocedural producer-to-consumer flow.

Dependencies

Depends on #5, #7, and #10.

## Goal Construct ClariTree-owned semantic lineage from typed IR facts and persist it using explicit producer-to-consumer graph relationships. ## Scope - Build and validate value-definition and value-use aggregates separately from symbols. - Compute intraprocedural reaching definitions across real control flow, including overwrites, branches, loops, merges, and uncertain/uninitialized cases. - Derive new definitions from operation input uses. - Add direct argument-to-parameter and return-to-call-result bindings. - Define conservative certainty and effects for aliases, address-taking/dereference, fields/arrays, external calls, variadics, and indirect calls. - Preserve enough source context and durable handles for every queryable definition/use. - Map each lineage node and relationship to explicit LadybugDB types; do not collapse relationships behind a string-valued kind. - Direct every lineage relationship from the producing value toward the consuming or derived value. ## Acceptance criteria - Backend-independent unit fixtures cover initialization, assignment, reassignment, branch merge, loop-carried flow, calls, returns, pointers/aliases, fields, arrays, globals, and uncertain external effects. - Certainty is a closed enum and every variant is handled explicitly. - The lineage aggregate rejects missing endpoints, reversed relationships, cross-revision references, and invalid source anchors. - LadybugDB schema documentation, migration, adapter mapping, and round-trip tests ship in the same change as persisted lineage types. - A multi-TU integration fixture demonstrates interprocedural producer-to-consumer flow. ## Dependencies Depends on #5, #7, and #10.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
JayKobe6k/ClariTree#11
No description provided.