All the detectors return already a list of executed paths, so there is no need for SupportedOutput = Union[ExecutionPaths, List[ExecutionPaths]]. Removing this union generally simplifies the detector output manipulation
Create a base class Output with abc. ExecutionPaths inherits from it. Right now this is not useful for this PR, but it will allow us to create outputs type that don't rely on the notion of path (ex: if the bug just highlight a basic block). This also will make more clear what functions are needed to make an output, versus the functions that are just needed by this type of output (ex: paths might only be needed for ExecutionPaths)
Generally remove the properties in ExecutionPaths. Most of them were used only once, and internally, so this remove the code complexity
write_to_files returns now a bool, so that there is no need to access paths. write_to_files was actually also checking for len(paths)
SupportedOutput = Union[ExecutionPaths, List[ExecutionPaths]]
. Removing this union generally simplifies the detector output manipulationOutput
withabc
.ExecutionPaths
inherits from it. Right now this is not useful for this PR, but it will allow us to create outputs type that don't rely on the notion of path (ex: if the bug just highlight a basic block). This also will make more clear what functions are needed to make an output, versus the functions that are just needed by this type of output (ex:paths
might only be needed forExecutionPaths
)ExecutionPaths
. Most of them were used only once, and internally, so this remove the code complexitywrite_to_files
returns now a bool, so that there is no need to accesspaths
.write_to_files
was actually also checking forlen(paths)