Table of Contents

Class AnalysisFactCollector

Namespace
RDCore.SDK.Semantics.Facts
Assembly
RDCore.SDK.dll

An IAnalysisObserver that keeps the facts it is told of, to hand them over as the RuntimeFacts of a procedure.

public sealed class AnalysisFactCollector : IAnalysisObserver
Inheritance
AnalysisFactCollector
Implements
Inherited Members

Remarks

A fact is kept once: an instruction that the evaluation arrives at again (a For loop's counter is evaluated by its opener and by its Next) states the same fact about the same code, and the same fact twice is not two facts.

Not thread-safe, like the analysis it observes.

Methods

OnConversion(ConversionFact)

A value was let-coerced (MS-VBAL 5.5.1.2).

public void OnConversion(ConversionFact fact)

Parameters

fact ConversionFact

What the conversion is, and what is known of it.

OnError(VBErrorInfo)

An instruction raised a run-time error that is the code's: it raises it whenever it runs.

public void OnError(VBErrorInfo error)

Parameters

error VBErrorInfo

The error, where the instruction raises it.

Remarks

👉 The error an evaluation raises for a value it only assumed is never one: the runtime semantics do not raise it. Nor is an internal error, which is a defect of the platform and not something the code does.

OnOperation(OperatorFact)

An operator was evaluated (MS-VBAL 5.6.9), or a member was accessed (MS-VBAL 5.6.12-14).

public void OnOperation(OperatorFact fact)

Parameters

fact OperatorFact

What the operation is, and what is known of it.

OnStatement(StatementFact)

A statement whose runtime semantics establish facts of their own was evaluated (MS-VBAL 5.4).

public void OnStatement(StatementFact fact)

Parameters

fact StatementFact

What the statement does, and what is known of it.

Take(bool)

The facts told of since the last time this was called, and forgets them.

public RuntimeFacts Take(bool isFullyAnalyzed)

Parameters

isFullyAnalyzed bool

Whether the code the facts are about was evaluated in full.

Returns

RuntimeFacts