Ghidra Decompiler Analysis Engine
Classes | Public Member Functions | List of all members
ScoreProtoModel Class Reference

Class for calculating "goodness of fit" of parameter trials against a prototype model. More...

#include <fspec.hh>

Public Member Functions

 ScoreProtoModel (bool isinput, const ProtoModel *mod, int4 numparam)
 Constructor. More...
 
void addParameter (const Address &addr, int4 sz)
 Register a trial to be scored. More...
 
void doScore (void)
 Compute the fitness score.
 

Detailed Description

Class for calculating "goodness of fit" of parameter trials against a prototype model.

The class is instantiated with a prototype model (ProtoModel). A set of Varnode parameter trials are registered by calling addParameter() for each trial. Then calling doScore() computes a score that evaluates how well the set of registered trials fit the prototype model. A lower score indicates a better fit.

Constructor & Destructor Documentation

◆ ScoreProtoModel()

ScoreProtoModel::ScoreProtoModel ( bool  isinput,
const ProtoModel mod,
int4  numparam 
)

Constructor.

Parameters
isinputis set to true to compute scores against the input part of the model
modis the prototype model to score against
numparamis the presumed number of trials that will constitute the score

Member Function Documentation

◆ addParameter()

void ScoreProtoModel::addParameter ( const Address addr,
int4  sz 
)

Register a trial to be scored.

Parameters
addris the starting address of the trial
szis the number of bytes in the trial

The documentation for this class was generated from the following files: