// Copyright (c) StellaOps. All rights reserved.
// Licensed under AGPL-3.0-or-later. See LICENSE in the project root.
namespace StellaOps.BinaryIndex.Semantic;
///
/// Service for generating semantic fingerprints from key-semantics graphs.
///
public interface ISemanticFingerprintGenerator
{
///
/// Generate a semantic fingerprint from a key-semantics graph.
///
/// The key-semantics graph.
/// Function start address.
/// Fingerprint generation options.
/// Cancellation token.
/// The generated semantic fingerprint.
Task GenerateAsync(
KeySemanticsGraph graph,
ulong address,
SemanticFingerprintOptions? options = null,
CancellationToken ct = default);
///
/// Generate a semantic fingerprint from a lifted function (convenience method).
///
/// The lifted function.
/// Graph extractor to use.
/// Fingerprint generation options.
/// Cancellation token.
/// The generated semantic fingerprint.
Task GenerateFromFunctionAsync(
LiftedFunction function,
ISemanticGraphExtractor graphExtractor,
SemanticFingerprintOptions? options = null,
CancellationToken ct = default);
///
/// Gets the algorithm used by this generator.
///
SemanticFingerprintAlgorithm Algorithm { get; }
}