using System; using System.Collections.Generic; namespace StellaOps.Scanner.Reachability.Ordering; /// /// Canonical (deterministically ordered) graph representation. /// public sealed class CanonicalGraph { /// /// Ordering strategy used. /// public required GraphOrderingStrategy Strategy { get; init; } /// /// Deterministically ordered nodes. /// public required IReadOnlyList Nodes { get; init; } /// /// Deterministically ordered edges. /// public required IReadOnlyList Edges { get; init; } /// /// Content hash of canonical representation. /// public required string ContentHash { get; init; } /// /// Anchor nodes (entry points), if present. /// public IReadOnlyList? AnchorNodes { get; init; } /// /// Optional timestamp for diagnostics; excluded from . /// public DateTimeOffset? ComputedAt { get; init; } } public sealed class CanonicalNode { /// /// Position in ordered list (0-indexed). /// public required int Index { get; init; } /// /// Node identifier. /// public required string Id { get; init; } /// /// Node type (e.g. method, function). /// public required string NodeType { get; init; } /// /// Node label for UI display (optional). /// public string? Label { get; init; } } public sealed class CanonicalEdge { public required int SourceIndex { get; init; } public required int TargetIndex { get; init; } public required string EdgeType { get; init; } }