Experiment: GenerateBlameReport

Different experiments to generate blame reports.

Tip

If you want to run the same project + version multiple times via slurm you need to empty the $VARATS_ROOT/benchbuild/BC_files directory in between runs because the path to the git repository will change. See #494

Tip

To use interaction filters, we recommend storing all of them in a separate directory (e.g., $VARATS_ROOT/benchbuild/interaction_filters) with descriptive names and symlinking them to the place where the experiment expects them.

Module: BlameReportExperiment

Implements the basic blame report experiment.

The experiment analyses a project with VaRA’s blame analysis and generates a BlameReport.

class varats.experiments.vara.blame_report_experiment.BlameReportGeneration(project, experiment_handle, blame_taint_scope)[source]

Bases: ProjectStep

Analyse a project with VaRA and generate a BlameReport.

NAME = 'BlameReportGeneration'
DESCRIPTION = 'Analyses the bitcode with -vara-BR of VaRA.'
project: VProject
analyze()[source]

This step performs the actual analysis with the correct command line flags.

Return type:

StepResult

Flags used:
  • -vara-BR: to run a commit flow report

  • -yaml-report-outfile=<path>: specify the path to store the results

class varats.experiments.vara.blame_report_experiment.BlameReportExperiment(name=NOTHING, projects=NOTHING, id=NOTHING, schema=NOTHING, container=NOTHING)[source]

Bases: VersionExperiment

Generates a blame report of the project(s) specified in the call.

NAME: ClassVar[str] = 'GenerateBlameReport'
REPORT_SPEC: ReportSpecification = <varats.report.report.ReportSpecification object>
REQUIREMENTS: List[Requirement] = [SlurmMem(mem_req=268435456000)]
BLAME_TAINT_SCOPE = 2
actions_for_project(project)[source]

Returns the specified steps to run the project(s) specified in the call in a fixed order.

Parameters:

project (VProject) – to analyze

Return type:

MutableSequence[Step]

SHORTHAND: str = 'BRE'
class varats.experiments.vara.blame_report_experiment.BlameReportExperimentRegion(name=NOTHING, projects=NOTHING, id=NOTHING, schema=NOTHING, container=NOTHING)[source]

Bases: BlameReportExperiment

Generates a blame report with region scoped taints.

NAME: ClassVar[str] = 'GenerateBlameReportRegion'
BLAME_TAINT_SCOPE = 0
SHORTHAND: str = 'BRER'
class varats.experiments.vara.blame_report_experiment.BlameReportExperimentCommitInFunction(name=NOTHING, projects=NOTHING, id=NOTHING, schema=NOTHING, container=NOTHING)[source]

Bases: BlameReportExperiment

Generates a blame report with commit-in-function scoped taints.

NAME: ClassVar[str] = 'GenerateBlameReportCommitInFunction'
BLAME_TAINT_SCOPE = 1
SHORTHAND: str = 'BRECIF'

Module: BlameExperiment

Implements the base blame experiment, making it easier to create different blame experiments that have a similar experiment setup.

varats.experiments.vara.blame_experiment.setup_basic_blame_experiment(experiment, project, report_type)[source]

Setup the project for a blame experiment.

  • run time extensions

  • compile time extensions

  • prepare compiler

  • configure C/CXX flags

Return type:

None

varats.experiments.vara.blame_experiment.generate_basic_blame_experiment_actions(project, bc_file_extensions=None, extraction_error_handler=None)[source]

Generate the basic actions for a blame experiment.

  • handle caching of BC files

  • compile project, if needed

Parameters:
  • project (Project) – reference to the BB project

  • bc_file_extensions (Optional[List[BCFileExtensions]]) – list of bitcode file extensions (e.g. opt, no opt)

  • extraction_error_handler (Optional[PEErrorHandler]) – handler to manage errors during the extraction process

Return type:

List[Step]


Module: BlameServerExperiment

Implements blame experiment using a blame cache server.

The experiment starts the blame server, compiles with blame annotations and kills the server at the end.

class varats.experiments.vara.blame_server_experiment.CompileWithBlameServer(project, port)[source]

Bases: Compile

Start blame server before and kill server after compilation.

NAME = 'BlameServerSteps'
DESCRIPTION = 'Start server before and kill server after compilation.'
static find_open_port()[source]

Finds and returns an available port on the local machine.

Return type:

Any

class varats.experiments.vara.blame_server_experiment.BlameServerExperiment(name=NOTHING, projects=NOTHING, id=NOTHING, schema=NOTHING, container=NOTHING)[source]

Bases: VersionExperiment

Generate a blame annotation report using blame server.

NAME: ClassVar[str] = 'RunBlameServer'
REPORT_SPEC: ReportSpecification = <varats.report.report.ReportSpecification object>
actions_for_project(project)[source]

Returns the specified steps to run the project(s) specified in the call in a fixed order.

Parameters:

project (Project) – to analyze

Return type:

MutableSequence[Step]

SHORTHAND: str = 'BSE'