All Projects → rshariffdeen → CPR

rshariffdeen / CPR

Licence: MIT license
CPR: A new automated program repair technique based on concolic execution which works on patch abstraction with the sub-optimal goal of refining the patch to less over-fit the initial test cases.

Programming Languages

c
50402 projects - #5 most used programming language
shell
77523 projects
python
139335 projects - #7 most used programming language
Makefile
30231 projects
SMT
39 projects
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to CPR

logifix
Fixing static analysis violations in Java source code using Datalog
Stars: ✭ 17 (-22.73%)
Mutual labels:  program-repair
crete-dev
CRETE under development
Stars: ✭ 56 (+154.55%)
Mutual labels:  concolic-execution
kGenProg
A High-performance, High-extensibility and High-portability APR System
Stars: ✭ 47 (+113.64%)
Mutual labels:  program-repair
GenPat
This is an automated transformation inference tool that leverages a big code corpus to guide the abstraction of transformation patterns.
Stars: ✭ 19 (-13.64%)
Mutual labels:  program-repair
angelix
Semantic program repair system for C programs
Stars: ✭ 84 (+281.82%)
Mutual labels:  program-repair
MSR2021-ProgramRepair
Code of our paper Applying CodeBERT for Automated Program Repair of Java Simple Bugs which is accepted to MSR 2021.
Stars: ✭ 26 (+18.18%)
Mutual labels:  program-repair
BIFI
[ICML 2021] Break-It-Fix-It: Unsupervised Learning for Program Repair
Stars: ✭ 74 (+236.36%)
Mutual labels:  program-repair
crusher
No description or website provided.
Stars: ✭ 21 (-4.55%)
Mutual labels:  concolic-execution

Docker Pulls DOI

CPR - CardioPulmonary Resuscitation

CPR: A new automated program repair technique based on concolic execution which works on patch abstraction with the sub-optimal goal of refining the patch to less over-fit the initial test cases.

Automated program repair reduces the manual effort in fixing program errors. However, existing repair techniques modify a buggy program such that it passes given tests. Such repair techniques do not discriminate between correct patches and patches that overfit the available tests and break untested but desired functionality. We attempt to solve this problem with a novel solution that make use of the duality of space exploration in Input Space and Program Space. We implemented our technique in the form of a tool called CPR and evaluated its efficacy in reducing the patch space by discarding overfitting patches from a pool of plausible patches. Similar to Cardio-Pulmonary Resuscitation (CPR) does to a patient, our tool CPR resuscitate or recover programs via appropriate fixes.

In this work, we therefore propose and implement an integrated approach for detecting and discarding overfitting patches by exploiting the relationship between the patch space and input space. We leverage concolic path exploration to systematically traverse the input space (and generate inputs), while systematically ruling out significant parts of the patch space. Given a long enough time budget, this approach allows a significant reduction in the pool of patch candidates, as shown by our experiments.

CPR is a reconfigurable APR tool for C source-codes. CPR is:

  • Extensible: CPR is designed so that it can be easily extended to plug in any component to replace existing
  • Efficient: CPR utilize parallel computing to improve performance

Build and Dependencies

We provide a ready-made container which includes all necessary envrionment set-up to deploy and run our tool. Dependencies include:

  • LLVM 3.4
  • KLEE 1.4
  • Python 3.7
  • Z3 SMT Solver
  • MathSAT Solver
  • Docker

Build and run a container:

docker build -t cpr .
docker run --rm -ti cpr /bin/bash

Example

We provide several examples you can run to test our tool, all test cases are included in the 'tests' directory.

Run examples:

pypy3 CPR.py --conf=tests/bug-types/div-zero/div-zero-1/repair.conf
pypy3 CPR.py --conf=tests/bug-types/div-zero/div-zero-2/repair.conf

Documentation

Bugs

CPR should be considered alpha-quality software. Bugs can be reported here:

https://github.com/rshariffdeen/CPR/issues

Contributions

We welcome contributions to improve this work, see details

Developers

  • Ridwan Shariffdeen
  • Yannic Noller

Contributors

  • Sergey Mechtaev

Publication

Concolic Program Repair
Ridwan Shariffdeen, Yannic Noller, Lars Grunske, Abhik Roychoudhury
42nd ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 2021

Acknowledgements

This work was partially supported by the National Satellite of Excellence in Trustworthy Software Systems, funded by National Research Foundation (NRF) Singapore.

License

This project is licensed under the MIT License - see the LICENSE file for details

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].