Package it.unive.lisa
Class LiSAConfiguration
- java.lang.Object
-
- it.unive.lisa.LiSAConfiguration
-
public class LiSAConfiguration extends java.lang.Object
A holder for the configuration of aLiSA
analysis.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LiSAConfiguration.GraphType
The type of graphs that can be dumped by LiSA.
-
Field Summary
Fields Modifier and Type Field Description it.unive.lisa.analysis.AbstractState<?,?,?,?>
abstractState
TheAbstractState
instance to run during the analysis.LiSAConfiguration.GraphType
analysisGraphs
Sets the format to use for dumping graph files, named<cfg signature>[optional numeric hash].<format>
, in the working directory at the end of the analysis.it.unive.lisa.interprocedural.callgraph.CallGraph
callGraph
TheCallGraph
instance to use during the analysis.static int
DEFAULT_WIDENING_THRESHOLD
The default number of fixpoint iteration on a given node after which calls toLattice.lub(Lattice)
gets replaced withLattice.widening(Lattice)
.java.lang.Class<?>
fixpointWorkingSet
The concrete class ofWorkingSet
to be used in fixpoints.it.unive.lisa.interprocedural.InterproceduralAnalysis<?,?,?,?>
interproceduralAnalysis
TheInterproceduralAnalysis
instance to use during the analysis.boolean
jsonOutput
Sets whether or not a json report file, namedreport.json
, should be created and dumped in the working directory at the end of the analysis.it.unive.lisa.interprocedural.OpenCallPolicy
openCallPolicy
TheOpenCallPolicy
to be used for computing the result ofOpenCall
s.java.util.Collection<it.unive.lisa.checks.semantic.SemanticCheck<?,?,?,?>>
semanticChecks
The collection ofSemanticCheck
s to execute.boolean
serializeInputs
Whether or not the inputsCFG
s to the analysis should be dumped in json format before the analysis starts.boolean
serializeResults
Whether or not the results of the analysis (if executed) should be dumped in json format.java.util.Collection<it.unive.lisa.checks.syntactic.SyntacticCheck>
syntacticChecks
The collection ofSyntacticCheck
s to execute.int
wideningThreshold
The number of fixpoint iteration on a given node after which calls toLattice.lub(Lattice)
gets replaced withLattice.widening(Lattice)
.java.lang.String
workdir
The working directory for this instance of LiSA, that is, the directory files will be created, if any (log files excluded, use the logging configuration for controlling where those are placed).
-
Constructor Summary
Constructors Constructor Description LiSAConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
int
hashCode()
java.lang.String
toString()
-
-
-
Field Detail
-
DEFAULT_WIDENING_THRESHOLD
public static final int DEFAULT_WIDENING_THRESHOLD
The default number of fixpoint iteration on a given node after which calls toLattice.lub(Lattice)
gets replaced withLattice.widening(Lattice)
.- See Also:
- Constant Field Values
-
syntacticChecks
public final java.util.Collection<it.unive.lisa.checks.syntactic.SyntacticCheck> syntacticChecks
The collection ofSyntacticCheck
s to execute. These checks will be immediately executed after LiSA is started, as they do not require any semantic information. Defaults to an empty set.
-
semanticChecks
public final java.util.Collection<it.unive.lisa.checks.semantic.SemanticCheck<?,?,?,?>> semanticChecks
The collection ofSemanticCheck
s to execute. These will be executed after the fixpoint iteration has been completed, and will be provided with the computed fixpoint results (customizable throughabstractState
) and theCallGraph
(that can be customized throughcallGraph
) that has been built. Defaults to an empty set.
-
callGraph
public it.unive.lisa.interprocedural.callgraph.CallGraph callGraph
TheCallGraph
instance to use during the analysis. Defaults tonull
. Setting this field is optional: if an analysis is to be executed (that is, ifabstractState
has been set), a defaultCallGraph
instance will be created throughLiSAFactory.getDefaultFor(Class, Object...)
in order to perform the analysis.
-
interproceduralAnalysis
public it.unive.lisa.interprocedural.InterproceduralAnalysis<?,?,?,?> interproceduralAnalysis
TheInterproceduralAnalysis
instance to use during the analysis. Defaults tonull
. Setting this field is optional: if an analysis is to be executed (that is, ifabstractState
has been set), a defaultInterproceduralAnalysis
instance will be created throughLiSAFactory.getDefaultFor(Class, Object...)
in order to perform the analysis.
-
abstractState
public it.unive.lisa.analysis.AbstractState<?,?,?,?> abstractState
TheAbstractState
instance to run during the analysis. This will be used as singleton to retrieve the top instances needed to boot up the analysis, and can thus be any lattice element. If no value is set for this field, no analysis will be executed. Defaults tonull
.
-
analysisGraphs
public LiSAConfiguration.GraphType analysisGraphs
Sets the format to use for dumping graph files, named<cfg signature>[optional numeric hash].<format>
, in the working directory at the end of the analysis. These files will contain a graph representing each inputCFG
s' structure, and whose nodes will contain a representation of the results of the semantic analysis on eachStatement
. To customize where the graphs should be generated, useworkdir
. Defaults toLiSAConfiguration.GraphType.NONE
(that is, no graphs will be dumped).
-
serializeInputs
public boolean serializeInputs
Whether or not the inputsCFG
s to the analysis should be dumped in json format before the analysis starts. Graph files are named<cfg signature>_cfg.json
, and are dumped in the path pointed to byworkdir
. IfanalysisGraphs
is not set toLiSAConfiguration.GraphType.NONE
, inputs will also be dumped using the format specified by that field. Defaults tofalse
.
-
serializeResults
public boolean serializeResults
Whether or not the results of the analysis (if executed) should be dumped in json format. Graph files are named<cfg signature>[optional numeric hash]json
, and are dumped in the path pointed to byworkdir
. IfanalysisGraphs
is not set toLiSAConfiguration.GraphType.NONE
, results will also be dumped using the format specified by that field. Defaults tofalse
.
-
jsonOutput
public boolean jsonOutput
Sets whether or not a json report file, namedreport.json
, should be created and dumped in the working directory at the end of the analysis. This file will contain all theWarning
s that have been generated, as well as a list of produced files. To customize where the report should be generated, useworkdir
. Defaults tofalse
.
-
workdir
public java.lang.String workdir
The working directory for this instance of LiSA, that is, the directory files will be created, if any (log files excluded, use the logging configuration for controlling where those are placed). The value of this field is passed to theFileManager
instance of the analysis. Defaults to the directory where LiSA was run from.
-
wideningThreshold
public int wideningThreshold
The number of fixpoint iteration on a given node after which calls toLattice.lub(Lattice)
gets replaced withLattice.widening(Lattice)
. Defaults toDEFAULT_WIDENING_THRESHOLD
.
-
fixpointWorkingSet
public java.lang.Class<?> fixpointWorkingSet
The concrete class ofWorkingSet
to be used in fixpoints. Defaults toFIFOWorkingSet
.
-
openCallPolicy
public it.unive.lisa.interprocedural.OpenCallPolicy openCallPolicy
TheOpenCallPolicy
to be used for computing the result ofOpenCall
s. Defaults toWorstCasePolicy
.
-
-