Skip to content

Commit

Permalink
feat-fix: criteria resolve now only requires an idmap
Browse files Browse the repository at this point in the history
  • Loading branch information
EagleoutIce committed Aug 30, 2024
1 parent eaf41f6 commit f0d8a7a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cli/repl/commands/lineage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ function pushRelevantEdges(queue: [NodeId, DataflowGraphEdge][], outgoingEdges:
* @param dfg - The dataflow graph
* @returns The lineage of the node represented as a list of node ids
*/
export function getLineage(criterion: SingleSlicingCriterion, ast: NormalizedAst, dfg: DataflowInformation) {
const src = dfg.graph.get(slicingCriterionToId(criterion, ast))
export function getLineage(criterion: SingleSlicingCriterion, { idMap } : NormalizedAst, dfg: DataflowInformation) {
const src = dfg.graph.get(slicingCriterionToId(criterion, idMap))
guard(src !== undefined, 'The ID pointed to by the criterion does not exist in the dataflow graph')
const [vertex, outgoingEdges] = src
const result: Set<NodeId> = new Set([vertex.id])
Expand Down Expand Up @@ -76,4 +76,4 @@ export const getLineageCommand: ReplCommand = {
const lineageIds = getLineage(criterion as SingleSlicingCriterion, ast, dfg)
output.stdout([...lineageIds].join('\n'))
}
}
}

0 comments on commit f0d8a7a

Please sign in to comment.