Class AnalysisFactCollector
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
factConversionFactWhat 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
errorVBErrorInfoThe 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
factOperatorFactWhat 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
factStatementFactWhat 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
isFullyAnalyzedboolWhether the code the facts are about was evaluated in full.