Class SFQueryInfo
java.lang.Object
ghidra.features.bsim.query.facade.SFQueryInfo
A simple container object to hold information that is to be sent to a database server as
part of a query to find functions that are similar to those given in the constructor of this
class. For a list of configurable parameters, see the setter methods of this class.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The number of queries to make for the given set of functions. -
Constructor Summary
ConstructorsConstructorDescriptionSFQueryInfo
(Set<FunctionSymbol> functions) Constructs a query request with default parameters. -
Method Summary
Modifier and TypeMethodDescriptionReturns the input functions for which matches will be searched.int
The maximum number of similar functions to return for a given input function The default value is 100.int
getNumberOfStages
(int queries_per_stage) The number of queries to make for the given set of functions.double
Gets the threshold under which a potential similar function will not be matched.double
Gets the threshold under which a potential similar function will not be matched.void
setFunctions
(Set<FunctionSymbol> functions) Sets the input functions for which matches will be searched.void
setMaximumResults
(int maximumResults) void
setSignificanceThreshold
(double significanceThreshold) void
setSimilarityThreshold
(double similarityThreshold) toString()
-
Field Details
-
DEFAULT_QUERIES_PER_STAGE
public static final int DEFAULT_QUERIES_PER_STAGEThe number of queries to make for the given set of functions. For example, if 100 functions are submitted and the number of stages is 10, then 10 queries will be made to the server, with 10 functions per request.This defaults to 1, which means to send all functions in one query.
- See Also:
-
-
Constructor Details
-
SFQueryInfo
Constructs a query request with default parameters.- Parameters:
functions
- required--a set of functions (at least one) for which similar functions will searched. All functions must be from the same program.- Throws:
IllegalArgumentException
- if functions is null/empty or functions are from multiple programs.
-
-
Method Details
-
getProgram
- Returns:
- the program from which all queried functions are from
-
getSimilarityThreshold
public double getSimilarityThreshold()Gets the threshold under which a potential similar function will not be matched. This threshold is for how similar the potential function is. This is a value from 0.0 to 1.0. The default value is 0.7.- Returns:
- threshold under which a potential similar function will not be matched.
-
setSimilarityThreshold
public void setSimilarityThreshold(double similarityThreshold) - Parameters:
similarityThreshold
- the new threshold- See Also:
-
getSignificanceThreshold
public double getSignificanceThreshold()Gets the threshold under which a potential similar function will not be matched. This threshold is for how significant the match is (for example, smaller function matches are less significant). Higher is more significant. There is no upper bound. The default value is 0.0.- Returns:
- threshold under which a potential similar function will not be matched.
-
setSignificanceThreshold
public void setSignificanceThreshold(double significanceThreshold) - Parameters:
significanceThreshold
- the new threshold- See Also:
-
getMaximumResults
public int getMaximumResults()The maximum number of similar functions to return for a given input function The default value is 100.- Returns:
- The maximum number of similar functions to return
-
setMaximumResults
public void setMaximumResults(int maximumResults) - Parameters:
maximumResults
- the new maximum- See Also:
-
buildQueryNearest
-
getFunctions
Returns the input functions for which matches will be searched.- Returns:
- the input functions for which matches will be searched.
-
setFunctions
Sets the input functions for which matches will be searched.- Parameters:
functions
- the input functions for which matches will be searched.
-
getBsimFilter
-
getPreFilter
-
getFilterInfoStrings
-
getNumberOfStages
public int getNumberOfStages(int queries_per_stage) The number of queries to make for the given set of functions. For example, if 100 functions are submitted and the number of stages is 10, then 10 queries will be made to the server, with 10 functions per request.This defaults to 1, which means to send all functions in one query.
- Parameters:
queries_per_stage
- how many queries to initiate per stage- Returns:
- the number of queries to make for the given set of functions.
-
toString
-