Skip to main content

PyRep is a collection of automatic program repair approaches in and for Python.

Project description

FixKit

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

FixKit is a collection of various automated program repair approaches and techniques. It is designed to be a flexible and extensible framework for experimenting with different repair strategies. The framework is written in Python for Python and is designed to be easy to use and extend.

Installation

To install FixKit, simply get the package from PyPI:

pip install fixkit

To install the latest version from the repository, use:

pip install git+https://github.com/smythi93/fixkit.git

Usage

FixKit is a library and can be used directly in your Python code.

from fixkit.repair.pygenprog import PyGenProg
from fixkit.localization.coverage import CoverageLocalization

repair = PyGenProg.from_source(
  src= "subjects/middle",
  excludes=["tests.py"],
  localization=CoverageLocalization(
    "subjects/middle",
    cov="middle",
    metric="Ochiai",
    tests=["tests.py"],
  ),
  population_size=40,
  max_generations=10,
)
patches = repair.repair()

Components

Individual components can be swapped out and replaced with custom implementations. The following components are currently available:

  • Fault Localization: Determines the location of the fault in the source code.
  • Repair Approach: Generates patches to fix the fault in the source code.
  • Search Strategy: Searches for patches in the search space.
  • Fitness Function: Evaluates the fitness of patches based on a given metric.
  • Selection Strategy: Selects patches for the next generation based on their fitness.
  • Crossover Strategy: Combines patches to create new patches.
  • Mutation Operators: Mutates patches to create new patches.
  • Minimization Strategy: Minimizes patches to reduce their size.

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

fixkit-0.0.1.tar.gz (41.2 kB view details)

Uploaded Source

Built Distribution

fixkit-0.0.1-py3-none-any.whl (50.2 kB view details)

Uploaded Python 3

File details

Details for the file fixkit-0.0.1.tar.gz.

File metadata

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

File hashes

Hashes for fixkit-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1cdad83de5c1c692299529fd514b4a64a2bc71053a0c1a900e04d8625bcfc21d
MD5 e1ac481c2b358e674d048cd99ee5d430
BLAKE2b-256 97614bf2ab7fd33aa30545128f79e05d8c61ef1cc5ce973084a76a2aacde8230

See more details on using hashes here.

File details

Details for the file fixkit-0.0.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for fixkit-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a50c8c2e3c4b578521b202428a81be93cdfb8e0978b1e31524ec7816773ff6bf
MD5 1b2fe5537b1b141af4109bdc5ef5d9e3
BLAKE2b-256 2498a5337628a2512b3ed66d570159a3a63fb015735ed3c920868007821a051e

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