Skip to main content

SFLKit: : A Workbench for Statistical Fault Localization

Project description

SFLKit: A Workbench for Statistical Fault Localization

Python Version GitHub release PyPI Build Status Coverage Status Licence Code style: black

SFLKit (https://dl.acm.org/doi/10.1145/3540250.3558915) is an out-of-the-box library and tool for statistical fault localization. Statistical fault localization aims at detecting execution features that correlate with failures, such as whether individual lines are part of the execution.

Language Support

SFLKit supports currently Python 3 but we plan on releasing further language support.

Installation

You need to navigate to the root directory of SFLKit and run

pip install sflkit

If you have a separate Python 2 and Python 3 on your machine you may need to run

pip3 install sflkit

Execution

To execute SFLKit you need to create a config file matching your needs.

Config

[target]
path=/path/to/the/subject
language=Python|C                       ; The programming language used

[events]
events=Event(,Event)*                   ; The events to investigate, overwritten by predicates.
predicates=Predicate(,Pridcate)*        ; The predicates to investigate, overwrites events.
metrics=Metric(,Metric)*                ; The metrics used for investigation
passing=/path(,path)*                   ; The event files of passing runs, if a dir is provided
                                        ; all files inside the tree will be treated as event files
failing=/path(,path)*                   ; The event files of failing runs, if a dir is provided
                                        ; all files inside the tree will be treated as event files

[instrumentation]
path=/path/to/the/instrumented/subject
exclude=file(,file)*                    ; Files to exclude from the instrumentation, should be a python re pattern

[test]
runner=TestRunner                       ; The testrunner class, None if no run needed

This is the specification of the config file.

Usage

The general usage of SFLKit is

usage: sflkit [-h] [--debug] -c CONFIG {instrumentation,analyze} ...

A workbench for statistical fault localization python programs and in the future other programs.

optional arguments:
  -h, --help            show this help message and exit
  --debug               the debug flag to activate debug information
  -c CONFIG, --config CONFIG
                        path to the config file

command:
  The framework allows for the execution of various commands.

  {instrumentation,analyze}
                        the command to execute
    instrumentation     execute the instrumentation of subject
    analyze             execute the analysis of the collected predicates

If you have adopted a config file for your investigations you need to execute

sflkit -c path/to/your/config instrument

to instrument the project defined by the file.

After the instrumentation, you can run your tests or experiments. But keep in mind to preserve the EVENTS_PATH file for each failing and passing run.

If you want to analyze your runs you need to execute

sflkit -c path/to/your/config analyze

which produces an output with the suggested code locations for the analysis objects and metrics defined in the config file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sflkit-0.2.4.tar.gz (41.4 kB view details)

Uploaded Source

Built Distribution

sflkit-0.2.4-py3-none-any.whl (38.8 kB view details)

Uploaded Python 3

File details

Details for the file sflkit-0.2.4.tar.gz.

File metadata

  • Download URL: sflkit-0.2.4.tar.gz
  • Upload date:
  • Size: 41.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for sflkit-0.2.4.tar.gz
Algorithm Hash digest
SHA256 d62d1b073b072c17ada213a01f89781cc3cd553b7a032176ac293d05269a2f68
MD5 18c6a938d7a39f3f86812bc5cdf2bd10
BLAKE2b-256 941f68ad6d2fbadd672c27fd79d13e9810eb6f8baa665743fc39d4eda7eddefe

See more details on using hashes here.

File details

Details for the file sflkit-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: sflkit-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 38.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for sflkit-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d1a76f30eaf286549389a24d2d6587e21999a716f3318508ad59acc1f77b0e8b
MD5 fb11f6b0957257eb45f13cba30fe7d28
BLAKE2b-256 5b92df9eb0976561d74432442cc82c20062e5bbc09792f7eb229adf620d669a9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page