Interface SampleExtractionResult<ProgramState>

Type Parameters

  • ProgramState


  • SampleExtractionResult


samples: EvaluationSample<ProgramState>[]

The samples successfully extracted from the provided nodes and trace.

In a successful evaluation, one sample will be produced for each state in trace with the exception of the last state (the evaluation result), which will be returned in unmatchedStates.

In an unsuccessful evaluation, the trace states will be exhausted before all nodes have been matched. In this case, all matched samples are returned, and the final state (the evaluation result) is dropped. This can be detected by checking if the length of unmatchedStates is 0.

unmatchedStates: ProgramState[]

If the provided nodes are exhausted before all states from trace have been matched, the remaining "unmatched" states are returned. This is useful for extracting samples for an evaluation involving two or more compilations.

In a successful evaluation, after samples have been extracted from each set of nodes, the final trace state (the evaluation result) will be returned in unmatchedStates.

Generated using TypeDoc